summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--pwmanager/pwmanager/pwmdocui.cpp8
-rw-r--r--pwmanager/pwmanager/pwmexception.cpp7
-rw-r--r--pwmanager/pwmanager/serializer.cpp12
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
@@ -437,16 +437,16 @@ 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");
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
@@ -40,19 +40,26 @@ void __printError(const string &msg)
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
@@ -117,19 +117,30 @@
#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 ");
@@ -180,12 +191,13 @@ QCString Serializer::getXml()
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"), "");