CppEditor: Add a second variant of "move def to decl" quickfix

This time with the cursor on the declaration.

Fixes: QTCREATORBUG-9515
Change-Id: I50b2ac8516f4df98e4cc9e3ffa60a9e5cf079c4e
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Christian Kandeler
2023-10-02 13:27:17 +02:00
parent d4a5096c76
commit 6b81c93a66
3 changed files with 134 additions and 28 deletions

View File

@@ -520,9 +520,18 @@ public:
};
/*!
Moves the definition of a function to its declaration.
Moves the definition of a function to its declaration, with the cursor on the definition.
*/
class MoveFuncDefToDecl: public CppQuickFixFactory
class MoveFuncDefToDeclPush : public CppQuickFixFactory
{
public:
void match(const CppQuickFixInterface &interface, TextEditor::QuickFixOperations &result) override;
};
/*!
Moves the definition of a function to its declaration, with the cursor on the declaration.
*/
class MoveFuncDefToDeclPull : public CppQuickFixFactory
{
public:
void match(const CppQuickFixInterface &interface, TextEditor::QuickFixOperations &result) override;