[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice-devel
Subject:    [PATCH] Fix encoding problems when copying
From:       Peter Simonsson <psn () linux ! se>
Date:       2003-09-26 16:20:11
[Download RAW message or body]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi!
This patch should fix the bug (#64900) that the text isn't encoded correctly 
when copying in kivio.
I'll apply on sunday if nobody objects (or earlier if I get an ok :))

- -- 
LLaP
Peter Simonsson

Kivio (KOffice Flowcharting Application) - http://www.koffice.org/kivio/
Kexi - http://www.koffice.org/kexi/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQE/dGc+jR6JKcrOq3sRAlD4AKDjr7AV8XiVpJ3GH9ItLi3MN86/TQCgnDai
9uMtlXH7fQkWLsNmYep9cC4=
=h+uj
-----END PGP SIGNATURE-----

["kivio.diff" (text/x-diff)]

? filedump.xml
Index: kiviopart/kiviodragobject.cpp
===================================================================
RCS file: /home/kde/koffice/kivio/kiviopart/kiviodragobject.cpp,v
retrieving revision 1.6
diff -u -p -r1.6 kiviodragobject.cpp
--- kiviopart/kiviodragobject.cpp	8 Jun 2003 17:43:06 -0000	1.6
+++ kiviopart/kiviodragobject.cpp	26 Sep 2003 16:09:56 -0000
@@ -141,6 +141,7 @@ QByteArray KivioDragObject::kivioEncoded
 
   QDomDocument doc("KivioSelection");
   QDomElement elem = doc.createElement( "KivioSelection" );
+  doc.appendChild(elem);
   KivioStencil *stencil = 0;
   QPtrListIterator<KivioStencil> it(m_stencilList);
 
@@ -149,9 +150,7 @@ QByteArray KivioDragObject::kivioEncoded
     elem.appendChild(stencil->saveXML(doc));
   }
 
-  QCString result;
-  QTextStream ts(result, IO_WriteOnly);
-  ts << elem;
+  QCString result = doc.toCString();
 
   return result;
 }


_______________________________________________
koffice-devel mailing list
koffice-devel@mail.kde.org
http://mail.kde.org/mailman/listinfo/koffice-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic