diff options
author | Jarek Kobus <jaroslaw.kobus@theqtcompany.com> | 2016-04-18 19:04:59 +0200 |
---|---|---|
committer | Erik Verbruggen <erik.verbruggen@theqtcompany.com> | 2016-04-19 08:50:38 +0000 |
commit | 33f6d3c03768b88369bb7b666262a7f36a72d2a2 (patch) | |
tree | 6c5b89a8575f5225be0636a35a21ed3a8c413217 /tools | |
parent | f648d720d0c2a5dcef02c10cfe6cfaea717a6cdc (diff) |
Remove old, obsolete, dead code
Change-Id: I384cafc47b43cdc96d02cd98179503150af35758
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/qscxmlc/scxmlcppdumper.cpp | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/tools/qscxmlc/scxmlcppdumper.cpp b/tools/qscxmlc/scxmlcppdumper.cpp index 5f37ac8..a48a6b6 100644 --- a/tools/qscxmlc/scxmlcppdumper.cpp +++ b/tools/qscxmlc/scxmlcppdumper.cpp @@ -464,19 +464,7 @@ protected: clazz.classFields << QStringLiteral("QScxmlTransition ") + tName + QLatin1Char(';'); // Initializer: -#if QT_VERSION < QT_VERSION_CHECK(5, 6, 0) // QTBUG-46703 work-around. See bug report why it's a bad one. - QString parentName; - auto parent = m_parents.last(); - if (HistoryState *historyState = parent->asHistoryState()) { - parentName = QStringLiteral("state_") + mangledName(historyState) + QStringLiteral("_defaultConfiguration"); - } else { - parentName = parentStateMemberName(); - } - Q_ASSERT(!parentName.isEmpty()); - QString initializer = tName + QStringLiteral("(&") + parentName + QStringLiteral(", "); -#else QString initializer = tName + QStringLiteral("("); -#endif QStringList elements; foreach (const QString &event, node->events) elements.append(qba(event)); @@ -491,15 +479,11 @@ protected: clazz.init.impl << tName + QStringLiteral(".setConditionalExpression(%1);").arg(cond); } -#if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0) if (m_parents.last()->asHistoryState()) { clazz.init.impl << QStringLiteral("%1.setDefaultTransition(&%2);").arg(parentStateMemberName(), tName); } else { clazz.init.impl << QStringLiteral("%1.addTransitionTo(&%2);").arg(tName, parentStateMemberName()); } -#else // QTBUG-46703: no default transition for QHistoryState yet... - clazz.init.impl << parentName + QStringLiteral(".addTransition(&") + tName + QStringLiteral(");"); -#endif if (node->type == Transition::Internal) { clazz.init.impl << tName + QStringLiteral(".setTransitionType(QAbstractTransition::InternalTransition);"); @@ -554,21 +538,6 @@ protected: // visit the kid: if (Transition *t = node->defaultConfiguration()) { -#if QT_VERSION < QT_VERSION_CHECK(5, 6, 0) // work-around for QTBUG-46703 - // Declaration: - clazz.classFields << QStringLiteral("QState ") + stateName + QStringLiteral("_defaultConfiguration;"); - - // Initializer: - QString init = stateName + QStringLiteral("_defaultConfiguration(&state_"); - if (State *parentState = node->parent->asState()) { - init += mangledName(parentState); - } - clazz.constructor.initializer << init + QLatin1Char(')'); - - // init: - clazz.init.impl << stateName + QStringLiteral(".setDefaultState(&") - + stateName + QStringLiteral("_defaultConfiguration);"); -#endif m_parents.append(node); t->accept(this); |