[Qt] the RPC Console should be a QWidget to make window more independent

- fix issue #5254
This commit is contained in:
Jonas Schnelli
2014-11-10 16:41:57 +01:00
parent 5406f61373
commit 4a8fc152a9
4 changed files with 17 additions and 11 deletions

View File

@@ -128,7 +128,7 @@ BitcoinGUI::BitcoinGUI(const NetworkStyle *networkStyle, QWidget *parent) :
setUnifiedTitleAndToolBarOnMac(true);
#endif
rpcConsole = new RPCConsole(enableWallet ? this : 0);
rpcConsole = new RPCConsole(0);
#ifdef ENABLE_WALLET
if(enableWallet)
{
@@ -234,6 +234,8 @@ BitcoinGUI::~BitcoinGUI()
delete appMenuBar;
MacDockIconHandler::instance()->setMainWindow(NULL);
#endif
delete rpcConsole;
}
void BitcoinGUI::createActions(const NetworkStyle *networkStyle)
@@ -831,6 +833,9 @@ void BitcoinGUI::closeEvent(QCloseEvent *event)
if(!clientModel->getOptionsModel()->getMinimizeToTray() &&
!clientModel->getOptionsModel()->getMinimizeOnClose())
{
// close rpcConsole in case it was open to make some space for the shutdown window
rpcConsole->close();
QApplication::quit();
}
}