CppEditor: Rearrange quick fix files

Moved content of cppinsertdecldef.(cpp|h) cppcompleteswitch.(cpp|h)
cppinsertqtpropertymembers.(cpp|h) and ApplyDeclDefLinkChanges to
cppquickfixes.(cpp|h).

Made msgQtStringLiteralDescription private member function of
WrapStringLiteral, added anonymous namespace, "extracted" useful
functions to the top of cppquickfixes.cpp.

Change-Id: I4f82a005a62be3c29d4b96902667bd3a2b9397cc
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
This commit is contained in:
Lorenz Haas
2013-04-11 18:01:40 +02:00
committed by Nikolai Kosjar
parent 38531a781e
commit 61ddf16689
13 changed files with 1665 additions and 1866 deletions

View File

@@ -230,6 +230,10 @@ public:
Type *type,
QByteArray *enclosingFunction = 0,
CallAST **enclosingFunctionCall = 0);
private:
static QString msgQtStringLiteralDescription(const QString &replacement, int qtVersion);
static QString msgQtStringLiteralDescription(const QString &replacement);
};
/*!
@@ -387,6 +391,69 @@ public:
void match(const CppQuickFixInterface &interface, QuickFixOperations &result);
};
/*!
Adds missing case statements for "switch (enumVariable)"
*/
class CompleteSwitchCaseStatement: public CppQuickFixFactory
{
public:
void match(const CppQuickFixInterface &interface, QuickFixOperations &result);
};
/*!
Adds a declarations to a definition
*/
class InsertDeclFromDef: public CppQuickFixFactory
{
public:
void match(const CppQuickFixInterface &interface, TextEditor::QuickFixOperations &result);
};
/*!
Adds a definition for a declaration.
*/
class InsertDefFromDecl: public CppQuickFixFactory
{
public:
void match(const CppQuickFixInterface &interface, TextEditor::QuickFixOperations &result);
};
/*!
Extracts the selected code and puts it to a function
*/
class ExtractFunction : public CppQuickFixFactory
{
public:
void match(const CppQuickFixInterface &interface, TextEditor::QuickFixOperations &result);
};
/*!
Adds getter and setter functions for a member variable
*/
class GenerateGetterSetter : public CppQuickFixFactory
{
public:
void match(const CppQuickFixInterface &interface, TextEditor::QuickFixOperations &result);
};
/*!
Adds missing members for a Q_PROPERTY
*/
class InsertQtPropertyMembers : public CppQuickFixFactory
{
public:
void match(const CppQuickFixInterface &interface, TextEditor::QuickFixOperations &result);
};
/*!
Applies function signature changes
*/
class ApplyDeclDefLinkChanges: public CppQuickFixFactory
{
public:
void match(const CppQuickFixInterface &interface, TextEditor::QuickFixOperations &result);
};
} // namespace Internal
} // namespace CppEditor