diff options
author | MarcoFalke <falke.marco@gmail.com> | 2018-08-13 16:13:29 -0400 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2018-08-24 08:34:38 -0400 |
commit | ddddce0e46e73d4ca369f2ce9696231cc579e1f9 (patch) | |
tree | b4242246762d8ff5c2351925ee8907b4dd232611 /src/qt | |
parent | ddc3ec92b0e655a3da21ac2e85ec2e7ecb66c65b (diff) |
util: Replace boost::signals2 with std::function
Diffstat (limited to 'src/qt')
-rw-r--r-- | src/qt/bitcoin.cpp | 10 | ||||
-rw-r--r-- | src/qt/bitcoingui.cpp | 2 | ||||
-rw-r--r-- | src/qt/splashscreen.cpp | 4 | ||||
-rw-r--r-- | src/qt/transactiontablemodel.cpp | 4 |
4 files changed, 11 insertions, 9 deletions
diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp index d3ec67e441..5da54c5b2d 100644 --- a/src/qt/bitcoin.cpp +++ b/src/qt/bitcoin.cpp @@ -76,13 +76,10 @@ static void InitMessage(const std::string &message) LogPrintf("init message: %s\n", message); } -/* - Translate string to current locale using Qt. - */ -static std::string Translate(const char* psz) -{ +/** Translate string to current locale using Qt. */ +const std::function<std::string(const char*)> G_TRANSLATION_FUN = [](const char* psz) { return QCoreApplication::translate("bitcoin-core", psz).toStdString(); -} +}; static QString GetLangTerritory() { @@ -619,7 +616,6 @@ int main(int argc, char *argv[]) // Now that QSettings are accessible, initialize translations QTranslator qtTranslatorBase, qtTranslator, translatorBase, translator; initTranslations(qtTranslatorBase, qtTranslator, translatorBase, translator); - translationInterface.Translate.connect(Translate); // Show help message immediately after parsing command-line options (for "-lang") and setting locale, // but before showing splash screen. diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index e2488092e2..71bfe74de5 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -57,6 +57,8 @@ #include <QUrlQuery> #include <QVBoxLayout> +#include <boost/bind.hpp> + const std::string BitcoinGUI::DEFAULT_UIPLATFORM = #if defined(Q_OS_MAC) "macosx" diff --git a/src/qt/splashscreen.cpp b/src/qt/splashscreen.cpp index e438d22919..0b111cc6d7 100644 --- a/src/qt/splashscreen.cpp +++ b/src/qt/splashscreen.cpp @@ -14,8 +14,8 @@ #include <interfaces/handler.h> #include <interfaces/node.h> #include <interfaces/wallet.h> -#include <util.h> #include <ui_interface.h> +#include <util.h> #include <version.h> #include <QApplication> @@ -24,6 +24,8 @@ #include <QPainter> #include <QRadialGradient> +#include <boost/bind.hpp> + SplashScreen::SplashScreen(interfaces::Node& node, Qt::WindowFlags f, const NetworkStyle *networkStyle) : QWidget(0, f), curAlignment(0), m_node(node) { diff --git a/src/qt/transactiontablemodel.cpp b/src/qt/transactiontablemodel.cpp index e100cac533..3443852023 100644 --- a/src/qt/transactiontablemodel.cpp +++ b/src/qt/transactiontablemodel.cpp @@ -16,10 +16,10 @@ #include <core_io.h> #include <interfaces/handler.h> #include <interfaces/node.h> -#include <validation.h> #include <sync.h> #include <uint256.h> #include <util.h> +#include <validation.h> #include <QColor> #include <QDateTime> @@ -27,6 +27,8 @@ #include <QIcon> #include <QList> +#include <boost/bind.hpp> + // Amount column is right-aligned it contains numbers static int column_alignments[] = { Qt::AlignLeft|Qt::AlignVCenter, /* status */ |