Skip to content

Commit 02b0905

Browse files
committed
Some more fixes
1 parent 379fb51 commit 02b0905

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

Diff for: plugins/AccountsService/AccountsService.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@ Q_DECLARE_METATYPE(StringMapList)
6666
QVariant 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

Diff for: plugins/Unity/Indicators/actionrootstate.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -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
}

Diff for: plugins/Utils/windowstatestorage.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@
2828
QMutex WindowStateStorage::s_mutex;
2929

3030
inline QString sanitiseString(QString string) {
31-
return string.remove("\"").remove("'").remove("\\");
31+
return string.remove(QLatin1Char('\"'))
32+
.remove(QLatin1Char('\''))
33+
.remove(QLatin1Char('\\'));
3234
}
3335

3436
WindowStateStorage::WindowStateStorage(QObject *parent):

Diff for: src/SecondaryWindow.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -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"));

0 commit comments

Comments
 (0)