on xenial help sign in
Make the DashCommunicator async and more flexible to handle a lifecycle-suspended dash Fixes: 1339883
efcd1baMichael Zanetti
CMakeLists.txt+2−2
@@ -64,13 +64,13 @@ if(SHELL_INSTALL_QML STREQUAL "")
64 message(FATAL_ERROR "Could not determine plugin installation dir.")
64 message(FATAL_ERROR "Could not determine plugin installation dir.")
65endif()
65endif()
66
66
67+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden")
68+
67execute_process(COMMAND ${PKG_CONFIG_EXECUTABLE} --variable=plugindir unity-shell-api OUTPUT_VARIABLE SHELL_PLUGINDIR OUTPUT_STRIP_TRAILING_WHITESPACE)
69execute_process(COMMAND ${PKG_CONFIG_EXECUTABLE} --variable=plugindir unity-shell-api OUTPUT_VARIABLE SHELL_PLUGINDIR OUTPUT_STRIP_TRAILING_WHITESPACE)
68if(SHELL_PLUGINDIR STREQUAL "")
70if(SHELL_PLUGINDIR STREQUAL "")
69 message(FATAL_ERROR "Could not determine plugin import dir.")
71 message(FATAL_ERROR "Could not determine plugin import dir.")
70endif()
72endif()
71
73
72−set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden")
73−
74set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-permissive -pedantic -Wall -Wextra")
74set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-permissive -pedantic -Wall -Wextra")
75
75
76if ("${CMAKE_BUILD_TYPE}" STREQUAL "release" OR "${CMAKE_BUILD_TYPE}" STREQUAL "relwithdebinfo")
76if ("${CMAKE_BUILD_TYPE}" STREQUAL "release" OR "${CMAKE_BUILD_TYPE}" STREQUAL "relwithdebinfo")
debian/control+1−1
@@ -25,7 +25,7 @@ Build-Depends: cmake,
25 libpulse-dev,
25 libpulse-dev,
26 libqmenumodel-dev (>= 0.2.8),
26 libqmenumodel-dev (>= 0.2.8),
27 libqt5xmlpatterns5-dev,
27 libqt5xmlpatterns5-dev,
28− libunity-api-dev (>= 7.91),
28+ libunity-api-dev (>= 7.92),
29 libusermetricsoutput1-dev,
29 libusermetricsoutput1-dev,
30 libxcb1-dev,
30 libxcb1-dev,
31 pkg-config,
31 pkg-config,
debian/unity8-private.install+1
@@ -1,3 +1,4 @@
1+usr/lib/*/libunity8-private.*
1usr/lib/*/unity8/qml/AccountsService
2usr/lib/*/unity8/qml/AccountsService
2usr/lib/*/unity8/qml/Dash
3usr/lib/*/unity8/qml/Dash
3usr/lib/*/unity8/qml/HudClient
4usr/lib/*/unity8/qml/HudClient
plugins/LightDM/DBusGreeter.h−1
@@ -21,7 +21,6 @@
21#include <QObject>
21#include <QObject>
22
22
23class Greeter;
23class Greeter;
24−class QDBusInterface;
25
24
26/** This is an internal class used to talk with the indicators.
25/** This is an internal class used to talk with the indicators.
27 */
26 */
plugins/LightDM/DBusGreeterList.h−1
@@ -21,7 +21,6 @@
21#include <QObject>
21#include <QObject>
22
22
23class Greeter;
23class Greeter;
24−class QDBusInterface;
25
24
26/** This is an internal class used to talk with the indicators.
25/** This is an internal class used to talk with the indicators.
27 */
26 */
plugins/Unity/DashCommunicator/CMakeLists.txt+8−2
@@ -1,5 +1,6 @@
1include_directories(
1include_directories(
2 ${CMAKE_CURRENT_SOURCE_DIR}
2 ${CMAKE_CURRENT_SOURCE_DIR}
3+ ${libunity8-private_SOURCE_DIR}
3)
4)
4
5
5set(QMLDASHCOMMUNICATORPLUGIN_SRC
6set(QMLDASHCOMMUNICATORPLUGIN_SRC
@@ -7,13 +8,18 @@ set(QMLDASHCOMMUNICATORPLUGIN_SRC
7 dbusdashcommunicatorservice.cpp
8 dbusdashcommunicatorservice.cpp
8 dashcommunicatorservice.cpp
9 dashcommunicatorservice.cpp
9 dashcommunicator.cpp
10 dashcommunicator.cpp
11+ dashconnection.cpp
10− )
12+)
11
13
12add_library(DashCommunicator-qml MODULE
14add_library(DashCommunicator-qml MODULE
13 ${QMLDASHCOMMUNICATORPLUGIN_SRC}
15 ${QMLDASHCOMMUNICATORPLUGIN_SRC}
14− )
16+)
15
17
16qt5_use_modules(DashCommunicator-qml DBus Qml)
18qt5_use_modules(DashCommunicator-qml DBus Qml)
17
19
20+target_link_libraries(DashCommunicator-qml
21+ unity8-private
22+)
23+
18# export the qmldir and qmltypes files
24# export the qmldir and qmltypes files
19add_unity8_plugin(Unity.DashCommunicator 0.1 Unity/DashCommunicator TARGETS DashCommunicator-qml)
25add_unity8_plugin(Unity.DashCommunicator 0.1 Unity/DashCommunicator TARGETS DashCommunicator-qml)
plugins/Unity/DashCommunicator/dashcommunicator.cpp+22−13
@@ -15,29 +15,38 @@
15 */
15 */
16
16
17#include "dashcommunicator.h"
17#include "dashcommunicator.h"
18+#include "dashconnection.h"
18
19
19#include <QObject>
20#include <QObject>
20−#include <QDBusConnection>
21−#include <QDBusInterface>
22−#include <QDebug>
23
21
24DashCommunicator::DashCommunicator(QObject *parent):
22DashCommunicator::DashCommunicator(QObject *parent):
25− QObject(parent)
23+ QThread(parent),
24+ m_dashConnection(nullptr),
25+ m_created(false)
26{
26{
27+ start();
27}
28}
28
29
29−DashCommunicator::~DashCommunicator()
30+void DashCommunicator::setCurrentScope(const QString &scopeId, bool animate, bool isSwipe)
30{
31{
32+ m_mutex.lock();
33+ if (m_created) {
34+ QMetaObject::invokeMethod(m_dashConnection, "setCurrentScope",
35+ Q_ARG(QString, scopeId),
36+ Q_ARG(bool, animate),
37+ Q_ARG(bool, isSwipe));
38+ }
39+ m_mutex.unlock();
31}
40}
32
41
33−
34−void DashCommunicator::setCurrentScope(const QString &scopeId, bool animate, bool isSwipe)
42+void DashCommunicator::run()
35{
43{
36− QDBusConnection connection = QDBusConnection::sessionBus();
37− QDBusInterface dashIface ("com.canonical.UnityDash",
44+ m_dashConnection = new DashConnection("com.canonical.UnityDash",
38− "/com/canonical/UnityDash",
45+ "/com/canonical/UnityDash",
39− "",
46+ "", this);
40− connection);
47+ m_mutex.lock();
48+ m_created = true;
49+ m_mutex.unlock();
41
50
42− dashIface.call("SetCurrentScope", scopeId, animate, isSwipe);
51+ exec();
43}
52}
plugins/Unity/DashCommunicator/dashcommunicator.h+16−6
@@ -17,19 +17,29 @@
17#ifndef DASHCOMMUNICATOR_H
17#ifndef DASHCOMMUNICATOR_H
18#define DASHCOMMUNICATOR_H
18#define DASHCOMMUNICATOR_H
19
19
20+// Qt
20−#include <QObject>
21+#include <QThread>
22+#include <QMutex>
21
23
24+class DashConnection;
25+
22−class DashCommunicator: public QObject
26+class DashCommunicator: public QThread
23{
27{
24 Q_OBJECT
28 Q_OBJECT
25− Q_CLASSINFO("D-Bus Interface", "com.canonical.Unity.DashCommunicator")
26−
27public:
29public:
28− DashCommunicator(QObject *parent = 0);
30+ explicit DashCommunicator(QObject *parent = 0);
29− ~DashCommunicator();
31+ ~DashCommunicator() = default;
30
32
31public Q_SLOTS:
33public Q_SLOTS:
32 void setCurrentScope(const QString &scopeId, bool animate, bool isSwipe);
34 void setCurrentScope(const QString &scopeId, bool animate, bool isSwipe);
35+
36+protected:
37+ void run() override;
38+
39+private:
40+ DashConnection *m_dashConnection;
41+ bool m_created;
42+ QMutex m_mutex;
33};
43};
34
44
35#endif
45#endif
plugins/Unity/DashCommunicator/dashconnection.cppnew file+33
@@ -0,0 +1,33 @@
1+/*
2+ * Copyright (C) 2014 Canonical, Ltd.
3+ *
4+ * This program is free software: you can redistribute it and/or modify it under
5+ * the terms of the GNU Lesser General Public License version 3, as published by
6+ * the Free Software Foundation.
7+ *
8+ * This program is distributed in the hope that it will be useful, but WITHOUT
9+ * ANY WARRANTY; without even the implied warranties of MERCHANTABILITY,
10+ * SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11+ * Lesser General Public License for more details.
12+ *
13+ * You should have received a copy of the GNU Lesser General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
15+ */
16+
17+#include "dashconnection.h"
18+
19+#include <QDBusInterface>
20+#include <QDBusPendingCall>
21+
22+DashConnection::DashConnection(const QString &service, const QString &path, const QString &interface, QObject *parent):
23+ AbstractDBusServiceMonitor(service, path, interface, SessionBus, parent)
24+{
25+
26+}
27+
28+void DashConnection::setCurrentScope(const QString &scopeId, bool animate, bool isSwipe)
29+{
30+ if (dbusInterface()) {
31+ dbusInterface()->asyncCall("SetCurrentScope", scopeId, animate, isSwipe);
32+ }
33+}
plugins/Unity/DashCommunicator/dashconnection.hnew file+34
@@ -0,0 +1,34 @@
1+/*
2+ * Copyright (C) 2014 Canonical, Ltd.
3+ *
4+ * This program is free software: you can redistribute it and/or modify it under
5+ * the terms of the GNU Lesser General Public License version 3, as published by
6+ * the Free Software Foundation.
7+ *
8+ * This program is distributed in the hope that it will be useful, but WITHOUT
9+ * ANY WARRANTY; without even the implied warranties of MERCHANTABILITY,
10+ * SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11+ * Lesser General Public License for more details.
12+ *
13+ * You should have received a copy of the GNU Lesser General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
15+ */
16+
17+#ifndef THREADEDDASHCONNECTION_H
18+#define THREADEDDASHCONNECTION_H
19+
20+// local
21+#include "abstractdbusservicemonitor.h"
22+
23+
24+class DashConnection: public AbstractDBusServiceMonitor
25+{
26+ Q_OBJECT
27+public:
28+ DashConnection(const QString &service, const QString &path, const QString &interface, QObject *parent = 0);
29+
30+public Q_SLOTS:
31+ void setCurrentScope(const QString &scopeId, bool animate, bool isSwipe);
32+};
33+
34+#endif
plugins/Unity/Launcher/CMakeLists.txt+1−1
@@ -1,6 +1,6 @@
1include(FindPkgConfig)
1include(FindPkgConfig)
2pkg_check_modules(LAUNCHER_API REQUIRED unity-shell-launcher=4)
2pkg_check_modules(LAUNCHER_API REQUIRED unity-shell-launcher=4)
3−pkg_check_modules(APPLICATION_API REQUIRED unity-shell-application=4)
3+pkg_check_modules(APPLICATION_API REQUIRED unity-shell-application=5)
4pkg_check_modules(GSETTINGS_QT REQUIRED gsettings-qt)
4pkg_check_modules(GSETTINGS_QT REQUIRED gsettings-qt)
5
5
6add_definitions(-DSM_BUSNAME=systemBus)
6add_definitions(-DSM_BUSNAME=systemBus)
qml/Shell.qml+7
@@ -128,6 +128,13 @@ Item {
128 objectName: "dashCommunicator"
128 objectName: "dashCommunicator"
129 }
129 }
130
130
131+ Binding {
132+ target: ApplicationManager
133+ property: "forceDashActive"
134+ value: launcher.shown || launcher.dashSwipe
135+ }
136+
137+
131 WindowKeysFilter {
138 WindowKeysFilter {
132 // Handle but do not filter out volume keys
139 // Handle but do not filter out volume keys
133 Keys.onVolumeUpPressed: { volumeControl.volumeUp(); event.accepted = false; }
140 Keys.onVolumeUpPressed: { volumeControl.volumeUp(); event.accepted = false; }
src/CMakeLists.txt+1
@@ -36,3 +36,4 @@ install(TARGETS ${SHELL_APP}
36
36
37add_subdirectory(Panel)
37add_subdirectory(Panel)
38add_subdirectory(Dash)
38add_subdirectory(Dash)
39+add_subdirectory(libunity8-private)
src/Dash/CMakeLists.txt+2
@@ -9,6 +9,8 @@ add_executable(unity8-dash ${DASH_SRCS})
9
9
10qt5_use_modules(unity8-dash Gui Qml Quick Test)
10qt5_use_modules(unity8-dash Gui Qml Quick Test)
11
11
12+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden")
13+
12# install binaries
14# install binaries
13install(TARGETS ${DASH_APP}
15install(TARGETS ${DASH_APP}
14 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
16 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
src/Panel/CMakeLists.txt+2
@@ -1 +1,3 @@
1add_subdirectory(Indicators)
1add_subdirectory(Indicators)
2+
3+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden")
src/libunity8-private/CMakeLists.txtnew file+25
@@ -0,0 +1,25 @@
1+set(LIB_NAME "unity8-private")
2+set(SOVERSION 0)
3+set(VERSION ${SOVERSION}.0.0)
4+
5+project(lib${LIB_NAME})
6+
7+set(lib${LIB_NAME}_SRCS
8+ abstractdbusservicemonitor.cpp
9+ )
10+
11+add_library(${LIB_NAME} SHARED
12+ ${lib${LIB_NAME}_SRCS}
13+ )
14+
15+set_target_properties(${LIB_NAME} PROPERTIES
16+ VERSION ${VERSION}
17+ SOVERSION ${SOVERSION}
18+ )
19+
20+qt5_use_modules(${LIB_NAME} DBus)
21+
22+# install library
23+install(TARGETS ${LIB_NAME}
24+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
25+ )
src/libunity8-private/abstractdbusservicemonitor.cppnew file+87
@@ -0,0 +1,87 @@
1+/*
2+ * Copyright (C) 2011-2014 Canonical, Ltd.
3+ *
4+ * Authors:
5+ * Ugo Riboni <ugo.riboni@canonical.com>
6+ *
7+ * This program is free software; you can redistribute it and/or modify
8+ * it under the terms of the GNU General Public License as published by
9+ * the Free Software Foundation; version 3.
10+ *
11+ * This program is distributed in the hope that it will be useful,
12+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
13+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+ * GNU General Public License for more details.
15+ *
16+ * You should have received a copy of the GNU General Public License
17+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
18+ */
19+
20+#include "abstractdbusservicemonitor.h"
21+
22+#include <QDBusInterface>
23+#include <QDBusServiceWatcher>
24+#include <QDBusConnection>
25+#include <QDBusConnectionInterface>
26+#include <QDBusReply>
27+
28+AbstractDBusServiceMonitor::AbstractDBusServiceMonitor(const QString &service, const QString &path,
29+ const QString &interface, const Bus bus,
30+ QObject *parent)
31+ : QObject(parent)
32+ , m_service(service)
33+ , m_path(path)
34+ , m_interface(interface)
35+ , m_watcher(new QDBusServiceWatcher(service,
36+ (bus == SystemBus) ? QDBusConnection::systemBus()
37+ : QDBusConnection::sessionBus()))
38+ , m_dbusInterface(nullptr)
39+{
40+ connect(m_watcher, &QDBusServiceWatcher::serviceRegistered, this, &AbstractDBusServiceMonitor::createInterface);
41+ connect(m_watcher, &QDBusServiceWatcher::serviceUnregistered, this, &AbstractDBusServiceMonitor::destroyInterface);
42+
43+ // Connect to the service if it's up already
44+ QDBusConnectionInterface* sessionBus = QDBusConnection::sessionBus().interface();
45+ QDBusReply<bool> reply = sessionBus->isServiceRegistered(m_service);
46+ if (reply.isValid() && reply.value()) {
47+ createInterface(m_service);
48+ }
49+}
50+
51+AbstractDBusServiceMonitor::~AbstractDBusServiceMonitor()
52+{
53+ delete m_watcher;
54+ delete m_dbusInterface;
55+}
56+
57+void AbstractDBusServiceMonitor::createInterface(const QString &)
58+{
59+ if (m_dbusInterface != nullptr) {
60+ delete m_dbusInterface;
61+ m_dbusInterface = nullptr;
62+ }
63+
64+ m_dbusInterface = new QDBusInterface(m_service, m_path, m_interface,
65+ QDBusConnection::sessionBus());
66+ Q_EMIT serviceAvailableChanged(true);
67+}
68+
69+void AbstractDBusServiceMonitor::destroyInterface(const QString &)
70+{
71+ if (m_dbusInterface != nullptr) {
72+ delete m_dbusInterface;
73+ m_dbusInterface = nullptr;
74+ }
75+
76+ Q_EMIT serviceAvailableChanged(false);
77+}
78+
79+QDBusInterface* AbstractDBusServiceMonitor::dbusInterface() const
80+{
81+ return m_dbusInterface;
82+}
83+
84+bool AbstractDBusServiceMonitor::serviceAvailable() const
85+{
86+ return m_dbusInterface != nullptr;
87+}
src/libunity8-private/abstractdbusservicemonitor.hnew file+66
@@ -0,0 +1,66 @@
1+/*
2+ * Copyright (C) 2011-2014 Canonical, Ltd.
3+ *
4+ * Authors:
5+ * Ugo Riboni <ugo.riboni@canonical.com>
6+ *
7+ * This program is free software; you can redistribute it and/or modify
8+ * it under the terms of the GNU General Public License as published by
9+ * the Free Software Foundation; version 3.
10+ *
11+ * This program is distributed in the hope that it will be useful,
12+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
13+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+ * GNU General Public License for more details.
15+ *
16+ * You should have received a copy of the GNU General Public License
17+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
18+ */
19+
20+#ifndef ABSTRACTDBUSSERVICEMONITOR_H
21+#define ABSTRACTDBUSSERVICEMONITOR_H
22+
23+#include <QObject>
24+#include <QString>
25+#include <QDBusConnection>
26+
27+class QDBusInterface;
28+class QDBusServiceWatcher;
29+
30+class Q_DECL_EXPORT AbstractDBusServiceMonitor : public QObject
31+{
32+ Q_OBJECT
33+ Q_ENUMS(Bus)
34+ Q_PROPERTY(bool serviceAvailable READ serviceAvailable NOTIFY serviceAvailableChanged)
35+
36+public:
37+ enum Bus {
38+ SessionBus,
39+ SystemBus,
40+ };
41+
42+ explicit AbstractDBusServiceMonitor(const QString &service, const QString &path, const QString &interface,
43+ const Bus bus = SessionBus,
44+ QObject *parent = 0);
45+ ~AbstractDBusServiceMonitor();
46+
47+ QDBusInterface* dbusInterface() const;
48+
49+ bool serviceAvailable() const;
50+
51+Q_SIGNALS:
52+ void serviceAvailableChanged(bool available);
53+
54+private Q_SLOTS:
55+ void createInterface(const QString &service);
56+ void destroyInterface(const QString &service);
57+
58+protected:
59+ const QString m_service;
60+ const QString m_path;
61+ const QString m_interface;
62+ QDBusServiceWatcher* m_watcher;
63+ QDBusInterface* m_dbusInterface;
64+};
65+
66+#endif // ABSTRACTDBUSSERVICEMONITOR_H
tests/mocks/Unity/Application/ApplicationManager.cpp+26
@@ -43,6 +43,7 @@ ApplicationManager *ApplicationManager::singleton()
43ApplicationManager::ApplicationManager(QObject *parent)
43ApplicationManager::ApplicationManager(QObject *parent)
44 : ApplicationManagerInterface(parent)
44 : ApplicationManagerInterface(parent)
45 , m_suspended(false)
45 , m_suspended(false)
46+ , m_forceDashActive(false)
46{
47{
47 m_roleNames.insert(RoleSession, "session");
48 m_roleNames.insert(RoleSession, "session");
48 m_roleNames.insert(RoleFullscreen, "fullscreen");
49 m_roleNames.insert(RoleFullscreen, "fullscreen");
@@ -292,6 +293,31 @@ void ApplicationManager::setSuspended(bool suspended)
292 Q_EMIT suspendedChanged();
293 Q_EMIT suspendedChanged();
293}
294}
294
295
296+bool ApplicationManager::forceDashActive() const
297+{
298+ return m_forceDashActive;
299+}
300+
301+void ApplicationManager::setForceDashActive(bool forceDashActive)
302+{
303+ if (m_forceDashActive == forceDashActive) {
304+ return;
305+ }
306+
307+ ApplicationInfo *dash = findApplication("unity8-dash");
308+ if (dash) {
309+ if (forceDashActive) {
310+ dash->setState(ApplicationInfo::Running);
311+ } else {
312+ if (!dash->focused()) {
313+ dash->setState(ApplicationInfo::Suspended);
314+ }
315+ }
316+ }
317+ m_forceDashActive = forceDashActive;
318+ Q_EMIT forceDashActiveChanged();
319+}
320+
295bool ApplicationManager::focusApplication(const QString &appId)
321bool ApplicationManager::focusApplication(const QString &appId)
296{
322{
297 ApplicationInfo *application = findApplication(appId);
323 ApplicationInfo *application = findApplication(appId);
tests/mocks/Unity/Application/ApplicationManager.h+6−2
@@ -99,8 +99,11 @@ class ApplicationManager : public ApplicationManagerInterface {
99 Q_INVOKABLE bool stopApplication(const QString &appId) override;
99 Q_INVOKABLE bool stopApplication(const QString &appId) override;
100
100
101 QString focusedApplicationId() const override;
101 QString focusedApplicationId() const override;
102− bool suspended() const;
102+ bool suspended() const override;
103− void setSuspended(bool suspended);
103+ void setSuspended(bool suspended) override;
104+
105+ bool forceDashActive() const override;
106+ void setForceDashActive(bool forceDashActive) override;
104
107
105 // Only for testing
108 // Only for testing
106 Q_INVOKABLE QStringList availableApplications();
109 Q_INVOKABLE QStringList availableApplications();
@@ -124,6 +127,7 @@ class ApplicationManager : public ApplicationManagerInterface {
124 void buildListOfAvailableApplications();
127 void buildListOfAvailableApplications();
125 void onWindowCreated();
128 void onWindowCreated();
126 bool m_suspended;
129 bool m_suspended;
130+ bool m_forceDashActive;
127 QList<ApplicationInfo*> m_runningApplications;
131 QList<ApplicationInfo*> m_runningApplications;
128 QList<ApplicationInfo*> m_availableApplications;
132 QList<ApplicationInfo*> m_availableApplications;
129 QTimer m_windowCreatedTimer;
133 QTimer m_windowCreatedTimer;
tests/mocks/Unity/Application/CMakeLists.txt+1−1
@@ -1,4 +1,4 @@
1−pkg_check_modules(APPLICATION_API REQUIRED unity-shell-application=4)
1+pkg_check_modules(APPLICATION_API REQUIRED unity-shell-application=5)
2
2
3set(FakeUnityApplicationQml_SOURCES
3set(FakeUnityApplicationQml_SOURCES
4 plugin.cpp
4 plugin.cpp
tests/plugins/Unity/Launcher/CMakeLists.txt+1−1
@@ -1,6 +1,6 @@
1pkg_check_modules(GSETTINGS_QT REQUIRED gsettings-qt)
1pkg_check_modules(GSETTINGS_QT REQUIRED gsettings-qt)
2pkg_check_modules(LAUNCHER_API REQUIRED unity-shell-launcher=4)
2pkg_check_modules(LAUNCHER_API REQUIRED unity-shell-launcher=4)
3−pkg_check_modules(APPLICATION_API REQUIRED unity-shell-application=4)
3+pkg_check_modules(APPLICATION_API REQUIRED unity-shell-application=5)
4
4
5include_directories(
5include_directories(
6 ${CMAKE_CURRENT_BINARY_DIR}
6 ${CMAKE_CURRENT_BINARY_DIR}
tests/plugins/Unity/Launcher/launchermodeltest.cpp+2
@@ -105,6 +105,8 @@ public:
105 bool requestFocusApplication(const QString &appId) { Q_UNUSED(appId); return true; }
105 bool requestFocusApplication(const QString &appId) { Q_UNUSED(appId); return true; }
106 bool suspended() const { return false; }
106 bool suspended() const { return false; }
107 void setSuspended(bool) {}
107 void setSuspended(bool) {}
108+ bool forceDashActive() const { return false; }
109+ void setForceDashActive(bool) {}
108
110
109private:
111private:
110 QList<MockApp*> m_list;
112 QList<MockApp*> m_list;