aboutsummaryrefslogtreecommitdiff
path: root/src/qt/main.cpp
diff options
context:
space:
mode:
authorRussell Yanofsky <russ@yanofsky.org>2017-11-06 20:11:43 -0500
committerRussell Yanofsky <russ@yanofsky.org>2019-01-04 06:31:07 -0500
commit7e4bd19785ff9120b7242ff9f15231868aaf7db4 (patch)
tree6a08b07a7be3233661b9a1bf973d77fa81a31109 /src/qt/main.cpp
parentca20b65cc04825bb317f1a59d02c77912f6bf097 (diff)
downloadbitcoin-7e4bd19785ff9120b7242ff9f15231868aaf7db4.tar.xz
Add BitcoinApplication & RPCConsole tests
Add test coverage for Qt initialization code & basic RPC console functionality.
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); }