Don't use KDBusAddons on Windows
It's only used for KDBusService, which likely doesn't work properly on Windows
This commit is contained in:
@@ -60,11 +60,10 @@ else()
|
||||
TYPE REQUIRED
|
||||
PURPOSE "Secure storage of account secrets"
|
||||
)
|
||||
find_package(KF5DBusAddons ${KF5_MIN_VERSION})
|
||||
set_package_properties(KF5DBusAddons PROPERTIES
|
||||
TYPE REQUIRED
|
||||
PURPOSE "DBus convenience functions"
|
||||
)
|
||||
endif()
|
||||
|
||||
if (NOT ANDROID AND NOT WIN32)
|
||||
find_package(KF5DBusAddons ${KF5_MIN_VERSION} REQUIRED)
|
||||
endif()
|
||||
|
||||
find_package(Quotient 0.7)
|
||||
|
||||
@@ -76,7 +76,12 @@ if(ANDROID)
|
||||
"network-connect"
|
||||
)
|
||||
else()
|
||||
target_link_libraries(neochat PRIVATE Qt5::Widgets KF5::DBusAddons ${QTKEYCHAIN_LIBRARIES})
|
||||
target_link_libraries(neochat PRIVATE Qt5::Widgets ${QTKEYCHAIN_LIBRARIES})
|
||||
endif()
|
||||
|
||||
if(TARGET KF5::DBusAddons)
|
||||
target_link_libraries(neochat PRIVATE KF5::DBusAddons)
|
||||
target_compile_definitions(neochat PRIVATE -DHAVE_KDBUSADDONS)
|
||||
endif()
|
||||
|
||||
install(TARGETS neochat ${KF5_INSTALL_TARGETS_DEFAULT_ARGS})
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
#include <QQuickWindow>
|
||||
|
||||
#include <KAboutData>
|
||||
#ifndef Q_OS_ANDROID
|
||||
#ifdef HAVE_KDBUSADDONS
|
||||
#include <KDBusService>
|
||||
#endif
|
||||
#include <KLocalizedContext>
|
||||
@@ -83,8 +83,8 @@ int main(int argc, char *argv[])
|
||||
KAboutData::setApplicationData(about);
|
||||
QApplication::setWindowIcon(QIcon::fromTheme(QStringLiteral("org.kde.neochat")));
|
||||
|
||||
#ifndef Q_OS_ANDROID
|
||||
KDBusService service(KDBusService::Unique);
|
||||
#ifdef HAVE_KDBUSADDONS
|
||||
KDBusService service(KDBusService::Unique)
|
||||
#endif
|
||||
|
||||
#ifdef NEOCHAT_FLATPAK
|
||||
@@ -151,7 +151,7 @@ int main(int argc, char *argv[])
|
||||
return -1;
|
||||
}
|
||||
|
||||
#ifndef Q_OS_ANDROID
|
||||
#ifdef HAVE_KDBUSADDONS
|
||||
QObject::connect(&service, &KDBusService::activateRequested, &engine, [&engine](const QStringList & /*arguments*/, const QString & /*workingDirectory*/) {
|
||||
const auto rootObjects = engine.rootObjects();
|
||||
for (auto obj : rootObjects) {
|
||||
|
||||
Reference in New Issue
Block a user