on xenial help sign in
drop unneeded debug print and microoptimize an if/else
1f0b8d1Michael Zanetti
plugins/Unity/Launcher/gsettings.cpp+1−4
@@ -21,7 +21,6 @@
21
21
22#include <QGSettings>
22#include <QGSettings>
23#include <QVariant>
23#include <QVariant>
24−#include <QDebug>
25
24
26GSettings::GSettings(QObject *parent):
25GSettings::GSettings(QObject *parent):
27 QObject(parent)
26 QObject(parent)
@@ -43,7 +42,6 @@ QStringList GSettings::storedApplications() const
43 }
42 }
44
43
45 Q_FOREACH(const QString &entry, gSettings.get(settingsKey).toStringList()) {
44 Q_FOREACH(const QString &entry, gSettings.get(settingsKey).toStringList()) {
46− qDebug() << "got entry" << entry;
47 if (entry.startsWith("application://")) {
45 if (entry.startsWith("application://")) {
48 // convert legacy entries to new world appids
46 // convert legacy entries to new world appids
49 QString appId = entry;
47 QString appId = entry;
@@ -51,8 +49,7 @@ QStringList GSettings::storedApplications() const
51 appId.remove(QRegExp("^application://"));
49 appId.remove(QRegExp("^application://"));
52 appId.remove(QRegExp(".desktop$"));
50 appId.remove(QRegExp(".desktop$"));
53 storedApps << appId;
51 storedApps << appId;
54− }
55− if (entry.startsWith("appid://")) {
52+ } else if (entry.startsWith("appid://")) {
56 QString appId = entry;
53 QString appId = entry;
57 appId.remove("appid://");
54 appId.remove("appid://");
58 if (appId.split('/').count() == 3) {
55 if (appId.split('/').count() == 3) {