forked from qt-creator/qt-creator
C++: Remove unneeded qualifications
Mostly done using the following ruby script:
Dir.glob('**/*.cpp').each { |file|
next if file =~ %r{src/shared/qbs|/qmljs/}
s = File.read(file)
s.scan(/^using namespace (.*);$/) {
ns = $1
t = s.gsub(/^(.*)\b#{ns}::((?!Const)[A-Z])/) { |m|
before = $1
char = $2
if before =~ /"|\/\/|\\|using|SIGNAL|SLOT|Q_/
m
else
before + char
end
}
if t != s
puts file
File.open(file, 'w').write(t)
end
}
}
Change-Id: I6fbe13ddc1485efe95c3156097bf41d90c0febac
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
f5225c0928
commit
65e7db42b8
@@ -128,12 +128,12 @@ public:
|
||||
: m_params(params)
|
||||
{}
|
||||
|
||||
IAssistProposal *immediateProposal(const TextEditor::AssistInterface *) Q_DECL_OVERRIDE
|
||||
IAssistProposal *immediateProposal(const AssistInterface *) Q_DECL_OVERRIDE
|
||||
{
|
||||
QTC_ASSERT(m_params.function, return 0);
|
||||
|
||||
AssistProposalItem *hintItem
|
||||
= new VirtualFunctionProposalItem(TextEditor::TextEditorWidget::Link());
|
||||
= new VirtualFunctionProposalItem(TextEditorWidget::Link());
|
||||
hintItem->setText(QCoreApplication::translate("VirtualFunctionsAssistProcessor",
|
||||
"...searching overrides"));
|
||||
hintItem->setOrder(-1000);
|
||||
@@ -180,8 +180,7 @@ private:
|
||||
|
||||
AssistProposalItem *itemFromFunction(Function *func) const
|
||||
{
|
||||
const TextEditor::TextEditorWidget::Link link
|
||||
= CppTools::linkToSymbol(maybeDefinitionFor(func));
|
||||
const TextEditorWidget::Link link = CppTools::linkToSymbol(maybeDefinitionFor(func));
|
||||
QString text = m_overview.prettyName(LookupContext::fullyQualifiedName(func));
|
||||
if (func->isPureVirtual())
|
||||
text += QLatin1String(" = 0");
|
||||
@@ -196,7 +195,7 @@ private:
|
||||
VirtualFunctionAssistProvider::Parameters m_params;
|
||||
Overview m_overview;
|
||||
Icons m_icons;
|
||||
mutable CppTools::SymbolFinder m_finder;
|
||||
mutable SymbolFinder m_finder;
|
||||
};
|
||||
|
||||
VirtualFunctionAssistProvider::VirtualFunctionAssistProvider()
|
||||
|
||||
Reference in New Issue
Block a user