Skip to content

Commit

Permalink
Merge branch 'omp-jb51115' into 'master'
Browse files Browse the repository at this point in the history
Use dbus-gmain instead of dbus-glib

See merge request mer-core/lipstick!155
  • Loading branch information
pvuorela committed Dec 9, 2020
2 parents ee16375 + 8b0dc5c commit e1b1883
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
@@ -0,0 +1,3 @@
[submodule "dbus-gmain"]
path = src/3rdparty/dbus-gmain
url = https://github.com/sailfishos-mirror/dbus-glib
1 change: 0 additions & 1 deletion rpm/lipstick-qt5.spec
Expand Up @@ -32,7 +32,6 @@ BuildRequires: pkgconfig(dsme_dbus_if) >= 0.63.2
BuildRequires: pkgconfig(thermalmanager_dbus_if)
BuildRequires: pkgconfig(usb_moded)
BuildRequires: pkgconfig(dbus-1)
BuildRequires: pkgconfig(dbus-glib-1)
BuildRequires: pkgconfig(libresourceqt5)
BuildRequires: pkgconfig(ngf-qt5)
BuildRequires: pkgconfig(systemd)
Expand Down
1 change: 1 addition & 0 deletions src/3rdparty/dbus-gmain
Submodule dbus-gmain added at d42176
3 changes: 2 additions & 1 deletion src/src.pro
Expand Up @@ -64,6 +64,7 @@ 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 @@ -91,6 +92,7 @@ HEADERS += \
logging.h \

SOURCES += \
3rdparty/dbus-gmain/dbus-gmain.c \
homeapplication.cpp \
homewindow.cpp \
lipsticksettings.cpp \
Expand Down Expand Up @@ -139,7 +141,6 @@ CONFIG += link_pkgconfig mobility qt warn_on depend_includepath qmake_cache targ
CONFIG -= link_prl
PKGCONFIG += \
dbus-1 \
dbus-glib-1 \
dsme_dbus_if \
keepalive \
libresourceqt5 \
Expand Down
6 changes: 4 additions & 2 deletions src/volume/pulseaudiocontrol.cpp
Expand Up @@ -13,14 +13,16 @@
****************************************************************************/

#include "pulseaudiocontrol.h"
#include "dbus-gmain/dbus-gmain.h"

#include <QDBusMessage>
#include <QDBusConnection>
#include <QDBusArgument>
#include <QDBusServiceWatcher>
#include <dbus/dbus-glib-lowlevel.h>
#include <QTimer>
#include <QDebug>


#define DBUS_ERR_CHECK(err) \
if (dbus_error_is_set(&err)) \
{ \
Expand Down Expand Up @@ -111,7 +113,7 @@ void PulseAudioControl::openConnection()
}

if (m_dbusConnection != NULL) {
dbus_connection_setup_with_g_main(m_dbusConnection, NULL);
dbus_gmain_set_up_connection(m_dbusConnection, NULL);
dbus_connection_add_filter(m_dbusConnection, PulseAudioControl::signalHandler, (void *)this, NULL);

addSignalMatch();
Expand Down
2 changes: 1 addition & 1 deletion tests/ut_volumecontrol/ut_volumecontrol.cpp
Expand Up @@ -25,7 +25,7 @@
extern "C"
{
#include <dbus/dbus.h>
#include <dbus/dbus-glib-lowlevel.h>
#include "dbus-gmain/dbus-gmain.h"
}

#include <policy/resource-set.h>
Expand Down
3 changes: 2 additions & 1 deletion tests/ut_volumecontrol/ut_volumecontrol.pro
@@ -1,13 +1,14 @@
include(../common.pri)
TARGET = ut_volumecontrol
INCLUDEPATH += $$VOLUMESRCDIR $$UTILITYSRCDIR
INCLUDEPATH += $$VOLUMESRCDIR $$UTILITYSRCDIR $$3RDPARTYSRCDIR
CONFIG += link_pkgconfig
PKGCONFIG += dbus-1 dbus-glib-1 libresourceqt5
QT += dbus qml quick
QMAKE_CXXFLAGS += `pkg-config --cflags-only-I mlite5`

HEADERS += \
ut_volumecontrol.h \
$$3RDPARTYSRCDIR/dbus-gmain/dbus-gmain.h \
$$VOLUMESRCDIR/volumecontrol.h \
$$VOLUMESRCDIR/pulseaudiocontrol.h \
$$UTILITYSRCDIR/closeeventeater.h \
Expand Down

0 comments on commit e1b1883

Please sign in to comment.