From 61ddf16689e7499ac26aede6bf50a33ba03a6d69 Mon Sep 17 00:00:00 2001 From: Lorenz Haas Date: Thu, 11 Apr 2013 18:01:40 +0200 Subject: 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 --- src/plugins/cppeditor/cppquickfixes.h | 67 +++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) (limited to 'src/plugins/cppeditor/cppquickfixes.h') diff --git a/src/plugins/cppeditor/cppquickfixes.h b/src/plugins/cppeditor/cppquickfixes.h index 66950f98ac..61e2dbe9fa 100644 --- a/src/plugins/cppeditor/cppquickfixes.h +++ b/src/plugins/cppeditor/cppquickfixes.h @@ -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 -- cgit v1.2.1