diff --git a/CMakeLists.txt b/CMakeLists.txt index a8e05be..f8b79b4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,7 +24,7 @@ set(CMAKE_BUILD_WITH_INSTALL_RPATH ON) set(QT_MIN_VERSION "5.7.0") set(VERSION_MAJOR "3") set(VERSION_MINOR "1") -set(VERSION_RELEASE "0") +set(VERSION_RELEASE "1") set(VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_RELEASE}) set(SOVERSION "5") add_definitions(-D'VERSION="${VERSION}"') #" diff --git a/src/core/operationrunner.cpp b/src/core/operationrunner.cpp index 7253119..f29b14f 100644 --- a/src/core/operationrunner.cpp +++ b/src/core/operationrunner.cpp @@ -21,6 +21,7 @@ #include "ops/operation.h" #include "util/report.h" +#include #include #include #include @@ -52,13 +53,20 @@ void OperationRunner::run() // Disable Plasma removable device automounting unsigned int currentUid = getuid(); // 0 if running as root unsigned int userId = getpwnam(getlogin())->pw_uid; // uid of original user before sudo + qDebug() << "sessionBus" << QDBusConnection::sessionBus().isConnected(); + QDBusConnection::disconnectFromBus(QStringLiteral("qt_default_session_bus")); seteuid(userId); QStringList modules; - QDBusConnection bus = QDBusConnection::connectToBus(QDBusConnection::SessionBus, QStringLiteral("sessionBus")); +// QDBusConnection bus = QDBusConnection::connectToBus(QDBusConnection::SessionBus, QStringLiteral("sessionBus")); + QDBusConnection bus = QDBusConnection::connectToBus(QDBusConnection::SessionBus, QStringLiteral("qt_default_session_bus")); + DBusConnection(_q_manager()->busConnection(SessionBus)) + qDebug() << "bus" << bus.isConnected(); + qDebug() << "sessionBus" << QDBusConnection::sessionBus().isConnected(); QDBusInterface kdedInterface( QStringLiteral("org.kde.kded5"), QStringLiteral("/kded"), QStringLiteral("org.kde.kded5"), bus ); QDBusReply reply = kdedInterface.call( QStringLiteral("loadedModules") ); if ( reply.isValid() ) modules = reply.value(); + qDebug() << modules; QString automounterService = QStringLiteral("device_automounter"); bool automounter = modules.contains(automounterService); if (automounter)