aboutsummaryrefslogtreecommitdiff
path: root/src/qt
diff options
context:
space:
mode:
Diffstat (limited to 'src/qt')
-rw-r--r--src/qt/bantablemodel.cpp2
-rw-r--r--src/qt/bitcoin.cpp1
-rw-r--r--src/qt/bitcoingui.cpp8
-rw-r--r--src/qt/coincontroldialog.cpp1
-rw-r--r--src/qt/modaloverlay.cpp6
-rw-r--r--src/qt/modaloverlay.h2
-rw-r--r--src/qt/peertablemodel.cpp1
-rw-r--r--src/qt/rpcconsole.cpp16
-rw-r--r--src/qt/rpcconsole.h12
-rw-r--r--src/qt/signverifymessagedialog.cpp1
-rw-r--r--src/qt/splashscreen.cpp1
-rw-r--r--src/qt/test/paymentservertests.cpp1
-rw-r--r--src/qt/transactiondesc.cpp1
-rw-r--r--src/qt/walletframe.cpp1
-rw-r--r--src/qt/walletmodel.h1
-rw-r--r--src/qt/walletmodeltransaction.h1
16 files changed, 25 insertions, 31 deletions
diff --git a/src/qt/bantablemodel.cpp b/src/qt/bantablemodel.cpp
index efc726e09e..ae11b80347 100644
--- a/src/qt/bantablemodel.cpp
+++ b/src/qt/bantablemodel.cpp
@@ -7,8 +7,6 @@
#include <qt/clientmodel.h>
#include <interfaces/node.h>
-#include <sync.h>
-#include <util/time.h>
#include <algorithm>
diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp
index 86f4dc91a1..f548dc9fe3 100644
--- a/src/qt/bitcoin.cpp
+++ b/src/qt/bitcoin.cpp
@@ -10,7 +10,6 @@
#include <qt/bitcoingui.h>
#include <chainparams.h>
-#include <fs.h>
#include <qt/clientmodel.h>
#include <qt/guiconstants.h>
#include <qt/guiutil.h>
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index 2878a8eb14..b280a0c14f 100644
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -199,12 +199,12 @@ BitcoinGUI::BitcoinGUI(interfaces::Node& node, const PlatformStyle *_platformSty
openOptionsDialogWithTab(OptionsDialog::TAB_NETWORK);
});
- modalOverlay = new ModalOverlay(this->centralWidget());
+ modalOverlay = new ModalOverlay(enableWallet, this->centralWidget());
+ connect(labelBlocksIcon, &GUIUtil::ClickableLabel::clicked, this, &BitcoinGUI::showModalOverlay);
+ connect(progressBar, &GUIUtil::ClickableProgressBar::clicked, this, &BitcoinGUI::showModalOverlay);
#ifdef ENABLE_WALLET
if(enableWallet) {
connect(walletFrame, &WalletFrame::requestedSyncWarningInfo, this, &BitcoinGUI::showModalOverlay);
- connect(labelBlocksIcon, &GUIUtil::ClickableLabel::clicked, this, &BitcoinGUI::showModalOverlay);
- connect(progressBar, &GUIUtil::ClickableProgressBar::clicked, this, &BitcoinGUI::showModalOverlay);
}
#endif
@@ -796,7 +796,7 @@ void BitcoinGUI::showDebugWindow()
void BitcoinGUI::showDebugWindowActivateConsole()
{
- rpcConsole->setTabFocus(RPCConsole::TAB_CONSOLE);
+ rpcConsole->setTabFocus(RPCConsole::TabTypes::CONSOLE);
showDebugWindow();
}
diff --git a/src/qt/coincontroldialog.cpp b/src/qt/coincontroldialog.cpp
index 03d18d2845..f928f1ca2a 100644
--- a/src/qt/coincontroldialog.cpp
+++ b/src/qt/coincontroldialog.cpp
@@ -19,7 +19,6 @@
#include <wallet/coincontrol.h>
#include <interfaces/node.h>
#include <key_io.h>
-#include <policy/fees.h>
#include <policy/policy.h>
#include <wallet/wallet.h>
diff --git a/src/qt/modaloverlay.cpp b/src/qt/modaloverlay.cpp
index 8ecc33da84..efdd494d9f 100644
--- a/src/qt/modaloverlay.cpp
+++ b/src/qt/modaloverlay.cpp
@@ -12,7 +12,7 @@
#include <QResizeEvent>
#include <QPropertyAnimation>
-ModalOverlay::ModalOverlay(QWidget *parent) :
+ModalOverlay::ModalOverlay(bool enable_wallet, QWidget *parent) :
QWidget(parent),
ui(new Ui::ModalOverlay),
bestHeaderHeight(0),
@@ -29,6 +29,10 @@ userClosed(false)
blockProcessTime.clear();
setVisible(false);
+ if (!enable_wallet) {
+ ui->infoText->setVisible(false);
+ ui->infoTextStrong->setText(tr("Bitcoin Core is currently syncing. It will download headers and blocks from peers and validate them until reaching the tip of the block chain."));
+ }
}
ModalOverlay::~ModalOverlay()
diff --git a/src/qt/modaloverlay.h b/src/qt/modaloverlay.h
index cf8b53f2b3..c075a89f94 100644
--- a/src/qt/modaloverlay.h
+++ b/src/qt/modaloverlay.h
@@ -21,7 +21,7 @@ class ModalOverlay : public QWidget
Q_OBJECT
public:
- explicit ModalOverlay(QWidget *parent);
+ explicit ModalOverlay(bool enable_wallet, QWidget *parent);
~ModalOverlay();
public Q_SLOTS:
diff --git a/src/qt/peertablemodel.cpp b/src/qt/peertablemodel.cpp
index 99a9a12fe2..af2a1bb0e5 100644
--- a/src/qt/peertablemodel.cpp
+++ b/src/qt/peertablemodel.cpp
@@ -9,7 +9,6 @@
#include <qt/guiutil.h>
#include <interfaces/node.h>
-#include <sync.h>
#include <algorithm>
diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp
index 4f6629bfe1..3dd64c5273 100644
--- a/src/qt/rpcconsole.cpp
+++ b/src/qt/rpcconsole.cpp
@@ -1268,22 +1268,24 @@ void RPCConsole::showOrHideBanTableIfRequired()
void RPCConsole::setTabFocus(enum TabTypes tabType)
{
- ui->tabWidget->setCurrentIndex(tabType);
+ ui->tabWidget->setCurrentIndex(int(tabType));
}
QString RPCConsole::tabTitle(TabTypes tab_type) const
{
- return ui->tabWidget->tabText(tab_type);
+ return ui->tabWidget->tabText(int(tab_type));
}
QKeySequence RPCConsole::tabShortcut(TabTypes tab_type) const
{
switch (tab_type) {
- case TAB_INFO: return QKeySequence(Qt::CTRL + Qt::Key_I);
- case TAB_CONSOLE: return QKeySequence(Qt::CTRL + Qt::Key_T);
- case TAB_GRAPH: return QKeySequence(Qt::CTRL + Qt::Key_N);
- case TAB_PEERS: return QKeySequence(Qt::CTRL + Qt::Key_P);
- }
+ case TabTypes::INFO: return QKeySequence(Qt::CTRL + Qt::Key_I);
+ case TabTypes::CONSOLE: return QKeySequence(Qt::CTRL + Qt::Key_T);
+ case TabTypes::GRAPH: return QKeySequence(Qt::CTRL + Qt::Key_N);
+ case TabTypes::PEERS: return QKeySequence(Qt::CTRL + Qt::Key_P);
+ } // no default case, so the compiler can warn about missing cases
+
+ assert(false);
}
void RPCConsole::updateAlerts(const QString& warnings)
diff --git a/src/qt/rpcconsole.h b/src/qt/rpcconsole.h
index 6b0f07baf1..f586d04022 100644
--- a/src/qt/rpcconsole.h
+++ b/src/qt/rpcconsole.h
@@ -58,14 +58,14 @@ public:
CMD_ERROR
};
- enum TabTypes {
- TAB_INFO = 0,
- TAB_CONSOLE = 1,
- TAB_GRAPH = 2,
- TAB_PEERS = 3
+ enum class TabTypes {
+ INFO,
+ CONSOLE,
+ GRAPH,
+ PEERS
};
- std::vector<TabTypes> tabs() const { return {TAB_INFO, TAB_CONSOLE, TAB_GRAPH, TAB_PEERS}; }
+ std::vector<TabTypes> tabs() const { return {TabTypes::INFO, TabTypes::CONSOLE, TabTypes::GRAPH, TabTypes::PEERS}; }
QString tabTitle(TabTypes tab_type) const;
QKeySequence tabShortcut(TabTypes tab_type) const;
diff --git a/src/qt/signverifymessagedialog.cpp b/src/qt/signverifymessagedialog.cpp
index 71f5f2ae75..1d0e1323bc 100644
--- a/src/qt/signverifymessagedialog.cpp
+++ b/src/qt/signverifymessagedialog.cpp
@@ -14,7 +14,6 @@
#include <util/validation.h> // For strMessageMagic
#include <wallet/wallet.h>
-#include <string>
#include <vector>
#include <QClipboard>
diff --git a/src/qt/splashscreen.cpp b/src/qt/splashscreen.cpp
index 0e5abb89f3..26c9fe7ad4 100644
--- a/src/qt/splashscreen.cpp
+++ b/src/qt/splashscreen.cpp
@@ -17,7 +17,6 @@
#include <ui_interface.h>
#include <util/system.h>
#include <util/translation.h>
-#include <version.h>
#include <QApplication>
#include <QCloseEvent>
diff --git a/src/qt/test/paymentservertests.cpp b/src/qt/test/paymentservertests.cpp
index eca468a6ab..ef0808054d 100644
--- a/src/qt/test/paymentservertests.cpp
+++ b/src/qt/test/paymentservertests.cpp
@@ -8,7 +8,6 @@
#include <qt/test/paymentrequestdata.h>
#include <amount.h>
-#include <chainparams.h>
#include <interfaces/node.h>
#include <random.h>
#include <script/script.h>
diff --git a/src/qt/transactiondesc.cpp b/src/qt/transactiondesc.cpp
index 648fdb7673..44ce5265cd 100644
--- a/src/qt/transactiondesc.cpp
+++ b/src/qt/transactiondesc.cpp
@@ -18,7 +18,6 @@
#include <key_io.h>
#include <validation.h>
#include <script/script.h>
-#include <timedata.h>
#include <util/system.h>
#include <policy/policy.h>
#include <wallet/ismine.h>
diff --git a/src/qt/walletframe.cpp b/src/qt/walletframe.cpp
index 94413547d4..d7f0617315 100644
--- a/src/qt/walletframe.cpp
+++ b/src/qt/walletframe.cpp
@@ -9,7 +9,6 @@
#include <qt/walletview.h>
#include <cassert>
-#include <cstdio>
#include <QHBoxLayout>
#include <QLabel>
diff --git a/src/qt/walletmodel.h b/src/qt/walletmodel.h
index 54428aec08..f16fe81bd9 100644
--- a/src/qt/walletmodel.h
+++ b/src/qt/walletmodel.h
@@ -22,7 +22,6 @@
#include <interfaces/wallet.h>
#include <support/allocators/secure.h>
-#include <map>
#include <vector>
#include <QObject>
diff --git a/src/qt/walletmodeltransaction.h b/src/qt/walletmodeltransaction.h
index a41d8f2457..242ba13897 100644
--- a/src/qt/walletmodeltransaction.h
+++ b/src/qt/walletmodeltransaction.h
@@ -7,7 +7,6 @@
#include <qt/walletmodel.h>
-#include <memory>
#include <amount.h>
#include <QObject>