aboutsummaryrefslogtreecommitdiff
path: root/src/qt/main.cpp
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2019-01-09 14:38:28 +0100
committerMarcoFalke <falke.marco@gmail.com>2019-01-09 14:40:38 +0100
commitfdbe7f41c02847276e980724e49865daf7951214 (patch)
tree2269493cdc34a8b0a3cd8dcc071a98def95e8c36 /src/qt/main.cpp
parentc6806ee8694e9c864a29ef260c87b9fed77de84f (diff)
parent7e4bd19785ff9120b7242ff9f15231868aaf7db4 (diff)
Merge #11625: Add BitcoinApplication & RPCConsole tests
7e4bd19785 Add BitcoinApplication & RPCConsole tests (Russell Yanofsky) ca20b65cc0 Move BitcoinApplication to header so it can be tested (Russell Yanofsky) Pull request description: Add test coverage for Qt initialization code & basic RPC console functionality Motivation for this change was a bug in #11603 which existing tests failed to catch. Tree-SHA512: f66546ffc84b8e07679c66a73b265023fbf6a0cb8f24f1606a5fcae2dd3b4dc7b2c6d26c69dedcec53398a26ef17c4d5fb28c055698fa6e45e89aa2995cefe2f
Diffstat (limited to 'src/qt/main.cpp')
-rw-r--r--src/qt/main.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/qt/main.cpp b/src/qt/main.cpp
new file mode 100644
index 0000000000..6a3c2249d1
--- /dev/null
+++ b/src/qt/main.cpp
@@ -0,0 +1,17 @@
+// Copyright (c) 2018 The Bitcoin Core developers
+// Distributed under the MIT software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#include <qt/bitcoin.h>
+
+#include <QCoreApplication>
+
+#include <functional>
+#include <string>
+
+/** Translate string to current locale using Qt. */
+extern const std::function<std::string(const char*)> G_TRANSLATION_FUN = [](const char* psz) {
+ return QCoreApplication::translate("bitcoin-core", psz).toStdString();
+};
+
+int main(int argc, char* argv[]) { return GuiMain(argc, argv); }