Clang: Use the same format for the current document filter and the symbol outline

Global variables and fields had different style of
the return value. Make it look the same.

Change-Id: Ie031a994b65991289103028234227950861e05d0
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
This commit is contained in:
Ivan Donchevskii
2018-08-07 10:09:39 +02:00
parent d2b951565a
commit 86b8164a93

View File

@@ -69,11 +69,6 @@ static QString addType(const QString &signature, const ClangBackEnd::ExtraInfo &
return signature + QLatin1String(" -> ", 4) + extraInfo.typeSpelling.toString();
}
static QString addTypeToVariableName(const QString &name, const ClangBackEnd::ExtraInfo &extraInfo)
{
return extraInfo.typeSpelling.toString() + QLatin1String(" ") + name;
}
static Core::LocatorFilterEntry makeEntry(Core::ILocatorFilter *filter,
const ClangBackEnd::TokenInfoContainer &info)
{
@@ -84,13 +79,11 @@ static Core::LocatorFilterEntry makeEntry(Core::ILocatorFilter *filter,
QString extra;
ClangBackEnd::HighlightingType mainType = info.types.mainHighlightingType;
if (mainType == ClangBackEnd::HighlightingType::VirtualFunction
|| mainType == ClangBackEnd::HighlightingType::Function) {
displayName = addType(displayName, extraInfo);
extra = extraInfo.semanticParentTypeSpelling.toString();
} else if (mainType == ClangBackEnd::HighlightingType::GlobalVariable
|| mainType == ClangBackEnd::HighlightingType::Function
|| mainType == ClangBackEnd::HighlightingType::GlobalVariable
|| mainType == ClangBackEnd::HighlightingType::Field
|| mainType == ClangBackEnd::HighlightingType::QtProperty) {
displayName = addTypeToVariableName(displayName, extraInfo);
displayName = addType(displayName, extraInfo);
extra = extraInfo.semanticParentTypeSpelling.toString();
} else {
extra = extraInfo.typeSpelling.toString();