Use ICore::dialogParent for message boxes without parent so far

Change-Id: I2ee35796b2c041e6ea2ae6bd677e10167451d1b8
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
This commit is contained in:
hjk
2014-03-11 18:09:23 +01:00
parent f4db27a65c
commit 3b84a6dc88
25 changed files with 104 additions and 58 deletions

View File

@@ -108,7 +108,7 @@ void ExecuteFilter::accept(LocatorFilterEntry selection) const
if (m_process->state() != QProcess::NotRunning) {
const QString info(tr("Previous command is still running ('%1').\nDo you want to kill it?")
.arg(p->headCommand()));
int r = QMessageBox::question(0, tr("Kill Previous Process?"), info,
int r = QMessageBox::question(ICore::dialogParent(), tr("Kill Previous Process?"), info,
QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel,
QMessageBox::Yes);
if (r == QMessageBox::Yes)

View File

@@ -382,7 +382,7 @@ bool VcsManager::promptToDelete(IVersionControl *vc, const QString &fileName)
const QString msg = tr("Would you like to remove this file from the version control system (%1)?\n"
"Note: This might remove the local file.").arg(vc->displayName());
const QMessageBox::StandardButton button =
QMessageBox::question(0, title, msg, QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes);
QMessageBox::question(ICore::dialogParent(), title, msg, QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes);
if (button != QMessageBox::Yes)
return true;
return vc->vcsDelete(fileName);