DiffEditor: 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: I04454108cf2818bb88237849169a8359dd408de9
Reviewed-by: hjk <hjk@theqtcompany.com>
This commit is contained in:
Orgad Shaneh
2015-02-03 23:54:47 +02:00
committed by hjk
parent 59d6fbd533
commit 7d469ff1fb
2 changed files with 40 additions and 40 deletions

View File

@@ -356,7 +356,7 @@ void UnifiedDiffEditorWidget::patch(bool revert)
return;
if (PatchTool::runPatch(
Core::EditorManager::defaultTextCodec()->fromUnicode(patch),
EditorManager::defaultTextCodec()->fromUnicode(patch),
workingDirectory, strip, revert))
m_controller->requestReload();
}
@@ -792,7 +792,7 @@ void UnifiedDiffEditorWidget::jumpToOriginalFile(const QString &fileName,
const QString absoluteFileName = dir.absoluteFilePath(fileName);
QFileInfo fi(absoluteFileName);
if (fi.exists() && !fi.isDir())
Core::EditorManager::openEditorAt(absoluteFileName, lineNumber, columnNumber);
EditorManager::openEditorAt(absoluteFileName, lineNumber, columnNumber);
}
void UnifiedDiffEditorWidget::setCurrentDiffFileIndex(int diffFileIndex)