Bug 342309

Summary: "/kded org.kde.kded5.unloadModule" logs "QDBusAbstractAdaptor: Cannot relay signal KDEDModule::moduleDeleted(KDEDModule*): Pointers are not supported: KDEDModule*"
Product: [Frameworks and Libraries] frameworks-kded Reporter: Elias Probst <mail>
Component: generalAssignee: David Faure <faure>
Status: RESOLVED WORKSFORME    
Severity: normal CC: jpsinthemix, kdelibs-bugs-null, stefan.bruens
Priority: NOR    
Version First Reported In: 5.45.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Elias Probst 2014-12-29 13:59:04 UTC
Unloading a kded module results in this message being logged by kded5:
QDBusAbstractAdaptor: Cannot relay signal KDEDModule::moduleDeleted(KDEDModule*): Pointers are not supported: KDEDModule*

The module is successfully unloaded, so this just seems to be a cosmetical issue but I'm not sure whether this has also any other implications.

I can reproduce this with any kded module here by doing:
qdbus org.kde.kded5 /kded org.kde.kded5.unloadModule touchpad

Running latest KF5/P5 from git and Qt 5.4.0.
Comment 1 John Stanley 2015-09-28 23:16:09 UTC
I'm seeing this also for KF5 5.14.0. From  qtbase-opensource-src-5.5.0/src/dbus/doc/src/dbus-adaptors.qdoc, this appears to be due to restrictions on Qt slot argument types for Qt D-Bus Adaptors (QDBusAbstractAdaptor).

I am using the following patches which eliminate the warnings, but I'm not at all sure if this is the appropriate way to handle this:

kdbusaddons patch:

--- kdbusaddons-5.14.0.old/src/kdedmodule.h     2015-09-05 04:54:56.000000000 -0400
+++ kdbusaddons-5.14.0.new/src/kdedmodule.h     2015-09-28 07:35:54.224470387 -0400
@@ -81,7 +81,7 @@ Q_SIGNALS:
     /**
      * Emitted when the module is being deleted.
      */
-    void moduleDeleted(KDEDModule *);
+    void moduleDeleted(QString);

     /**
      * Emitted when a mainwindow registers itself.
--- kdbusaddons-5.14.0.old/src/kdedmodule.cpp   2015-09-05 04:54:56.000000000 -0400
+++ kdbusaddons-5.14.0.new/src/kdedmodule.cpp   2015-09-28 07:38:06.156460154 -0400
@@ -41,7 +41,7 @@ KDEDModule::KDEDModule(QObject *parent)

 KDEDModule::~KDEDModule()
 {
-    emit moduleDeleted(this);
+    emit moduleDeleted(d->moduleName);
     delete d;
 }
---

kded patch:

--- kded-5.14.0.old/src/kded.h  2015-09-05 04:55:59.000000000 -0400
+++ kded-5.14.0.new/src/kded.h  2015-09-28 07:41:52.240442620 -0400
@@ -144,7 +144,7 @@ public Q_SLOTS:
     /**
      * A KDEDModule is about to get destroyed.
      */
-    void slotKDEDModuleRemoved(KDEDModule *);
+    void slotKDEDModuleRemoved(QString);

 protected Q_SLOTS:

--- kded-5.14.0.old/src/kded.cpp        2015-09-05 04:55:59.000000000 -0400
+++ kded-5.14.0.new/src/kded.cpp        2015-09-28 07:41:15.556445465 -0400
@@ -446,9 +446,9 @@ QStringList Kded::loadedModules()
     return m_modules.keys();
 }

-void Kded::slotKDEDModuleRemoved(KDEDModule *module)
+void Kded::slotKDEDModuleRemoved(QString moduleName)
 {
-    m_modules.remove(module->moduleName());
+    m_modules.remove(moduleName);
 }

 void Kded::slotApplicationRemoved(const QString &name)
---
Comment 2 Justin Zobel 2022-11-21 08:22:01 UTC
Thank you for reporting this issue in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the issue with a recent software version?

If you can reproduce the issue, please change the status to "REPORTED" when replying. Thank you!
Comment 3 Bug Janitor Service 2022-12-06 05:16:26 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 4 Bug Janitor Service 2022-12-21 05:18:56 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!