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:
Eike Ziller
2017-09-15 11:03:45 +02:00
parent 083ff55abe
commit 3c988e5a0d
3 changed files with 197 additions and 225 deletions

View File

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