-rw-r--r-- | pwmanager/pwmanager/pwmdocui.cpp | 8 | ||||
-rw-r--r-- | pwmanager/pwmanager/pwmexception.cpp | 7 | ||||
-rw-r--r-- | pwmanager/pwmanager/serializer.cpp | 12 |
3 files changed, 23 insertions, 4 deletions
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 @@ -431,27 +431,27 @@ QString PwMDocUi::string_locked() { return i18n("<LOCKED>"); } QString PwMDocUi::string_deepLockedShort() { return i18n("DEEP-LOCKED"); } 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."); } QString PwMDocUi::string_defaultTitle() { return i18n("Untitled"); } #ifndef PWM_EMBEDDED #include "pwmdocui.moc" #endif 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 @@ -34,25 +34,32 @@ void pwmFatal(const char *id, void __printError(const string &msg) { QString __msg(PROG_NAME " generated a fatal fault:\n"); __msg += msg.c_str(); cerr << "\n\n" << __msg.latin1() << endl; KMessageBox::error(0, __msg, PROG_NAME " fatal ERROR!"); } 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 @@ -111,31 +111,42 @@ # define ENTRY_COMMENT_WR ENTRY_COMMENT_NEW # define ENTRY_URL_WR ENTRY_URL_NEW # define ENTRY_LAUNCHER_WR ENTRY_LAUNCHER_NEW # define ENTRY_LVP_WR ENTRY_LVP_NEW # define ENTRY_BIN_WR ENTRY_BIN_NEW # define ENTRY_META_WR ENTRY_META_NEW #endif 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 throw PwMException(PwMException::EX_PARSE); #else qDebug("Serializer::Serializer : Parse Exception "); #endif } } Serializer::~Serializer() { @@ -174,24 +185,25 @@ QCString Serializer::getXml() cout << tmp << endl; printDebug("<END Serializer::getXml() dump>"); #endif // DEBUG QCString ret(domDoc->toCString(0)); ret.replace('\n', ""); return ret; #else #if defined(PWM_DEBUG) && SERIALIZER_DEBUG != 0 QCString tmp(" " + domDoc->toCString()); printDebug("<BEGIN Serializer::getXml() dump>\n"); + qDebug(tmp); cout << tmp << endl; printDebug("<END Serializer::getXml() dump>"); #endif // DEBUG QCString ret(domDoc->toCString()); ret.replace(QRegExp("\n"), ""); return ret; #endif } bool Serializer::serialize(const vector<PwMCategoryItem> &dta) |