Commit 19bb8e34 authored by Eike Ziller's avatar Eike Ziller Committed by Tobias Hunger

ProjectExplorer: Fix translation issues

Add missing Q_OBJECT macro, use sensible contexts, and use "simpler"
namespace resolution (for QTBUG-64007)

Change-Id: I2417a7a40e8ba0ff4bfdff34d2a4c57d8dcdeb00
Reviewed-by: Tobias Hunger's avatarTobias Hunger <tobias.hunger@qt.io>
parent 68589a3f
......@@ -57,9 +57,11 @@
*/
using namespace Utils;
using namespace ProjectExplorer::Internal;
namespace ProjectExplorer {
using namespace Internal;
namespace Internal {
enum State { Inactive, Run };
......
......@@ -233,7 +233,10 @@ protected:
class SessionDelegate : public BaseDelegate
{
protected:
QString entryType() override { return tr("session", "Appears in \"Open session <name>\""); }
QString entryType() override
{
return ProjectWelcomePage::tr("session", "Appears in \"Open session <name>\"");
}
QRect toolTipArea(const QRect &itemRect, const QModelIndex &idx) const override
{
// in expanded state bottom contains 'Clone', 'Rename', etc links, where the tool tip
......@@ -413,7 +416,10 @@ private:
class ProjectDelegate : public BaseDelegate
{
QString entryType() override { return tr("project", "Appears in \"Open project <name>\""); }
QString entryType() override
{
return ProjectWelcomePage::tr("project", "Appears in \"Open project <name>\"");
}
int shortcutRole() const override { return ProjectModel::ShortcutRole; }
public:
......
......@@ -988,9 +988,9 @@ void RunControlPrivate::onWorkerStarted(RunWorker *worker)
continueStart();
return;
}
showError(tr("Unexpected run control state %1 when worker %2 started.")
.arg(stateName(state))
.arg(worker->d->id));
showError(RunControl::tr("Unexpected run control state %1 when worker %2 started.")
.arg(stateName(state))
.arg(worker->d->id));
}
void RunControlPrivate::onWorkerFailed(RunWorker *worker, const QString &msg)
......@@ -1576,14 +1576,14 @@ void RunWorkerPrivate::timerEvent(QTimerEvent *ev)
if (startWatchdogCallback)
startWatchdogCallback();
else
q->reportFailure(tr("Worker start timed out."));
q->reportFailure(RunWorker::tr("Worker start timed out."));
return;
}
if (ev->timerId() == stopWatchdogTimerId) {
if (stopWatchdogCallback)
stopWatchdogCallback();
else
q->reportFailure(tr("Worker stop timed out."));
q->reportFailure(RunWorker::tr("Worker stop timed out."));
return;
}
}
......
......@@ -517,6 +517,8 @@ private:
class PROJECTEXPLORER_EXPORT SimpleTargetRunner : public RunWorker
{
Q_OBJECT
public:
explicit SimpleTargetRunner(RunControl *runControl);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment