[PoC] Add support for systemd-logind

Review Request #125856 - Created Oct. 29, 2015 and updated

Information
Dāvis Mosāns
polkit-qt-1
master
5658f6a...
Reviewers
polkit-qt-1
dafre, graesslin, jreznik, mbriza

I don't really understaind this thing, but basically adding support for systemd-logind.

Currently when don't have ConsoleKit but systemd-logind then Qt aborts with "QDBusArgument: read from a write-only object"

backtrace

#5  0x00007f8c0a08f6c9 in qt_message_fatal (context=..., message=<synthetic pointer>) at /mnt/Qt/qtbase/src/corelib/global/qlogging.cpp:1606
#6  QMessageLogger::fatal (this=this@entry=0x7ffcd8e21c70, msg=msg@entry=0x7f8c0b9a7450 "QDBusArgument: read from a write-only object") at /mnt/Qt/qtbase/src/corelib/global/qlogging.cpp:780
#7  0x00007f8c0b940978 in QDBusArgumentPrivate::checkRead (d=<optimized out>) at /mnt/Qt/qtbase/src/dbus/qdbusargument.cpp:136
#8  0x00007f8c0b98bfa8 in QDBusArgumentPrivate::checkRead (d=<optimized out>) at /mnt/Qt/qtbase/src/dbus/qdbusargument.cpp:160
#9  QDBusArgumentPrivate::checkReadAndDetach (d=@0x7ffcd8e21f10: 0x2623610) at /mnt/Qt/qtbase/src/dbus/qdbusargument.cpp:146
#10 0x00007f8c0b98ed19 in QDBusArgument::beginMapEntry (this=0x7ffcd8e21f10) at /mnt/Qt/qtbase/src/dbus/qdbusargument.cpp:1063
#11 0x00007f8be144202f in operator>><QVariant> (list=..., arg=...) at /usr/include/qt/QtDBus/qdbusargument.h:275
#12 PolkitQt1::Authority::Private::init (this=0x2618fa0) at /mnt/KDE/kdesupport/polkit-qt-1/core/polkitqt1-authority.cpp:259
#13 0x00007f8be1442eee in PolkitQt1::Authority::Authority (this=0x264c730, authority=0x0, parent=<optimized out>) at /mnt/KDE/kdesupport/polkit-qt-1/core/polkitqt1-authority.cpp:167
#14 0x00007f8be14434ec in PolkitQt1::Authority::instance (authority=authority@entry=0x0) at /mnt/KDE/kdesupport/polkit-qt-1/core/polkitqt1-authority.cpp:50
#15 0x00007f8be1657602 in KAuth::Polkit1Backend::Polkit1Backend (this=0x251f8d0) at /mnt/AUR/kauth-git/src/kauth/src/backends/polkit-1/Polkit1Backend.cpp:69
#16 0x00007f8be1659ddd in qt_plugin_instance () at /mnt/AUR/kauth-git/src/build/src/moc_Polkit1Backend.cpp:194
#17 0x00007f8c0a240c73 in QPluginLoader::instance (this=this@entry=0x7ffcd8e22290) at /mnt/Qt/qtbase/src/corelib/plugin/qpluginloader.cpp:192
#18 0x00007f8bfc2c495f in KAuth::BackendsManager::retrieveInstancesIn (path=...) at /mnt/AUR/kauth-git/src/kauth/src/BackendsManager.cpp:62
#19 0x00007f8bfc2c4dbb in KAuth::BackendsManager::init () at /mnt/AUR/kauth-git/src/kauth/src/BackendsManager.cpp:75
#20 0x00007f8bfc2c550d in KAuth::BackendsManager::authBackend () at /mnt/AUR/kauth-git/src/kauth/src/BackendsManager.cpp:117
#21 0x00007f8bfc2be6c1 in KAuth::Action::setName (this=this@entry=0x7ffcd8e224c0, name=...) at /mnt/AUR/kauth-git/src/kauth/src/kauthaction.cpp:119
#22 0x00007f8bfc2be821 in KAuth::Action::Action (this=0x7ffcd8e224c0, name=...) at /mnt/AUR/kauth-git/src/kauth/src/kauthaction.cpp:70
#23 0x00007f8beda8377e in PowerDevilUPowerBackend::init (this=0x2646610) at /mnt/AUR/powerdevil-git/src/powerdevil/daemon/backends/upower/powerdevilupowerbackend.cpp:151
#24 0x00007f8bed830117 in PowerDevil::Core::loadCore (this=0x2651830, backend=backend@entry=0x2646610) at /mnt/AUR/powerdevil-git/src/powerdevil/daemon/powerdevilcore.cpp:86
#25 0x00007f8beda78f5f in KDEDPowerDevil::init (this=0x255df00) at /mnt/AUR/powerdevil-git/src/powerdevil/daemon/kdedpowerdevil.cpp:89
#26 0x00007f8c0a283ae1 in QObject::event (this=0x255df00, e=<optimized out>) at /mnt/Qt/qtbase/src/corelib/kernel/qobject.cpp:1256
#27 0x00007f8c080ffa74 in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x255df00, e=0x2557970) at /mnt/Qt/qtbase/src/widgets/kernel/qapplication.cpp:3718
#28 0x00007f8c08104707 in QApplication::notify (this=0x7ffcd8e22e80, receiver=0x255df00, e=0x2557970) at /mnt/Qt/qtbase/src/widgets/kernel/qapplication.cpp:3499
#29 0x00007f8c0a256cc9 in QCoreApplication::notifyInternal2 (receiver=0x255df00, event=event@entry=0x2557970) at /mnt/Qt/qtbase/src/corelib/kernel/qcoreapplication.cpp:1002
#30 0x00007f8c0a2597f2 in QCoreApplication::sendEvent (event=0x2557970, receiver=<optimized out>) at ../../include/QtCore/../../../../../src/corelib/kernel/qcoreapplication.h:227
#31 QCoreApplicationPrivate::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0, data=0x2410900) at /mnt/Qt/qtbase/src/corelib/kernel/qcoreapplication.cpp:1636
#32 0x00007f8c0a259d88 in QCoreApplication::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0) at /mnt/Qt/qtbase/src/corelib/kernel/qcoreapplication.cpp:1494
#33 0x00007f8c0a2ab403 in postEventSourceDispatch (s=0x24a9000) at /mnt/Qt/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:270
#34 0x00007f8c0671ddc7 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#35 0x00007f8c0671e020 in ?? () from /usr/lib/libglib-2.0.so.0
#36 0x00007f8c0671e0cc in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#37 0x00007f8c0a2ab477 in QEventDispatcherGlib::processEvents (this=0x24ad210, flags=...) at /mnt/Qt/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:417
#38 0x00007f8c0a255032 in QEventLoop::exec (this=this@entry=0x7ffcd8e22d90, flags=..., flags@entry=...) at /mnt/Qt/qtbase/src/corelib/kernel/qeventloop.cpp:204
#39 0x00007f8c0a25ddc4 in QCoreApplication::exec () at /mnt/Qt/qtbase/src/corelib/kernel/qcoreapplication.cpp:1272
#40 0x00007f8c0a5aa8f4 in QGuiApplication::exec () at /mnt/Qt/qtbase/src/gui/kernel/qguiapplication.cpp:1593
#41 0x00007f8c080fc635 in QApplication::exec () at /mnt/Qt/qtbase/src/widgets/kernel/qapplication.cpp:2977
#42 0x00007f8bf6592591 in kdemain (argc=1, argv=<optimized out>) at /mnt/AUR/kded-git/src/kded/src/kded.cpp:746
#43 0x00000000004083da in launch (argc=argc@entry=1, _name=_name@entry=0x40b639 "kded5", args=<optimized out>, args@entry=0x0, cwd=cwd@entry=0x0, envc=envc@entry=0, envs=<optimized out>, envs@entry=0x0, reset_env=false, tty=0x0,
    avoid_loops=false, startup_id_str=0x40b55f "0") at /mnt/AUR/kinit-git/src/kinit/src/kdeinit/kinit.cpp:741
#44 0x000000000040586f in main (argc=5, argv=<optimized out>) at /mnt/AUR/kinit-git/src/kinit/src/kdeinit/kinit.cpp:1808

Doesn't show error anymore and seems it works I think...

Dāvis Mosāns
Leslie Zhai
Dāvis Mosāns
Dāvis Mosāns
David Edmundson
Dāvis Mosāns
Review request changed

People:

+graesslin
Loading...