Git: Fix warning when applying settings with Ok

The current parentDialog is the settings window, but it is closed
immediately, so the warning just disappears.

Change-Id: I7f5033239bf18e758595965587947bec40facf6f
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Orgad Shaneh
2021-09-29 18:19:15 +03:00
committed by Orgad Shaneh
parent 13067a7d9c
commit b8b3970329

View File

@@ -87,6 +87,7 @@
#include <QClipboard>
#include <QFileDialog>
#include <QMenu>
#include <QTimer>
#include <QVBoxLayout>
#ifdef WITH_TESTS
@@ -477,8 +478,11 @@ void GitPluginPrivate::onApplySettings()
bool gitFoundOk;
QString errorMessage;
m_settings.gitExecutable(&gitFoundOk, &errorMessage);
if (!gitFoundOk)
if (!gitFoundOk) {
QTimer::singleShot(0, this, [this, errorMessage] {
Core::AsynchronousMessageBox::warning(tr("Git Settings"), errorMessage);
});
}
}
void GitPluginPrivate::cleanCommitMessageFile()