diff options
author | Lorenz Haas <lykurg@gmail.com> | 2013-04-11 18:01:40 +0200 |
---|---|---|
committer | Nikolai Kosjar <nikolai.kosjar@digia.com> | 2013-04-15 13:32:42 +0200 |
commit | 61ddf16689e7499ac26aede6bf50a33ba03a6d69 (patch) | |
tree | 5946f64ee61ad181c1db5733dd70a32069bfe3c6 /src/plugins/cppeditor/cppquickfixes.h | |
parent | 38531a781ef0aef317c201da26ecfb49b2ae6366 (diff) | |
download | qt-creator-61ddf16689e7499ac26aede6bf50a33ba03a6d69.tar.gz |
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>
Diffstat (limited to 'src/plugins/cppeditor/cppquickfixes.h')
-rw-r--r-- | src/plugins/cppeditor/cppquickfixes.h | 67 |
1 files changed, 67 insertions, 0 deletions
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 |