Skip to content

Commit 84ef729

Browse files
author
Philip Kaufmann
committed
Bitcoin-Qt: fix QApplication includes to match our include defaults
- move all QApplication includes to top of included Qt headers - undef our loop macro where it would cause compilation errors otherwise
1 parent 0a74065 commit 84ef729

File tree

7 files changed

+13
-12
lines changed

7 files changed

+13
-12
lines changed

src/qt/bitcoin.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
* W.J. van der Laan 2011-2012
33
*/
44

5-
#include <QApplication>
6-
75
#include "bitcoingui.h"
86
#include "clientmodel.h"
97
#include "walletmodel.h"
@@ -17,6 +15,8 @@
1715
#include "splashscreen.h"
1816
#include "intro.h"
1917

18+
#undef loop /* Todo: ugh, remove this when the #define loop is gone from util.h */
19+
#include <QApplication>
2020
#include <QMessageBox>
2121
#if QT_VERSION < 0x050000
2222
#include <QTextCodec>

src/qt/bitcoinamountfield.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@
44
#include "bitcoinunits.h"
55
#include "guiconstants.h"
66

7+
#include <QApplication>
78
#include <QHBoxLayout>
89
#include <QKeyEvent>
910
#include <QDoubleSpinBox>
10-
#include <QApplication>
11+
1112
#include <qmath.h> // for qPow()
1213

1314
BitcoinAmountField::BitcoinAmountField(QWidget *parent):

src/qt/bitcoingui.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
* The Bitcoin Developers 2011-2012
66
*/
77

8-
#include <QApplication>
9-
108
#include "bitcoingui.h"
119

1210
#include "transactiontablemodel.h"
@@ -30,6 +28,8 @@
3028
#include "macdockiconhandler.h"
3129
#endif
3230

31+
#undef loop /* Todo: ugh, remove this when the #define loop is gone from util.h */
32+
#include <QApplication>
3333
#include <QMenuBar>
3434
#include <QMenu>
3535
#include <QIcon>

src/qt/guiutil.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#include <QApplication>
2-
31
#include "guiutil.h"
42

53
#include "bitcoinaddressvalidator.h"
@@ -9,6 +7,8 @@
97
#include "util.h"
108
#include "init.h"
119

10+
#undef loop /* Todo: ugh, remove this when the #define loop is gone from util.h */
11+
#include <QApplication>
1212
#include <QDateTime>
1313
#include <QDoubleValidator>
1414
#include <QFont>

src/qt/notificator.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#include "notificator.h"
22

3+
#include <QApplication>
34
#include <QMetaType>
45
#include <QVariant>
56
#include <QIcon>
6-
#include <QApplication>
77
#include <QStyle>
88
#include <QByteArray>
99
#include <QSystemTrayIcon>

src/qt/paymentserver.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
// Distributed under the MIT/X11 software license, see the accompanying
33
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
44

5-
#include <QApplication>
6-
75
#include "paymentserver.h"
86

97
#include "guiconstants.h"
108
#include "ui_interface.h"
119
#include "util.h"
1210

11+
#undef loop /* Todo: ugh, remove this when the #define loop is gone from util.h */
12+
#include <QApplication>
1313
#include <QByteArray>
1414
#include <QDataStream>
1515
#include <QDebug>

src/qt/splashscreen.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
#include "clientversion.h"
33
#include "util.h"
44

5-
#include <QPainter>
6-
#undef loop /* ugh, remove this when the #define loop is gone from util.h */
5+
#undef loop /* Todo: ugh, remove this when the #define loop is gone from util.h */
76
#include <QApplication>
7+
#include <QPainter>
88

99
SplashScreen::SplashScreen(const QPixmap &pixmap, Qt::WindowFlags f) :
1010
QSplashScreen(pixmap, f)

0 commit comments

Comments
 (0)