ScxmlEditor: Convert to using Tr::tr

Change-Id: Ia8ab06d4b8a16bb144d6887624c478fb911f29ea
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Alessandro Portale
2022-08-23 13:05:04 +02:00
parent 94d7e2efac
commit dc3eae230f
41 changed files with 226 additions and 1445 deletions

View File

@@ -1,8 +1,9 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0
#include "statewarningitem.h"
#include "idwarningitem.h"
#include "scxmleditortr.h"
#include "statewarningitem.h"
#include <utils/utilsicons.h>
@@ -12,11 +13,11 @@ StateWarningItem::StateWarningItem(StateItem *parent)
: WarningItem(parent)
{
setSeverity(OutputPane::Warning::InfoType);
setTypeName(tr("State"));
setDescription(tr("Draw some transitions to state."));
setTypeName(Tr::tr("State"));
setDescription(Tr::tr("Draw some transitions to state."));
setPixmap(Utils::Icons::WARNING.pixmap());
setReason(tr("No input connection."));
setReason(Tr::tr("No input connection."));
}
void StateWarningItem::setIdWarning(IdWarningItem *idwarning)
@@ -34,16 +35,16 @@ void StateWarningItem::check()
bool inputProblem = !m_parentItem->isInitial() && !m_parentItem->hasInputTransitions(m_parentItem, true);
if (outputProblem && inputProblem) {
setReason(tr("No input or output connections (%1).").arg(m_parentItem->itemId()));
setDescription(tr("Draw some transitions to or from state."));
setReason(Tr::tr("No input or output connections (%1).").arg(m_parentItem->itemId()));
setDescription(Tr::tr("Draw some transitions to or from state."));
setWarningActive(true);
} else if (outputProblem) {
setReason(tr("No output connections (%1).").arg(m_parentItem->itemId()));
setDescription(tr("Draw some transitions from state."));
setReason(Tr::tr("No output connections (%1).").arg(m_parentItem->itemId()));
setDescription(Tr::tr("Draw some transitions from state."));
setWarningActive(true);
} else if (inputProblem) {
setReason(tr("No input connections (%1).").arg(m_parentItem->itemId()));
setDescription(tr("Draw some transitions to state."));
setReason(Tr::tr("No input connections (%1).").arg(m_parentItem->itemId()));
setDescription(Tr::tr("Draw some transitions to state."));
setWarningActive(true);
} else
setWarningActive(false);