Kaynağa Gözat

FIX: Added missing return

Xavi Planes 15 yıl önce
ebeveyn
işleme
57153a02a8

+ 3 - 3
Libs/PluginFramework/EventBus/ctkEvent.cpp

@@ -54,17 +54,17 @@ bool ctkEvent::operator==(const ctkEvent& other) const
 
 const QVariant& ctkEvent::property(const QString& name) const
 {
-  d->properties[name];
+  return d->properties[name];
 }
 
 QStringList ctkEvent::propertyNames() const
 {
-  d->properties.keys();
+  return d->properties.keys();
 }
 
 const QString& ctkEvent::topic() const
 {
-  d->topic;
+  return d->topic;
 }
 
 bool ctkEvent::matches(const ctkLDAPSearchFilter& filter) const

+ 3 - 5
Libs/PluginFramework/ctkPluginContext.cpp

@@ -134,13 +134,11 @@
   {
     Q_D(ctkPluginContext);
     // TODO check permissions for a direct connection
-    receiver->connect(&(d->plugin->fwCtx->listeners), SIGNAL(pluginChanged(ctkPluginEvent)), method, type);
+    return receiver->connect(&(d->plugin->fwCtx->listeners), SIGNAL(pluginChanged(ctkPluginEvent)), method, type);
   }
 
   bool ctkPluginContext::connectFrameworkListener(const QObject* receiver, const char* method, Qt::ConnectionType type)
   {
     Q_D(ctkPluginContext);
-    receiver->connect(&(d->plugin->fwCtx->listeners), SIGNAL(frameworkEvent(ctkPluginFrameworkEvent)), method, type);
-
-
-}
+    return receiver->connect(&(d->plugin->fwCtx->listeners), SIGNAL(frameworkEvent(ctkPluginFrameworkEvent)), method, type);
+  }