Diffstat (limited to 'pwmanager/pwmanager/serializer.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | pwmanager/pwmanager/serializer.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/pwmanager/pwmanager/serializer.cpp b/pwmanager/pwmanager/serializer.cpp index 507fa30..6c6512e 100644 --- a/pwmanager/pwmanager/serializer.cpp +++ b/pwmanager/pwmanager/serializer.cpp | |||
@@ -24,6 +24,8 @@ | |||
24 | #ifdef PWM_EMBEDDED | 24 | #ifdef PWM_EMBEDDED |
25 | #include <kglobal.h> | 25 | #include <kglobal.h> |
26 | #include <klocale.h> | 26 | #include <klocale.h> |
27 | //Added by qt3to4: | ||
28 | #include <Q3CString> | ||
27 | #endif | 29 | #endif |
28 | 30 | ||
29 | /* enable/disable serializer debugging (0/1) */ | 31 | /* enable/disable serializer debugging (0/1) */ |
@@ -146,7 +148,7 @@ Serializer::Serializer() | |||
146 | #endif | 148 | #endif |
147 | } | 149 | } |
148 | 150 | ||
149 | Serializer::Serializer(const QCString &buffer) | 151 | Serializer::Serializer(const Q3CString &buffer) |
150 | { | 152 | { |
151 | defaultLockStat = true; | 153 | defaultLockStat = true; |
152 | //US BUG: I needed to specify a document name. Otherwise impl will not be created for serializing | 154 | //US BUG: I needed to specify a document name. Otherwise impl will not be created for serializing |
@@ -177,7 +179,7 @@ void Serializer::clear() | |||
177 | domDoc = new QDomDocument; | 179 | domDoc = new QDomDocument; |
178 | } | 180 | } |
179 | 181 | ||
180 | bool Serializer::parseXml(const QCString &buffer) | 182 | bool Serializer::parseXml(const Q3CString &buffer) |
181 | { | 183 | { |
182 | //abort(); | 184 | //abort(); |
183 | //qDebug("parse %s ", buffer.data()); | 185 | //qDebug("parse %s ", buffer.data()); |
@@ -198,33 +200,33 @@ bool Serializer::parseXml(const QCString &buffer) | |||
198 | return true; | 200 | return true; |
199 | } | 201 | } |
200 | 202 | ||
201 | QCString Serializer::getXml() | 203 | Q3CString Serializer::getXml() |
202 | { | 204 | { |
203 | PWM_ASSERT(domDoc); | 205 | PWM_ASSERT(domDoc); |
204 | 206 | ||
205 | #ifndef PWM_EMBEDDED | 207 | #ifndef PWM_EMBEDDED |
206 | #if defined(PWM_DEBUG) && SERIALIZER_DEBUG != 0 | 208 | #if defined(PWM_DEBUG) && SERIALIZER_DEBUG != 0 |
207 | QCString tmp(domDoc->toCString(8)); | 209 | Q3CString tmp(domDoc->toCString(8)); |
208 | printDebug("<BEGIN Serializer::getXml() dump>\n"); | 210 | printDebug("<BEGIN Serializer::getXml() dump>\n"); |
209 | cout << tmp << endl; | 211 | cout << tmp << endl; |
210 | printDebug("<END Serializer::getXml() dump>"); | 212 | printDebug("<END Serializer::getXml() dump>"); |
211 | #endif // DEBUG | 213 | #endif // DEBUG |
212 | 214 | ||
213 | QCString ret(domDoc->toCString(0)); | 215 | Q3CString ret(domDoc->toCString(0)); |
214 | ret.replace('\n', ""); | 216 | ret.replace('\n', ""); |
215 | return ret; | 217 | return ret; |
216 | #else | 218 | #else |
217 | 219 | ||
218 | #if defined(PWM_DEBUG) && SERIALIZER_DEBUG != 0 | 220 | #if defined(PWM_DEBUG) && SERIALIZER_DEBUG != 0 |
219 | QCString tmp(" " + domDoc->toCString()); | 221 | Q3CString tmp(" " + domDoc->toCString()); |
220 | printDebug("<BEGIN Serializer::getXml() dump>\n"); | 222 | printDebug("<BEGIN Serializer::getXml() dump>\n"); |
221 | qDebug(tmp); | 223 | qDebug(tmp); |
222 | cout << tmp << endl; | 224 | cout << tmp << endl; |
223 | printDebug("<END Serializer::getXml() dump>"); | 225 | printDebug("<END Serializer::getXml() dump>"); |
224 | #endif // DEBUG | 226 | #endif // DEBUG |
225 | 227 | ||
226 | QCString ret(domDoc->toCString()); | 228 | Q3CString ret(domDoc->toByteArray()); |
227 | ret.replace(QRegExp("\n"), ""); | 229 | ret.replace("\n", ""); |
228 | return ret; | 230 | return ret; |
229 | 231 | ||
230 | #endif | 232 | #endif |