forked from qt-creator/qt-creator
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:
@@ -130,14 +130,6 @@ class VCSBASE_EXPORT VcsBasePlugin : public ExtensionSystem::IPlugin
|
||||
protected:
|
||||
explicit VcsBasePlugin();
|
||||
|
||||
template<class T, typename... Args>
|
||||
T *initializeVcs(const Core::Context &context, Args&&... args)
|
||||
{
|
||||
T *vc = Core::VcsManager::registerVersionControl<T>(std::forward<Args>(args)...);
|
||||
initializeVcs(vc, context);
|
||||
return vc;
|
||||
}
|
||||
|
||||
void extensionsInitialized() override;
|
||||
|
||||
public:
|
||||
@@ -216,12 +208,12 @@ protected:
|
||||
// Returns whether actions should be set up further.
|
||||
bool enableMenuAction(ActionState as, QAction *in) const;
|
||||
|
||||
void initializeVcs(Core::IVersionControl *vc, const Core::Context &context);
|
||||
|
||||
private:
|
||||
void slotSubmitEditorAboutToClose(VcsBaseSubmitEditor *submitEditor, bool *result);
|
||||
void slotStateChanged(const VcsBase::Internal::State &s, Core::IVersionControl *vc);
|
||||
|
||||
void initializeVcs(Core::IVersionControl *vc, const Core::Context &context);
|
||||
|
||||
VcsBasePluginPrivate *d;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user