summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/assistant/simpletextviewer/assistant.cpp5
-rw-r--r--examples/assistant/simpletextviewer/assistant.h3
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();