forked from qt-creator/qt-creator
Separate scope in classes quickopen filter
The scope of the classes is now separated and displayed in the second column, and not included in the search.
This commit is contained in:
@@ -90,6 +90,7 @@ public:
|
||||
SearchSymbols();
|
||||
|
||||
void setSymbolsToSearchFor(SymbolTypes types);
|
||||
void setSeparateScope(bool separateScope);
|
||||
|
||||
QList<ModelItemInfo> operator()(CPlusPlus::Document::Ptr doc)
|
||||
{ return operator()(doc, QString()); }
|
||||
@@ -111,14 +112,27 @@ protected:
|
||||
virtual bool visit(CPlusPlus::Declaration *symbol);
|
||||
#endif
|
||||
virtual bool visit(CPlusPlus::Class *symbol);
|
||||
|
||||
QString scopedSymbolName(const QString &symbolName) const;
|
||||
QString scopedSymbolName(const CPlusPlus::Symbol *symbol) const;
|
||||
QString symbolName(const CPlusPlus::Symbol *symbol) const;
|
||||
void appendItem(const QString &name,
|
||||
const QString &info,
|
||||
ModelItemInfo::ItemType type,
|
||||
const CPlusPlus::Symbol *symbol);
|
||||
|
||||
private:
|
||||
QString findOrInsert(const QString &s)
|
||||
{ return *strings.insert(s); }
|
||||
|
||||
QSet<QString> strings; // Used to avoid QString duplication
|
||||
|
||||
QString _scope;
|
||||
CPlusPlus::Overview overview;
|
||||
CPlusPlus::Icons icons;
|
||||
QList<ModelItemInfo> items;
|
||||
SymbolTypes symbolsToSearchFor;
|
||||
bool separateScope;
|
||||
};
|
||||
|
||||
Q_DECLARE_OPERATORS_FOR_FLAGS(SearchSymbols::SymbolTypes)
|
||||
|
||||
Reference in New Issue
Block a user