diff --git a/cacic-teste/cacic-teste.pro b/cacic-teste/cacic-teste.pro index 1854f4c..4a453a2 100644 --- a/cacic-teste/cacic-teste.pro +++ b/cacic-teste/cacic-teste.pro @@ -9,7 +9,6 @@ QT += network TARGET = cacic-teste CONFIG -= app_bundle -LIBS += -L/usr/lib -lcryptopp TEMPLATE = app diff --git a/cacic-teste/testcacic.cpp b/cacic-teste/testcacic.cpp index 4c92be5..73b1159 100644 --- a/cacic-teste/testcacic.cpp +++ b/cacic-teste/testcacic.cpp @@ -91,3 +91,7 @@ void CTestCacic::testpegarIPInterfaceDeRede(){ void CTestCacic::testpegarMACInterfaceDeRede(){ QVERIFY(OCacicComp.pegarMACInterfaceDeRede() == "E0:3F:49:E4:70:12"); } + +void CTestCacic::testpegarOS(){ + QVERIFY(OCacicComp.pegarOS() == "linux"); +} diff --git a/cacic-teste/testcacic.h b/cacic-teste/testcacic.h index b81d0e0..8cd5fed 100644 --- a/cacic-teste/testcacic.h +++ b/cacic-teste/testcacic.h @@ -40,6 +40,7 @@ private slots: void testDeleteFile(); void testpegarIPInterfaceDeRede(); void testpegarMACInterfaceDeRede(); + void testpegarOS(); }; #endif // TESTINSTALLCACIC_H diff --git a/src/cacic_computer.cpp b/src/cacic_computer.cpp index d823d10..c065bfe 100644 --- a/src/cacic_computer.cpp +++ b/src/cacic_computer.cpp @@ -31,7 +31,7 @@ std::string CACIC_Computer::pegarIPInterfaceDeRede() { break; } } - return result.at(0).toString().toStdString() ; + return result.at(0).toString().toStdString(); } @@ -43,4 +43,16 @@ std::string CACIC_Computer::pegarMACInterfaceDeRede(){ break; } } + return "ERROR MAC"; +} + +std::string CACIC_Computer::pegarOS(){ + QString text; + qint32 x=0; + //QStringList environment = QProcessEnvironment::systemEnvironment().toStringList(); + QStringList environment = QProcess::systemEnvironment(); +// foreach (text, environment) { +// qDebug() << x << sear; +// x++; +// } } diff --git a/src/cacic_computer.h b/src/cacic_computer.h index 0d03f79..64e05ed 100644 --- a/src/cacic_computer.h +++ b/src/cacic_computer.h @@ -15,6 +15,7 @@ public: explicit CACIC_Computer(QObject *parent = 0); std::string pegarIPInterfaceDeRede(); std::string pegarMACInterfaceDeRede(); + std::string pegarOS(); void setIp(const std::string &value); void setMac(const std::string &value); void setOs(const std::string &value); diff --git a/src/ccacic.h b/src/ccacic.h index 0b3f7ef..4e2f767 100644 --- a/src/ccacic.h +++ b/src/ccacic.h @@ -15,7 +15,6 @@ #include #include #include -#include "crypt/aes.h" class CCacic : public QObject { -- libgit2 0.21.2