From 9fc33449def36eeb83d0f3110a760605c2421236 Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Wed, 22 Jan 2025 16:46:35 +0100 Subject: GitClient: Get rid of gitVersion() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We assume the minimum required version is 2.13. Change-Id: I8ed8b199700243182d1b55b936631865fe7e462e Reviewed-by: Orgad Shaneh Reviewed-by: André Hartmann --- src/plugins/git/gitplugin.cpp | 26 -------------------------- 1 file changed, 26 deletions(-) (limited to 'src/plugins/git/gitplugin.cpp') diff --git a/src/plugins/git/gitplugin.cpp b/src/plugins/git/gitplugin.cpp index 3b557b1d580..1e4d2097653 100644 --- a/src/plugins/git/gitplugin.cpp +++ b/src/plugins/git/gitplugin.cpp @@ -44,7 +44,6 @@ #include #include -#include #include #include #include @@ -134,8 +133,6 @@ public: GitLogEditorWidgetT() : GitLogEditorWidget(new Editor) {} }; -static const QVersionNumber minimumRequiredVersion{1, 9}; - // GitPlugin class GitPluginPrivate final : public VersionControlBase @@ -295,7 +292,6 @@ public: void cleanCommitMessageFile(); void cleanRepository(const FilePath &directory); void applyPatch(const FilePath &workingDirectory, QString file = {}); - void updateVersionWarning(); void instantBlameOnce(); @@ -1374,26 +1370,6 @@ void GitPluginPrivate::startCommit(CommitType commitType) openSubmitEditor(m_commitMessageFileName, data); } -void GitPluginPrivate::updateVersionWarning() -{ - QPointer curDocument = EditorManager::currentDocument(); - if (!curDocument) - return; - Utils::onResultReady(gitClient().gitVersion(), this, [curDocument](const QVersionNumber &version) { - if (!curDocument || version.isNull() || version >= minimumRequiredVersion) - return; - InfoBar *infoBar = curDocument->infoBar(); - Id gitVersionWarning("GitVersionWarning"); - if (!infoBar->canInfoBeAdded(gitVersionWarning)) - return; - infoBar->addInfo( - InfoBarEntry(gitVersionWarning, - Tr::tr("Unsupported version of Git found. Git %1 or later required.") - .arg(minimumRequiredVersion.toString()), - InfoBarEntry::GlobalSuppression::Enabled)); - }); -} - void GitPluginPrivate::instantBlameOnce() { m_instantBlame.once(); @@ -1707,8 +1683,6 @@ void GitPluginPrivate::updateActions(VersionControlBase::ActionState as) m_commandLocator->setEnabled(repositoryEnabled); if (!enableMenuAction(as, m_menuAction)) return; - if (repositoryEnabled) - updateVersionWarning(); // Note: This menu is visible if there is no repository. Only // 'Create Repository'/'Show' actions should be available. const QString fileName = Utils::quoteAmpersands(state.currentFileName()); -- cgit v1.2.3