Bump version to 3.1.1.

This commit is contained in:
Andrius Štikonas 2017-06-14 00:20:13 +02:00
parent 9252bc6156
commit b98dcc90d8
2 changed files with 10 additions and 2 deletions

View File

@ -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}"') #"

View File

@ -21,6 +21,7 @@
#include "ops/operation.h"
#include "util/report.h"
#include <QDebug>
#include <QDBusInterface>
#include <QDBusReply>
#include <QMutex>
@ -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<QStringList> 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)