diff options
author | Alex Merry <alex.merry@kde.org> | 2015-10-14 12:18:40 +0100 |
---|---|---|
committer | Alex Merry <alex.merry@kde.org> | 2015-11-03 10:22:34 +0000 |
commit | 009c480413910e8c1a18f4d1420f4a517ea606e6 (patch) | |
tree | c8a41523992eac3cadcfe18c11b956d84b397c5b /tests/ECMPoQmToolsTest/tr_thread_test_module.cpp | |
parent | fb7b8eea7d91772f989d5b060c86df20f2ebdb66 (diff) | |
download | extra-cmake-modules-009c480413910e8c1a18f4d1420f4a517ea606e6.tar.gz extra-cmake-modules-009c480413910e8c1a18f4d1420f4a517ea606e6.tar.bz2 |
Make sure we load translations on the main thread.
BUG: 346188
REVIEW: 123726
Diffstat (limited to 'tests/ECMPoQmToolsTest/tr_thread_test_module.cpp')
-rw-r--r-- | tests/ECMPoQmToolsTest/tr_thread_test_module.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/ECMPoQmToolsTest/tr_thread_test_module.cpp b/tests/ECMPoQmToolsTest/tr_thread_test_module.cpp new file mode 100644 index 00000000..b9000ffa --- /dev/null +++ b/tests/ECMPoQmToolsTest/tr_thread_test_module.cpp @@ -0,0 +1,12 @@ +#include <QCoreApplication> +#include <QTextStream> + +#include <stdio.h> + +extern "C" Q_DECL_EXPORT void print_strings() +{ + QTextStream output(stdout); + + output << QCoreApplication::translate("testcontext", "test string") << ":"; + output << QCoreApplication::translate("testcontext", "test plural %n", 0, 5) << '\n'; +} |