Git commit a615965503888236cc50128530d736e227973386 by Konstantinos Smanis. Committed on 24/10/2013 at 18:22. Pushed by ksmanis into branch 'master'. Some QT_NO_CAST_FROM_ASCII leftovers. M +2 -2 src/helper/helper.cpp M +5 -5 src/removeDlg.cpp http://commits.kde.org/kcm-grub2/a615965503888236cc50128530d736e227973386 diff --git a/src/helper/helper.cpp b/src/helper/helper.cpp index b5182e6..4cfdeda 100644 --- a/src/helper/helper.cpp +++ b/src/helper/helper.cpp @@ -41,12 +41,12 @@ = //The $PATH environment variable is emptied by D-Bus activation, //so let's provide a sane default. Needed for os-prober to work. -static const QString path =3D QLatin1String("/usr/sbin:/usr/bin:/sbin:/bin= "); +static const QLatin1String path("/usr/sbin:/usr/bin:/sbin:/bin"); = Helper::Helper() { KGlobal::locale()->insertCatalog(QLatin1String("kcm-grub2")); - qputenv("PATH", path.toLatin1()); + qputenv("PATH", path.latin1()); } = ActionReply Helper::executeCommand(const QStringList &command) diff --git a/src/removeDlg.cpp b/src/removeDlg.cpp index 1c8d75f..18eb08a 100644 --- a/src/removeDlg.cpp +++ b/src/removeDlg.cpp @@ -44,7 +44,7 @@ RemoveDialog::RemoveDialog(const QList &entries, Q= Widget *parent, Qt::WFl setMainWidget(widget); enableButtonOk(false); setWindowTitle(i18nc("@title:window", "Remove Old Entries")); - setWindowIcon(KIcon("list-remove")); + setWindowIcon(KIcon(QLatin1String("list-remove"))); = m_progressDlg =3D 0; = @@ -116,7 +116,7 @@ void RemoveDialog::slotButtonClicked(int button) QString packageName =3D ui->treeWidget->topLevelItem(i)->d= ata(0, Qt::UserRole).toString(); m_backend->markForRemoval(packageName); if (ui->checkBox_headers->isChecked()) { - packageName.replace("image", "headers"); + packageName.replace(QLatin1String("image"), QLatin1Str= ing("headers")); m_backend->markForRemoval(packageName); } } @@ -164,15 +164,15 @@ void RemoveDialog::slotFinished(bool success) } void RemoveDialog::detectCurrentKernelImage() { - QFile file("/proc/cmdline"); + QFile file(QLatin1String("/proc/cmdline")); if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) { return; } = QTextStream stream(&file); - Q_FOREACH(const QString &argument, stream.readAll().split(QRegExp("\\s= +"))) { + Q_FOREACH(const QString &argument, stream.readAll().split(QRegExp(QLat= in1String("\\s+")))) { if (argument.startsWith(QLatin1String("BOOT_IMAGE"))) { - m_currentKernelImage =3D argument.section('=3D', 1); + m_currentKernelImage =3D argument.section(QLatin1Char('=3D'), = 1); return; } }