Commit 073ff329 authored by Thorbjørn Lindeijer's avatar Thorbjørn Lindeijer
Browse files

Set the text of the discard color scheme changes button

Otherwise it would refer explicitly to closing without saving in some
cases, which isn't really suitable here.
parent e27f6884
......@@ -512,12 +512,20 @@ void FontSettingsPage::maybeSaveColorScheme()
if (d_ptr->m_value.colorScheme() == d_ptr->ui.schemeEdit->colorScheme())
int ret = QMessageBox::warning(d_ptr->ui.schemeComboBox->window(),
QMessageBox *messageBox = new QMessageBox(QMessageBox::Warning,
tr("Color Scheme Changed"),
tr("The color scheme \"%1\" was modified, do you want to save the changes?")
QMessageBox::Discard | QMessageBox::Save, QMessageBox::Save);
if (ret == QMessageBox::Save) {
QMessageBox::Discard | QMessageBox::Save,
// Change the text of the discard button
QPushButton *discardButton = static_cast<QPushButton*>(messageBox->button(QMessageBox::Discard));
messageBox->addButton(discardButton, QMessageBox::DestructiveRole);
if (messageBox->exec() == QMessageBox::Save) {
const ColorScheme &scheme = d_ptr->ui.schemeEdit->colorScheme();>m_value.colorSchemeFileName());
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment