diff options
author | Kai Koehne <kai.koehne@qt.io> | 2017-11-27 17:22:09 +0100 |
---|---|---|
committer | Kai Koehne <kai.koehne@qt.io> | 2018-01-04 11:17:20 +0000 |
commit | 1a60dc756f35b3b19a444c976dcb547f51c30d76 (patch) | |
tree | f18b28f441f0c8a7ea39f99a7e08da3f30562f36 /examples/assistant | |
parent | 2f3dc790aefadc74debfa25efe958078def34146 (diff) |
SimpleTextViewer example: Remove QObject::tr antipattern
Change-Id: I8e7d1dcf9cd2a5a1ccc563032324528fe3262611
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Diffstat (limited to 'examples/assistant')
-rw-r--r-- | examples/assistant/simpletextviewer/assistant.cpp | 5 | ||||
-rw-r--r-- | examples/assistant/simpletextviewer/assistant.h | 3 |
2 files changed, 6 insertions, 2 deletions
diff --git a/examples/assistant/simpletextviewer/assistant.cpp b/examples/assistant/simpletextviewer/assistant.cpp index 9e668bb7f..58103c14a 100644 --- a/examples/assistant/simpletextviewer/assistant.cpp +++ b/examples/assistant/simpletextviewer/assistant.cpp @@ -108,8 +108,9 @@ bool Assistant::startAssistant() proc->start(app, args); if (!proc->waitForStarted()) { - QMessageBox::critical(nullptr, QObject::tr("Simple Text Viewer"), - QObject::tr("Unable to launch Qt Assistant (%1)").arg(app)); + QMessageBox::critical(nullptr, + tr("Simple Text Viewer"), + tr("Unable to launch Qt Assistant (%1)").arg(app)); return false; } } diff --git a/examples/assistant/simpletextviewer/assistant.h b/examples/assistant/simpletextviewer/assistant.h index dada5a1ee..1ea7dd78f 100644 --- a/examples/assistant/simpletextviewer/assistant.h +++ b/examples/assistant/simpletextviewer/assistant.h @@ -51,6 +51,7 @@ #ifndef ASSISTANT_H #define ASSISTANT_H +#include <QCoreApplication> #include <QString> QT_BEGIN_NAMESPACE @@ -59,6 +60,8 @@ QT_END_NAMESPACE class Assistant { + Q_DECLARE_TR_FUNCTIONS(Assistant) + public: Assistant(); ~Assistant(); |