Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register
  • Index
  • » Users
  • » conconga
  • » Profile

Posts

Posts

Aug-30-13 18:52:38
is this patch correct to compile revision 16951 with debian wheezy?
Category: Developer

Done. Thanks.

Aug-30-13 18:24:16
is this patch correct to compile revision 16951 with debian wheezy?
Category: Developer

Hi all,

I updated source code to revision 16951, and managed to compile it after some corrections. The patch is attached. Would you please review it? One bug is a function with incorrect number of arguments, and I chose one! current/yikes)

One of the compilation error was:

g++ -c -pipe -O2 -w -fPIC -D_REENTRANT -DQT_WEBKIT -DQT_NO_DEBUG -DQT_XML_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtXml -I/usr/include/qt4 -Irelease/generatedfiles/ui -I/usr/include/qwt-qt4 -I. -I.. -I../GUI -I../GUI/Widgets -I../GUI/Tools -I../GUI/Dialogs -I../Units -I../Tools -I../Infos -I../FileData -I../Problems -Irelease/generatedfiles/moc -Irelease/generatedfiles/ui -o release/generatedfiles/Variables.o ../Variables.cpp
In file included from ../MOVector.h:169:0,
                 from ../Variables.h:4,
                 from ../Variables.cpp:1:
../MOVector.cpp: In instantiation of ‘bool MOVector<ItemClass>::dropMimeData(const QMimeData*, Qt::DropAction, int, int, const QModelIndex&) [with ItemClass = ScannedVariable]’:
../Variables.cpp:164:1:   required from here
../MOVector.cpp:741:13: error: ‘insertItem’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
../MOVector.cpp:741:13: note: declarations in dependent base ‘MOAVector<ScannedVariable>’ are not found by unqualified lookup
../MOVector.cpp:741:13: note: use ‘this->insertItem’ instead



Attachment did not work. here is the patch:
Index: OMOptimBasis/MOVector.cpp
===================================================================
--- OMOptimBasis/MOVector.cpp    (Revision 16951)
+++ OMOptimBasis/MOVector.cpp    (Arbeitskopie)
@@ -674,7 +674,7 @@
         if( !domItem.isNull() )
         {
             newItem = new ItemClass(domItem);
-            addItem(newItem);
+            this->addItem(newItem);
         }
         n = n.nextSibling();
     }
@@ -705,7 +705,7 @@
     :MOAVector<ItemClass>(owner)
{
     setItems(domList);
-    connect(this,SIGNAL(dataChanged(QModelIndex,QModelIndex)),this,SIGNAL(modified()));
+    this->connect(this,SIGNAL(dataChanged(QModelIndex,QModelIndex)),this,SIGNAL(modified()));
}


@@ -738,7 +738,7 @@
         qDebug(QString("droped vector size :"+QString::number(dropedVector.size())).toLatin1().data());
         for(int i=0;i<dropedVector.size();i++)
         {
-            somethingDone = insertItem(dropedVector.at(i),row) || somethingDone;
+            somethingDone = this->insertItem(dropedVector.at(i),row) || somethingDone;
         }
     }
     return somethingDone;
Index: OMOptim/Core/Optim/EA/SA1/SA1explorer.h
===================================================================
--- OMOptim/Core/Optim/EA/SA1/SA1explorer.h    (Revision 16951)
+++ OMOptim/Core/Optim/EA/SA1/SA1explorer.h    (Arbeitskopie)
@@ -68,7 +68,7 @@
      * @param _solution unused solution
      */
     virtual void updateParam(EOT & _solution) {
-        coolingSchedule.update(temperature);
+        coolingSchedule.update(temperature, true);
     };

     /**


Thanks!

  • Index
  • » Users
  • » conconga
  • » Profile
You are here: