forked from qt-creator/qt-creator
CppEditor: Offer class-level quickfixes also when clicking "in class"
That is, allow the cursor to on some "neutral" place in the body of the declaration, not only strictly on the class name. Fixes: QTCREATORBUG-15699 Change-Id: I74ad6048c16c19d418446c990178535d878fc630 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -538,6 +538,11 @@ public:
|
||||
m_classAST = path.at(index)->asClassSpecifier();
|
||||
}
|
||||
}
|
||||
|
||||
// Also offer the operation if we are on some "empty" part of the class declaration.
|
||||
if (!m_classAST)
|
||||
m_classAST = path.at(pathSize - 1)->asClassSpecifier();
|
||||
|
||||
if (!m_classAST || !m_classAST->base_clause_list)
|
||||
return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user