-rw-r--r-- | pwmanager/pwmanager/serializer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pwmanager/pwmanager/serializer.cpp b/pwmanager/pwmanager/serializer.cpp index fcdcec3..9377e3d 100644 --- a/pwmanager/pwmanager/serializer.cpp +++ b/pwmanager/pwmanager/serializer.cpp | |||
@@ -385,65 +385,65 @@ bool Serializer::extractMeta(const QDomNode &n, | |||
385 | cur = cur.nextSibling(); | 385 | cur = cur.nextSibling(); |
386 | continue; | 386 | continue; |
387 | } | 387 | } |
388 | #ifndef PWM_EMBEDDED | 388 | #ifndef PWM_EMBEDDED |
389 | if (name == META_CREATE_DATE) { | 389 | if (name == META_CREATE_DATE) { |
390 | dta->create = QDateTime::fromString(val, Qt::ISODate); | 390 | dta->create = QDateTime::fromString(val, Qt::ISODate); |
391 | } else if (name == META_VALID_DATE) { | 391 | } else if (name == META_VALID_DATE) { |
392 | dta->valid = QDateTime::fromString(val, Qt::ISODate); | 392 | dta->valid = QDateTime::fromString(val, Qt::ISODate); |
393 | } else if (name == META_EXPIRE_DATE) { | 393 | } else if (name == META_EXPIRE_DATE) { |
394 | dta->expire = QDateTime::fromString(val, Qt::ISODate); | 394 | dta->expire = QDateTime::fromString(val, Qt::ISODate); |
395 | } else if (name == META_UPDATE_DATE) { | 395 | } else if (name == META_UPDATE_DATE) { |
396 | dta->update = QDateTime::fromString(val, Qt::ISODate); | 396 | dta->update = QDateTime::fromString(val, Qt::ISODate); |
397 | } else if (name == META_UPDATE_INT) { | 397 | } else if (name == META_UPDATE_INT) { |
398 | dta->updateInt = strtoul(val.latin1(), 0, 10); | 398 | dta->updateInt = strtoul(val.latin1(), 0, 10); |
399 | } else if (name == META_UNIQUEID) { | 399 | } else if (name == META_UNIQUEID) { |
400 | dta->uniqueid = unescapeEntryData(val).latin1(); | 400 | dta->uniqueid = unescapeEntryData(val).latin1(); |
401 | } else { | 401 | } else { |
402 | printDebug(string("extractMeta(): invalid: ") | 402 | printDebug(string("extractMeta(): invalid: ") |
403 | + name.latin1()); | 403 | + name.latin1()); |
404 | } | 404 | } |
405 | #else | 405 | #else |
406 | 406 | ||
407 | QDateTime m_dt; | 407 | QDateTime m_dt; |
408 | 408 | ||
409 | if ((name == META_CREATE_DATE) || | 409 | if ((name == META_CREATE_DATE) || |
410 | (name == META_VALID_DATE) || | 410 | (name == META_VALID_DATE) || |
411 | (name == META_EXPIRE_DATE) || | 411 | (name == META_EXPIRE_DATE) || |
412 | (name == META_UPDATE_DATE)) | 412 | (name == META_UPDATE_DATE)) |
413 | { | 413 | { |
414 | int pos = val.find("T"); | 414 | int pos = val.find("T"); |
415 | QString date = val.left(pos); | 415 | QString date = val.left(pos); |
416 | QString time = val.mid(pos+1); | 416 | QString time = val.mid(pos+1); |
417 | qDebug("Serializer::extractMeta : date=%s ,time=%s",date.latin1(), time.latin1() ); | 417 | qDebug("Serializer::extractMeta from %s to date=%s ,time=%s",val.latin1(), date.latin1(), time.latin1() ); |
418 | bool ok1, ok2; | 418 | bool ok1, ok2; |
419 | 419 | ||
420 | QDate m_date = KGlobal::locale()->readDate(date, &ok1); | 420 | QDate m_date = KGlobal::locale()->readDate(date, &ok1); |
421 | QTime m_time = KGlobal::locale()->readTime(time, &ok2); | 421 | QTime m_time = KGlobal::locale()->readTime(time, &ok2); |
422 | if ((ok1 == false) || (ok2 == false)) | 422 | if ((ok1 == false) || (ok2 == false)) |
423 | qDebug("Serializer::extractMeta invalid date or time !!!!!!!!!!!!!"); | 423 | qDebug("Serializer::extractMeta invalid date or time !!!!!!!!!!!!!"); |
424 | m_dt.setDate(m_date); | 424 | m_dt.setDate(m_date); |
425 | m_dt.setTime(m_time); | 425 | m_dt.setTime(m_time); |
426 | } | 426 | } |
427 | 427 | ||
428 | 428 | ||
429 | if (name == META_CREATE_DATE) { | 429 | if (name == META_CREATE_DATE) { |
430 | dta->create = m_dt; | 430 | dta->create = m_dt; |
431 | } else if (name == META_VALID_DATE) { | 431 | } else if (name == META_VALID_DATE) { |
432 | dta->valid = m_dt; | 432 | dta->valid = m_dt; |
433 | } else if (name == META_EXPIRE_DATE) { | 433 | } else if (name == META_EXPIRE_DATE) { |
434 | dta->expire = m_dt; | 434 | dta->expire = m_dt; |
435 | } else if (name == META_UPDATE_DATE) { | 435 | } else if (name == META_UPDATE_DATE) { |
436 | dta->update = m_dt; | 436 | dta->update = m_dt; |
437 | } else if (name == META_UPDATE_INT) { | 437 | } else if (name == META_UPDATE_INT) { |
438 | dta->updateInt = strtoul(val.latin1(), 0, 10); | 438 | dta->updateInt = strtoul(val.latin1(), 0, 10); |
439 | } else if (name == META_UNIQUEID) { | 439 | } else if (name == META_UNIQUEID) { |
440 | dta->uniqueid = unescapeEntryData(val).latin1(); | 440 | dta->uniqueid = unescapeEntryData(val).latin1(); |
441 | } else { | 441 | } else { |
442 | printDebug(string("extractMeta(): invalid: ") | 442 | printDebug(string("extractMeta(): invalid: ") |
443 | + name.latin1()); | 443 | + name.latin1()); |
444 | } | 444 | } |
445 | #endif | 445 | #endif |
446 | cur = cur.nextSibling(); | 446 | cur = cur.nextSibling(); |
447 | } | 447 | } |
448 | return true; | 448 | return true; |
449 | } | 449 | } |