Commit 530332c2 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh

CppTools: Replace Method with Function

Change-Id: I6405c4dfa07eba1ea09ba23fe20667769eaca748
Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@digia.com>
parent edddfba9
......@@ -112,7 +112,7 @@ void ClangSymbolSearcher::search(const QLinkedList<Symbol> &allSymbols)
case Symbol::Constructor:
case Symbol::Destructor:
if (m_parameters.types & SymbolSearcher::Functions) {
info.type = CppTools::ModelItemInfo::Method;
info.type = CppTools::ModelItemInfo::Function;
break;
} else {
continue;
......
......@@ -130,7 +130,7 @@ public:
if (index != -1) {
QString text = info.symbolName;
QString scope = info.symbolScope;
if (info.type == ModelItemInfo::Method) {
if (info.type == ModelItemInfo::Function) {
QString name;
info.unqualifiedNameAndScope(info.symbolName, &name, &scope);
text = name + info.symbolType;
......
......@@ -89,7 +89,7 @@ QList<Core::LocatorFilterEntry> CppCurrentDocumentFilter::matchesFor(QFutureInte
QString matchString = info.symbolName;
if (info.type == ModelItemInfo::Declaration)
matchString = ModelItemInfo::representDeclaration(info.symbolName, info.symbolType);
else if (info.type == ModelItemInfo::Method)
else if (info.type == ModelItemInfo::Function)
matchString += info.symbolType;
if ((hasWildcard && regexp.exactMatch(matchString))
......@@ -98,7 +98,7 @@ QList<Core::LocatorFilterEntry> CppCurrentDocumentFilter::matchesFor(QFutureInte
QVariant id = qVariantFromValue(info);
QString name = matchString;
QString extraInfo = info.symbolScope;
if (info.type == ModelItemInfo::Method) {
if (info.type == ModelItemInfo::Function) {
if (info.unqualifiedNameAndScope(matchString, &name, &extraInfo))
name += info.symbolType;
}
......
......@@ -132,7 +132,7 @@ void CppLocatorData::flushPendingDocument(bool force)
case ModelItemInfo::Class:
resultsClasses.append(info);
break;
case ModelItemInfo::Method:
case ModelItemInfo::Function:
resultsFunctions.append(info);
break;
default:
......
......@@ -97,7 +97,7 @@ bool SearchSymbols::visit(Function *symbol)
return false;
QString name = symbolName(symbol);
QString type = overview.prettyType(symbol->type());
appendItem(name, type, _scope, ModelItemInfo::Method, symbol);
appendItem(name, type, _scope, ModelItemInfo::Function, symbol);
return false;
}
......@@ -130,7 +130,7 @@ bool SearchSymbols::visit(Declaration *symbol)
QString name = symbolName(symbol);
QString type = overview.prettyType(symbol->type());
appendItem(name, type, _scope,
symbol->type()->asFunctionType() ? ModelItemInfo::Method
symbol->type()->asFunctionType() ? ModelItemInfo::Function
: ModelItemInfo::Declaration,
symbol);
return false;
......
......@@ -50,7 +50,7 @@ namespace CppTools {
struct CPPTOOLS_EXPORT ModelItemInfo
{
enum ItemType { Enum, Class, Method, Declaration };
enum ItemType { Enum, Class, Function, Declaration };
ModelItemInfo()
: type(Declaration),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment