forked from qt-creator/qt-creator
Git: Use ICore::dialogParent as dialog parent
Change-Id: Idc3f2f4d27d3279f76b688fac635e8d38b2705f5 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
committed by
Orgad Shaneh
parent
d3c1086910
commit
f5203796e4
@@ -319,11 +319,11 @@ void GerritPlugin::addToLocator(CommandLocator *locator)
|
||||
void GerritPlugin::push(const QString &topLevel)
|
||||
{
|
||||
// QScopedPointer is required to delete the dialog when leaving the function
|
||||
GerritPushDialog dialog(topLevel, m_reviewers, m_parameters, ICore::mainWindow());
|
||||
GerritPushDialog dialog(topLevel, m_reviewers, m_parameters, ICore::dialogParent());
|
||||
|
||||
const QString initErrorMessage = dialog.initErrorMessage();
|
||||
if (!initErrorMessage.isEmpty()) {
|
||||
QMessageBox::warning(ICore::mainWindow(), tr("Initialization Failed"), initErrorMessage);
|
||||
QMessageBox::warning(ICore::dialogParent(), tr("Initialization Failed"), initErrorMessage);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -350,7 +350,7 @@ void GerritPlugin::openView()
|
||||
if (!ICore::showOptionsDialog("Gerrit"))
|
||||
return;
|
||||
}
|
||||
GerritDialog *gd = new GerritDialog(m_parameters, m_server, currentRepository(), ICore::mainWindow());
|
||||
GerritDialog *gd = new GerritDialog(m_parameters, m_server, currentRepository(), ICore::dialogParent());
|
||||
gd->setModal(false);
|
||||
connect(gd, &GerritDialog::fetchDisplay, this,
|
||||
[this](const QSharedPointer<GerritChange> &change) { fetch(change, FetchDisplay); });
|
||||
@@ -433,7 +433,7 @@ void GerritPlugin::fetch(const QSharedPointer<GerritChange> &change, int mode)
|
||||
|
||||
if (!verifiedRepository) {
|
||||
QMessageBox::StandardButton answer = QMessageBox::question(
|
||||
ICore::mainWindow(), tr("Remote Not Verified"),
|
||||
ICore::dialogParent(), tr("Remote Not Verified"),
|
||||
tr("Change host %1\nand project %2\n\nwere not verified among remotes"
|
||||
" in %3. Select different folder?")
|
||||
.arg(m_server->host,
|
||||
|
||||
Reference in New Issue
Block a user