Fix usage of deprecated API QMessageBox::standardIcon

Instead use the style to get the icon and get the pixmap from there.
Emulates what QMessageBox::setIcon(QMessageBox::Icon) does.

Change-Id: Ic20d55070d510773eb194dc695689954b4862a2f
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Eike Ziller
2019-03-15 11:50:41 +01:00
parent ff66adcd70
commit d7929eaf59
4 changed files with 52 additions and 17 deletions

View File

@@ -569,7 +569,7 @@ VcsBaseSubmitEditor::PromptSubmitResult
const QString commitName = plugin->commitDisplayName();
mb.setWindowTitle(tr("Close %1 %2 Editor")
.arg(plugin->versionControl()->displayName(), commitName));
mb.setIconPixmap(QMessageBox::standardIcon(QMessageBox::Question));
mb.setIcon(QMessageBox::Question);
QString message;
if (canCommit) {
message = tr("What do you want to do with these changes?");