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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user