diff options
| author | Andre Hartmann <[email protected]> | 2025-08-31 19:18:23 +0200 |
|---|---|---|
| committer | André Hartmann <[email protected]> | 2025-09-02 18:51:06 +0000 |
| commit | 8b82f24b994b8d80b91e2f241cb39f4ae0c7154c (patch) | |
| tree | 66d5d446d21152ac3af25a1502ca7f92d9894b50 /src/plugins/git/gitclient.cpp | |
| parent | 5de0aa3fe129e39052027feb1887501f9d1b5701 (diff) | |
Git: Stop modification status update when inactive
Task-number: QTCREATORBUG-32002
Change-Id: I47ef68a4a9b8b3bfa27db194d41486edbf494ccc
Reviewed-by: André Hartmann <[email protected]>
Diffstat (limited to 'src/plugins/git/gitclient.cpp')
| -rw-r--r-- | src/plugins/git/gitclient.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/plugins/git/gitclient.cpp b/src/plugins/git/gitclient.cpp index 4841374bf23..272a6b98304 100644 --- a/src/plugins/git/gitclient.cpp +++ b/src/plugins/git/gitclient.cpp @@ -55,6 +55,7 @@ #include <vcsbase/vcsoutputwindow.h> #include <QAction> +#include <QApplication> #include <QCoreApplication> #include <QDir> #include <QFileInfo> @@ -815,6 +816,13 @@ GitClient::GitClient() } } }); + connect(qApp, &QApplication::applicationStateChanged, this, [this](Qt::ApplicationState state) { + if (!VcsBase::Internal::commonSettings().vcsShowStatus()) + return; + + if (state == Qt::ApplicationActive) + updateModificationInfos(); + }); } GitClient::~GitClient() = default; @@ -927,6 +935,9 @@ void GitClient::updateNextModificationInfo() { using IVCF = IVersionControl::FileState; + if (qApp->applicationState() != Qt::ApplicationActive) + return; + if (m_statusUpdateQueue.isEmpty()) { m_timer->start(); return; |
