Skip to content

Commit 3aee10b

Browse files
committed
gui: Drop ShutdownWindow dependency to BitcoinGUI
1 parent 61eb058 commit 3aee10b

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

src/qt/utilitydialog.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010

1111
#include <qt/forms/ui_helpmessagedialog.h>
1212

13-
#include <qt/bitcoingui.h>
14-
1513
#include <clientversion.h>
1614
#include <init.h>
1715
#include <util/system.h>
@@ -21,9 +19,10 @@
2119

2220
#include <QCloseEvent>
2321
#include <QLabel>
22+
#include <QMainWindow>
2423
#include <QRegExp>
25-
#include <QTextTable>
2624
#include <QTextCursor>
25+
#include <QTextTable>
2726
#include <QVBoxLayout>
2827

2928
/** "Help message" or "About" dialog box */
@@ -144,10 +143,9 @@ ShutdownWindow::ShutdownWindow(QWidget *parent, Qt::WindowFlags f):
144143
setLayout(layout);
145144
}
146145

147-
QWidget *ShutdownWindow::showShutdownWindow(BitcoinGUI *window)
146+
QWidget* ShutdownWindow::showShutdownWindow(QMainWindow* window)
148147
{
149-
if (!window)
150-
return nullptr;
148+
assert(window != nullptr);
151149

152150
// Show a simple window indicating shutdown status
153151
QWidget *shutdownWindow = new ShutdownWindow();

src/qt/utilitydialog.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,11 @@
66
#define BITCOIN_QT_UTILITYDIALOG_H
77

88
#include <QDialog>
9-
#include <QObject>
9+
#include <QWidget>
1010

11-
class BitcoinGUI;
11+
QT_BEGIN_NAMESPACE
12+
class QMainWindow;
13+
QT_END_NAMESPACE
1214

1315
namespace interfaces {
1416
class Node;
@@ -46,7 +48,7 @@ class ShutdownWindow : public QWidget
4648

4749
public:
4850
explicit ShutdownWindow(QWidget *parent=nullptr, Qt::WindowFlags f=Qt::Widget);
49-
static QWidget *showShutdownWindow(BitcoinGUI *window);
51+
static QWidget* showShutdownWindow(QMainWindow* window);
5052

5153
protected:
5254
void closeEvent(QCloseEvent *event);

test/lint/lint-circular-dependencies.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ EXPECTED_CIRCULAR_DEPENDENCIES=(
1313
"index/txindex -> validation -> index/txindex"
1414
"policy/fees -> txmempool -> policy/fees"
1515
"qt/addresstablemodel -> qt/walletmodel -> qt/addresstablemodel"
16-
"qt/bitcoingui -> qt/utilitydialog -> qt/bitcoingui"
1716
"qt/bitcoingui -> qt/walletframe -> qt/bitcoingui"
1817
"qt/bitcoingui -> qt/walletview -> qt/bitcoingui"
1918
"qt/clientmodel -> qt/peertablemodel -> qt/clientmodel"

0 commit comments

Comments
 (0)