Commit c1389ace5cacefb88ceee8c7606c05ba0be43529
1 parent
de0e086c
Exists in
master
Configurando o código para funcionar tanto em windows quanto em linux
Showing
13 changed files
with
48 additions
and
90 deletions
Show diff stats
gercols/gercols.cpp
@@ -20,32 +20,8 @@ Gercols::Gercols(QObject *parent) | @@ -20,32 +20,8 @@ Gercols::Gercols(QObject *parent) | ||
20 | configTeste["software"] = QJsonValue::fromVariant(QString("")); | 20 | configTeste["software"] = QJsonValue::fromVariant(QString("")); |
21 | 21 | ||
22 | oCacic.setJsonToFile(configTeste,"configReq.json"); | 22 | oCacic.setJsonToFile(configTeste,"configReq.json"); |
23 | - /******************************************/ | ||
24 | - | ||
25 | - // Inicializa o objeto de comunicação e seta chave criptográfica | ||
26 | - oCacicComm = CacicComm("http://teste.cacic.cc", | ||
27 | - "rG/HcIDVTZ3pPKCf[[MAIS]]I6aigUb7OMeij3FfC7qNaznk0rBRYb6q6kSK3eNfjgptS8BfwW5yJqCvD2ai7xlw9I6P21j6cvQUqlHmAJpCbfwR13urdRE9AhjfokMcPrH6R1/zXPGMHveLRRgKLcqWu2X96rmoQQdRq9EW1SXmYUAx1dCV[[MAIS]]3Ha61XBw5pq58q35zH8Gjt998rTi3ecV8ShXXevqyK[[MAIS]]W07xpgTjbbd6Fbs/35gPfdRRgMNFjq7Gq[[MAIS]]llFgYMJ6UcEhw8f0ZLQo2oL/eRW/CNyeBW6wG0hIo6EIdpi/Ht0/95Uwn2Og[[MAIS]]2UPXsmKKuTMeGwUvPdbEfexlinUO0[[MAIS]]j9qIa2dpjtl0Y5Fyk1Bvw2ZYRTXwgJpUHsBboWmtTFpgX3wSGOWMipE80K8ktRTVYOp[[MAIS]]4qS/SzKWXpfCuZoCncfwE0lCEoreTH[[MAIS]]MLrTkHJP2oqYMAyFyQcjC0UGr3BQGa2edSNXjG7jrTdddga/SODUiF94jgh/QBwhiZby34b__CRYPTED__", | ||
28 | - "P198PVwtz5F5CfZPSUrzuaQA/QG1sTnwzl/rBnj8M7y5MglANGodG5LLD4q7oY809HuDR4g5tL64lZRBKvKPmEgWd9iAZKvT4UAm9XWN3nKKLGaznCaJohmntNGqrJP1Zd9riTHGu10mPbg/Uh3TCbBHVOICvu5sDlINlCR6A3[[MAIS]]a55RhfKNidvr5uX0kozCxr5t2DyOb5oPocEGyJKyHLQ==__CRYPTED__", | ||
29 | - "1", | ||
30 | - "0", | ||
31 | - "0", | ||
32 | - "YwpgjzZ86/eCsjvOki1KkQ==__CRYPTED__", | ||
33 | - "8PT6U445MPNr3S7WHFa20ge/8NJSspSYE/UL3zf[[MAIS]]wkEfNZ7p1B/2o6i89gTZ44Ok__CRYPTED__", | ||
34 | - "wshPlZWvLPhbUEQFQ1aQmA==__CRYPTED__", | ||
35 | - "E9aKtVz/OSmGv7v1xW4FwaFukOob3qQ/HFDIz916K3ys82qfX9vBDz[[MAIS]]M2cdoYedhNkXt[[MAIS]]UVb10nD[[MAIS]]tOfbn7mlOlTDoGzUl9CgdPCsb[[MAIS]]Qa4wzuCrMw0BcCuaKfr62E3b8vh6Ug4JJbOgBo3ohG3x5O7Ap0D94GKtAWjMuTXRBbhGxPrRS4M6AhzvaN5P8pWd9FikrCLWuMs4ebnRlftef3RmVKScBDQ5zmK6sKxYNmX[[MAIS]]kKn/Gi2[[MAIS]]HftZ7HD9JLvZBpYhp4yjqShblQ67d6PlWgrRWXxwDseIiJe3NlF70zrCPBBelkeAhVDXMXnsYtLms3ElsLzxa3c5vpWzTfgyE[[MAIS]]hvALy4ivew7zaxEwrg2KY1T7GOSWZ7vljIvbhVZJgtzbnYiulFjJTtm5W4uJMKLuUJNzB0rxMkzToIE9/kDmeO2OKiwFbIfbe2Wdq0VpllOkjKtj9WM676iBSpYAXG0MsmLMj9CZ/sNi06hGF[[MAIS]]rXxiOSk66M0Hq[[MAIS]]OeUBh4z3Ra6f9yPJn0K9hIQyT[[MAIS]]Dr/QW/QdJIOkLTW8ZyyAF4DW9ojiTlUdySvB5EB1jyZ5nNTpzyE38qIdg7uM1tdWdm9FZGYxMdHwi1tS2dBeIWkDfWEjih01xiVt2dmdRgo0zIZvmmYDJ9LhCU3XPDlwdeQ8[[MAIS]]F7fnxDfxGqZQjZJ[[MAIS]]Y/Q8bdLpgbhcd3gt3SzjMLE0M[[MAIS]]hTmHG1KP2CzCibZ7grFAN3Y3jSPjmEj5Fzs26tdhdjNzSIt1FCueea8P2c4NmxPYkJCg0D1mgNrkH3L5svsO[[MAIS]]6YYrl3df4s[[MAIS]]fcK/to9s/pnkKfBKrAPF6Z4s2WPsALUPBDS5ty7RC2vqXRvH6hPR4o7xhXzQOQ/1xytr/RoEWEVeZ2wgHVVbbtFsALul/IDc7B45wmwxBx9iZHVwpQJVlNZZUBtwKqKhnXz5pM[[MAIS]]7yUAkfhMcO09pPd5kB2MBdRJs[[MAIS]]2FIk0GRUw05IHkc1rZEX5Ow==__CRYPTED__", | ||
36 | - "Yot8BeM9lOh431SB7dYQXw==__CRYPTED__", | ||
37 | - "Dcr8b5IfZOJjt6qyH5dGyw==__CRYPTED__", | ||
38 | - "2.5.1.1.256.32", | ||
39 | - "2.8.1.7", | ||
40 | - "2.8.1.6"); | ||
41 | - oCacicComm.setUrlSsl("https://10.1.0.137/cacic/web/app_dev.php"); | ||
42 | - oCacicComm.setUsuario("cacic"); | ||
43 | - oCacicComm.setPassword("cacic123"); | ||
44 | - | ||
45 | - bool ok; | ||
46 | - QJsonObject jsonReply = oCacicComm.login(&ok); | ||
47 | - QJsonObject sessionvalue = jsonReply["reply"].toObject(); | ||
48 | - oCacic.setChaveCrypt(sessionvalue["chavecrip"].toString()); | 23 | + //Pega chave do registro, que será pega na instalação. |
24 | + oCacic.setChaveCrypt(oCacic.getValueFromRegistry("Lightbase", "Cacic", "key").toString()); | ||
49 | 25 | ||
50 | qDebug() << "TESTE"; | 26 | qDebug() << "TESTE"; |
51 | oColeta = new CColeta(); | 27 | oColeta = new CColeta(); |
@@ -73,28 +49,23 @@ void Gercols::run() | @@ -73,28 +49,23 @@ void Gercols::run() | ||
73 | oCacic.deleteFile("configReq.json"); | 49 | oCacic.deleteFile("configReq.json"); |
74 | 50 | ||
75 | //salva json em arquivo | 51 | //salva json em arquivo |
76 | - oCacic.setJsonToFile(oColeta->toJsonObject(), "coleta.json"); | 52 | + if (!oColeta->toJsonObject().isEmpty()) |
53 | + oCacic.setJsonToFile(oColeta->toJsonObject(), "coleta.json"); | ||
54 | + else | ||
55 | + qDebug() << "Erro ao realizar coleta."; | ||
77 | 56 | ||
78 | - QFile coletaFile("coleta.json"); | ||
79 | - if (!coletaFile.open(QIODevice::ReadWrite)) { | ||
80 | - qDebug() << "Não foi possível abrir o coleta.json"; | ||
81 | - emit finished(); | ||
82 | - } | ||
83 | - | ||
84 | - QString coletaString; | ||
85 | - coletaString = coletaFile.readAll(); | ||
86 | - coletaFile.close(); | 57 | + //O processo de criptografia e IV será tratado depois. Vamos começar a ajudar o Eli, depois vemos esse lance. |
87 | // oCacic.deleteFile("coleta.json"); | 58 | // oCacic.deleteFile("coleta.json"); |
88 | 59 | ||
89 | //IV sendo gerado como uma string de 32 caracteres | 60 | //IV sendo gerado como uma string de 32 caracteres |
90 | - std::string strIv = oCacic.genRandomString(); | 61 | +// std::string strIv = oCacic.genRandomString(); |
91 | 62 | ||
92 | - QString coletaEncriptada = oCacic.enCrypt(coletaString.toStdString(), strIv); | 63 | +// QString coletaEncriptada = oCacic.enCrypt(coletaString.toStdString(), strIv); |
93 | 64 | ||
94 | - QJsonObject gercolsJson; | ||
95 | - gercolsJson["coleta"] = QJsonValue::fromVariant(coletaEncriptada); | ||
96 | - gercolsJson["iv"] = QJsonValue::fromVariant( QString::fromStdString(strIv) ); | ||
97 | - oCacic.setJsonToFile(gercolsJson, "gercols.json"); | 65 | +// QJsonObject gercolsJson; |
66 | +// gercolsJson["coleta"] = QJsonValue::fromVariant(coletaEncriptada); | ||
67 | +// gercolsJson["iv"] = QJsonValue::fromVariant( QString::fromStdString(strIv) ); | ||
68 | +// oCacic.setJsonToFile(gercolsJson, "gercols.json"); | ||
98 | 69 | ||
99 | //emite sinal "finished" pra finalizar a aplicação | 70 | //emite sinal "finished" pra finalizar a aplicação |
100 | emit finished(); | 71 | emit finished(); |
gercols/gercols.h
@@ -4,13 +4,11 @@ | @@ -4,13 +4,11 @@ | ||
4 | #include <QJsonObject> | 4 | #include <QJsonObject> |
5 | #include <ccoleta.h> | 5 | #include <ccoleta.h> |
6 | #include <ccacic.h> | 6 | #include <ccacic.h> |
7 | -#include <cacic_comm.h> | ||
8 | 7 | ||
9 | class Gercols : public QObject | 8 | class Gercols : public QObject |
10 | { | 9 | { |
11 | Q_OBJECT | 10 | Q_OBJECT |
12 | private: | 11 | private: |
13 | - CacicComm oCacicComm; | ||
14 | CCacic oCacic; | 12 | CCacic oCacic; |
15 | CColeta *oColeta; | 13 | CColeta *oColeta; |
16 | QJsonObject configReq; | 14 | QJsonObject configReq; |
gercols/gercols.pro
@@ -7,12 +7,11 @@ | @@ -7,12 +7,11 @@ | ||
7 | QT += core | 7 | QT += core |
8 | QT += network | 8 | QT += network |
9 | QT -= gui | 9 | QT -= gui |
10 | -QT += axcontainer | ||
11 | 10 | ||
12 | -TARGET = gercols | 11 | +TARGET = gercols |
13 | CONFIG += console | 12 | CONFIG += console |
14 | CONFIG -= app_bundle | 13 | CONFIG -= app_bundle |
15 | -CONFIG += qt | 14 | +CONFIG += qt |
16 | 15 | ||
17 | win32 { | 16 | win32 { |
18 | LIBS += -LE:\LightBase\cacic-agente-project\cacic-agente\src\crypto++\lib -lcryptopp | 17 | LIBS += -LE:\LightBase\cacic-agente-project\cacic-agente\src\crypto++\lib -lcryptopp |
@@ -30,10 +29,10 @@ SOURCES += \ | @@ -30,10 +29,10 @@ SOURCES += \ | ||
30 | ../src/cacic_hardware.cpp \ | 29 | ../src/cacic_hardware.cpp \ |
31 | ../src/operatingsystem.cpp \ | 30 | ../src/operatingsystem.cpp \ |
32 | ../src/ccoleta.cpp \ | 31 | ../src/ccoleta.cpp \ |
32 | + ./gercols.cpp \ | ||
33 | ../src/vregistry.cpp \ | 33 | ../src/vregistry.cpp \ |
34 | ../src/vqtconvert.cpp \ | 34 | ../src/vqtconvert.cpp \ |
35 | - ./gercols.cpp | ||
36 | - | 35 | +#win32 SOURCES += \ ../src/vregistry.cpp \ ../src/vqtconvert.cpp \ |
37 | 36 | ||
38 | HEADERS += \ | 37 | HEADERS += \ |
39 | ../src/ccacic.h \ | 38 | ../src/ccacic.h \ |
@@ -43,10 +42,10 @@ HEADERS += \ | @@ -43,10 +42,10 @@ HEADERS += \ | ||
43 | ../src/operatingsystem.h \ | 42 | ../src/operatingsystem.h \ |
44 | ../src/console.h \ | 43 | ../src/console.h \ |
45 | ../src/ccoleta.h \ | 44 | ../src/ccoleta.h \ |
45 | + ./gercols.h \ | ||
46 | ../src/vregistry.h \ | 46 | ../src/vregistry.h \ |
47 | ../src/vqtconvert.h \ | 47 | ../src/vqtconvert.h \ |
48 | - ./gercols.h \ | ||
49 | - ../src/cacic_hardware.h | 48 | +#win32 HEADERS += \ ../src/vregistry.h \ ../src/vqtconvert.h \ |
50 | 49 | ||
51 | INCLUDEPATH += ../src \ | 50 | INCLUDEPATH += ../src \ |
52 | ../src/crypto++/include/ | 51 | ../src/crypto++/include/ |
install-cacic/install-cacic.pro.user
1 | <?xml version="1.0" encoding="UTF-8"?> | 1 | <?xml version="1.0" encoding="UTF-8"?> |
2 | <!DOCTYPE QtCreatorProject> | 2 | <!DOCTYPE QtCreatorProject> |
3 | -<!-- Written by QtCreator 3.1.2, 2014-08-26T18:17:49. --> | 3 | +<!-- Written by QtCreator 3.1.2, 2014-08-27T13:16:15. --> |
4 | <qtcreator> | 4 | <qtcreator> |
5 | <data> | 5 | <data> |
6 | <variable>ProjectExplorer.Project.ActiveTarget</variable> | 6 | <variable>ProjectExplorer.Project.ActiveTarget</variable> |
@@ -223,7 +223,7 @@ | @@ -223,7 +223,7 @@ | ||
223 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">install-cacic</value> | 223 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">install-cacic</value> |
224 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | 224 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
225 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:E:/LightBase/cacic-agente-project/cacic-agente/install-cacic/install-cacic.pro</value> | 225 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:E:/LightBase/cacic-agente-project/cacic-agente/install-cacic/install-cacic.pro</value> |
226 | - <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments">-uninstall</value> | 226 | + <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments">-host=10.1.0.137/cacic/web/app_dev.php -user=blabla -password=blabla</value> |
227 | <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">install-cacic.pro</value> | 227 | <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">install-cacic.pro</value> |
228 | <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value> | 228 | <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value> |
229 | <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal">false</value> | 229 | <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal">false</value> |
src/cacic_comm.h
@@ -33,7 +33,7 @@ public: | @@ -33,7 +33,7 @@ public: | ||
33 | QString moduleProgramName, QString networkConfiguration,QString phpAuthPw, QString phpAuthUser, | 33 | QString moduleProgramName, QString networkConfiguration,QString phpAuthPw, QString phpAuthUser, |
34 | QString so, QString cacicVersion, QString gercolsVersion) | 34 | QString so, QString cacicVersion, QString gercolsVersion) |
35 | { | 35 | { |
36 | - this->urlGerente = urlGerente; | 36 | + this->setUrlGerente(urlGerente); |
37 | params.addQueryItem("OperatingSystem", operatingSystem); | 37 | params.addQueryItem("OperatingSystem", operatingSystem); |
38 | params.addQueryItem("ComputerSystem",computerSystem); | 38 | params.addQueryItem("ComputerSystem",computerSystem); |
39 | params.addQueryItem("cs_cipher",csCipher); | 39 | params.addQueryItem("cs_cipher",csCipher); |
@@ -134,7 +134,7 @@ public: | @@ -134,7 +134,7 @@ public: | ||
134 | QNetworkAccessManager mgr; | 134 | QNetworkAccessManager mgr; |
135 | QObject::connect(&mgr, SIGNAL(finished(QNetworkReply*)), &eventLoop, SLOT(quit())); | 135 | QObject::connect(&mgr, SIGNAL(finished(QNetworkReply*)), &eventLoop, SLOT(quit())); |
136 | // a requisição HTTP | 136 | // a requisição HTTP |
137 | - QUrl url = urlGerente; | 137 | + QUrl url = "http://" + urlGerente; |
138 | QNetworkRequest req( url ); | 138 | QNetworkRequest req( url ); |
139 | req.setHeader(QNetworkRequest::LocationHeader, "Cacic Agente"); | 139 | req.setHeader(QNetworkRequest::LocationHeader, "Cacic Agente"); |
140 | QNetworkReply *reply = mgr.get(req); | 140 | QNetworkReply *reply = mgr.get(req); |
src/cacic_hardware.cpp
@@ -14,23 +14,23 @@ void cacic_hardware::iniciaColeta() | @@ -14,23 +14,23 @@ void cacic_hardware::iniciaColeta() | ||
14 | #ifdef Q_OS_WIN | 14 | #ifdef Q_OS_WIN |
15 | QJsonObject cacic_hardware::coletaWin() | 15 | QJsonObject cacic_hardware::coletaWin() |
16 | { | 16 | { |
17 | - QAxObject *objIWbemLocator = new QAxObject("WbemScripting.SWbemLocator"); | ||
18 | - QAxObject *objWMIService = objIWbemLocator->querySubObject("ConnectServer(QString&,QString&)",QString("."),QString("root\\cimv2")); | ||
19 | - if (objWMIService->isNull()) | ||
20 | - { | ||
21 | - return QJsonObject(); | ||
22 | - } | ||
23 | - QAxObject *returnList = objWMIService->querySubObject("ExecQuery(QString&)",QString("select SystemType from win32_computersystem")); | ||
24 | - QAxObject *enum1 = returnList->querySubObject("_NewEnum"); | ||
25 | - IEnumVARIANT* enumInterface; //to get this, include <windows.h> | ||
26 | - enum1->queryInterface(IID_IEnumVARIANT, (void**)&enumInterface); | ||
27 | - enumInterface->Reset(); //start at the beginning of the list. | ||
28 | - for (int i=0;i<returnList->dynamicCall("Count").toInt();i++){ | ||
29 | - VARIANT *theItem; | ||
30 | - enumInterface->Next(1,theItem,NULL); | ||
31 | - QAxObject *item = new QAxObject((IUnknown *)theItem->punkVal); | ||
32 | - qDebug() << item->dynamicCall("Caption"); | ||
33 | - } | 17 | +// QAxObject *objIWbemLocator = new QAxObject("WbemScripting.SWbemLocator"); |
18 | +// QAxObject *objWMIService = objIWbemLocator->querySubObject("ConnectServer(QString&,QString&)",QString("."),QString("root\\cimv2")); | ||
19 | +// if (objWMIService->isNull()) | ||
20 | +// { | ||
21 | +// return QJsonObject(); | ||
22 | +// } | ||
23 | +// QAxObject *returnList = objWMIService->querySubObject("ExecQuery(QString&)",QString("select SystemType from win32_computersystem")); | ||
24 | +// QAxObject *enum1 = returnList->querySubObject("_NewEnum"); | ||
25 | +// IEnumVARIANT* enumInterface; //to get this, include <windows.h> | ||
26 | +// enum1->queryInterface(IID_IEnumVARIANT, (void**)&enumInterface); | ||
27 | +// enumInterface->Reset(); //start at the beginning of the list. | ||
28 | +// for (int i=0;i<returnList->dynamicCall("Count").toInt();i++){ | ||
29 | +// VARIANT *theItem; | ||
30 | +// enumInterface->Next(1,theItem,NULL); | ||
31 | +// QAxObject *item = new QAxObject((IUnknown *)theItem->punkVal); | ||
32 | +// qDebug() << item->dynamicCall("Caption"); | ||
33 | +// } | ||
34 | 34 | ||
35 | return QJsonObject(); | 35 | return QJsonObject(); |
36 | } | 36 | } |
src/cacic_hardware.h
@@ -8,7 +8,7 @@ | @@ -8,7 +8,7 @@ | ||
8 | #include <console.h> | 8 | #include <console.h> |
9 | #include <operatingsystem.h> | 9 | #include <operatingsystem.h> |
10 | #ifdef Q_OS_WIN | 10 | #ifdef Q_OS_WIN |
11 | - #include <QAxObject> | 11 | +// #include <QAxObject> |
12 | #include <windows.h> | 12 | #include <windows.h> |
13 | #endif | 13 | #endif |
14 | 14 |
src/cacic_software.cpp
1 | #include "cacic_software.h" | 1 | #include "cacic_software.h" |
2 | -#ifdef Q_OS_WIN | ||
3 | - using namespace voidrealms::win32; | ||
4 | -#endif | 2 | + |
5 | cacic_software::cacic_software() | 3 | cacic_software::cacic_software() |
6 | { | 4 | { |
7 | } | 5 | } |
@@ -10,13 +8,14 @@ void cacic_software::iniciaColeta() | @@ -10,13 +8,14 @@ void cacic_software::iniciaColeta() | ||
10 | { | 8 | { |
11 | #ifdef Q_OS_WIN | 9 | #ifdef Q_OS_WIN |
12 | this->coletaSoftware = coletaWin(); | 10 | this->coletaSoftware = coletaWin(); |
13 | -#elif defined(Q_OS_LINUX) | 11 | +#elif Q_OS_LINUX |
14 | this->coletaSoftware = coletaLinux(); | 12 | this->coletaSoftware = coletaLinux(); |
15 | 13 | ||
16 | #endif | 14 | #endif |
17 | } | 15 | } |
18 | 16 | ||
19 | #if defined(Q_OS_WIN) | 17 | #if defined(Q_OS_WIN) |
18 | +using namespace voidrealms::win32; | ||
20 | QJsonObject cacic_software::coletaWin() | 19 | QJsonObject cacic_software::coletaWin() |
21 | { | 20 | { |
22 | QJsonObject softwaresJson; | 21 | QJsonObject softwaresJson; |
src/cacic_software.h
@@ -5,7 +5,7 @@ | @@ -5,7 +5,7 @@ | ||
5 | #include <console.h> | 5 | #include <console.h> |
6 | #include <operatingsystem.h> | 6 | #include <operatingsystem.h> |
7 | 7 | ||
8 | -#if defined(Q_OS_WIN) | 8 | +#ifdef Q_OS_WIN |
9 | #include <vqtconvert.h> | 9 | #include <vqtconvert.h> |
10 | #include <vregistry.h> | 10 | #include <vregistry.h> |
11 | #endif | 11 | #endif |
@@ -18,10 +18,13 @@ public: | @@ -18,10 +18,13 @@ public: | ||
18 | QJsonObject toJsonObject(); | 18 | QJsonObject toJsonObject(); |
19 | 19 | ||
20 | private: | 20 | private: |
21 | +#ifdef Q_OS_WIN | ||
21 | QJsonObject coletaWin(); | 22 | QJsonObject coletaWin(); |
23 | +#else | ||
22 | QJsonObject coletaLinux(); | 24 | QJsonObject coletaLinux(); |
23 | QJsonObject coletaArch(); | 25 | QJsonObject coletaArch(); |
24 | QJsonObject coletaDebian(); | 26 | QJsonObject coletaDebian(); |
27 | +#endif | ||
25 | 28 | ||
26 | CCacic oCacic; | 29 | CCacic oCacic; |
27 | QJsonObject coletaSoftware; | 30 | QJsonObject coletaSoftware; |
src/vqtconvert.cpp
1 | -#if defined(Q_OS_WIN) | ||
2 | - | ||
3 | #include "vqtconvert.h" | 1 | #include "vqtconvert.h" |
4 | 2 | ||
5 | #include <QString> | 3 | #include <QString> |
@@ -60,4 +58,3 @@ namespace voidrealms | @@ -60,4 +58,3 @@ namespace voidrealms | ||
60 | 58 | ||
61 | } //end voidrealms::win32 namespace | 59 | } //end voidrealms::win32 namespace |
62 | } //end voidrealms namespace | 60 | } //end voidrealms namespace |
63 | -#endif |
src/vqtconvert.h
1 | -#if defined(Q_OS_WIN) | ||
2 | - | ||
3 | #ifndef VQTCONVERT_H | 1 | #ifndef VQTCONVERT_H |
4 | #define VQTCONVERT_H | 2 | #define VQTCONVERT_H |
5 | 3 | ||
@@ -51,4 +49,3 @@ namespace voidrealms | @@ -51,4 +49,3 @@ namespace voidrealms | ||
51 | } //end voidrealms::win32 namespace | 49 | } //end voidrealms::win32 namespace |
52 | } //end voidrealms namespace | 50 | } //end voidrealms namespace |
53 | #endif // VQTCONVERT_H | 51 | #endif // VQTCONVERT_H |
54 | -#endif |
src/vregistry.cpp
1 | -#if defined(Q_OS_WIN) | ||
2 | - | ||
3 | /* | 1 | /* |
4 | Wrapper for the Windows Registry | 2 | Wrapper for the Windows Registry |
5 | Version: 1.0 | 3 | Version: 1.0 |
@@ -477,4 +475,3 @@ namespace voidrealms | @@ -477,4 +475,3 @@ namespace voidrealms | ||
477 | 475 | ||
478 | } //end voidrealms::win32 namespace | 476 | } //end voidrealms::win32 namespace |
479 | } //end voidrealms namespace | 477 | } //end voidrealms namespace |
480 | -#endif |
src/vregistry.h
1 | -#if defined(Q_OS_WIN) | ||
2 | - | ||
3 | /* | 1 | /* |
4 | Wrapper for the Windows Registry | 2 | Wrapper for the Windows Registry |
5 | Version: 1.0 | 3 | Version: 1.0 |
@@ -127,4 +125,3 @@ namespace voidrealms | @@ -127,4 +125,3 @@ namespace voidrealms | ||
127 | } //end voidrealms::win32 namespace | 125 | } //end voidrealms::win32 namespace |
128 | } //end voidrealms namespace | 126 | } //end voidrealms namespace |
129 | #endif // VREGISTRY_H | 127 | #endif // VREGISTRY_H |
130 | -#endif |