From d2bcfdfe44568123b688c86b3a69e4a932641a33 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Tue, 16 Jan 2018 10:04:32 +0100 Subject: tests/integration/utils/dbus-pulse-volume.cpp: Yet another location where we need to check for HAS_UT_ACCTSERVICE_SOUND_SETTINGS. --- tests/integration/CMakeLists.txt | 4 ++++ tests/integration/utils/dbus-pulse-volume.cpp | 4 ++++ 2 files changed, 8 insertions(+) (limited to 'tests/integration') diff --git a/tests/integration/CMakeLists.txt b/tests/integration/CMakeLists.txt index a19c789..452006b 100644 --- a/tests/integration/CMakeLists.txt +++ b/tests/integration/CMakeLists.txt @@ -35,6 +35,10 @@ add_definitions(-DSOUND_SERVICE_BIN="${CMAKE_BINARY_DIR}/src/ayatana-indicator-s -DFAKE_HOME="${FAKE_HOME}" ) +if(EXISTS "/usr/share/accountsservice/interfaces/com.ubuntu.AccountsService.Sound.xml") + add_definitions(-DHAS_UT_ACCTSERVICE_SOUND_SETTINGS) +endif() + set(GLIB_REQUIRED_VERSION 2.26) pkg_check_modules( diff --git a/tests/integration/utils/dbus-pulse-volume.cpp b/tests/integration/utils/dbus-pulse-volume.cpp index c8b6ae6..1912bf5 100644 --- a/tests/integration/utils/dbus-pulse-volume.cpp +++ b/tests/integration/utils/dbus-pulse-volume.cpp @@ -140,7 +140,11 @@ bool DBusPulseVolume::setVolume(QString const & role, double volume) { QDBusVariant dbusVar(QVariant::fromValue(volume)); QDBusReply set_vol = accounts_interface_->call(QLatin1String("Set"), +#if HAS_UT_ACCTSERVICE_SOUND_SETTINGS QVariant::fromValue(QString("com.ubuntu.AccountsService.Sound")), +#else + QVariant::fromValue(QString("org.ayatana.AccountsService.Sound")), +#endif QVariant::fromValue(QString("Volume")), QVariant::fromValue(dbusVar)); if (!set_vol.isValid()) -- cgit v1.2.3