rev 14731 - in trunk/packages/kdeutils/debian: . patches

Sune Vuorela pusling-guest at alioth.debian.org
Sat May 30 19:56:50 UTC 2009


Author: pusling-guest
Date: 2009-05-30 19:56:50 +0000 (Sat, 30 May 2009)
New Revision: 14731

Added:
   trunk/packages/kdeutils/debian/patches/01_r974448_use_QXmlStreams_instead_of_hand_writing_xml.diff
   trunk/packages/kdeutils/debian/patches/series
Modified:
   trunk/packages/kdeutils/debian/changelog
   trunk/packages/kdeutils/debian/control
Log:
* Backport a patch to write better xml in kwalletmanager.
  (Closes: 530419)
* Add rar and  unrar | unrar-free to ark suggests.

Modified: trunk/packages/kdeutils/debian/changelog
===================================================================
--- trunk/packages/kdeutils/debian/changelog	2009-05-30 19:29:39 UTC (rev 14730)
+++ trunk/packages/kdeutils/debian/changelog	2009-05-30 19:56:50 UTC (rev 14731)
@@ -1,10 +1,12 @@
-kdeutils (4:4.2.3-1) UNRELEASED; urgency=low
+kdeutils (4:4.2.4-1) UNRELEASED; urgency=low
 
   * New upstream release.
 
   +++ Changes by Sune Vuorela:
 
   * Fix sections.
+  * Backport a patch to write better xml in kwalletmanager.
+    (Closes: 530419)
 
   +++ Changes by Fathi Boudra:
 
@@ -13,7 +15,7 @@
   +++ Changes by Pino Toscano:
 
   * Remove ncompress and zoo from ark recommends.
-  * Add rar and  unrar | unrar-free to ark recommends.
+  * Add rar and  unrar | unrar-free to ark suggests.
 
  -- Debian Qt/KDE Maintainers <debian-qt-kde at lists.debian.org>  Sat, 02 May 2009 12:35:15 +0200
 

Modified: trunk/packages/kdeutils/debian/control
===================================================================
--- trunk/packages/kdeutils/debian/control	2009-05-30 19:29:39 UTC (rev 14730)
+++ trunk/packages/kdeutils/debian/control	2009-05-30 19:56:50 UTC (rev 14731)
@@ -45,7 +45,8 @@
 Package: ark
 Section: utils
 Architecture: any
-Recommends: bzip2, p7zip-full, rar, unrar | unrar-free, unzip, zip
+Recommends: bzip2, p7zip-full, unzip, zip
+Suggests: rar, unrar | unrar-free
 Depends: ${shlibs:Depends}, ${misc:Depends}
 Description: archive utility for KDE 4
  Ark manages various archive formats, including tar, gzip, bzip2, rar and zip,

Added: trunk/packages/kdeutils/debian/patches/01_r974448_use_QXmlStreams_instead_of_hand_writing_xml.diff
===================================================================
--- trunk/packages/kdeutils/debian/patches/01_r974448_use_QXmlStreams_instead_of_hand_writing_xml.diff	                        (rev 0)
+++ trunk/packages/kdeutils/debian/patches/01_r974448_use_QXmlStreams_instead_of_hand_writing_xml.diff	2009-05-30 19:56:50 UTC (rev 14731)
@@ -0,0 +1,110 @@
+Use QXmlStreamWriter instead of hand building the XML.
+
+From upstream:
+SVN commit 974449 by mleupold:
+
+Backport of r974403:
+Use QXmlStreamWriter instead of manually crafted XML for exporting wallets to
+XML. This works around encoding/quoting problems.
+
+CCBUG:194358
+
+
+ M  +27 -16    kwalleteditor.cpp  
+
+Thanks to Dan Torop
+
+--- a/kwallet/kwalleteditor.cpp
++++ b/kwallet/kwalleteditor.cpp
+@@ -27,6 +27,7 @@
+ #include <QDomElement>
+ #include <QDomNode>
+ #include <QDomDocument>
++#include <QXmlStreamWriter>
+ #include <kaction.h>
+ #include <kdebug.h>
+ #include <kdialog.h>
+@@ -1084,12 +1085,16 @@ void KWalletEditor::importXML() {
+ void KWalletEditor::exportXML() {
+ 	KTemporaryFile tf;
+ 	tf.open();
+-	QTextStream ts(&tf);
++	QXmlStreamWriter xml(&tf);
++	xml.setAutoFormatting(true);
++	xml.writeStartDocument();
+ 	const QStringList fl = _w->folderList();
+ 
+-	ts << "<wallet name=\"" << _walletName << "\">" << endl;
++	xml.writeStartElement("wallet");
++	xml.writeAttribute("name", _walletName);
+ 	for (QStringList::const_iterator i = fl.constBegin(); i != fl.constEnd(); ++i) {
+-		ts << "  <folder name=\"" << *i << "\">" << endl;
++		xml.writeStartElement("folder");
++		xml.writeAttribute("name", *i);
+ 		_w->setFolder(*i);
+ 		QStringList entries = _w->entryList();
+ 		for (QStringList::const_iterator j = entries.constBegin(); j != entries.constEnd(); ++j) {
+@@ -1098,9 +1103,10 @@ void KWalletEditor::exportXML() {
+ 					{
+ 						QString pass;
+ 						if (_w->readPassword(*j, pass) == 0) {
+-							ts << "    <password name=\"" << Qt::escape(*j) << "\">";
+-							ts << Qt::escape(pass);
+-							ts << "</password>" << endl;
++							xml.writeStartElement("password");
++							xml.writeAttribute("name", *j);
++							xml.writeCharacters(pass);
++							xml.writeEndElement();
+ 						}
+ 						break;
+ 					}
+@@ -1108,10 +1114,10 @@ void KWalletEditor::exportXML() {
+ 					{
+ 						QByteArray ba;
+ 						if (_w->readEntry(*j, ba) == 0) {
+-							ts << "    <stream name=\"" << Qt::escape(*j) << "\">";
+-							ts << KCodecs::base64Encode(ba);
+-
+-							ts << "</stream>" << endl;
++							xml.writeStartElement("stream");
++							xml.writeAttribute("name", *j);
++							xml.writeCharacters(KCodecs::base64Encode(ba));
++							xml.writeEndElement();
+ 						}
+ 						break;
+ 					}
+@@ -1119,11 +1125,15 @@ void KWalletEditor::exportXML() {
+ 					{
+ 						QMap<QString,QString> map;
+ 						if (_w->readMap(*j, map) == 0) {
+-							ts << "    <map name=\"" << Qt::escape(*j) << "\">" << endl;
++							xml.writeStartElement("map");
++							xml.writeAttribute("name", *j);
+ 							for (QMap<QString,QString>::ConstIterator k = map.constBegin(); k != map.constEnd(); ++k) {
+-								ts << "      <mapentry name=\"" << Qt::escape(k.key()) << "\">" << Qt::escape(k.value()) << "</mapentry>" << endl;
++								xml.writeStartElement("mapentry");
++								xml.writeAttribute("name", k.key());
++								xml.writeCharacters(k.value());
++								xml.writeEndElement();
+ 							}
+-							ts << "    </map>" << endl;
++							xml.writeEndElement();
+ 						}
+ 						break;
+ 					}
+@@ -1132,11 +1142,12 @@ void KWalletEditor::exportXML() {
+ 					break;
+ 			}
+ 		}
+-		ts << "  </folder>" << endl;
++		xml.writeEndElement();
+ 	}
+ 
+-	ts << "</wallet>" << endl;
+-	ts.flush();
++	xml.writeEndElement();
++	xml.writeEndDocument();
++	tf.flush();
+ 
+ 	KUrl url = KFileDialog::getSaveUrl(KUrl(), "*.xml", this);
+ 

Added: trunk/packages/kdeutils/debian/patches/series
===================================================================
--- trunk/packages/kdeutils/debian/patches/series	                        (rev 0)
+++ trunk/packages/kdeutils/debian/patches/series	2009-05-30 19:56:50 UTC (rev 14731)
@@ -0,0 +1 @@
+01_r974448_use_QXmlStreams_instead_of_hand_writing_xml.diff




More information about the pkg-kde-commits mailing list