Move "Open with" menu logic to FileManager.

Better place than ProjectExplorer since it will then be available
elsewhere too.

Change-Id: I0508f121918105a562d2499ac6b31d19d733abad
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
This commit is contained in:
Eike Ziller
2011-12-09 10:45:17 +01:00
parent cb717979f3
commit 3998a0cbde
5 changed files with 78 additions and 74 deletions

View File

@@ -323,8 +323,8 @@ void FolderNavigationWidget::contextMenuEvent(QContextMenuEvent *ev)
// open with...
if (!m_fileSystemModel->isDir(current)) {
QMenu *openWith = menu.addMenu(tr("Open with"));
ProjectExplorerPlugin::populateOpenWithMenu(openWith,
m_fileSystemModel->filePath(current));
Core::FileManager::populateOpenWithMenu(openWith,
m_fileSystemModel->filePath(current));
}
// Open file dialog to choose a path starting from current
@@ -361,8 +361,7 @@ void FolderNavigationWidget::contextMenuEvent(QContextMenuEvent *ev)
findOnFileSystem(info.absolutePath());
return;
}
ProjectExplorerPlugin::openEditorFromAction(action,
m_fileSystemModel->filePath(current));
Core::FileManager::executeOpenWithMenuAction(action, m_fileSystemModel->filePath(current));
}
QString FolderNavigationWidget::msgFindOnFileSystem()