forked from qt-creator/qt-creator
Core: 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: I5c6690f51488bf8ca3610ba9fb11e6e5fd814aaa Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com> Reviewed-by: hjk <hjk@theqtcompany.com>
This commit is contained in:
@@ -168,7 +168,7 @@ struct DocumentManagerPrivate
|
||||
};
|
||||
|
||||
static DocumentManager *m_instance;
|
||||
static Internal::DocumentManagerPrivate *d;
|
||||
static DocumentManagerPrivate *d;
|
||||
|
||||
QFileSystemWatcher *DocumentManagerPrivate::fileWatcher()
|
||||
{
|
||||
@@ -1425,11 +1425,11 @@ void DocumentManager::executeOpenWithMenuAction(QAction *action)
|
||||
if (entry.editorFactory) {
|
||||
// close any open editors that have this file open
|
||||
// remember the views to open new editors in there
|
||||
QList<Internal::EditorView *> views;
|
||||
QList<EditorView *> views;
|
||||
QList<IEditor *> editorsOpenForFile
|
||||
= DocumentModel::editorsForFilePath(entry.fileName);
|
||||
foreach (IEditor *openEditor, editorsOpenForFile) {
|
||||
Internal::EditorView *view = EditorManagerPrivate::viewForEditor(openEditor);
|
||||
EditorView *view = EditorManagerPrivate::viewForEditor(openEditor);
|
||||
if (view && view->currentEditor() == openEditor) // visible
|
||||
views.append(view);
|
||||
}
|
||||
@@ -1439,12 +1439,12 @@ void DocumentManager::executeOpenWithMenuAction(QAction *action)
|
||||
if (views.isEmpty()) {
|
||||
EditorManager::openEditor(entry.fileName, entry.editorFactory->id());
|
||||
} else {
|
||||
if (Internal::EditorView *currentView = EditorManagerPrivate::currentEditorView()) {
|
||||
if (EditorView *currentView = EditorManagerPrivate::currentEditorView()) {
|
||||
if (views.removeOne(currentView))
|
||||
views.prepend(currentView); // open editor in current view first
|
||||
}
|
||||
EditorManager::OpenEditorFlags flags;
|
||||
foreach (Internal::EditorView *view, views) {
|
||||
foreach (EditorView *view, views) {
|
||||
IEditor *editor =
|
||||
EditorManagerPrivate::openEditor(view, entry.fileName,
|
||||
entry.editorFactory->id(), flags);
|
||||
|
Reference in New Issue
Block a user