summaryrefslogtreecommitdiff
path: root/src/plugins/projectexplorer/projectexplorer.cpp
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2021-10-21 15:39:28 +0200
committerEike Ziller <eike.ziller@qt.io>2021-10-27 09:02:23 +0000
commitdc5717bd0669f91c265eedf3db00a3e7217e287d (patch)
treec63dd7b4d6d61e82a776ae7fd9e1b6328fa807a0 /src/plugins/projectexplorer/projectexplorer.cpp
parent588ef08d4691b7488058af8426175942232bbbec (diff)
downloadqt-creator-dc5717bd0669f91c265eedf3db00a3e7217e287d.tar.gz
Move File System view to Core plugin
So it can be accessed from a wider range of places. Change-Id: I282883addecf7bb070a65d9f4f7b8e6e2e4b5e47 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: David Schulz <david.schulz@qt.io>
Diffstat (limited to 'src/plugins/projectexplorer/projectexplorer.cpp')
-rw-r--r--src/plugins/projectexplorer/projectexplorer.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp
index c9fcf0ff26..934a7b87b5 100644
--- a/src/plugins/projectexplorer/projectexplorer.cpp
+++ b/src/plugins/projectexplorer/projectexplorer.cpp
@@ -63,7 +63,6 @@
#include "devicesupport/sshsettingspage.h"
#include "editorsettingspropertiespage.h"
#include "filesinallprojectsfind.h"
-#include "foldernavigationwidget.h"
#include "jsonwizard/jsonwizardfactory.h"
#include "jsonwizard/jsonwizardgeneratorfactory.h"
#include "jsonwizard/jsonwizardpagefactory_p.h"
@@ -117,6 +116,7 @@
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/fileutils.h>
#include <coreplugin/findplaceholder.h>
+#include <coreplugin/foldernavigationwidget.h>
#include <coreplugin/icore.h>
#include <coreplugin/idocument.h>
#include <coreplugin/idocumentfactory.h>
@@ -665,7 +665,6 @@ public:
CustomParsersSettingsPage m_customParsersSettingsPage;
ProjectTreeWidgetFactory m_projectTreeFactory;
- FolderNavigationWidgetFactory m_folderNavigationWidgetFactory;
DefaultDeployConfigurationFactory m_defaultDeployConfigFactory;
IDocumentFactory m_documentFactory;
@@ -2934,7 +2933,8 @@ ProjectExplorerPluginPrivate::ProjectExplorerPluginPrivate() {}
void ProjectExplorerPluginPrivate::extendFolderNavigationWidgetFactory()
{
- connect(&m_folderNavigationWidgetFactory,
+ auto folderNavigationWidgetFactory = FolderNavigationWidgetFactory::instance();
+ connect(folderNavigationWidgetFactory,
&FolderNavigationWidgetFactory::aboutToShowContextMenu,
this,
[this](QMenu *menu, const FilePath &filePath, bool isDir) {
@@ -2955,7 +2955,7 @@ void ProjectExplorerPluginPrivate::extendFolderNavigationWidgetFactory()
});
}
});
- connect(&m_folderNavigationWidgetFactory,
+ connect(folderNavigationWidgetFactory,
&FolderNavigationWidgetFactory::fileRenamed,
this,
[](const FilePath &before, const FilePath &after) {
@@ -2979,7 +2979,7 @@ void ProjectExplorerPluginPrivate::extendFolderNavigationWidgetFactory()
});
}
});
- connect(&m_folderNavigationWidgetFactory,
+ connect(folderNavigationWidgetFactory,
&FolderNavigationWidgetFactory::aboutToRemoveFile,
this,
[](const FilePath &filePath) {
@@ -3846,8 +3846,9 @@ void ProjectExplorerPluginPrivate::showInFileSystemPane()
{
Node *currentNode = ProjectTree::currentNode();
QTC_ASSERT(currentNode, return );
- QWidget *widget = NavigationWidget::activateSubWidget(m_folderNavigationWidgetFactory.id(),
- Side::Left);
+ QWidget *widget
+ = NavigationWidget::activateSubWidget(FolderNavigationWidgetFactory::instance()->id(),
+ Side::Left);
if (auto *navWidget = qobject_cast<FolderNavigationWidget *>(widget))
navWidget->syncWithFilePath(currentNode->filePath());
}