diff options
author | Christian Kamm <christian.d.kamm@nokia.com> | 2010-09-24 15:07:42 +0200 |
---|---|---|
committer | Christian Kamm <christian.d.kamm@nokia.com> | 2010-09-24 15:08:54 +0200 |
commit | be563abf68c5c8561d9d6c0b765941b6123fd52e (patch) | |
tree | 65cbfd64a6cb36a0a7e557ba4e3e99046c56ae7e /src/plugins/cpptools/cppcodeformatter.cpp | |
parent | 0420f91c122bbbebfb5e070562d76dc2006ccb61 (diff) | |
download | qt-creator-be563abf68c5c8561d9d6c0b765941b6123fd52e.tar.gz |
C++ indenter: Simplify debugging by making dump() more verbose.
Diffstat (limited to 'src/plugins/cpptools/cppcodeformatter.cpp')
-rw-r--r-- | src/plugins/cpptools/cppcodeformatter.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/plugins/cpptools/cppcodeformatter.cpp b/src/plugins/cpptools/cppcodeformatter.cpp index b242f6c490..87811c01cd 100644 --- a/src/plugins/cpptools/cppcodeformatter.cpp +++ b/src/plugins/cpptools/cppcodeformatter.cpp @@ -36,6 +36,7 @@ #include <texteditor/tabsettings.h> #include <QtCore/QDebug> +#include <QtCore/QMetaEnum> #include <QtGui/QTextDocument> #include <QtGui/QTextCursor> #include <QtGui/QTextBlock> @@ -907,10 +908,12 @@ int CodeFormatter::tokenizeBlock(const QTextBlock &block, bool *endedJoined) void CodeFormatter::dump() const { + QMetaEnum metaEnum = staticMetaObject.enumerator(staticMetaObject.indexOfEnumerator("StateType")); + qDebug() << "Current token index" << m_tokenIndex; qDebug() << "Current state:"; foreach (State s, m_currentState) { - qDebug() << s.type << s.savedIndentDepth << s.savedPaddingDepth; + qDebug() << metaEnum.valueToKey(s.type) << s.savedIndentDepth << s.savedPaddingDepth; } qDebug() << "Current indent depth:" << m_indentDepth; qDebug() << "Current padding depth:" << m_paddingDepth; |