forked from qt-creator/qt-creator
CppEditor: Let users create implementations for all member functions
... in one go. Fixes: QTCREATORBUG-12164 Change-Id: Ifc81c8b1caf4319ce57882375f513d72e4c0ea52 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -407,6 +407,26 @@ private:
|
||||
const CPlusPlus::FunctionDefinitionAST *ctor) const;
|
||||
};
|
||||
|
||||
/*!
|
||||
Adds a definition for any number of member function declarations.
|
||||
*/
|
||||
class InsertDefsFromDecls : public CppQuickFixFactory
|
||||
{
|
||||
public:
|
||||
void match(const CppQuickFixInterface &interface,
|
||||
TextEditor::QuickFixOperations &result) override;
|
||||
|
||||
enum class Mode {
|
||||
Off, // Testing: simulates user canceling the dialog
|
||||
Alternating, // Testing: simulates user choosing a different DefPos for every function
|
||||
User // Normal interactive mode
|
||||
};
|
||||
void setMode(Mode mode) { m_mode = mode; }
|
||||
|
||||
private:
|
||||
Mode m_mode = Mode::User;
|
||||
};
|
||||
|
||||
/*!
|
||||
Extracts the selected code and puts it to a function
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user