diff options
Diffstat (limited to 'meson/test cases/frameworks/4 qt/q5core.cpp')
-rw-r--r-- | meson/test cases/frameworks/4 qt/q5core.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/meson/test cases/frameworks/4 qt/q5core.cpp b/meson/test cases/frameworks/4 qt/q5core.cpp new file mode 100644 index 000000000..44581a687 --- /dev/null +++ b/meson/test cases/frameworks/4 qt/q5core.cpp @@ -0,0 +1,28 @@ +#include <QCoreApplication> +#include <QtGlobal> +#include <QString> +#include <QTranslator> +#include <QLocale> +#include <QLibraryInfo> +#include <QDebug> + +int main(int argc, char **argv) { + QCoreApplication app(argc, argv); + + QTranslator qtTranslator; + qtTranslator.load("qt_" + QLocale::system().name(), + QLibraryInfo::location(QLibraryInfo::TranslationsPath)); + app.installTranslator(&qtTranslator); + + QTranslator myappTranslator; + if(!myappTranslator.load(QT "core_fr") ) + return 1; + + app.installTranslator(&myappTranslator); + + qDebug() << QObject::tr("Translate me!"); + // Don't actually start the main loop so this + // can be run as a unit test. + //return app.exec(); + return 0; +} |