on xenial help sign in
Some more fixes
commit02b090582b23a1a1786e4d3254ea3ecd19e80a2d authorAlbert Astals Cid <albert.astals@canonical.com> dateMon 9 May 2016, 14:25 (10 years ago) parent379fb51
4 files changed+7−5
plugins/AccountsService/AccountsService.cpp+2−2 plugins/Unity/Indicators/actionrootstate.cpp+1−1 plugins/Utils/windowstatestorage.cpp+3−1 src/SecondaryWindow.cpp+1−1
plugins/AccountsService/AccountsService.cpp+2−2
@@ -66,9 +66,9 @@ Q_DECLARE_METATYPE(StringMapList)
6666QVariant primaryButtonConverter(const QVariant &value)
6767{
6868 QString stringValue = value.toString();
69− if (stringValue == "left") {
69+ if (stringValue == QLatin1String("left")) {
7070 return QVariant::fromValue(0);
71− } else if (stringValue == "right") {
71+ } else if (stringValue == QLatin1String("right")) {
7272 return QVariant::fromValue(1); // Mir is less clear on this -- any non-zero value is the same
7373 } else {
7474 return QVariant::fromValue(0); // default to left
plugins/Unity/Indicators/actionrootstate.cpp+1−1
@@ -44,7 +44,7 @@ void ActionRootState::setActionGroup(QDBusActionGroup *actionGroup)
4444 connect(m_actionGroup, &QDBusActionGroup::statusChanged, this, [&](bool) { updateActionState(); });
4545 connect(m_actionGroup, &QDBusActionGroup::actionAppear, this, [&](const QString&) { updateActionState(); });
4646 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(); });
4848
4949 connect(m_actionGroup, &QObject::destroyed, this, [&](QObject*) { updateActionState(); });
5050 }
plugins/Utils/windowstatestorage.cpp+3−1
@@ -28,7 +28,9 @@
2828QMutex WindowStateStorage::s_mutex;
2929
3030inline QString sanitiseString(QString string) {
31− return string.remove("\"").remove("'").remove("\\");
31+ return string.remove(QLatin1Char('\"'))
32+ .remove(QLatin1Char('\''))
33+ .remove(QLatin1Char('\\'));
3234}
3335
3436WindowStateStorage::WindowStateStorage(QObject *parent):
src/SecondaryWindow.cpp+1−1
@@ -30,7 +30,7 @@ SecondaryWindow::SecondaryWindow(QQmlEngine *engine)
3030 if (!ok) {
3131 pxpgu = 8;
3232 }
33− engine->rootContext()->setContextProperty("internalGu", pxpgu);
33+ engine->rootContext()->setContextProperty(QStringLiteral("internalGu"), pxpgu);
3434 setResizeMode(QQuickView::SizeRootObjectToView);
3535 setColor("black");
3636 setTitle(QStringLiteral("Unity8 Shell - Secondary Screen"));