summaryrefslogtreecommitdiffabout
path: root/pwmanager/pwmanager/pwmdoc.h
authorulf69 <ulf69>2004-10-18 02:55:13 (UTC)
committer ulf69 <ulf69>2004-10-18 02:55:13 (UTC)
commit2fd3f09238a624b1a91793d43b5f3653e2b34763 (patch) (side-by-side diff)
tree07cff893e261ad594ff44d7ab2e8e457a88d6390 /pwmanager/pwmanager/pwmdoc.h
parent4e7fac5fdb4c0dace10cada64f036c56bb29fe58 (diff)
downloadkdepimpi-2fd3f09238a624b1a91793d43b5f3653e2b34763.zip
kdepimpi-2fd3f09238a624b1a91793d43b5f3653e2b34763.tar.gz
kdepimpi-2fd3f09238a624b1a91793d43b5f3653e2b34763.tar.bz2
*** empty log message ***
Diffstat (limited to 'pwmanager/pwmanager/pwmdoc.h') (more/less context) (ignore whitespace changes)
-rw-r--r--pwmanager/pwmanager/pwmdoc.h39
1 files changed, 19 insertions, 20 deletions
diff --git a/pwmanager/pwmanager/pwmdoc.h b/pwmanager/pwmanager/pwmdoc.h
index 2e9547e..6a1dd30 100644
--- a/pwmanager/pwmanager/pwmdoc.h
+++ b/pwmanager/pwmanager/pwmdoc.h
@@ -130,16 +130,6 @@ struct PwMMetaData
uniqueid = KApplication::randomString(8);
}
- PwMMetaData& operator = (const PwMMetaData& x)
- {
- create = x.create;
- expire = x.expire;
- update = x.update;
- updateInt = x.updateInt;
- uniqueid = x.uniqueid;
- return *this;
- }
-
inline bool isValid() const
{
if (valid.isNull())
@@ -217,10 +207,26 @@ struct PwMDataItem
if (clearMeta)
meta.clear();
}
-
+ //US ENH: we need this operator to compare two items if we have no unique ids
+ //available. Generaly this happens before the first sync
+ bool PwMDataItem::operator==( const PwMDataItem &a ) const
+ {
+ qDebug("oper==%s", a.desc.c_str());
+ if ( desc != a.desc ) return false;
+ if ( name != a.name ) return false;
+ if ( pw != a.pw ) return false;
+ if ( comment != a.comment ) return false;
+ if ( url != a.url ) return false;
+ if ( launcher != a.launcher ) return false;
+ //all other field will not be checked.
+ return true;
+ }
+
+ //US ENH:this operator is used to copy an elements data during syncronization
+ //Attention: listViewPos will not be copied. So the position will stay the same.
PwMDataItem& operator = (const PwMDataItem& x)
{
- qDebug("oper=%s", x.desc.c_str());
+ // qDebug("oper=%s", x.desc.c_str());
desc = x.desc;
name = x.name;
pw = x.pw;
@@ -228,7 +234,7 @@ struct PwMDataItem
url = x.url;
launcher = x.launcher;
lockStat = x.lockStat;
- listViewPos = x.listViewPos;
+ //Do not copy listViewPos!!! listViewPos = x.listViewPos;
binary = x.binary;
meta = x.meta;
rev = x.rev;
@@ -774,13 +780,6 @@ protected:
//the following methods are the overwritten callbackmethods from the syncinterface
virtual bool sync(KSyncManager* manager, QString filename, int mode);
- //called by the syncmanager to indicate that the work has to be marked as dirty.
- virtual void sync_setModified();
- //called by the syncmanager to ask if the dirty flag is set.
- virtual bool sync_isModified();
- //called by the syncmanager to indicate that the work has to be saved.
- virtual void sync_save();
-
#endif
private:
//US ENH: helpermethods to access the sync data for a certain syncname.