Commit 9f6a985d4e705ea9c9607ac593f7d75297cddde0
1 parent
0e8988e8
Exists in
master
Alteradas diretivas de pré-compilação para rodar em linux.
Showing
7 changed files
with
23 additions
and
6 deletions
Show diff stats
src/cacic_hardware.cpp
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
src/vqtconvert.cpp
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) | ... | ... |