forked from qt-creator/qt-creator
ScxmlEditor: Convert to using Tr::tr
Change-Id: Ia8ab06d4b8a16bb144d6887624c478fb911f29ea Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0
|
||||
|
||||
#include "idwarningitem.h"
|
||||
#include "scxmleditortr.h"
|
||||
|
||||
#include <QGraphicsScene>
|
||||
|
||||
using namespace ScxmlEditor::PluginInterface;
|
||||
@@ -10,9 +12,9 @@ IdWarningItem::IdWarningItem(QGraphicsItem *parent)
|
||||
: WarningItem(parent)
|
||||
{
|
||||
setSeverity(OutputPane::Warning::ErrorType);
|
||||
setTypeName(tr("State"));
|
||||
setDescription(tr("Each state must have a unique ID."));
|
||||
setReason(tr("Missing ID."));
|
||||
setTypeName(Tr::tr("State"));
|
||||
setDescription(Tr::tr("Each state must have a unique ID."));
|
||||
setReason(Tr::tr("Missing ID."));
|
||||
setX(-boundingRect().width());
|
||||
}
|
||||
|
||||
@@ -32,7 +34,7 @@ void IdWarningItem::setId(const QString &text)
|
||||
|
||||
// Check new id
|
||||
if (m_id.isEmpty()) {
|
||||
setReason(tr("Missing ID."));
|
||||
setReason(Tr::tr("Missing ID."));
|
||||
setWarningActive(true);
|
||||
} else
|
||||
checkDuplicates(m_id);
|
||||
@@ -56,7 +58,7 @@ void IdWarningItem::checkDuplicates(const QString &id)
|
||||
foundItems[0]->setWarningActive(false);
|
||||
} else {
|
||||
for (int i = 0; i < foundItems.count(); ++i) {
|
||||
foundItems[i]->setReason(tr("Duplicate ID (%1).").arg(id));
|
||||
foundItems[i]->setReason(Tr::tr("Duplicate ID (%1).").arg(id));
|
||||
foundItems[i]->setWarningActive(true);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user