CppEditor: Refactor "insert member from use" quickfixes

The interfaces make much more sense now, and the coding style is taken
into account (except for the fallback case where the user enters the
type).

Change-Id: If08dfc41ebd63287fb5b0b187944e7fdf08b0823
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Christian Kandeler
2023-05-04 13:21:17 +02:00
parent 80a425acba
commit 7808195f74
2 changed files with 60 additions and 111 deletions

View File

@@ -376,15 +376,9 @@ private:
TextEditor::QuickFixOperations &result);
void maybeAddMember(const CppQuickFixInterface &interface, CPlusPlus::Scope *scope,
const QByteArray &classTypeExpr, const QString &typeString,
const QByteArray &classTypeExpr, const CPlusPlus::ExpressionAST *initExpr,
TextEditor::QuickFixOperations &result);
QString getType(
const CppQuickFixInterface &interface,
const CPlusPlus::MemInitializerAST *memInitializer,
const CPlusPlus::FunctionDefinitionAST *ctor) const;
QString getIdentifier(const CppQuickFixInterface &interface) const;
bool m_membersOnly = false;
};