forked from qt-creator/qt-creator
C++: Fix indenting of QML_* macros.
Task-number: QTCREATORBUG-2111
This commit is contained in:
@@ -678,6 +678,7 @@ bool CodeFormatter::tryDeclaration()
|
|||||||
QString tokenText = currentTokenText().toString();
|
QString tokenText = currentTokenText().toString();
|
||||||
if (tokenText.startsWith(QLatin1String("Q_"))
|
if (tokenText.startsWith(QLatin1String("Q_"))
|
||||||
|| tokenText.startsWith(QLatin1String("QT_"))
|
|| tokenText.startsWith(QLatin1String("QT_"))
|
||||||
|
|| tokenText.startsWith(QLatin1String("QML_"))
|
||||||
|| tokenText.startsWith(QLatin1String("QDOC_"))) {
|
|| tokenText.startsWith(QLatin1String("QDOC_"))) {
|
||||||
enter(qt_like_macro);
|
enter(qt_like_macro);
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -299,6 +299,8 @@ void tst_CodeFormatter::macrosNoSemicolon()
|
|||||||
<< Line("int i;")
|
<< Line("int i;")
|
||||||
<< Line("Q_BLABLA();")
|
<< Line("Q_BLABLA();")
|
||||||
<< Line("int i;")
|
<< Line("int i;")
|
||||||
|
<< Line("QML_DECLARE_TYPE(a, b, c, d)")
|
||||||
|
<< Line("int i;")
|
||||||
<< Line("Q_PROPERTY(abc)")
|
<< Line("Q_PROPERTY(abc)")
|
||||||
<< Line("QDOC_PROPERTY(abc)")
|
<< Line("QDOC_PROPERTY(abc)")
|
||||||
<< Line("void foo() {")
|
<< Line("void foo() {")
|
||||||
|
|||||||
Reference in New Issue
Block a user