summaryrefslogtreecommitdiffabout
path: root/kabc/picture.cpp
authorzautrix <zautrix>2005-01-14 11:37:40 (UTC)
committer zautrix <zautrix>2005-01-14 11:37:40 (UTC)
commit61c95ce0295f1397db6499c5b468a9fb3d32a0f4 (patch) (unidiff)
tree2bceecc46d42a572adfad7d8e5000d1534642cbd /kabc/picture.cpp
parenta46ecf5ed81460ec9a4e457798e1bf0fb74c5624 (diff)
downloadkdepimpi-61c95ce0295f1397db6499c5b468a9fb3d32a0f4.zip
kdepimpi-61c95ce0295f1397db6499c5b468a9fb3d32a0f4.tar.gz
kdepimpi-61c95ce0295f1397db6499c5b468a9fb3d32a0f4.tar.bz2
made kapi saving faster
Diffstat (limited to 'kabc/picture.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/picture.cpp38
1 files changed, 32 insertions, 6 deletions
diff --git a/kabc/picture.cpp b/kabc/picture.cpp
index 6a34b98..57aa297 100644
--- a/kabc/picture.cpp
+++ b/kabc/picture.cpp
@@ -53,16 +53,42 @@ Picture::~Picture()
53 53
54bool Picture::operator==( const Picture &p ) const 54bool Picture::operator==( const Picture &p ) const
55{ 55{
56 if ( mIntern != p.mIntern ) return false; 56 //qDebug("compare PIC ");
57 57 if ( mUndefined && p.mUndefined ) {
58 //qDebug("compare PIC true 1 ");
59 return true;
60 }
61 if ( mUndefined || p.mUndefined ) {
62 //qDebug("compare PIC false 1");
63 return false;
64 }
65 // now we should deal with two defined pics!
66 if ( mIntern != p.mIntern ) {
67 //qDebug("compare PIC false 2");
68 return false;
69 }
58 if ( mIntern ) { 70 if ( mIntern ) {
59 if ( mData != p.mData ) 71 //qDebug("mIntern ");
72 if ( mData.isNull() && p.mData.isNull() ) {
73 //qDebug("compare PIC true 2 ");
74 return true;
75 }
76 if ( mData.isNull() || p.mData.isNull() ){
77 //qDebug("compare PIC false 3-1");
78
79 return false;
80 }
81 if ( mData != p.mData ) {
82 //qDebug("compare PIC false 3");
60 return false; 83 return false;
84 }
61 } else { 85 } else {
62 if ( mUrl != p.mUrl ) 86 if ( mUrl != p.mUrl ) {
63 return false; 87 //qDebug("compare PIC false 4");
88 return false;
89 }
64 } 90 }
65 91 //qDebug("compare PIC true ");
66 return true; 92 return true;
67} 93}
68 94