From 5e83bc404c77d6e70c62152f1f97eb264afcc80d Mon Sep 17 00:00:00 2001 From: Philip Kaufmann Date: Fri, 5 Sep 2014 13:18:35 +0200 Subject: [PATCH] [Qt] include and file header cleanup - alphabetical ordering - correct ordering own headers before normal headers etc. --- src/qt/bitcoin.cpp | 5 ++++- src/qt/bitcoinamountfield.h | 4 ++-- src/qt/bitcoingui.cpp | 5 +++-- src/qt/coincontroldialog.h | 8 +++++--- src/qt/intro.h | 2 +- src/qt/openuridialog.h | 2 +- src/qt/optionsdialog.cpp | 2 ++ src/qt/optionsmodel.cpp | 1 + src/qt/paymentrequestplus.cpp | 1 + src/qt/receivecoinsdialog.h | 7 ++++--- src/qt/rpcconsole.cpp | 4 +++- src/qt/rpcconsole.h | 8 ++++---- src/qt/sendcoinsdialog.h | 8 ++++---- src/qt/splashscreen.cpp | 3 ++- src/qt/transactiondesc.cpp | 4 ++-- 15 files changed, 39 insertions(+), 25 deletions(-) diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp index 6cc6b99ce..d9ca42301 100644 --- a/src/qt/bitcoin.cpp +++ b/src/qt/bitcoin.cpp @@ -16,6 +16,7 @@ #include "splashscreen.h" #include "utilitydialog.h" #include "winshutdownmonitor.h" + #ifdef ENABLE_WALLET #include "paymentserver.h" #include "walletmodel.h" @@ -26,6 +27,7 @@ #include "rpcserver.h" #include "ui_interface.h" #include "util.h" + #ifdef ENABLE_WALLET #include "wallet.h" #endif @@ -34,15 +36,16 @@ #include #include + #include #include #include #include #include #include +#include #include #include -#include #if defined(QT_STATICPLUGIN) #include diff --git a/src/qt/bitcoinamountfield.h b/src/qt/bitcoinamountfield.h index c713f5d68..84795a7e7 100644 --- a/src/qt/bitcoinamountfield.h +++ b/src/qt/bitcoinamountfield.h @@ -7,12 +7,12 @@ #include +class AmountSpinBox; + QT_BEGIN_NAMESPACE class QValueComboBox; QT_END_NAMESPACE -class AmountSpinBox; - /** Widget for entering bitcoin amounts. */ class BitcoinAmountField: public QWidget diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index 790301a1e..dd5192982 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -14,6 +14,7 @@ #include "optionsmodel.h" #include "rpcconsole.h" #include "utilitydialog.h" + #ifdef ENABLE_WALLET #include "walletframe.h" #include "walletmodel.h" @@ -24,8 +25,8 @@ #endif #include "init.h" -#include "util.h" #include "ui_interface.h" +#include "util.h" #include @@ -50,8 +51,8 @@ #include #if QT_VERSION < 0x050000 -#include #include +#include #else #include #endif diff --git a/src/qt/coincontroldialog.h b/src/qt/coincontroldialog.h index 4f7422642..a6f239a89 100644 --- a/src/qt/coincontroldialog.h +++ b/src/qt/coincontroldialog.h @@ -14,13 +14,15 @@ #include #include -namespace Ui { - class CoinControlDialog; -} class WalletModel; + class CCoinControl; class CTxMemPool; +namespace Ui { + class CoinControlDialog; +} + class CoinControlDialog : public QDialog { Q_OBJECT diff --git a/src/qt/intro.h b/src/qt/intro.h index 295a75562..e3e396d36 100644 --- a/src/qt/intro.h +++ b/src/qt/intro.h @@ -12,7 +12,7 @@ class FreespaceChecker; namespace Ui { -class Intro; + class Intro; } /** Introduction screen (pre-GUI startup). diff --git a/src/qt/openuridialog.h b/src/qt/openuridialog.h index 28da7d6d9..67a5f167d 100644 --- a/src/qt/openuridialog.h +++ b/src/qt/openuridialog.h @@ -8,7 +8,7 @@ #include namespace Ui { -class OpenURIDialog; + class OpenURIDialog; } class OpenURIDialog : public QDialog diff --git a/src/qt/optionsdialog.cpp b/src/qt/optionsdialog.cpp index c775a7f8d..279467129 100644 --- a/src/qt/optionsdialog.cpp +++ b/src/qt/optionsdialog.cpp @@ -17,11 +17,13 @@ #include "main.h" // for MAX_SCRIPTCHECK_THREADS #include "netbase.h" #include "txdb.h" // for -dbcache defaults + #ifdef ENABLE_WALLET #include "wallet.h" // for CWallet::minTxFee #endif #include + #include #include #include diff --git a/src/qt/optionsmodel.cpp b/src/qt/optionsmodel.cpp index 99928ebe4..bd747faeb 100644 --- a/src/qt/optionsmodel.cpp +++ b/src/qt/optionsmodel.cpp @@ -15,6 +15,7 @@ #include "main.h" #include "net.h" #include "txdb.h" // for -dbcache defaults + #ifdef ENABLE_WALLET #include "wallet.h" #include "walletdb.h" diff --git a/src/qt/paymentrequestplus.cpp b/src/qt/paymentrequestplus.cpp index acce42e20..7b7de4983 100644 --- a/src/qt/paymentrequestplus.cpp +++ b/src/qt/paymentrequestplus.cpp @@ -13,6 +13,7 @@ #include #include + #include #include #include diff --git a/src/qt/receivecoinsdialog.h b/src/qt/receivecoinsdialog.h index 663cb157a..7a7e38e25 100644 --- a/src/qt/receivecoinsdialog.h +++ b/src/qt/receivecoinsdialog.h @@ -5,6 +5,8 @@ #ifndef RECEIVECOINSDIALOG_H #define RECEIVECOINSDIALOG_H +#include "guiutil.h" + #include #include #include @@ -13,13 +15,12 @@ #include #include -#include "guiutil.h" +class OptionsModel; +class WalletModel; namespace Ui { class ReceiveCoinsDialog; } -class OptionsModel; -class WalletModel; QT_BEGIN_NAMESPACE class QModelIndex; diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp index 11089b249..8129353d4 100644 --- a/src/qt/rpcconsole.cpp +++ b/src/qt/rpcconsole.cpp @@ -16,10 +16,12 @@ #include "util.h" #include "json/json_spirit_value.h" + +#include + #ifdef ENABLE_WALLET #include #endif -#include #include #include diff --git a/src/qt/rpcconsole.h b/src/qt/rpcconsole.h index 64bb5c29b..1ffff9275 100644 --- a/src/qt/rpcconsole.h +++ b/src/qt/rpcconsole.h @@ -14,14 +14,14 @@ class ClientModel; -QT_BEGIN_NAMESPACE -class QItemSelection; -QT_END_NAMESPACE - namespace Ui { class RPCConsole; } +QT_BEGIN_NAMESPACE +class QItemSelection; +QT_END_NAMESPACE + /** Local Bitcoin RPC console. */ class RPCConsole: public QDialog { diff --git a/src/qt/sendcoinsdialog.h b/src/qt/sendcoinsdialog.h index 6cdf4a00c..a090fa42d 100644 --- a/src/qt/sendcoinsdialog.h +++ b/src/qt/sendcoinsdialog.h @@ -14,14 +14,14 @@ class OptionsModel; class SendCoinsEntry; class SendCoinsRecipient; -QT_BEGIN_NAMESPACE -class QUrl; -QT_END_NAMESPACE - namespace Ui { class SendCoinsDialog; } +QT_BEGIN_NAMESPACE +class QUrl; +QT_END_NAMESPACE + /** Dialog for sending bitcoins */ class SendCoinsDialog : public QDialog { diff --git a/src/qt/splashscreen.cpp b/src/qt/splashscreen.cpp index 5dd110b36..feb0f3350 100644 --- a/src/qt/splashscreen.cpp +++ b/src/qt/splashscreen.cpp @@ -4,11 +4,12 @@ #include "splashscreen.h" -#include "version.h" #include "clientversion.h" #include "init.h" #include "ui_interface.h" #include "util.h" +#include "version.h" + #ifdef ENABLE_WALLET #include "wallet.h" #endif diff --git a/src/qt/transactiondesc.cpp b/src/qt/transactiondesc.cpp index 727b8dc66..492371834 100644 --- a/src/qt/transactiondesc.cpp +++ b/src/qt/transactiondesc.cpp @@ -6,13 +6,13 @@ #include "bitcoinunits.h" #include "guiutil.h" +#include "paymentserver.h" +#include "transactionrecord.h" #include "base58.h" #include "db.h" #include "main.h" -#include "paymentserver.h" #include "script/script.h" -#include "transactionrecord.h" #include "timedata.h" #include "ui_interface.h" #include "util.h"