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

@@ -305,7 +305,7 @@ void GerritPlugin::updateActions(bool hasTopLevel)
m_pushToGerritCommand->action()->setEnabled(hasTopLevel);
}
void GerritPlugin::addToLocator(Core::CommandLocator *locator)
void GerritPlugin::addToLocator(CommandLocator *locator)
{
locator->appendCommand(m_gerritCommand);
locator->appendCommand(m_pushToGerritCommand);
@@ -439,7 +439,7 @@ void GerritPlugin::fetch(const QSharedPointer<GerritChange> &change, int mode)
QString repository;
bool verifiedRepository = false;
if (!m_dialog.isNull() && !m_parameters.isNull() && QFile::exists(m_dialog->repositoryPath()))
repository = Core::VcsManager::findTopLevelForDirectory(m_dialog->repositoryPath());
repository = VcsManager::findTopLevelForDirectory(m_dialog->repositoryPath());
if (!repository.isEmpty()) {
// Check if remote from a working dir is the same as remote from patch
@@ -550,7 +550,7 @@ QString GerritPlugin::findLocalRepository(QString project, const QString &branch
} // branchRegexp or file name match
} // for repositories
// No match, do we have a projects folder?
if (Core::DocumentManager::useProjectsDirectory())
if (DocumentManager::useProjectsDirectory())
return DocumentManager::projectsDirectory();
return QDir::currentPath();