diff options
author | Lars Knoll <lars.knoll@nokia.com> | 2009-03-23 09:18:55 (GMT) |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2009-03-23 09:18:55 (GMT) |
commit | e5fcad302d86d316390c6b0f62759a067313e8a9 (patch) | |
tree | c2afbf6f1066b6ce261f14341cf6d310e5595bc1 /tools/linguist/tests/data | |
download | Qt-e5fcad302d86d316390c6b0f62759a067313e8a9.zip Qt-e5fcad302d86d316390c6b0f62759a067313e8a9.tar.gz Qt-e5fcad302d86d316390c6b0f62759a067313e8a9.tar.bz2 |
Long live Qt 4.5!
Diffstat (limited to 'tools/linguist/tests/data')
-rw-r--r-- | tools/linguist/tests/data/main.cpp | 35 | ||||
-rw-r--r-- | tools/linguist/tests/data/test.pro | 9 |
2 files changed, 44 insertions, 0 deletions
diff --git a/tools/linguist/tests/data/main.cpp b/tools/linguist/tests/data/main.cpp new file mode 100644 index 0000000..ebbda0a --- /dev/null +++ b/tools/linguist/tests/data/main.cpp @@ -0,0 +1,35 @@ + +#include <QtGui> +#include <QtCore> + +int main(int argc, char **argv) +{ + QApplication app(argc, argv); + QStringList args = app.arguments(); + + if (argc <= 1) { + qDebug() << "Usage: " << qPrintable(args[0]) << " <ts-file>"; + return 1; + } + + QTranslator trans; + trans.load(args[1], "."); + app.installTranslator(&trans); + + QWidget w; + QVBoxLayout *layout = new QVBoxLayout(&w); + + QLabel label1(QObject::tr("XXXXXXXXX \33 XXXXXXXXXXX • and → "), 0); + QLabel label2(QObject::tr("\32"), 0); + QLabel label3(QObject::tr("\176"), 0); + QLabel label4(QObject::tr("\301"), 0); + + layout->addWidget(&label1); + layout->addWidget(&label2); + layout->addWidget(&label3); + layout->addWidget(&label4); + + w.show(); + + return app.exec(); +} diff --git a/tools/linguist/tests/data/test.pro b/tools/linguist/tests/data/test.pro new file mode 100644 index 0000000..90e5704 --- /dev/null +++ b/tools/linguist/tests/data/test.pro @@ -0,0 +1,9 @@ +TEMPLATE = app +TARGET += +DEPENDPATH += . +INCLUDEPATH += . + +SOURCES += main.cpp + +TRANSLATIONS += t1_en.ts +TRANSLATIONS += t1_de.ts |