aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/projectexplorer/projectnodes.h
diff options
context:
space:
mode:
authorTobias Hunger <tobias.hunger@qt.io>2017-06-19 16:07:25 +0200
committerTobias Hunger <tobias.hunger@qt.io>2017-06-20 14:24:02 +0000
commitbc22de5f0ae7795561673bf91e9bd5f532e7f4b0 (patch)
tree65bff7bc0fcad47ccb1bec91b832e4163a8735de /src/plugins/projectexplorer/projectnodes.h
parente42f3db9f0ab1ec28bf9ba414add84d3b552118f (diff)
ProjectExplorer: Do not use version manager cache in threads
Do not use VcsManager's cache of version control systems from different threads. Iterate over all IVersionControls instead of getting the specific version control for a directory. This is less exact, but will probably not hurt users. Task-number: QTCREATORBUG-18258 Change-Id: Iae2be5735a0d7ecc8d774904f6681963fca1d114 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Diffstat (limited to 'src/plugins/projectexplorer/projectnodes.h')
-rw-r--r--src/plugins/projectexplorer/projectnodes.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/plugins/projectexplorer/projectnodes.h b/src/plugins/projectexplorer/projectnodes.h
index 7c440b7355..746f7437b4 100644
--- a/src/plugins/projectexplorer/projectnodes.h
+++ b/src/plugins/projectexplorer/projectnodes.h
@@ -37,6 +37,7 @@
#include <functional>
namespace Utils { class MimeType; }
+namespace Core { class IVersionControl; }
namespace ProjectExplorer {
@@ -188,9 +189,16 @@ public:
FileNode *asFileNode() final { return this; }
const FileNode *asFileNode() const final { return this; }
+ // For ABI compatibility, remove in QtC 4.4:
static QList<FileNode *> scanForFiles(const Utils::FileName &directory,
const std::function<FileNode *(const Utils::FileName &fileName)> factory,
QFutureInterface<QList<FileNode *>> *future = nullptr);
+
+ static QList<FileNode *>
+ scanForFilesWithVersionControls(const Utils::FileName &directory,
+ const std::function<FileNode *(const Utils::FileName &fileName)> factory,
+ const QList<Core::IVersionControl *> &versionControls,
+ QFutureInterface<QList<FileNode *>> *future = nullptr);
bool supportsAction(ProjectAction action, Node *node) const override;
private: