Browse Source

Compare string contents instead of pointer value.

Sascha Zelzer 14 years ago
parent
commit
53dae71cf6
1 changed files with 3 additions and 1 deletions
  1. 3 1
      Libs/PluginFramework/ctkServiceSlotEntry.cpp

+ 3 - 1
Libs/PluginFramework/ctkServiceSlotEntry.cpp

@@ -27,6 +27,8 @@
 
 #include <QSharedData>
 
+#include <cstring>
+
 class ctkServiceSlotEntryData : public QSharedData
 {
 public:
@@ -105,7 +107,7 @@ bool ctkServiceSlotEntry::operator==(const ctkServiceSlotEntry& other) const
 {
   return d->plugin == other.d->plugin &&
          d->receiver == other.d->receiver &&
-         d->slot == other.d->slot;
+         std::strcmp(d->slot, other.d->slot) == 0;
 }
 
 void ctkServiceSlotEntry::invokeSlot(const ctkServiceEvent &event)