forked from qt-creator/qt-creator
DocumentManager: Merge {slotE,e}xecuteOpenWithMenuAction
Change-Id: Ia84a428ace4d109a3577a100920c9ae5336cefe8 Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
@@ -1368,11 +1368,6 @@ void DocumentManager::executeOpenWithMenuAction(QAction *action)
|
|||||||
EditorManager::openExternalEditor(entry.fileName, entry.externalEditor->id());
|
EditorManager::openExternalEditor(entry.fileName, entry.externalEditor->id());
|
||||||
}
|
}
|
||||||
|
|
||||||
void DocumentManager::slotExecuteOpenWithMenuAction(QAction *action)
|
|
||||||
{
|
|
||||||
executeOpenWithMenuAction(action);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool DocumentManager::eventFilter(QObject *obj, QEvent *e)
|
bool DocumentManager::eventFilter(QObject *obj, QEvent *e)
|
||||||
{
|
{
|
||||||
if (obj == qApp && e->type() == QEvent::ApplicationActivate) {
|
if (obj == qApp && e->type() == QEvent::ApplicationActivate) {
|
||||||
|
@@ -126,10 +126,8 @@ public:
|
|||||||
lead to any editors to reload or any other editor manager actions. */
|
lead to any editors to reload or any other editor manager actions. */
|
||||||
static void notifyFilesChangedInternally(const QStringList &files);
|
static void notifyFilesChangedInternally(const QStringList &files);
|
||||||
|
|
||||||
static void executeOpenWithMenuAction(QAction *action);
|
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void slotExecuteOpenWithMenuAction(QAction *action);
|
static void executeOpenWithMenuAction(QAction *action);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void currentFileChanged(const QString &filePath);
|
void currentFileChanged(const QString &filePath);
|
||||||
|
@@ -541,7 +541,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
|
|||||||
d->m_openWithMenu->setTitle(tr("Open With"));
|
d->m_openWithMenu->setTitle(tr("Open With"));
|
||||||
|
|
||||||
connect(d->m_openWithMenu, SIGNAL(triggered(QAction*)),
|
connect(d->m_openWithMenu, SIGNAL(triggered(QAction*)),
|
||||||
DocumentManager::instance(), SLOT(slotExecuteOpenWithMenuAction(QAction*)));
|
DocumentManager::instance(), SLOT(executeOpenWithMenuAction(QAction*)));
|
||||||
|
|
||||||
//
|
//
|
||||||
// Separators
|
// Separators
|
||||||
|
@@ -110,7 +110,7 @@ ResourceEditorW::ResourceEditorW(const Core::Context &context,
|
|||||||
// (That is because this editor instance is deleted in executeOpenWithMenuAction
|
// (That is because this editor instance is deleted in executeOpenWithMenuAction
|
||||||
// in that case.)
|
// in that case.)
|
||||||
connect(m_openWithMenu, SIGNAL(triggered(QAction*)),
|
connect(m_openWithMenu, SIGNAL(triggered(QAction*)),
|
||||||
Core::DocumentManager::instance(), SLOT(slotExecuteOpenWithMenuAction(QAction*)),
|
Core::DocumentManager::instance(), SLOT(executeOpenWithMenuAction(QAction*)),
|
||||||
Qt::QueuedConnection);
|
Qt::QueuedConnection);
|
||||||
|
|
||||||
connect(m_resourceEditor, SIGNAL(dirtyChanged(bool)), m_resourceDocument, SLOT(dirtyChanged(bool)));
|
connect(m_resourceEditor, SIGNAL(dirtyChanged(bool)), m_resourceDocument, SLOT(dirtyChanged(bool)));
|
||||||
|
Reference in New Issue
Block a user