Misc: 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: I919da493d0629b719d328e5e71c96a29d230dfd1
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
This commit is contained in:
Orgad Shaneh
2015-02-03 23:56:02 +02:00
committed by hjk
parent 2f1509aa58
commit 74ed591db3
61 changed files with 247 additions and 248 deletions

View File

@@ -118,7 +118,7 @@ public:
void updateEventCombo();
AnalyzerRunControl *createRunControl(const AnalyzerStartParameters &sp,
ProjectExplorer::RunConfiguration *runConfiguration = 0);
RunConfiguration *runConfiguration = 0);
signals:
void cycleDetectionEnabled(bool enabled);
@@ -131,8 +131,8 @@ public slots:
void slotRequestDump();
void loadExternalLogFile();
void selectFunction(const Valgrind::Callgrind::Function *);
void setCostFormat(Valgrind::Internal::CostDelegate::CostFormat format);
void selectFunction(const Function *);
void setCostFormat(CostDelegate::CostFormat format);
void enableCycleDetection(bool enabled);
void shortenTemplates(bool enabled);
void setCostEvent(int index);
@@ -160,15 +160,15 @@ public slots:
void dataFunctionSelected(const QModelIndex &index);
void calleeFunctionSelected(const QModelIndex &index);
void callerFunctionSelected(const QModelIndex &index);
void visualisationFunctionSelected(const Valgrind::Callgrind::Function *function);
void showParserResults(const Valgrind::Callgrind::ParseData *data);
void visualisationFunctionSelected(const Function *function);
void showParserResults(const ParseData *data);
void takeParserDataFromRunControl(CallgrindRunControl *rc);
void takeParserData(ParseData *data);
void engineStarting(const Analyzer::AnalyzerRunControl *);
void engineStarting(const AnalyzerRunControl *);
void engineFinished();
void editorOpened(Core::IEditor *);
void editorOpened(IEditor *);
void requestContextMenu(TextEditorWidget *widget, int line, QMenu *menu);
public:
@@ -401,7 +401,7 @@ void CallgrindToolPrivate::updateCostFormat()
void CallgrindToolPrivate::handleFilterProjectCosts()
{
ProjectExplorer::Project *pro = ProjectExplorer::ProjectTree::currentProject();
Project *pro = ProjectTree::currentProject();
QTC_ASSERT(pro, return);
if (m_filterProjectCosts->isChecked()) {
@@ -819,7 +819,7 @@ void CallgrindToolPrivate::clearTextMarks()
m_textMarks.clear();
}
void CallgrindToolPrivate::engineStarting(const Analyzer::AnalyzerRunControl *)
void CallgrindToolPrivate::engineStarting(const AnalyzerRunControl *)
{
// enable/disable actions
m_resetAction->setEnabled(true);
@@ -929,7 +929,7 @@ void CallgrindToolPrivate::slotRequestDump()
void CallgrindToolPrivate::loadExternalLogFile()
{
const QString filePath = QFileDialog::getOpenFileName(
Core::ICore::mainWindow(),
ICore::mainWindow(),
tr("Open Callgrind Log File"),
QString(),
tr("Callgrind Output (callgrind.out*);;All Files (*)"));