Browse Source

change some code for compile with Release version, the run error main is have return set, but not return.

yuchuli 9 months ago
parent
commit
ed5e459440

+ 3 - 0
src/driver/driver_map_xodrload/main.cpp

@@ -196,6 +196,9 @@ bool LoadXODR(std::string strpath)
     std::cout<<" road name is "<<proad1->GetRoadName()<<std::endl;
 
     gsrx.SetXODR(&mxodr);
+
+    return true;
+
 }
 
 class roadx

+ 1 - 1
src/tool/IVSysMan/IVSysMan.pro

@@ -12,7 +12,7 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
 TARGET = IVSysMan
 TEMPLATE = app
 
-QMAKE_CXXFLAGS +=  -g
+#QMAKE_CXXFLAGS +=  -g
 
 # The following define makes your compiler emit warnings if you use
 # any feature of Qt which has been marked as deprecated (the exact warnings

+ 6 - 0
src/tool/IVSysMan/main.cpp

@@ -42,6 +42,8 @@ int main(int argc, char *argv[])
 {
     QApplication a(argc, argv);
 
+    qDebug("run hear.");
+
 #ifdef  USE_ONEIVSYSMAN
 
     QSharedMemory shareMem("IVSysMan_Count");
@@ -85,6 +87,8 @@ int main(int argc, char *argv[])
         return 0;
     }
 
+
+
     void * ponethread = new std::thread(threadOne,&shareMem,ncount);
     (void *)ponethread;
 
@@ -112,10 +116,12 @@ int main(int argc, char *argv[])
         locateInfoPath = "./locateInfo.xml";
     }
 
+
     ivlog->debug("gstrxmlpath 启动配置文件路径:%s", gstrxmlpath.c_str());
     ivlog->debug("resManager.xml path: %s", carStatePath.c_str());
     ivlog->debug("resManager.xml path: %s", locateInfoPath.c_str());
 
+
     MainWindow w;
     w.show();
 

+ 15 - 5
src/tool/IVSysMan/progmon.cpp

@@ -93,7 +93,7 @@ std::vector<ProgUnit> ProgMon::loadprogunit(std::string path)
     std::vector<ProgUnit> xvectorprog;
     QDomDocument doc;
 
-    qDebug()<<"path: "<<path.data()<<endl;
+    qDebug()<<"path: "<<path.data();
     QFile file(path.data());
     if (!file.open(QIODevice::ReadOnly))
         return xvectorprog;
@@ -114,6 +114,7 @@ std::vector<ProgUnit> ProgMon::loadprogunit(std::string path)
         std::string name = e.nodeName().toStdString();
         if(name == "setting")
         {
+            QString str1 = e.attribute("defaultpath","./");
             defdir = e.attribute("defaultpath","./").toStdString();
             break;
         }
@@ -176,6 +177,8 @@ std::vector<ProgUnit> ProgMon::loadprogunit(std::string path)
 
          n = n.nextSibling();
     }
+
+    return xvectorprog;
 }
 
 void ProgMon::updatexml(std::string path)
@@ -193,6 +196,7 @@ void ProgMon::updatexml(std::string path)
         bool bNew = true;
         nsize = mvectorprog.size();
         int noldpos = -1;
+        (void)noldpos;
         for(j=0;j<nsize;j++)
         {
             if(strncmp(mvectorprog[j].strcmd.data(),pnewPU->strcmd.data(),255) == 0)
@@ -216,7 +220,7 @@ void ProgMon::updatexml(std::string path)
 
     //Stop And Delete new xml not have item.
     nsize = mvectorprog.size();
-    for(i=0;i<mvectorprog.size();i++)
+    for(i=0;i<static_cast<int>(mvectorprog.size()) ;i++)
     {
         int j;
         bool bNewHave = false;
@@ -257,7 +261,8 @@ void ProgMon::onProcessStarted()
         {
             mvectorprog.at(i).mbRun = true;
 #ifdef IV_OS_UNIX
-            mvectorprog.at(i).mpid = proc->pid();
+            mvectorprog.at(i).mpid = proc->processId();
+//            mvectorprog.at(i).mpid = proc->pid();
 #endif
 #ifdef IV_OS_WIN
 
@@ -415,6 +420,7 @@ void ProgMon::onChRead()
     QByteArray ba = proc->readAll();
 
     int ncha = proc->currentWriteChannel();
+    (void)ncha;
 
     if(proc->currentWriteChannel() == 1)
     {
@@ -638,7 +644,8 @@ bool ProgMon::checkStartState(ProgUnit *pu){
 
     unsigned int npid;
 #ifdef IV_OS_UNIX
-    npid =  pu->mProcess->pid();
+    npid = pu->mProcess->processId();
+//    npid =  pu->mProcess->pid();
 #endif
 
 #ifdef IV_OS_WIN
@@ -674,7 +681,7 @@ void ProgMon::run()
         nLastUpdate = nNow;
         int i;
 
-        for(i=0;i<mvectorprog.size();i++)
+        for(i=0;i<static_cast<int>(mvectorprog.size()) ;i++)
         {
             mMutex.lock();
             mvectorprog[i].UpdateResState();
@@ -1049,6 +1056,8 @@ void ProgMon::UpdateCPUMemStat()
 {
     return;
     static qint64 nLastCPUTotal,nLastIdleTotal;
+    (void)nLastCPUTotal;
+    (void)nLastIdleTotal;
     static std::vector<qint64> nVectorLastCPU;
     static std::vector<qint64> nVectorLastIdle;
 
@@ -1059,6 +1068,7 @@ void ProgMon::UpdateCPUMemStat()
         QByteArray ba = xFileStat.readAll();
         QList<QByteArray> xlist = ba.split('\n');
         int nsize = xlist.size();
+        (void)nsize;
     }
     xFileStat.close();
 

+ 1 - 0
src/tool/simple_planning_simulator/main.cpp

@@ -11,6 +11,7 @@ int main(int argc, char *argv[])
     QApplication a(argc, argv);
     MainWindow w;
     w.show();
+//    return a.exec();
     ADCLicenseServ adclicense;
     int checklicense=adclicense.CheckLincese();
     if (checklicense==1)

+ 11 - 7
src/ui/ui_ads_hmi/ui_ads_hmi.pro

@@ -80,14 +80,18 @@ unix:!macx: DEPENDPATH += $$PWD/.
     error( "Couldn't find the ivboost.pri file!" )
 }
 
-if(contains(DEFINES,SYSTEM_AGX)){
 
-LIBS += -lQt5WebEngine -lQt5WebEngineWidgets
-}
-else
-{
-QT       +=  webenginewidgets
-}
+INCLUDEPATH += /home/nvidia/code/modularization/thirdpartylib/include/include
+LIBS +=  -lQt5WebEngineWidgets
+
+#if(contains(DEFINES,SYSTEM_AGX)){
+
+#LIBS += -lQt5WebEngine -lQt5WebEngineWidgets
+#}
+#else
+#{
+#QT       +=  webenginewidgets
+#}
 
 #win32: LIBS += D:/boost/stage/lib/libboost_thread-vc140-mt-gd-x64-1_68.lib D:/boost/stage/lib/libboost_system-vc140-mt-gd-x64-1_68.lib \
 #D:/boost/stage/lib/libboost_date_time-vc140-mt-gd-x64-1_68.lib D:/boost/stage/lib/libboost_chrono-vc140-mt-gd-x64-1_68.lib  \