VCS: 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: I061c7bdcade96961aed226a8348f8ab07ee95f5f
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
This commit is contained in:
Orgad Shaneh
2015-02-03 23:52:10 +02:00
committed by Orgad Shaneh
parent 6bbee89653
commit 620d1c36e5
18 changed files with 105 additions and 105 deletions

View File

@@ -312,7 +312,7 @@ void QueryContext::startQuery(const QString &query)
{
QStringList arguments = m_baseArguments;
arguments.push_back(query);
VcsBase::VcsOutputWindow::appendCommand(
VcsOutputWindow::appendCommand(
m_process.workingDirectory(), Utils::FileName::fromString(m_binary), arguments);
m_timer.start();
m_process.start(m_binary, arguments);
@@ -323,7 +323,7 @@ void QueryContext::errorTermination(const QString &msg)
{
m_progress.reportCanceled();
m_progress.reportFinished();
VcsBase::VcsOutputWindow::appendError(msg);
VcsOutputWindow::appendError(msg);
emit finished();
}
@@ -333,7 +333,7 @@ void QueryContext::processError(QProcess::ProcessError e)
if (e == QProcess::FailedToStart)
errorTermination(msg);
else
VcsBase::VcsOutputWindow::appendError(msg);
VcsOutputWindow::appendError(msg);
}
void QueryContext::processFinished(int exitCode, QProcess::ExitStatus es)
@@ -361,7 +361,7 @@ void QueryContext::processFinished(int exitCode, QProcess::ExitStatus es)
void QueryContext::readyReadStandardError()
{
VcsBase::VcsOutputWindow::appendError(QString::fromLocal8Bit(m_process.readAllStandardError()));
VcsOutputWindow::appendError(QString::fromLocal8Bit(m_process.readAllStandardError()));
}
void QueryContext::readyReadStandardOutput()
@@ -597,7 +597,7 @@ static bool parseOutput(const QSharedPointer<GerritParameters> &parameters,
.arg(QString::fromLocal8Bit(line))
.arg(error.errorString());
qWarning() << errorMessage;
VcsBase::VcsOutputWindow::appendError(errorMessage);
VcsOutputWindow::appendError(errorMessage);
res = false;
continue;
}