forked from qt-creator/qt-creator
Change File System pane to a forest of trees
It shows the file system as a tree, where the user can change the root directory of the view. Currently there are "Computer" (the default), and all project directories. If synchronization with the current editor is enabled, the view automatically switches to the best fitting root directory. Task-number: QTCREATORBUG-8305 Change-Id: Ic265eb49b1e8e0fd8cdeeb4fb1c64b8631f32e21 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
@@ -30,6 +30,7 @@
|
||||
#include "kit.h"
|
||||
#include "buildconfiguration.h"
|
||||
#include "deployconfiguration.h"
|
||||
#include "foldernavigationwidget.h"
|
||||
#include "projectexplorer.h"
|
||||
#include "projectnodes.h"
|
||||
#include "editorconfiguration.h"
|
||||
@@ -385,6 +386,8 @@ void SessionManager::addProject(Project *pro)
|
||||
m_instance, [pro]() { m_instance->projectDisplayNameChanged(pro); });
|
||||
|
||||
emit m_instance->projectAdded(pro);
|
||||
FolderNavigationWidgetFactory::addRootDirectory(pro->displayName(),
|
||||
pro->projectFilePath().parentDir());
|
||||
configureEditors(pro);
|
||||
connect(pro, &Project::fileListChanged, [pro](){ configureEditors(pro); });
|
||||
}
|
||||
@@ -739,6 +742,7 @@ void SessionManager::removeProjects(QList<Project *> remove)
|
||||
m_instance, &SessionManager::clearProjectFileCache);
|
||||
d->m_projectFileCache.remove(pro);
|
||||
emit m_instance->projectRemoved(pro);
|
||||
FolderNavigationWidgetFactory::removeRootDirectory(pro->projectFilePath().parentDir());
|
||||
delete pro;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user