forked from qt-creator/qt-creator
Design mode integration
Moved Qt Designer to open from Design Mode. Also, Design mode is now global, and created in coreplugin. Other plugins can register themselves to it.
This commit is contained in:
@@ -788,7 +788,6 @@ static IFileFactory *findFileFactory(const QList<IFileFactory*> &fileFactories,
|
||||
// opens either an editor or loads a project
|
||||
void MainWindow::openFiles(const QStringList &fileNames)
|
||||
{
|
||||
bool needToSwitchToEditor = false;
|
||||
QList<IFileFactory*> nonEditorFileFactories = getNonEditorFileFactories();
|
||||
|
||||
foreach (const QString &fileName, fileNames) {
|
||||
@@ -797,13 +796,9 @@ void MainWindow::openFiles(const QStringList &fileNames)
|
||||
if (IFileFactory *fileFactory = findFileFactory(nonEditorFileFactories, mimeDatabase(), fi)) {
|
||||
fileFactory->open(absoluteFilePath);
|
||||
} else {
|
||||
IEditor *editor = editorManager()->openEditor(absoluteFilePath);
|
||||
if (editor)
|
||||
needToSwitchToEditor = true;
|
||||
editorManager()->openEditor(absoluteFilePath);
|
||||
}
|
||||
}
|
||||
if (needToSwitchToEditor)
|
||||
editorManager()->ensureEditorManagerVisible();
|
||||
}
|
||||
|
||||
void MainWindow::setFocusToEditor()
|
||||
|
||||
Reference in New Issue
Block a user