QmlJS: Revert CodeFormatter::stateToString return type to QString

Change-Id: I532327126dfdbe4d338d7afd0bcbe5e27ba206d9
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
This commit is contained in:
Orgad Shaneh
2012-11-28 14:57:55 +02:00
committed by Fawzi Mohamed
parent a44aa55502
commit cd6302502b
2 changed files with 3 additions and 3 deletions

View File

@@ -1019,10 +1019,10 @@ void CodeFormatter::dump() const
qDebug() << "Current indent depth:" << m_indentDepth;
}
QByteArray CodeFormatter::stateToString(int type) const
QString CodeFormatter::stateToString(int type) const
{
const QMetaEnum &metaEnum = staticMetaObject.enumerator(staticMetaObject.indexOfEnumerator("StateType"));
return metaEnum.valueToKey(type);
return QString::fromUtf8(metaEnum.valueToKey(type));
}
QtStyleCodeFormatter::QtStyleCodeFormatter()

View File

@@ -278,7 +278,7 @@ protected:
bool isExpressionEndState(int type) const;
void dump() const;
QByteArray stateToString(int type) const;
QString stateToString(int type) const;
private:
void recalculateStateAfter(const QTextBlock &block);