Diffstat (limited to 'pwmanager/pwmanager/pwmdoc.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | pwmanager/pwmanager/pwmdoc.h | 38 |
1 files changed, 33 insertions, 5 deletions
diff --git a/pwmanager/pwmanager/pwmdoc.h b/pwmanager/pwmanager/pwmdoc.h index 91277f6..ddab7f3 100644 --- a/pwmanager/pwmanager/pwmdoc.h +++ b/pwmanager/pwmanager/pwmdoc.h | |||
@@ -116,9 +116,9 @@ struct PwMMetaData | |||
116 | */ | 116 | */ |
117 | unsigned long updateInt; | 117 | unsigned long updateInt; |
118 | 118 | ||
119 | //US ENH: enhancements of the filestructure | 119 | //US ENH: enhancements of the filestructure |
120 | /* each entry gets a unique id assigned */ | 120 | /* each entry gets a unique id assigned */ |
121 | QString uniqueid; | 121 | string uniqueid; |
122 | 122 | ||
123 | 123 | ||
124 | void clear() | 124 | void clear() |
@@ -129,6 +129,17 @@ struct PwMMetaData | |||
129 | updateInt = 0; | 129 | updateInt = 0; |
130 | uniqueid = KApplication::randomString(8); | 130 | uniqueid = KApplication::randomString(8); |
131 | } | 131 | } |
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 | |||
132 | inline bool isValid() const | 143 | inline bool isValid() const |
133 | { | 144 | { |
134 | if (valid.isNull()) | 145 | if (valid.isNull()) |
@@ -206,6 +217,23 @@ struct PwMDataItem | |||
206 | if (clearMeta) | 217 | if (clearMeta) |
207 | meta.clear(); | 218 | meta.clear(); |
208 | } | 219 | } |
220 | |||
221 | PwMDataItem& operator = (const PwMDataItem& x) | ||
222 | { | ||
223 | qDebug("oper=%s", x.desc.c_str()); | ||
224 | desc = x.desc; | ||
225 | name = x.name; | ||
226 | pw = x.pw; | ||
227 | comment = x.comment; | ||
228 | url = x.url; | ||
229 | launcher = x.launcher; | ||
230 | lockStat = x.lockStat; | ||
231 | listViewPos = x.listViewPos; | ||
232 | binary = x.binary; | ||
233 | meta = x.meta; | ||
234 | rev = x.rev; | ||
235 | return *this; | ||
236 | } | ||
209 | 237 | ||
210 | }; | 238 | }; |
211 | 239 | ||
@@ -763,8 +791,8 @@ protected: | |||
763 | PwMerror addSyncDataEntry(PwMSyncItem *d, bool dontFlagDirty = false); | 791 | PwMerror addSyncDataEntry(PwMSyncItem *d, bool dontFlagDirty = false); |
764 | 792 | ||
765 | /** returns a pointer to the syncdata */ | 793 | /** returns a pointer to the syncdata */ |
766 | PwMSyncItem* getSyncDataEntry(unsigned int index) | 794 | PwMSyncItem getSyncDataEntry(unsigned int index) |
767 | { return &(dti.syncDta[index]); } | 795 | { return *(dti.syncDta[index]); } |
768 | 796 | ||
769 | /** delete entry */ | 797 | /** delete entry */ |
770 | bool delSyncDataEntry(unsigned int index, bool dontFlagDirty = false); | 798 | bool delSyncDataEntry(unsigned int index, bool dontFlagDirty = false); |