CppEditor: Add quick fix for "Assign to Local Variable"

Adds a local variable which stores the return value of a function call
or new expression.

Task-number: QTCREATORBUG-9052
Change-Id: I1fccbdd5b9f28c8409a4b0fa24610e406de61b24
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
This commit is contained in:
Lorenz Haas
2013-04-17 21:53:20 +02:00
committed by Nikolai Kosjar
parent a8ff5e8343
commit 7ae31f2ea9
5 changed files with 419 additions and 1 deletions

View File

@@ -473,6 +473,15 @@ public:
void match(const CppQuickFixInterface &interface, TextEditor::QuickFixOperations &result);
};
/*!
Assigns the return value of a function call or a new expression to a local variable
*/
class AssignToLocalVariable : public CppQuickFixFactory
{
public:
void match(const CppQuickFixInterface &interface, TextEditor::QuickFixOperations &result);
};
} // namespace Internal
} // namespace CppEditor