forked from qt-creator/qt-creator
Added 'Open with ->Qt Designer' in Project Explorer.
Added IExternalEditor which knows a kind and a mimetype. Make EditorManager and ProjectExplorer "Open With" query the interface and add the respective kinds. Add "openExternalEditor" to EditorManager. Add External editors for Designer and Linguist, making use of Mac 'open' or Designer's Tcp socket mechanism to ensure files are opened in the same instance (per Qt version). Task-number: 249392 Reviewed-by: con <qtc-committer@nokia.com>
This commit is contained in:
@@ -910,10 +910,15 @@ void MainWindow::openFileWith()
|
||||
{
|
||||
QStringList fileNames = editorManager()->getOpenFileNames();
|
||||
foreach (const QString &fileName, fileNames) {
|
||||
const QString editorKind = editorManager()->getOpenWithEditorKind(fileName);
|
||||
bool isExternal;
|
||||
const QString editorKind = editorManager()->getOpenWithEditorKind(fileName, &isExternal);
|
||||
if (editorKind.isEmpty())
|
||||
continue;
|
||||
editorManager()->openEditor(fileName, editorKind);
|
||||
if (isExternal) {
|
||||
editorManager()->openExternalEditor(fileName, editorKind);
|
||||
} else {
|
||||
editorManager()->openEditor(fileName, editorKind);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user