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
| @@ -48,7 +48,7 @@ QJsonObject cacic_hardware::coletaWin() | @@ -48,7 +48,7 @@ QJsonObject cacic_hardware::coletaWin() | ||
| 48 | } | 48 | } |
| 49 | return QJsonObject(); | 49 | return QJsonObject(); |
| 50 | } | 50 | } |
| 51 | -#elif Q_OS_LINUX | 51 | +#elif defined(Q_OS_LINUX) |
| 52 | QJsonObject cacic_hardware::coletaLinux() | 52 | QJsonObject cacic_hardware::coletaLinux() |
| 53 | { | 53 | { |
| 54 | 54 |
src/cacic_hardware.h
| @@ -22,7 +22,12 @@ public: | @@ -22,7 +22,12 @@ public: | ||
| 22 | private: | 22 | private: |
| 23 | #ifdef Q_OS_WIN | 23 | #ifdef Q_OS_WIN |
| 24 | QJsonObject coletaWin(); | 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 | QJsonObject coletaLinux(); | 31 | QJsonObject coletaLinux(); |
| 27 | void coletaLinuxMem(QJsonObject &hardware, const QJsonObject &component); | 32 | void coletaLinuxMem(QJsonObject &hardware, const QJsonObject &component); |
| 28 | void coletaLinuxCpu(QJsonObject &hardware, const QJsonObject &component); | 33 | void coletaLinuxCpu(QJsonObject &hardware, const QJsonObject &component); |
src/cacic_software.cpp
| @@ -8,7 +8,7 @@ void cacic_software::iniciaColeta() | @@ -8,7 +8,7 @@ void cacic_software::iniciaColeta() | ||
| 8 | { | 8 | { |
| 9 | #ifdef Q_OS_WIN | 9 | #ifdef Q_OS_WIN |
| 10 | this->coletaSoftware = coletaWin(); | 10 | this->coletaSoftware = coletaWin(); |
| 11 | -#elif Q_OS_LINUX | 11 | +#elif defined(Q_OS_LINUX) |
| 12 | this->coletaSoftware = coletaLinux(); | 12 | this->coletaSoftware = coletaLinux(); |
| 13 | 13 | ||
| 14 | #endif | 14 | #endif |
src/vqtconvert.cpp
| 1 | +#if defined(Q_OS_WIN) | ||
| 2 | + | ||
| 1 | #include "vqtconvert.h" | 3 | #include "vqtconvert.h" |
| 2 | 4 | ||
| 3 | #include <QString> | 5 | #include <QString> |
| @@ -58,3 +60,4 @@ namespace voidrealms | @@ -58,3 +60,4 @@ namespace voidrealms | ||
| 58 | 60 | ||
| 59 | } //end voidrealms::win32 namespace | 61 | } //end voidrealms::win32 namespace |
| 60 | } //end voidrealms namespace | 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 | Converts between QT types and Windows Types | 2 | Converts between QT types and Windows Types |
| 6 | Version: 1.0 | 3 | Version: 1.0 |
| @@ -10,6 +7,11 @@ Tested on: Windows XP SP3 | @@ -10,6 +7,11 @@ Tested on: Windows XP SP3 | ||
| 10 | Bryan Cairns - August 2009 | 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 | #include <QString> | 15 | #include <QString> |
| 14 | #include "windows.h" | 16 | #include "windows.h" |
| 15 | 17 | ||
| @@ -49,3 +51,4 @@ namespace voidrealms | @@ -49,3 +51,4 @@ namespace voidrealms | ||
| 49 | } //end voidrealms::win32 namespace | 51 | } //end voidrealms::win32 namespace |
| 50 | } //end voidrealms namespace | 52 | } //end voidrealms namespace |
| 51 | #endif // VQTCONVERT_H | 53 | #endif // VQTCONVERT_H |
| 54 | +#endif // defined(Q_OS_WIN) |
src/vregistry.cpp
| @@ -7,6 +7,8 @@ Tested on: Windows XP SP3 | @@ -7,6 +7,8 @@ Tested on: Windows XP SP3 | ||
| 7 | Bryan Cairns | 7 | Bryan Cairns |
| 8 | */ | 8 | */ |
| 9 | 9 | ||
| 10 | +#if defined(Q_OS_WIN) | ||
| 11 | + | ||
| 10 | #include "vregistry.h" | 12 | #include "vregistry.h" |
| 11 | #include "windows.h" | 13 | #include "windows.h" |
| 12 | #include "VQTConvert.h" | 14 | #include "VQTConvert.h" |
| @@ -475,3 +477,5 @@ namespace voidrealms | @@ -475,3 +477,5 @@ namespace voidrealms | ||
| 475 | 477 | ||
| 476 | } //end voidrealms::win32 namespace | 478 | } //end voidrealms::win32 namespace |
| 477 | } //end voidrealms namespace | 479 | } //end voidrealms namespace |
| 480 | + | ||
| 481 | +#endif // defined(Q_OS_WIN) |
src/vregistry.h
| @@ -7,6 +7,7 @@ Tested on: Windows XP SP3 | @@ -7,6 +7,7 @@ Tested on: Windows XP SP3 | ||
| 7 | Bryan Cairns | 7 | Bryan Cairns |
| 8 | */ | 8 | */ |
| 9 | 9 | ||
| 10 | +#if defined(Q_OS_WIN) | ||
| 10 | #ifndef VREGISTRY_H | 11 | #ifndef VREGISTRY_H |
| 11 | #define VREGISTRY_H | 12 | #define VREGISTRY_H |
| 12 | 13 | ||
| @@ -125,3 +126,4 @@ namespace voidrealms | @@ -125,3 +126,4 @@ namespace voidrealms | ||
| 125 | } //end voidrealms::win32 namespace | 126 | } //end voidrealms::win32 namespace |
| 126 | } //end voidrealms namespace | 127 | } //end voidrealms namespace |
| 127 | #endif // VREGISTRY_H | 128 | #endif // VREGISTRY_H |
| 129 | +#endif // defined(Q_OS_WIN) |