Skip to content

Commit

Permalink
[lipstick] Use QDBus for volume control. Fixes JB#52443
Browse files Browse the repository at this point in the history
Based on PR from Björn Bidar
  • Loading branch information
pvuorela committed Dec 29, 2020
1 parent 2c4250d commit 32a1644
Show file tree
Hide file tree
Showing 9 changed files with 157 additions and 263 deletions.
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

1 change: 0 additions & 1 deletion rpm/lipstick-qt5.spec
Expand Up @@ -31,7 +31,6 @@ BuildRequires: pkgconfig(keepalive)
BuildRequires: pkgconfig(dsme_dbus_if) >= 0.63.2
BuildRequires: pkgconfig(thermalmanager_dbus_if)
BuildRequires: pkgconfig(usb_moded)
BuildRequires: pkgconfig(dbus-1)
BuildRequires: pkgconfig(libresourceqt5)
BuildRequires: pkgconfig(ngf-qt5)
BuildRequires: pkgconfig(systemd)
Expand Down
24 changes: 13 additions & 11 deletions src/compositor/lipstickcompositor.cpp
Expand Up @@ -23,6 +23,16 @@
#include <QClipboard>
#include <QMimeData>
#include <QtGui/qpa/qplatformnativeinterface.h>
#include <QtGui/qpa/qplatformintegration.h>
#include <private/qguiapplication_p.h>
#include <qpa/qwindowsysteminterface.h>

#include <qmcenameowner.h>
#include <sys/types.h>
#include <systemd/sd-bus.h>
#include <systemd/sd-login.h>
#include <unistd.h>

#include "homeapplication.h"
#include "touchscreen/touchscreen.h"
#include "windowmodel.h"
Expand All @@ -32,18 +42,9 @@
#include "lipstickkeymap.h"
#include "lipsticksettings.h"
#include "lipstickrecorder.h"
#include <qpa/qwindowsysteminterface.h>
#include "alienmanager/alienmanager.h"
#include "hwcrenderstage.h"
#include "logging.h"
#include <private/qguiapplication_p.h>
#include <QtGui/qpa/qplatformintegration.h>
#include <qmcenameowner.h>
#include <dbus/dbus-protocol.h>
#include <sys/types.h>
#include <systemd/sd-bus.h>
#include <systemd/sd-login.h>
#include <unistd.h>

LipstickCompositor *LipstickCompositor::m_instance = 0;

Expand Down Expand Up @@ -904,8 +905,9 @@ void LipstickCompositor::processQueuedSetUpdatesEnabledCalls()
QueuedSetUpdatesEnabledCall queued(m_queuedSetUpdatesEnabledCalls.takeFirst());
if (queued.m_message.service() != m_mceNameOwner->nameOwner()) {
if (queued.m_message.isReplyRequired()) {
QDBusMessage reply(queued.m_message.createErrorReply(DBUS_ERROR_ACCESS_DENIED,
"Only mce is allowed to call this method"));
QDBusMessage reply(
queued.m_message.createErrorReply(QStringLiteral("org.freedesktop.DBus.Error.AccessDenied"),
QStringLiteral("Only mce is allowed to call this method")));
queued.m_connection.send(reply);
}
} else {
Expand Down
3 changes: 0 additions & 3 deletions src/src.pro
Expand Up @@ -64,7 +64,6 @@ dbus_policy.path = /etc/dbus-1/system.d
HEADERS += \
$$PUBLICHEADERS \
3rdparty/synchronizelists.h \
3rdparty/dbus-gmain/dbus-gmain.h \
notifications/notificationmanageradaptor.h \
notifications/categorydefinitionstore.h \
notifications/batterynotifier.h \
Expand Down Expand Up @@ -92,7 +91,6 @@ HEADERS += \
logging.h \

SOURCES += \
3rdparty/dbus-gmain/dbus-gmain.c \
homeapplication.cpp \
homewindow.cpp \
lipsticksettings.cpp \
Expand Down Expand Up @@ -140,7 +138,6 @@ SOURCES += \
CONFIG += link_pkgconfig mobility qt warn_on depend_includepath qmake_cache target_qt
CONFIG -= link_prl
PKGCONFIG += \
dbus-1 \
dsme_dbus_if \
glib-2.0 \
keepalive \
Expand Down

0 comments on commit 32a1644

Please sign in to comment.