From e695903cc49b33e63505b651b13d830e318fc29a Mon Sep 17 00:00:00 2001 From: ulf69 Date: Fri, 24 Sep 2004 22:21:25 +0000 Subject: fixed bug with QDomDocument handling, plus some GUI enhancements --- (limited to 'pwmanager') diff --git a/pwmanager/pwmanager/pwmdocui.cpp b/pwmanager/pwmanager/pwmdocui.cpp index e42dd9d..5e675fc 100644 --- a/pwmanager/pwmanager/pwmdocui.cpp +++ b/pwmanager/pwmanager/pwmdocui.cpp @@ -440,10 +440,10 @@ QString PwMDocUi::string_deepLockedShort() QString PwMDocUi::string_deepLockedLong() { return i18n("This file is DEEP-LOCKED!\n" - "That means all data has been encrypted " - "and written out to the file. If you want " - "to see the entries, please UNLOCK the file. " - "While unlocking, you will be prompted for the " + "That means all data has been encrypted\n" + "and written out to the file. If you want\n" + "to see the entries, please UNLOCK the file.\n" + "While unlocking, you will be prompted for the\n" "master-password or the key-card."); } diff --git a/pwmanager/pwmanager/pwmexception.cpp b/pwmanager/pwmanager/pwmexception.cpp index 4c00b04..c0dbb39 100644 --- a/pwmanager/pwmanager/pwmexception.cpp +++ b/pwmanager/pwmanager/pwmexception.cpp @@ -43,16 +43,23 @@ void __printError(const string &msg) void __printInfo(const string &msg) { cout << PROG_NAME " INFO: " << msg << endl; +#ifdef PWM_DEBUG + qDebug("%s INFO: %s", PROG_NAME, msg.c_str()) ; +#endif } void __printWarn(const string &msg) { cerr << PROG_NAME " WARNING: " << msg << endl; +#ifdef PWM_DEBUG + qDebug("%s WARNING: %s", PROG_NAME, msg.c_str()) ; +#endif } #ifdef PWM_DEBUG void __printDebug(const string &msg) { cout << PROG_NAME " DEBUG: " << msg << endl; + qDebug("%s DEBUG: %s", PROG_NAME, msg.c_str()) ; } #endif // PWM_DEBUG diff --git a/pwmanager/pwmanager/serializer.cpp b/pwmanager/pwmanager/serializer.cpp index 2810b48..fcdcec3 100644 --- a/pwmanager/pwmanager/serializer.cpp +++ b/pwmanager/pwmanager/serializer.cpp @@ -120,13 +120,24 @@ Serializer::Serializer() { defaultLockStat = true; +//US BUG: I needed to specify a document name. Otherwise impl will not be created for serializing +#ifndef PWM_EMBEDDED domDoc = new QDomDocument; +#else + domDoc = new QDomDocument("mydoc"); +#endif } Serializer::Serializer(const QCString &buffer) { defaultLockStat = true; +//US BUG: I needed to specify a document name. Otherwise impl will not be created for serializing +#ifndef PWM_EMBEDDED domDoc = new QDomDocument; +#else + domDoc = new QDomDocument("mydoc"); +#endif + if (!parseXml(buffer)) { delete domDoc; #ifndef PWM_EMBEDDED @@ -183,6 +194,7 @@ QCString Serializer::getXml() #if defined(PWM_DEBUG) && SERIALIZER_DEBUG != 0 QCString tmp(" " + domDoc->toCString()); printDebug("\n"); + qDebug(tmp); cout << tmp << endl; printDebug(""); #endif // DEBUG -- cgit v0.9.0.2