on xenial help sign in
Some more fixes
02b0905Albert Astals Cid
plugins/AccountsService/AccountsService.cpp+2−2
@@ -66,9 +66,9 @@ Q_DECLARE_METATYPE(StringMapList)
66QVariant primaryButtonConverter(const QVariant &value)
66QVariant primaryButtonConverter(const QVariant &value)
67{
67{
68 QString stringValue = value.toString();
68 QString stringValue = value.toString();
69− if (stringValue == "left") {
69+ if (stringValue == QLatin1String("left")) {
70 return QVariant::fromValue(0);
70 return QVariant::fromValue(0);
71− } else if (stringValue == "right") {
71+ } else if (stringValue == QLatin1String("right")) {
72 return QVariant::fromValue(1); // Mir is less clear on this -- any non-zero value is the same
72 return QVariant::fromValue(1); // Mir is less clear on this -- any non-zero value is the same
73 } else {
73 } else {
74 return QVariant::fromValue(0); // default to left
74 return QVariant::fromValue(0); // default to left
plugins/Unity/Indicators/actionrootstate.cpp+1−1
@@ -44,7 +44,7 @@ void ActionRootState::setActionGroup(QDBusActionGroup *actionGroup)
44 connect(m_actionGroup, &QDBusActionGroup::statusChanged, this, [&](bool) { updateActionState(); });
44 connect(m_actionGroup, &QDBusActionGroup::statusChanged, this, [&](bool) { updateActionState(); });
45 connect(m_actionGroup, &QDBusActionGroup::actionAppear, this, [&](const QString&) { updateActionState(); });
45 connect(m_actionGroup, &QDBusActionGroup::actionAppear, this, [&](const QString&) { updateActionState(); });
46 connect(m_actionGroup, &QDBusActionGroup::actionVanish, this, [&](const QString&) { updateActionState(); });
46 connect(m_actionGroup, &QDBusActionGroup::actionVanish, this, [&](const QString&) { updateActionState(); });
47− connect(m_actionGroup, &QDBusActionGroup::actionStateChanged, this, [&](QVariant) { updateActionState(); });
47+ connect(m_actionGroup, &QDBusActionGroup::actionStateChanged, this, [&](const QVariant&) { updateActionState(); });
48
48
49 connect(m_actionGroup, &QObject::destroyed, this, [&](QObject*) { updateActionState(); });
49 connect(m_actionGroup, &QObject::destroyed, this, [&](QObject*) { updateActionState(); });
50 }
50 }
plugins/Utils/windowstatestorage.cpp+3−1
@@ -28,7 +28,9 @@
28QMutex WindowStateStorage::s_mutex;
28QMutex WindowStateStorage::s_mutex;
29
29
30inline QString sanitiseString(QString string) {
30inline QString sanitiseString(QString string) {
31− return string.remove("\"").remove("'").remove("\\");
31+ return string.remove(QLatin1Char('\"'))
32+ .remove(QLatin1Char('\''))
33+ .remove(QLatin1Char('\\'));
32}
34}
33
35
34WindowStateStorage::WindowStateStorage(QObject *parent):
36WindowStateStorage::WindowStateStorage(QObject *parent):
src/SecondaryWindow.cpp+1−1
@@ -30,7 +30,7 @@ SecondaryWindow::SecondaryWindow(QQmlEngine *engine)
30 if (!ok) {
30 if (!ok) {
31 pxpgu = 8;
31 pxpgu = 8;
32 }
32 }
33− engine->rootContext()->setContextProperty("internalGu", pxpgu);
33+ engine->rootContext()->setContextProperty(QStringLiteral("internalGu"), pxpgu);
34 setResizeMode(QQuickView::SizeRootObjectToView);
34 setResizeMode(QQuickView::SizeRootObjectToView);
35 setColor("black");
35 setColor("black");
36 setTitle(QStringLiteral("Unity8 Shell - Secondary Screen"));
36 setTitle(QStringLiteral("Unity8 Shell - Secondary Screen"));