Commit f3ac9b084f711e2eb414e3bacf18cbf38559faa5

Authored by Eric Menezes Noronha
1 parent 9989db7c
Exists in master

merge

cacic-teste/testcacic.cpp
@@ -182,6 +182,7 @@ void CTestCacic::testStartService() @@ -182,6 +182,7 @@ void CTestCacic::testStartService()
182 QString exitStatus; 182 QString exitStatus;
183 #ifdef Q_OS_WIN 183 #ifdef Q_OS_WIN
184 exitStatus = OCacic.startProcess("../../install-cacic/debug/install-cacic.exe", true, &ok); 184 exitStatus = OCacic.startProcess("../../install-cacic/debug/install-cacic.exe", true, &ok);
  185 + qDebug() << exitStatus;
185 #else 186 #else
186 exitStatus = OCacic.startProcess("../../install-cacic/debug/install-cacic", true, &ok); 187 exitStatus = OCacic.startProcess("../../install-cacic/debug/install-cacic", true, &ok);
187 #endif 188 #endif
src/cacic_comm.h
@@ -62,7 +62,7 @@ public: @@ -62,7 +62,7 @@ public:
62 if (isSsl){ 62 if (isSsl){
63 url = urlSsl.isEmpty() ? "https://" + this->urlGerente + route : this->urlSsl + route; 63 url = urlSsl.isEmpty() ? "https://" + this->urlGerente + route : this->urlSsl + route;
64 if (!url.isValid()){ 64 if (!url.isValid()){
65 - jsonObj["error"] = QVariant("Invalid Url"); 65 + jsonObj["error"] = QJsonValue::fromVariant(QVariant("Invalid Url"));
66 return jsonObj; 66 return jsonObj;
67 } 67 }
68 req.setSslConfiguration(QSslConfiguration::defaultConfiguration()); 68 req.setSslConfiguration(QSslConfiguration::defaultConfiguration());
@@ -66,6 +66,7 @@ QJsonValue wmi::wmiSearch(QString classe, QStringList params) @@ -66,6 +66,7 @@ QJsonValue wmi::wmiSearch(QString classe, QStringList params)
66 valueList.remove("{"); 66 valueList.remove("{");
67 if (valueList.contains("}")) 67 if (valueList.contains("}"))
68 valueList.remove("}"); 68 valueList.remove("}");
  69 + if (!valueList.trimmed().isEmpty())
69 jList.append(valueList.trimmed()); 70 jList.append(valueList.trimmed());
70 } 71 }
71 itemWmi[tag] = jList; 72 itemWmi[tag] = jList;
@@ -73,7 +74,8 @@ QJsonValue wmi::wmiSearch(QString classe, QStringList params) @@ -73,7 +74,8 @@ QJsonValue wmi::wmiSearch(QString classe, QStringList params)
73 //O último valor sempre volta com "}" no final. 74 //O último valor sempre volta com "}" no final.
74 if (aux.contains("}")) 75 if (aux.contains("}"))
75 aux.remove("}"); 76 aux.remove("}");
76 - itemWmi[tag] = QJsonValue::fromVariant(aux.trimmed()); 77 + if (!aux.trimmed().isEmpty())
  78 + itemWmi[tag] = QJsonValue::fromVariant(aux.trimmed());
77 } 79 }
78 } 80 }
79 } // foreach(QString value, instanceList) 81 } // foreach(QString value, instanceList)