aboutsummaryrefslogtreecommitdiff
path: root/src/qt/bitcoin.cpp
diff options
context:
space:
mode:
authorJonas Schnelli <jonas.schnelli@include7.ch>2013-06-03 15:18:41 +0200
committerJonas Schnelli <jonas.schnelli@include7.ch>2013-06-03 15:18:41 +0200
commit39fe9de6b2b255969971beca8fa25a33ad2e5750 (patch)
tree6686041f6b801d0ea5185b026a480a5be61510e6 /src/qt/bitcoin.cpp
parentf679b2900a3a9f863f888cfb0b1a5e593628e37b (diff)
parentfa9e5adddda0bee5adc040b957cf3f1a6a470802 (diff)
Merge branch 'master' of git://github.com/bitcoin/bitcoin into prefsFix
Signed-off-by: Jonas Schnelli <jonas.schnelli@include7.ch> Conflicts: bitcoin-qt.pro
Diffstat (limited to 'src/qt/bitcoin.cpp')
-rw-r--r--src/qt/bitcoin.cpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp
index f869c58620..73a5a12efa 100644
--- a/src/qt/bitcoin.cpp
+++ b/src/qt/bitcoin.cpp
@@ -17,7 +17,9 @@
#include "splashscreen.h"
#include <QMessageBox>
+#if QT_VERSION < 0x050000
#include <QTextCodec>
+#endif
#include <QLocale>
#include <QTimer>
#include <QTranslator>
@@ -69,7 +71,7 @@ static bool ThreadSafeAskFee(int64 nFeeRequired)
{
if(!guiref)
return false;
- if(nFeeRequired < MIN_TX_FEE || nFeeRequired <= nTransactionFee || fDaemon)
+ if(nFeeRequired < CTransaction::nMinTxFee || nFeeRequired <= nTransactionFee || fDaemon)
return true;
bool payFee = false;
@@ -114,9 +116,11 @@ int main(int argc, char *argv[])
// Command-line options take precedence:
ParseParameters(argc, argv);
+#if QT_VERSION < 0x050000
// Internal string conversion is all UTF-8
QTextCodec::setCodecForTr(QTextCodec::codecForName("UTF-8"));
QTextCodec::setCodecForCStrings(QTextCodec::codecForTr());
+#endif
Q_INIT_RESOURCE(bitcoin);
QApplication app(argc, argv);
@@ -148,7 +152,7 @@ int main(int argc, char *argv[])
// as it is used to locate QSettings)
QApplication::setOrganizationName("Bitcoin");
QApplication::setOrganizationDomain("bitcoin.org");
- if(GetBoolArg("-testnet")) // Separate UI settings for testnet
+ if (GetBoolArg("-testnet", false)) // Separate UI settings for testnet
QApplication::setApplicationName("Bitcoin-Qt-testnet");
else
QApplication::setApplicationName("Bitcoin-Qt");
@@ -199,7 +203,7 @@ int main(int argc, char *argv[])
}
SplashScreen splash(QPixmap(), 0);
- if (GetBoolArg("-splash", true) && !GetBoolArg("-min"))
+ if (GetBoolArg("-splash", true) && !GetBoolArg("-min", false))
{
splash.show();
splash.setAutoFillBackground(true);
@@ -220,7 +224,7 @@ int main(int argc, char *argv[])
boost::thread_group threadGroup;
- BitcoinGUI window;
+ BitcoinGUI window(GetBoolArg("-testnet", false), 0);
guiref = &window;
QTimer* pollShutdownTimer = new QTimer(guiref);
@@ -246,7 +250,7 @@ int main(int argc, char *argv[])
window.setCurrentWallet("~Default");
// If -min option passed, start window minimized.
- if(GetBoolArg("-min"))
+ if(GetBoolArg("-min", false))
{
window.showMinimized();
}
@@ -274,6 +278,9 @@ int main(int argc, char *argv[])
}
else
{
+ threadGroup.interrupt_all();
+ threadGroup.join_all();
+ Shutdown();
return 1;
}
} catch (std::exception& e) {