forked from qt-creator/qt-creator
CppEditor: Handle classes that do not override
...when searching the overrides for virtual functions. In case there is no override for the static type of a function call expression, make sure to: 1) include the last provided override (look up bases) 2) and all overrides whose classes are derived from that static type Task-number: QTCREATORBUG-10470 Change-Id: I2c01bfdc6cb35c5a01a000ebd81a2b322ce2b795 Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
This commit is contained in:
@@ -48,9 +48,10 @@ public:
|
||||
VirtualFunctionAssistProvider();
|
||||
|
||||
struct Parameters {
|
||||
Parameters() : function(0), cursorPosition(-1), openInNextSplit(false) {}
|
||||
Parameters() : function(0), staticClass(0), cursorPosition(-1), openInNextSplit(false) {}
|
||||
|
||||
CPlusPlus::Function *function;
|
||||
CPlusPlus::Class *staticClass;
|
||||
QSharedPointer<CPlusPlus::TypeOfExpression> typeOfExpression; // Keeps instantiated symbols.
|
||||
CPlusPlus::Snapshot snapshot;
|
||||
int cursorPosition;
|
||||
@@ -80,6 +81,7 @@ public:
|
||||
|
||||
static QList<CPlusPlus::Symbol *> overrides(CPlusPlus::Function *function,
|
||||
CPlusPlus::Class *functionsClass,
|
||||
CPlusPlus::Class *staticClass,
|
||||
const CPlusPlus::Snapshot &snapshot);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user