author | ulf69 <ulf69> | 2004-09-29 06:21:37 (UTC) |
---|---|---|
committer | ulf69 <ulf69> | 2004-09-29 06:21:37 (UTC) |
commit | 53c2eac6f60a37f9ac8fc10b86460eb9c7347b51 (patch) (unidiff) | |
tree | 1f2fb8a996c9e97465df770364777eacaecefa34 /pwmanager/pwmanager/pwmdoc.cpp | |
parent | 72b990edf0191c2e86204308ce2cac07120284bf (diff) | |
download | kdepimpi-53c2eac6f60a37f9ac8fc10b86460eb9c7347b51.zip kdepimpi-53c2eac6f60a37f9ac8fc10b86460eb9c7347b51.tar.gz kdepimpi-53c2eac6f60a37f9ac8fc10b86460eb9c7347b51.tar.bz2 |
*** empty log message ***
Diffstat (limited to 'pwmanager/pwmanager/pwmdoc.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | pwmanager/pwmanager/pwmdoc.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/pwmanager/pwmanager/pwmdoc.cpp b/pwmanager/pwmanager/pwmdoc.cpp index 9fe4809..c167c2c 100644 --- a/pwmanager/pwmanager/pwmdoc.cpp +++ b/pwmanager/pwmanager/pwmdoc.cpp | |||
@@ -44,11 +44,13 @@ | |||
44 | #include <qfileinfo.h> | 44 | #include <qfileinfo.h> |
45 | #include <qfile.h> | 45 | #include <qfile.h> |
46 | 46 | ||
47 | #define __USE_GNU | ||
48 | #define _GNU_SOURCE | ||
47 | #include <stdio.h> | 49 | #include <stdio.h> |
48 | #include <stdlib.h> | 50 | #include <stdlib.h> |
49 | #include <errno.h> | 51 | #include <errno.h> |
50 | #include <string.h> | 52 | #include <string.h> |
51 | #include <iostream> | 53 | //US#include <iostream> |
52 | #include <algorithm> | 54 | #include <algorithm> |
53 | #include <sys/types.h> | 55 | #include <sys/types.h> |
54 | #include <sys/stat.h> | 56 | #include <sys/stat.h> |
@@ -1154,7 +1156,9 @@ bool PwMDoc::serializeDta(string *d) | |||
1154 | bool PwMDoc::deSerializeDta(const string *d, bool entriesLocked) | 1156 | bool PwMDoc::deSerializeDta(const string *d, bool entriesLocked) |
1155 | { | 1157 | { |
1156 | PWM_ASSERT(d); | 1158 | PWM_ASSERT(d); |
1159 | #ifndef PWM_EMBEDDED | ||
1157 | try { | 1160 | try { |
1161 | |||
1158 | Serializer ser(d->c_str()); | 1162 | Serializer ser(d->c_str()); |
1159 | ser.setDefaultLockStat(entriesLocked); | 1163 | ser.setDefaultLockStat(entriesLocked); |
1160 | if (!ser.deSerialize(&dta)) | 1164 | if (!ser.deSerialize(&dta)) |
@@ -1162,6 +1166,15 @@ bool PwMDoc::deSerializeDta(const string *d, bool entriesLocked) | |||
1162 | } catch (PwMException) { | 1166 | } catch (PwMException) { |
1163 | return false; | 1167 | return false; |
1164 | } | 1168 | } |
1169 | #else | ||
1170 | Serializer ser(d->c_str()); | ||
1171 | ser.setDefaultLockStat(entriesLocked); | ||
1172 | if (!ser.deSerialize(&dta)) | ||
1173 | return false; | ||
1174 | else | ||
1175 | return false; | ||
1176 | #endif | ||
1177 | |||
1165 | emitDataChanged(this); | 1178 | emitDataChanged(this); |
1166 | return true; | 1179 | return true; |
1167 | } | 1180 | } |