[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kcm-grub2] src: Some QT_NO_CAST_FROM_ASCII leftovers.
From: Konstantinos Smanis <konstantinos.smanis () gmail ! com>
Date: 2013-10-24 18:22:52
Message-ID: E1VZPYa-0004oX-A0 () scm ! kde ! org
[Download RAW message or body]
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 = 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<Entry> &entries, QWidget *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 = 0;
@@ -116,7 +116,7 @@ void RemoveDialog::slotButtonClicked(int button)
QString packageName = ui->treeWidget->topLevelItem(i)->data(0, Qt::UserRole).toString();
m_backend->markForRemoval(packageName);
if (ui->checkBox_headers->isChecked()) {
- packageName.replace("image", "headers");
+ packageName.replace(QLatin1String("image"), QLatin1String("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(QLatin1String("\\s+")))) {
if (argument.startsWith(QLatin1String("BOOT_IMAGE"))) {
- m_currentKernelImage = argument.section('=', 1);
+ m_currentKernelImage = argument.section(QLatin1Char('='), 1);
return;
}
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic