aboutsummaryrefslogtreecommitdiffstats
path: root/x11/kdelibs4
diff options
context:
space:
mode:
authorarved <arved@FreeBSD.org>2004-06-24 02:51:20 +0800
committerarved <arved@FreeBSD.org>2004-06-24 02:51:20 +0800
commit53ddd070cd65206b6b0c6f8513b31b419fed9125 (patch)
tree5ac7e015bc82304c5ccc3cefb50fb748c8793c8c /x11/kdelibs4
parent487b46c6af9400e7e13784c32e9d297b724b4567 (diff)
downloadfreebsd-ports-gnome-53ddd070cd65206b6b0c6f8513b31b419fed9125.tar.gz
freebsd-ports-gnome-53ddd070cd65206b6b0c6f8513b31b419fed9125.tar.zst
freebsd-ports-gnome-53ddd070cd65206b6b0c6f8513b31b419fed9125.zip
Work around a bug in QString::fromUtf8
This fixes my crashes of Konqueror, Kmix, Kate & ... on AMD64 Submitted by: Frerich Raabe Obtained from: KDE CVS
Diffstat (limited to 'x11/kdelibs4')
-rw-r--r--x11/kdelibs4/files/patch-kdeui-kxmlguifactory.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/x11/kdelibs4/files/patch-kdeui-kxmlguifactory.cpp b/x11/kdelibs4/files/patch-kdeui-kxmlguifactory.cpp
new file mode 100644
index 000000000000..a9ae71f61519
--- /dev/null
+++ b/x11/kdelibs4/files/patch-kdeui-kxmlguifactory.cpp
@@ -0,0 +1,23 @@
+Index: kxmlguifactory.cpp
+===================================================================
+RCS file: /home/kde/kdelibs/kdeui/kxmlguifactory.cpp,v
+retrieving revision 1.149
+retrieving revision 1.151
+diff -u -3 -p -r1.149 -r1.151
+--- kxmlguifactory.cpp 19 Jun 2004 21:35:02 -0000 1.149
++++ kdeui/kxmlguifactory.cpp 22 Jun 2004 15:56:16 -0000 1.151
+@@ -124,7 +124,14 @@ QString KXMLGUIFactory::readConfigFile(
+ return QString::null;
+ }
+
++#if QT_VERSION <= 0x030302
++ // Work around bug in QString::fromUtf8 (which calls strlen).
++ QByteArray buffer(file.size() + 1);
++ buffer = file.readAll();
++ buffer[ buffer.size() - 1 ] = '\0';
++#else
+ QByteArray buffer(file.readAll());
++#endif
+ return QString::fromUtf8(buffer.data(), buffer.size());
+ }
+