diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2013-11-13 04:35:12 -0800 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2013-11-13 04:35:12 -0800 |
commit | 2830a9051d19fa8ba29e26ef0440107a13b15975 (patch) | |
tree | c58c52e5deb98c8a7d79e2a73fad00ecbffbbdf1 /src/qt/bitcoin.cpp | |
parent | d6c434d97e93f46704d472997574787f81c318fd (diff) | |
parent | 146ba964e4b784171c29600e959a0fae3e2e0c03 (diff) |
Merge pull request #3240 from laanwj/2013_11_rebase_no_wallet
Introduce disable-wallet / no-wallet mode (rebased)
Diffstat (limited to 'src/qt/bitcoin.cpp')
-rw-r--r-- | src/qt/bitcoin.cpp | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp index 54f96f4426..57ce7da361 100644 --- a/src/qt/bitcoin.cpp +++ b/src/qt/bitcoin.cpp @@ -313,11 +313,16 @@ int main(int argc, char *argv[]) splash.finish(&window); ClientModel clientModel(&optionsModel); - WalletModel walletModel(pwalletMain, &optionsModel); + WalletModel *walletModel = 0; + if(pwalletMain) + walletModel = new WalletModel(pwalletMain, &optionsModel); window.setClientModel(&clientModel); - window.addWallet("~Default", &walletModel); - window.setCurrentWallet("~Default"); + if(walletModel) + { + window.addWallet("~Default", walletModel); + window.setCurrentWallet("~Default"); + } // If -min option passed, start window minimized. if(GetBoolArg("-min", false)) @@ -335,8 +340,11 @@ int main(int argc, char *argv[]) &window, SLOT(handlePaymentRequest(SendCoinsRecipient))); QObject::connect(&window, SIGNAL(receivedURI(QString)), paymentServer, SLOT(handleURIOrFile(QString))); - QObject::connect(&walletModel, SIGNAL(coinsSent(CWallet*,SendCoinsRecipient,QByteArray)), - paymentServer, SLOT(fetchPaymentACK(CWallet*,const SendCoinsRecipient&,QByteArray))); + if(walletModel) + { + QObject::connect(walletModel, SIGNAL(coinsSent(CWallet*,SendCoinsRecipient,QByteArray)), + paymentServer, SLOT(fetchPaymentACK(CWallet*,const SendCoinsRecipient&,QByteArray))); + } QObject::connect(paymentServer, SIGNAL(message(QString,QString,unsigned int)), guiref, SLOT(message(QString,QString,unsigned int))); QTimer::singleShot(100, paymentServer, SLOT(uiReady())); @@ -347,6 +355,7 @@ int main(int argc, char *argv[]) window.setClientModel(0); window.removeAllWallets(); guiref = 0; + delete walletModel; } // Shutdown the core and its threads, but don't exit Bitcoin-Qt here threadGroup.interrupt_all(); |