Commented out debug messages.
[emufront] / src / dataobjects / emufrontobject.cpp
index f3f1774..d6bee57 100644 (file)
 // along with EmuFront.  If not, see <http://www.gnu.org/licenses/>.
 
 #include "emufrontobject.h"
+#include <QDebug>
 
-EmuFrontObject::EmuFrontObject() : id(-1), name("")
+const int EmuFrontObject::ID_NOT_SET = -1;
+
+EmuFrontObject::EmuFrontObject() : id(EmuFrontObject::ID_NOT_SET), name("")
 {
 }
 
@@ -36,6 +39,7 @@ EmuFrontObject::EmuFrontObject(int id, QString name)
 
 EmuFrontObject::~EmuFrontObject()
 {
+    // qDebug() << "EmuFrontObject " << name << " dying.";
 }
 
 EmuFrontObject& EmuFrontObject::operator =(const EmuFrontObject &ob)
@@ -49,7 +53,7 @@ EmuFrontObject& EmuFrontObject::operator =(const EmuFrontObject &ob)
 
 bool EmuFrontObject::operator ==(const EmuFrontObject &sup)
 {
-    return (id >= 0 && id == sup.id);
+    return (id == sup.id && sup.name == name);
 }
 
 bool EmuFrontObject::operator !=(const EmuFrontObject &sup)