diff --git a/src/libs/cplusplus/TypePrettyPrinter.cpp b/src/libs/cplusplus/TypePrettyPrinter.cpp index 0e7ba193427..5b617054fd4 100644 --- a/src/libs/cplusplus/TypePrettyPrinter.cpp +++ b/src/libs/cplusplus/TypePrettyPrinter.cpp @@ -116,6 +116,9 @@ void TypePrettyPrinter::visit(UndefinedType *) _text.prepend(QLatin1String("signed")); else if (_fullySpecifiedType.isUnsigned()) _text.prepend(QLatin1String("unsigned")); + } else if (_fullySpecifiedType.isAuto()) { + prependSpaceUnlessBracket(); + _text.prepend("auto"); } prependCv(_fullySpecifiedType); diff --git a/src/plugins/cppeditor/quickfixes/insertfunctiondefinition.cpp b/src/plugins/cppeditor/quickfixes/insertfunctiondefinition.cpp index 0f9f8461380..f8ff21cd6ad 100644 --- a/src/plugins/cppeditor/quickfixes/insertfunctiondefinition.cpp +++ b/src/plugins/cppeditor/quickfixes/insertfunctiondefinition.cpp @@ -1883,17 +1883,17 @@ foo::foo2::MyType foo::foo2::bar() QByteArray original = "class Foo\n" "{\n" - " template\n" + " template\n" " void fun@c();\n" "};\n"; QByteArray expected = "class Foo\n" "{\n" - " template\n" + " template\n" " void fun@c();\n" "};\n" "\n" - "template\n" + "template\n" "inline void Foo::func()\n" "{\n" "\n"