From 51ed9ec971614aebdbfbd9527aba365dd0afd437 Mon Sep 17 00:00:00 2001 From: Brandon Dahler Date: Sat, 13 Apr 2013 00:13:08 -0500 Subject: Cleanup code using forward declarations. Use misc methods of avoiding unnecesary header includes. Replace int typedefs with int##_t from stdint.h. Replace PRI64[xdu] with PRI[xdu]64 from inttypes.h. Normalize QT_VERSION ifs where possible. Resolve some indirect dependencies as direct ones. Remove extern declarations from .cpp files. --- src/qt/paymentserver.cpp | 44 ++++++++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 20 deletions(-) (limited to 'src/qt/paymentserver.cpp') diff --git a/src/qt/paymentserver.cpp b/src/qt/paymentserver.cpp index 87db4bbf34..cb6291c35d 100644 --- a/src/qt/paymentserver.cpp +++ b/src/qt/paymentserver.cpp @@ -2,6 +2,23 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. +#include "paymentserver.h" + +#include "bitcoinunits.h" +#include "guiconstants.h" +#include "guiutil.h" +#include "optionsmodel.h" +#include "paymentserver.h" +#include "walletmodel.h" + +#include "base58.h" +#include "ui_interface.h" +#include "wallet.h" + +#include + +#include +#include #include #include #include @@ -13,8 +30,6 @@ #include #include #include -#include -#include #include #include #include @@ -22,27 +37,16 @@ #include #include #include +#include +#include + #if QT_VERSION < 0x050000 #include #else #include #endif -#include - -#include -#include - -#include "base58.h" -#include "bitcoinunits.h" -#include "guiconstants.h" -#include "guiutil.h" -#include "optionsmodel.h" -#include "paymentserver.h" -#include "ui_interface.h" -#include "util.h" -#include "wallet.h" -#include "walletmodel.h" +using namespace boost; const int BITCOIN_IPC_CONNECT_TIMEOUT = 1000; // milliseconds const QString BITCOIN_IPC_PREFIX("bitcoin:"); @@ -357,10 +361,10 @@ void PaymentServer::handleURIOrFile(const QString& s) if (s.startsWith(BITCOIN_IPC_PREFIX, Qt::CaseInsensitive)) // bitcoin: { -#if QT_VERSION >= 0x050000 - QUrlQuery uri((QUrl(s))); -#else +#if QT_VERSION < 0x050000 QUrl uri(s); +#else + QUrlQuery uri((QUrl(s))); #endif if (uri.hasQueryItem("request")) { -- cgit v1.2.3