forked from qt-creator/qt-creator
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:
@@ -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,14 +79,12 @@ static Core::LocatorFilterEntry makeEntry(Core::ILocatorFilter *filter,
|
||||
QString extra;
|
||||
ClangBackEnd::HighlightingType mainType = info.types.mainHighlightingType;
|
||||
if (mainType == ClangBackEnd::HighlightingType::VirtualFunction
|
||||
|| mainType == ClangBackEnd::HighlightingType::Function) {
|
||||
|| mainType == ClangBackEnd::HighlightingType::Function
|
||||
|| mainType == ClangBackEnd::HighlightingType::GlobalVariable
|
||||
|| mainType == ClangBackEnd::HighlightingType::Field
|
||||
|| mainType == ClangBackEnd::HighlightingType::QtProperty) {
|
||||
displayName = addType(displayName, extraInfo);
|
||||
extra = extraInfo.semanticParentTypeSpelling.toString();
|
||||
} else if (mainType == ClangBackEnd::HighlightingType::GlobalVariable
|
||||
|| mainType == ClangBackEnd::HighlightingType::Field
|
||||
|| mainType == ClangBackEnd::HighlightingType::QtProperty) {
|
||||
displayName = addTypeToVariableName(displayName, extraInfo);
|
||||
extra = extraInfo.semanticParentTypeSpelling.toString();
|
||||
} else {
|
||||
extra = extraInfo.typeSpelling.toString();
|
||||
}
|
||||
|
Reference in New Issue
Block a user