[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kcm-grub2] src: *FIXED: Setting the default entry when containing non-ASCII characters.
From: Konstantinos Smanis <konstantinos.smanis () gmail ! com>
Date: 2013-10-24 13:07:31
Message-ID: E1VZKdP-00060G-Fo () scm ! kde ! org
[Download RAW message or body]
Git commit 224140b28a3db0be745c404f61905f417f51fe4e by Konstantinos Smanis.
Committed on 24/10/2013 at 13:03.
Pushed by ksmanis into branch 'master'.
*FIXED: Setting the default entry when containing non-ASCII characters.
Excerpt from GRUB documentation: "GRUB uses UTF-8 internally other than
in rendering where some GRUB-specific appropriate representation is
used. All text files (including config) are assumed to be encoded in
UTF-8."
M +4 -4 src/kcm_grub2.cpp
http://commits.kde.org/kcm-grub2/224140b28a3db0be745c404f61905f417f51fe4e
diff --git a/src/kcm_grub2.cpp b/src/kcm_grub2.cpp
index 87c7cc5..2a8fdbf 100644
--- a/src/kcm_grub2.cpp
+++ b/src/kcm_grub2.cpp
@@ -466,8 +466,8 @@ void KCMGRUB2::save()
Action saveAction("org.kde.kcontrol.kcmgrub2.save");
saveAction.setHelperID("org.kde.kcontrol.kcmgrub2");
- saveAction.addArgument("rawConfigFileContents", \
configFileContents.toLocal8Bit());
- saveAction.addArgument("rawDefaultEntry", !m_entries.isEmpty() ? grubDefault : \
m_settings.value("GRUB_DEFAULT").toLocal8Bit()); + \
saveAction.addArgument("rawConfigFileContents", configFileContents.toUtf8()); + \
saveAction.addArgument("rawDefaultEntry", !m_entries.isEmpty() ? grubDefault.toUtf8() \
: m_settings.value("GRUB_DEFAULT").toUtf8()); if \
(ui->kcombobox_language->currentIndex() > 0) { \
saveAction.addArgument(QLatin1String("LANG"), qgetenv("LANG"));
saveAction.addArgument(QLatin1String("LANGUAGE"), \
m_settings.value(QLatin1String("LANGUAGE"))); @@ -500,7 +500,7 @@ void \
KCMGRUB2::save() dialog->setModal(true);
dialog->setDefaultButton(KDialog::Ok);
dialog->setEscapeButton(KDialog::Ok);
- KMessageBox::createKMessageBox(dialog, QMessageBox::Information, \
i18nc("@info", "Successfully saved GRUB settings."), QStringList(), QString(), 0, \
KMessageBox::Notify, reply.data().value("output").toString()); // \
krazy:exclude=qclasses + KMessageBox::createKMessageBox(dialog, \
QMessageBox::Information, i18nc("@info", "Successfully saved GRUB settings."), \
QStringList(), QString(), 0, KMessageBox::Notify, \
QString::fromUtf8(reply.data().value("output").toByteArray())); // \
krazy:exclude=qclasses load();
} else {
KMessageBox::detailedError(this, i18nc("@info", "Failed to save GRUB \
settings."), reply.errorDescription()); @@ -1134,7 +1134,7 @@ void \
KCMGRUB2::processReply(ActionReply &reply) errorMessage = i18nc("@info", "The \
process crashed."); break;
default:
- errorMessage = \
QString::fromLocal8Bit(reply.data().value(QLatin1String("output")).toByteArray()); + \
errorMessage = QString::fromUtf8(reply.data().value(QLatin1String("output")).toByteArray());
break;
}
reply.addData(QLatin1String("errorMessage"), errorMessage);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic