Vcs: Dissolve VcsManager::registerVersionControl

It's a somewhat unusual pattern, spelling it out will help
to move the vcs plugins setup closer to the now-usual pattern.

Change-Id: Ie7b70e52d75e34cd36b6a1d55ca868e3edab44a7
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
hjk
2020-01-21 18:04:49 +01:00
parent 5cda42020e
commit f5d4b65931
11 changed files with 26 additions and 28 deletions

View File

@@ -56,14 +56,6 @@ class CORE_EXPORT VcsManager : public QObject
public:
static VcsManager *instance();
template <typename T, typename... Args>
static T *registerVersionControl(Args&&... args)
{
auto vc = new T(std::forward<Args>(args)...);
addVersionControl(vc);
return vc;
}
static void extensionsInitialized();
static const QList<IVersionControl *> versionControls();
@@ -110,11 +102,11 @@ private:
explicit VcsManager(QObject *parent = nullptr);
~VcsManager() override;
void handleConfigurationChanges();
static void addVersionControl(IVersionControl *vc);
void handleConfigurationChanges();
friend class Core::Internal::MainWindow;
friend class Core::IVersionControl;
};
} // namespace Core