forked from qt-creator/qt-creator
C++: Offer only signals when completing in a connect() call
... at the second argument. The logic is as follows: The clang code model checks whether the set of completions contains any signals. If so, it instructs the built-in code model to analyze the AST to find out whether the completion location was at the second argument of a call to QObject::connect(). In that case, we filter out all non-signals, because they are not valid at that location. Fixes: QTCREATORBUG-13558 Change-Id: I9c7d0bd16161c723aef822280626cd06ece7df93 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -169,6 +169,9 @@ public:
|
||||
SymbolFinder *symbolFinder,
|
||||
bool inNextSplit) const final;
|
||||
|
||||
bool positionRequiresSignal(const QString &filePath, const QByteArray &content,
|
||||
int position) const;
|
||||
|
||||
void renameUsages(CPlusPlus::Symbol *symbol, const CPlusPlus::LookupContext &context,
|
||||
const QString &replacement = QString());
|
||||
void findUsages(CPlusPlus::Symbol *symbol, const CPlusPlus::LookupContext &context);
|
||||
|
||||
Reference in New Issue
Block a user