forked from qt-creator/qt-creator
CppEditor: Add quickfix for creating a forward declaration
In header files, a forward declaration is often preferable to including another header file, so let's offer this as a quickfix. Fixes: QTCREATORBUG-23444 Change-Id: Ib50550abb5337098e4122e65e2af42a66742d6f6 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
@@ -71,6 +71,18 @@ private:
|
||||
QString m_include;
|
||||
};
|
||||
|
||||
class AddForwardDeclForUndefinedIdentifierOp: public CppQuickFixOperation
|
||||
{
|
||||
public:
|
||||
AddForwardDeclForUndefinedIdentifierOp(const CppQuickFixInterface &interface, int priority,
|
||||
const QString &fqClassName, int symbolPos);
|
||||
private:
|
||||
void perform() override;
|
||||
|
||||
const QString m_className;
|
||||
const int m_symbolPos;
|
||||
};
|
||||
|
||||
/*!
|
||||
Rewrite
|
||||
a op b
|
||||
|
||||
Reference in New Issue
Block a user