summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--pwmanager/pwmanager/pwm.cpp10
-rw-r--r--pwmanager/pwmanager/pwmdocui.cpp10
-rw-r--r--pwmanager/pwmanager/serializer.cpp8
3 files changed, 18 insertions, 10 deletions
diff --git a/pwmanager/pwmanager/pwm.cpp b/pwmanager/pwmanager/pwm.cpp
index 9798e8e..b7b5307 100644
--- a/pwmanager/pwmanager/pwm.cpp
+++ b/pwmanager/pwmanager/pwm.cpp
@@ -24,6 +24,8 @@
#include <kiconloader.h>
#include <kmessagebox.h>
+#include <qstatusbar.h>
+
#ifndef PWM_EMBEDDED
#include <kmenubar.h>
#include <kstatusbar.h>
@@ -1358,17 +1360,15 @@ void PwM::copyToClipboard(const QString &s)
}
+
void PwM::showStatMsg(const QString &msg)
{
-#ifndef PWM_EMBEDDED
- KStatusBar *statBar = statusBar();
- statBar->message(msg, STATUSBAR_MSG_TIMEOUT * 1000);
+#ifdef DESKTOP_VERSION
+ statusBar()->message(msg, STATUSBAR_MSG_TIMEOUT * 1000);
#else
qDebug("Statusbar : %s",msg.latin1());
-#ifndef DESKTOP_VERSION
Global::statusMessage(msg);
#endif
-#endif
}
void PwM::focusInEvent(QFocusEvent *e)
diff --git a/pwmanager/pwmanager/pwmdocui.cpp b/pwmanager/pwmanager/pwmdocui.cpp
index 6ddb6f5..71b4a8d 100644
--- a/pwmanager/pwmanager/pwmdocui.cpp
+++ b/pwmanager/pwmanager/pwmdocui.cpp
@@ -379,13 +379,13 @@ bool PwMDocUi::openDocUi(PwMDoc *doc,
i18n("Could not read file!")
+ "\n"
+ filename,
- i18n("file error"));
+ i18n("File error"));
goto cancelOpen;
}
if (ret == e_alreadyOpen) {
KMessageBox::error(getCurrentView(),
i18n("This file is already open."),
- i18n("already open"));
+ i18n("Already open"));
goto cancelOpen;
}
if (ret == e_fileVer) {
@@ -394,7 +394,7 @@ bool PwMDocUi::openDocUi(PwMDoc *doc,
("File-version is not supported!\n"
"Did you create this file with an\nolder or newer version of PwM?"),
i18n
- ("incompatible version"));
+ ("Incompatible version"));
goto cancelOpen;
}
if (ret == e_wrongPw) {
@@ -410,7 +410,7 @@ bool PwMDocUi::openDocUi(PwMDoc *doc,
"as a PwM Password file.\n"
"Probably you have selected the wrong file."),
i18n
- ("no PwM password-file"));
+ ("No PwM password-file"));
goto cancelOpen;
}
if (ret == e_fileCorrupt) {
@@ -420,7 +420,7 @@ bool PwMDocUi::openDocUi(PwMDoc *doc,
"Maybe the media, you stored this file on,\n"
"had bad sectors?"),
i18n
- ("checksum error"));
+ ("Checksum error"));
goto cancelOpen;
}
}
diff --git a/pwmanager/pwmanager/serializer.cpp b/pwmanager/pwmanager/serializer.cpp
index ed0f754..5753c1d 100644
--- a/pwmanager/pwmanager/serializer.cpp
+++ b/pwmanager/pwmanager/serializer.cpp
@@ -165,6 +165,8 @@ void Serializer::clear()
bool Serializer::parseXml(const QCString &buffer)
{
+ //abort();
+ //qDebug("parse %s ", buffer.data());
PWM_ASSERT(domDoc);
#ifndef PWM_EMBEDDED
if (!domDoc->setContent(buffer, true))
@@ -356,6 +358,7 @@ bool Serializer::extractEntry(const QDomNode &n,
}
if (text == " ")
text = ""; // for backward compatibility.
+ //qDebug("entry %s ",unescapeEntryData(text).latin1());
if (name == ENTRY_DESC_NEW ||
name == ENTRY_DESC_OLD) {
dta->desc = unescapeEntryData(text).latin1();
@@ -701,9 +704,14 @@ QString Serializer::unescapeEntryData(QString dta)
dta.replace("$>--endl--<$", "\n");
dta.replace("||>", "]]>");
#else
+#ifdef DESKTOP_VERSION
+ dta.replace("$>--endl--<$", "\n");
+ dta.replace("||>", "]]>");
+#else
dta.replace(QRegExp("\\$>--endl--<\\$"), "\n");
dta.replace(QRegExp("||>"), "]]>");
#endif
+#endif
return dta;
}