diff options
| author | Wladimir J. van der Laan <[email protected]> | 2011-06-22 20:11:12 +0200 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2011-06-22 20:11:35 +0200 |
| commit | 47c6215c223ac85eeb31504aa2a56369bdfb3789 (patch) | |
| tree | b954ee8712514d72089a4f23a3cd9e93c820d0a0 | |
| parent | clarify text (diff) | |
| download | discoin-47c6215c223ac85eeb31504aa2a56369bdfb3789.tar.xz discoin-47c6215c223ac85eeb31504aa2a56369bdfb3789.zip | |
use #ifdef QT_UI to distinguish Qt UI instead of hardcoded #if 0
| -rw-r--r-- | bitcoin-qt.pro | 3 | ||||
| -rw-r--r-- | src/headers.h | 6 | ||||
| -rw-r--r-- | src/init.cpp | 12 | ||||
| -rw-r--r-- | src/qtui.h (renamed from src/externui.h) | 0 |
4 files changed, 10 insertions, 11 deletions
diff --git a/bitcoin-qt.pro b/bitcoin-qt.pro index 501695bd0..7e918f144 100644 --- a/bitcoin-qt.pro +++ b/bitcoin-qt.pro @@ -2,6 +2,7 @@ TEMPLATE = app TARGET = DEPENDPATH += . INCLUDEPATH += src src/json src/cryptopp src/qt +DEFINES += QT_GUI # for boost 1.37, add -mt to the boost libraries unix:LIBS += -lssl -lcrypto -lboost_system -lboost_filesystem -lboost_program_options -lboost_thread -ldb_cxx @@ -66,7 +67,7 @@ HEADERS += src/qt/bitcoingui.h \ src/qt/guiconstants.h \ src/qt/optionsmodel.h \ src/qt/monitoreddatamapper.h \ - src/externui.h \ + src/qtui.h \ src/qt/transactiondesc.h \ src/qt/transactiondescdialog.h \ src/qt/bitcoinamountfield.h diff --git a/src/headers.h b/src/headers.h index f682f746e..38d9566ba 100644 --- a/src/headers.h +++ b/src/headers.h @@ -100,7 +100,11 @@ #include "uibase.h" #include "ui.h" #else -#include "externui.h" +#ifdef QT_GUI +#include "qtui.h" +#else +#include "noui.h" +#endif #endif #ifdef GUI diff --git a/src/init.cpp b/src/init.cpp index f30618531..cbd9fc021 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -75,8 +75,7 @@ void HandleSIGTERM(int) // // Start // -#if 0 -#ifndef GUI +#if !defined(QT_GUI) && !defined(GUI) int main(int argc, char* argv[]) { bool fRet = false; @@ -88,7 +87,6 @@ int main(int argc, char* argv[]) return 1; } #endif -#endif bool AppInit(int argc, char* argv[]) { @@ -228,11 +226,9 @@ bool AppInit2(int argc, char* argv[]) fServer = GetBoolArg("-server"); /* force fServer when running without GUI */ -#if 0 -#ifndef GUI +#if !defined(QT_GUI) && !defined(GUI) fServer = true; #endif -#endif fPrintToConsole = GetBoolArg("-printtoconsole"); fPrintToDebugger = GetBoolArg("-printtodebugger"); @@ -529,12 +525,10 @@ bool AppInit2(int argc, char* argv[]) SetStartOnSystemStartup(true); #endif -#if 0 -#ifndef GUI +#if !defined(QT_GUI) && !defined(GUI) while (1) Sleep(5000); #endif -#endif return true; } diff --git a/src/externui.h b/src/qtui.h index 3243164c1..3243164c1 100644 --- a/src/externui.h +++ b/src/qtui.h |