Diffstat (limited to 'pwmanager/pwmanager/pwmdoc.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | pwmanager/pwmanager/pwmdoc.h | 39 |
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 | |||
@@ -132,12 +132,2 @@ struct PwMMetaData | |||
132 | 132 | ||
133 | PwMMetaData& operator = (const PwMMetaData& x) | ||
134 | { | ||
135 | create = x.create; | ||
136 | expire = x.expire; | ||
137 | update = x.update; | ||
138 | updateInt = x.updateInt; | ||
139 | uniqueid = x.uniqueid; | ||
140 | return *this; | ||
141 | } | ||
142 | |||
143 | inline bool isValid() const | 133 | inline bool isValid() const |
@@ -219,6 +209,22 @@ struct PwMDataItem | |||
219 | } | 209 | } |
220 | 210 | //US ENH: we need this operator to compare two items if we have no unique ids | |
211 | //available. Generaly this happens before the first sync | ||
212 | bool PwMDataItem::operator==( const PwMDataItem &a ) const | ||
213 | { | ||
214 | qDebug("oper==%s", a.desc.c_str()); | ||
215 | if ( desc != a.desc ) return false; | ||
216 | if ( name != a.name ) return false; | ||
217 | if ( pw != a.pw ) return false; | ||
218 | if ( comment != a.comment ) return false; | ||
219 | if ( url != a.url ) return false; | ||
220 | if ( launcher != a.launcher ) return false; | ||
221 | //all other field will not be checked. | ||
222 | return true; | ||
223 | } | ||
224 | |||
225 | //US ENH:this operator is used to copy an elements data during syncronization | ||
226 | //Attention: listViewPos will not be copied. So the position will stay the same. | ||
221 | PwMDataItem& operator = (const PwMDataItem& x) | 227 | PwMDataItem& operator = (const PwMDataItem& x) |
222 | { | 228 | { |
223 | qDebug("oper=%s", x.desc.c_str()); | 229 | // qDebug("oper=%s", x.desc.c_str()); |
224 | desc = x.desc; | 230 | desc = x.desc; |
@@ -230,3 +236,3 @@ struct PwMDataItem | |||
230 | lockStat = x.lockStat; | 236 | lockStat = x.lockStat; |
231 | listViewPos = x.listViewPos; | 237 | //Do not copy listViewPos!!! listViewPos = x.listViewPos; |
232 | binary = x.binary; | 238 | binary = x.binary; |
@@ -776,9 +782,2 @@ protected: | |||
776 | 782 | ||
777 | //called by the syncmanager to indicate that the work has to be marked as dirty. | ||
778 | virtual void sync_setModified(); | ||
779 | //called by the syncmanager to ask if the dirty flag is set. | ||
780 | virtual bool sync_isModified(); | ||
781 | //called by the syncmanager to indicate that the work has to be saved. | ||
782 | virtual void sync_save(); | ||
783 | |||
784 | #endif | 783 | #endif |