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:
Friedemann Kleint
2009-05-19 14:54:52 +02:00
parent 398451b9d5
commit 19663fee41
15 changed files with 687 additions and 65 deletions

View File

@@ -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);
}
}
}