Git: Use Core::AsynchronousMessageBox

Event loops can lead to crashes so it is better to use a dialog which has
not it's own event loop.

Change-Id: Ib703aad698f270b1fa491731adee131ad8b081e6
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Marco Bubke
2014-11-25 11:45:43 +01:00
committed by Orgad Shaneh
parent e9a6e99011
commit cda1b6d246
4 changed files with 13 additions and 12 deletions

View File

@@ -36,6 +36,7 @@
#include <coreplugin/documentmanager.h>
#include <coreplugin/icore.h>
#include <vcsbase/vcsoutputwindow.h>
#include <coreplugin/messagebox.h>
#include <QMessageBox>
#include <QProcess>
@@ -93,8 +94,8 @@ bool MergeTool::start(const QString &workingDirectory, const QStringList &files)
arguments << QLatin1String("mergetool") << QLatin1String("-y");
if (!files.isEmpty()) {
if (m_gitClient->gitVersion() < 0x010708) {
QMessageBox::warning(Core::ICore::dialogParent(), tr("Error"),
tr("File input for the merge tool requires Git 1.7.8, or later."));
Core::AsynchronousMessageBox::warning(tr("Error"),
tr("File input for the merge tool requires Git 1.7.8, or later."));
return false;
}
arguments << files;