Commit 9f6a985d4e705ea9c9607ac593f7d75297cddde0

Authored by Thiago Rocha
1 parent 0e8988e8
Exists in master

Alteradas diretivas de pré-compilação para rodar em linux.

src/cacic_hardware.cpp
... ... @@ -48,7 +48,7 @@ QJsonObject cacic_hardware::coletaWin()
48 48 }
49 49 return QJsonObject();
50 50 }
51   -#elif Q_OS_LINUX
  51 +#elif defined(Q_OS_LINUX)
52 52 QJsonObject cacic_hardware::coletaLinux()
53 53 {
54 54  
... ...
src/cacic_hardware.h
... ... @@ -22,7 +22,12 @@ public:
22 22 private:
23 23 #ifdef Q_OS_WIN
24 24 QJsonObject coletaWin();
25   -#elif Q_OS_LINUX
  25 +
  26 +#elif defined(Q_OS_LINUX)
  27 +/* Thiago aqui:
  28 + * Ao menos nos elif's tem que deixar com o "defined()".
  29 + * Por isso antes eu preferia deixar todas essas verificações com ele, mesmo tendo o ifdef.
  30 + */
26 31 QJsonObject coletaLinux();
27 32 void coletaLinuxMem(QJsonObject &hardware, const QJsonObject &component);
28 33 void coletaLinuxCpu(QJsonObject &hardware, const QJsonObject &component);
... ...
src/cacic_software.cpp
... ... @@ -8,7 +8,7 @@ void cacic_software::iniciaColeta()
8 8 {
9 9 #ifdef Q_OS_WIN
10 10 this->coletaSoftware = coletaWin();
11   -#elif Q_OS_LINUX
  11 +#elif defined(Q_OS_LINUX)
12 12 this->coletaSoftware = coletaLinux();
13 13  
14 14 #endif
... ...
src/vqtconvert.cpp
  1 +#if defined(Q_OS_WIN)
  2 +
1 3 #include "vqtconvert.h"
2 4  
3 5 #include <QString>
... ... @@ -58,3 +60,4 @@ namespace voidrealms
58 60  
59 61 } //end voidrealms::win32 namespace
60 62 } //end voidrealms namespace
  63 +#endif //defined(Q_OS_WIN)
... ...
src/vqtconvert.h
1   -#ifndef VQTCONVERT_H
2   -#define VQTCONVERT_H
3   -
4 1 /*
5 2 Converts between QT types and Windows Types
6 3 Version: 1.0
... ... @@ -10,6 +7,11 @@ Tested on: Windows XP SP3
10 7 Bryan Cairns - August 2009
11 8 */
12 9  
  10 +#if defined(Q_OS_WIN)
  11 +
  12 +#ifndef VQTCONVERT_H
  13 +#define VQTCONVERT_H
  14 +
13 15 #include <QString>
14 16 #include "windows.h"
15 17  
... ... @@ -49,3 +51,4 @@ namespace voidrealms
49 51 } //end voidrealms::win32 namespace
50 52 } //end voidrealms namespace
51 53 #endif // VQTCONVERT_H
  54 +#endif // defined(Q_OS_WIN)
... ...
src/vregistry.cpp
... ... @@ -7,6 +7,8 @@ Tested on: Windows XP SP3
7 7 Bryan Cairns
8 8 */
9 9  
  10 +#if defined(Q_OS_WIN)
  11 +
10 12 #include "vregistry.h"
11 13 #include "windows.h"
12 14 #include "VQTConvert.h"
... ... @@ -475,3 +477,5 @@ namespace voidrealms
475 477  
476 478 } //end voidrealms::win32 namespace
477 479 } //end voidrealms namespace
  480 +
  481 +#endif // defined(Q_OS_WIN)
... ...
src/vregistry.h
... ... @@ -7,6 +7,7 @@ Tested on: Windows XP SP3
7 7 Bryan Cairns
8 8 */
9 9  
  10 +#if defined(Q_OS_WIN)
10 11 #ifndef VREGISTRY_H
11 12 #define VREGISTRY_H
12 13  
... ... @@ -125,3 +126,4 @@ namespace voidrealms
125 126 } //end voidrealms::win32 namespace
126 127 } //end voidrealms namespace
127 128 #endif // VREGISTRY_H
  129 +#endif // defined(Q_OS_WIN)
... ...