Core: Add some helper methods to VcsManager

Make VcsManager provide a generic way to list all IVersionControls
and to search for a specific one based on its id.

At some point we want to register the IVersionControls directly
with the VcsManager instead of going through the object pool and this
is a first step into this direction.

Change-Id: Id4ded85b29487f6d8adcd0cec1de490afae07132
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
This commit is contained in:
Tobias Hunger
2015-01-19 15:36:07 +01:00
parent 5cefe1db26
commit 6b10466b10
3 changed files with 17 additions and 2 deletions

View File

@@ -32,6 +32,7 @@
#define VCSMANAGER_H
#include "core_global.h"
#include "id.h"
#include <QString>
#include <QObject>
@@ -63,6 +64,9 @@ public:
static void extensionsInitialized();
static QList<IVersionControl *> versionControls();
static IVersionControl *versionControl(Id id);
static void resetVersionControlForDirectory(const QString &inputDirectory);
static IVersionControl *findVersionControlForDirectory(const QString &directory,
QString *topLevelDirectory = 0);