summaryrefslogtreecommitdiff
path: root/src/plugins/cpptools/insertionpointlocator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/cpptools/insertionpointlocator.cpp')
-rw-r--r--src/plugins/cpptools/insertionpointlocator.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/plugins/cpptools/insertionpointlocator.cpp b/src/plugins/cpptools/insertionpointlocator.cpp
index d8e2762616..9359bb7a55 100644
--- a/src/plugins/cpptools/insertionpointlocator.cpp
+++ b/src/plugins/cpptools/insertionpointlocator.cpp
@@ -135,7 +135,7 @@ protected:
if (needsLeadingEmptyLine)
prefix += QLatin1String("\n");
if (needsPrefix)
- prefix += InsertionPointLocator::accessSpecToString(_xsSpec);
+ prefix += InsertionPointLocator::accessSpecToString(_xsSpec) + QLatin1String(":\n");
QString suffix;
if (needsSuffix)
@@ -278,25 +278,25 @@ QString InsertionPointLocator::accessSpecToString(InsertionPointLocator::AccessS
switch (xsSpec) {
default:
case InsertionPointLocator::Public:
- return QLatin1String("public:\n");
+ return QLatin1String("public");
case InsertionPointLocator::Protected:
- return QLatin1String("protected:\n");
+ return QLatin1String("protected");
case InsertionPointLocator::Private:
- return QLatin1String("private:\n");
+ return QLatin1String("private");
case InsertionPointLocator::PublicSlot:
- return QLatin1String("public slots:\n");
+ return QLatin1String("public slots");
case InsertionPointLocator::ProtectedSlot:
- return QLatin1String("protected slots:\n");
+ return QLatin1String("protected slots");
case InsertionPointLocator::PrivateSlot:
- return QLatin1String("private slots:\n");
+ return QLatin1String("private slots");
case InsertionPointLocator::Signals:
- return QLatin1String("signals:\n");
+ return QLatin1String("signals");
}
}
@@ -497,7 +497,7 @@ static InsertionLocation nextToSurroundingDefinitions(Symbol *declaration,
return noResult;
// scan preceding declarations for a function declaration (and see if it is defined)
- CppTools::SymbolFinder symbolFinder;
+ SymbolFinder symbolFinder;
Function *definitionFunction = 0;
QString prefix, suffix;
Declaration *surroundingFunctionDecl = 0;
@@ -572,7 +572,7 @@ QList<InsertionLocation> InsertionPointLocator::methodDefinition(Symbol *declara
return result;
if (useSymbolFinder) {
- CppTools::SymbolFinder symbolFinder;
+ SymbolFinder symbolFinder;
if (symbolFinder.findMatchingDefinition(declaration, m_refactoringChanges.snapshot(), true))
return result;
}