| 1 |
// Copyright (C) 2016 The Qt Company Ltd. |
| 2 |
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only |
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
#include <QtCore> |
| 29 |
#include <QtWidgets/QApplication> |
| 30 |
#include <QDebug> |
| 31 |
|
| 32 |
int main(int argc, char **argv) |
| 33 |
{ |
| 34 |
QApplication app(argc, argv); |
| 35 |
|
| 36 |
QTranslator translator; |
| 37 |
translator.load("whitespace"); |
| 38 |
app.installTranslator(&translator); |
| 39 |
|
| 40 |
QObject::tr("\nnewline at the start"); |
| 41 |
QObject::tr("newline at the end\n"); |
| 42 |
QObject::tr("newline and space at the end\n "); |
| 43 |
QObject::tr("space and newline at the end \n"); |
| 44 |
QObject::tr("\tTab at the start and newline at the end\n"); |
| 45 |
QObject::tr("\n\tnewline and tab at the start"); |
| 46 |
QObject::tr(" \tspace and tab at the start"); |
| 47 |
QObject::tr(" space_first"); |
| 48 |
QObject::tr("space_last "); |
| 49 |
QObject::tr("carriage return and line feed last\r\n"); |
| 50 |
return app.exec(); |
| 51 |
} |