mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-20 21:28:07 +00:00
feat(app): always use D-Bus Single Application on GNU/Linux
This commit is contained in:
parent
c38b164bf7
commit
628c30ed7b
3 changed files with 10 additions and 10 deletions
|
|
@ -32,7 +32,6 @@ set(CMAKE_CXX_STANDARD 11)
|
|||
|
||||
set(ASSETS_DIR assets)
|
||||
|
||||
option(ENABLE_DBUS "Enable single instance handling via DBus." NO)
|
||||
option(ENABLE_UPDATE_CHECK "Enable update check." NO)
|
||||
|
||||
include(GNUInstallDirs)
|
||||
|
|
@ -89,7 +88,7 @@ set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG -DQT_QML_DEBUG -DQT_
|
|||
# ------------------------------------------------------------------------------
|
||||
|
||||
set(QT5_PACKAGES Core Gui Quick Widgets QuickControls2 Svg LinguistTools Concurrent Network)
|
||||
if (ENABLE_DBUS)
|
||||
if (UNIX AND NOT APPLE)
|
||||
list(APPEND QT5_PACKAGES DBus)
|
||||
endif ()
|
||||
set(QT5_PACKAGES_OPTIONAL TextToSpeech)
|
||||
|
|
@ -255,7 +254,7 @@ else ()
|
|||
)
|
||||
endif ()
|
||||
|
||||
if (ENABLE_DBUS)
|
||||
if (UNIX AND NOT APPLE)
|
||||
list(APPEND SOURCES src/app/single-application/SingleApplicationDBus.cpp)
|
||||
list(APPEND HEADERS src/app/single-application/SingleApplicationDBusPrivate.hpp)
|
||||
else ()
|
||||
|
|
|
|||
|
|
@ -28,9 +28,6 @@ lcb_package_source(YES)
|
|||
lcb_spec_file("linphoneqt.spec")
|
||||
|
||||
lcb_cmake_options("-DENABLE_UPDATE_CHECK=${ENABLE_UPDATE_CHECK}")
|
||||
if(UNIX AND NOT APPLE)
|
||||
lcb_cmake_options("-DENABLE_DBUS=${ENABLE_DBUS}")
|
||||
endif()
|
||||
|
||||
# Add config step for packaging
|
||||
set(LINPHONE_BUILDER_ADDITIONAL_CONFIG_STEPS "${CMAKE_CURRENT_LIST_DIR}/additional_steps.cmake")
|
||||
|
|
|
|||
|
|
@ -35,11 +35,11 @@ struct InstancesInfo {
|
|||
};
|
||||
|
||||
class SingleApplicationPrivate : public QDBusAbstractAdaptor {
|
||||
Q_OBJECT
|
||||
Q_CLASSINFO("D-Bus Interface", "org.linphone.DBus.SingleApplication")
|
||||
Q_OBJECT;
|
||||
Q_CLASSINFO("D-Bus Interface", "org.linphone.DBus.SingleApplication");
|
||||
|
||||
public:
|
||||
Q_DECLARE_PUBLIC(SingleApplication) SingleApplicationPrivate (SingleApplication *q_ptr);
|
||||
SingleApplicationPrivate (SingleApplication *q_ptr);
|
||||
|
||||
QDBusConnection getBus () const;
|
||||
|
||||
|
|
@ -50,8 +50,12 @@ public:
|
|||
SingleApplication::Options options;
|
||||
quint32 instanceNumber;
|
||||
|
||||
private:
|
||||
// Explicit public slot. Cannot be private, must be exported as a method via D-Bus.
|
||||
public slots:
|
||||
void handleMessageReceived (quint32 instanceId, QByteArray message);
|
||||
|
||||
private:
|
||||
Q_DECLARE_PUBLIC(SingleApplication);
|
||||
};
|
||||
|
||||
#endif // SINGLE_APPLICATION_DBUS_PRIVATE_H_
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue