Commit 7d469ff1 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by hjk

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: default avatarhjk <hjk@theqtcompany.com>
parent 59d6fbd5
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment