summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--libopie/pim/opimrecord.cpp2
-rw-r--r--libopie2/opiepim/core/opimrecord.cpp2
2 files changed, 4 insertions, 0 deletions
diff --git a/libopie/pim/opimrecord.cpp b/libopie/pim/opimrecord.cpp
index 9510357..0c9734d 100644
--- a/libopie/pim/opimrecord.cpp
+++ b/libopie/pim/opimrecord.cpp
@@ -14,24 +14,26 @@ OPimRecord::OPimRecord( int uid )
m_lastHit = -1;
setUid( uid );
}
OPimRecord::~OPimRecord() {
}
OPimRecord::OPimRecord( const OPimRecord& rec )
: Qtopia::Record( rec )
{
(*this) = rec;
}
OPimRecord &OPimRecord::operator=( const OPimRecord& rec) {
+ if ( this == &rec ) return *this;
+
Qtopia::Record::operator=( rec );
m_xrefman = rec.m_xrefman;
m_lastHit = rec.m_lastHit;
return *this;
}
/*
* category names
*/
QStringList OPimRecord::categoryNames( const QString& appname ) const {
QStringList list;
QArray<int> cats = categories();
diff --git a/libopie2/opiepim/core/opimrecord.cpp b/libopie2/opiepim/core/opimrecord.cpp
index 9510357..0c9734d 100644
--- a/libopie2/opiepim/core/opimrecord.cpp
+++ b/libopie2/opiepim/core/opimrecord.cpp
@@ -14,24 +14,26 @@ OPimRecord::OPimRecord( int uid )
m_lastHit = -1;
setUid( uid );
}
OPimRecord::~OPimRecord() {
}
OPimRecord::OPimRecord( const OPimRecord& rec )
: Qtopia::Record( rec )
{
(*this) = rec;
}
OPimRecord &OPimRecord::operator=( const OPimRecord& rec) {
+ if ( this == &rec ) return *this;
+
Qtopia::Record::operator=( rec );
m_xrefman = rec.m_xrefman;
m_lastHit = rec.m_lastHit;
return *this;
}
/*
* category names
*/
QStringList OPimRecord::categoryNames( const QString& appname ) const {
QStringList list;
QArray<int> cats = categories();