diff --git a/src/bench/bench_dash.cpp b/src/bench/bench_dash.cpp index c549bfbafc..001e7612ee 100644 --- a/src/bench/bench_dash.cpp +++ b/src/bench/bench_dash.cpp @@ -16,6 +16,8 @@ #include +const std::function G_TRANSLATION_FUN = nullptr; + static const int64_t DEFAULT_BENCH_EVALUATIONS = 5; static const char* DEFAULT_BENCH_FILTER = ".*"; static const char* DEFAULT_BENCH_SCALING = "1.0"; diff --git a/src/dash-cli.cpp b/src/dash-cli.cpp index cf97031aa0..8d6bc22f73 100644 --- a/src/dash-cli.cpp +++ b/src/dash-cli.cpp @@ -26,6 +26,8 @@ #include +const std::function G_TRANSLATION_FUN = nullptr; + static const char DEFAULT_RPCCONNECT[] = "127.0.0.1"; static const int DEFAULT_HTTP_CLIENT_TIMEOUT=900; static const bool DEFAULT_NAMED=false; diff --git a/src/dash-tx.cpp b/src/dash-tx.cpp index 5fe7e7d6f5..d2ff5807e3 100644 --- a/src/dash-tx.cpp +++ b/src/dash-tx.cpp @@ -32,6 +32,8 @@ static bool fCreateBlank; static std::map registers; static const int CONTINUE_EXECUTION=-1; +const std::function G_TRANSLATION_FUN = nullptr; + static void SetupBitcoinTxArgs() { gArgs.AddArg("-?", "This help message", false, OptionsCategory::OPTIONS); diff --git a/src/dashd.cpp b/src/dashd.cpp index 3dd8012093..b8bf72d27d 100644 --- a/src/dashd.cpp +++ b/src/dashd.cpp @@ -25,6 +25,8 @@ #include +const std::function G_TRANSLATION_FUN = nullptr; + /* Introduction text for doxygen: */ /*! \mainpage Developer documentation diff --git a/src/noui.cpp b/src/noui.cpp index 4626d54104..1fad06c085 100644 --- a/src/noui.cpp +++ b/src/noui.cpp @@ -13,6 +13,8 @@ #include #include +#include + static bool noui_ThreadSafeMessageBox(const std::string& message, const std::string& caption, unsigned int style) { bool fSecure = style & CClientUIInterface::SECURE; diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index 1f87618c5f..3df992d455 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -61,6 +61,8 @@ #include #include +#include + const std::string BitcoinGUI::DEFAULT_UIPLATFORM = #if defined(Q_OS_MAC) "macosx" diff --git a/src/qt/dash.cpp b/src/qt/dash.cpp index 41012a710c..c9bd09e388 100644 --- a/src/qt/dash.cpp +++ b/src/qt/dash.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 G_TRANSLATION_FUN = [](const char* psz) { return QCoreApplication::translate("dash-core", psz).toStdString(); -} +}; static QString GetLangTerritory() { @@ -628,7 +625,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); if (gArgs.IsArgSet("-printcrashinfo")) { auto crashInfo = GetCrashInfoStrFromSerializedStr(gArgs.GetArg("-printcrashinfo", "")); diff --git a/src/qt/splashscreen.cpp b/src/qt/splashscreen.cpp index 67126ee299..20fffe7693 100644 --- a/src/qt/splashscreen.cpp +++ b/src/qt/splashscreen.cpp @@ -18,8 +18,8 @@ #include #include #include -#include #include +#include #include #include @@ -27,6 +27,8 @@ #include #include +#include + 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 2a443e70a1..505e1e0a60 100644 --- a/src/qt/transactiontablemodel.cpp +++ b/src/qt/transactiontablemodel.cpp @@ -13,10 +13,10 @@ #include #include #include -#include #include #include #include +#include #include #include @@ -24,6 +24,8 @@ #include #include +#include + // Amount column is right-aligned it contains numbers static int column_alignments[] = { Qt::AlignLeft|Qt::AlignVCenter, /* status */ diff --git a/src/test/test_dash.cpp b/src/test/test_dash.cpp index 8fdb2c7c43..ba48ade7d6 100644 --- a/src/test/test_dash.cpp +++ b/src/test/test_dash.cpp @@ -9,15 +9,16 @@ #include #include #include -#include #include #include #include -#include -#include -#include #include +#include #include