소스 검색

Compare string contents instead of pointer value.

Sascha Zelzer 14 년 전
부모
커밋
53dae71cf6
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  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)