forked from qt-creator/qt-creator
CppEditor: quickfix for conversion between pointer and stack variable
The ConvertFromAndToPointer quickfix allows to convert a pointer to a stack variable and vice versa. The initializer of the declaration is adjusted. Member accesses change to . or -> accordingly. Usages of the & and * operators are automatically fixed. Task-number: QTCREATORBUG-9598 Task-number: QTCREATORBUG-12733 Change-Id: I388a9bd32179c79bff808615299a91a225acea64 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
This commit is contained in:
@@ -459,6 +459,17 @@ public:
|
||||
void match(const CppQuickFixInterface &interface, TextEditor::QuickFixOperations &result);
|
||||
};
|
||||
|
||||
/*!
|
||||
Converts the selected variable to a pointer if it is a stack variable or reference, or vice versa.
|
||||
|
||||
Activates on variable declarations.
|
||||
*/
|
||||
class ConvertFromAndToPointer : public CppQuickFixFactory
|
||||
{
|
||||
public:
|
||||
void match(const CppQuickFixInterface &interface, TextEditor::QuickFixOperations &result);
|
||||
};
|
||||
|
||||
/*!
|
||||
Adds getter and setter functions for a member variable
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user