|
@@ -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();
|
|
|
|