summaryrefslogtreecommitdiffstats
path: root/redhat/kdebase/kdebase-3.5.12-kio_man_utf8.patch
diff options
context:
space:
mode:
authorFrancois Andriot <francois.andriot@free.fr>2011-12-10 00:52:10 +0100
committerFrancois Andriot <francois.andriot@free.fr>2011-12-10 00:52:10 +0100
commit4368359c6192aaff174d4ec6fde1a8ae0682defa (patch)
treee2dcc0c82393bde2af6463da82e6e4120d70cbdc /redhat/kdebase/kdebase-3.5.12-kio_man_utf8.patch
parent39b93ce6be5b6d1ef6cc322f816b6f5173e715a3 (diff)
downloadtde-packaging-4368359c6192aaff174d4ec6fde1a8ae0682defa.tar.gz
tde-packaging-4368359c6192aaff174d4ec6fde1a8ae0682defa.zip
RHEL/Fedora: minor packaging fixes for kdelibs, kdebase, kde-i18n
Diffstat (limited to 'redhat/kdebase/kdebase-3.5.12-kio_man_utf8.patch')
-rw-r--r--redhat/kdebase/kdebase-3.5.12-kio_man_utf8.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/redhat/kdebase/kdebase-3.5.12-kio_man_utf8.patch b/redhat/kdebase/kdebase-3.5.12-kio_man_utf8.patch
new file mode 100644
index 000000000..a85f0286d
--- /dev/null
+++ b/redhat/kdebase/kdebase-3.5.12-kio_man_utf8.patch
@@ -0,0 +1,40 @@
+--- kdebase/kioslave/man/kio_man.cpp.orig 2010-08-13 00:37:38.000000000 +0200
++++ kdebase/kioslave/man/kio_man.cpp 2011-12-08 21:10:25.720324499 +0100
+@@ -569,20 +569,24 @@
+ }
+ lastdir = filename.left(filename.findRev('/'));
+
+- myStdStream = TQString::null;
+- KProcess proc;
+- /* TODO: detect availability of 'man --recode' so that this can go
+- * upstream */
+- proc << "man" << "--recode" << "UTF-8" << filename;
+-
+- TQApplication::connect(&proc, TQT_SIGNAL(receivedStdout (KProcess *, char *, int)),
+- this, TQT_SLOT(slotGetStdOutputUtf8(KProcess *, char *, int)));
+- proc.start(KProcess::Block, KProcess::All);
+-
+- const TQCString cstr=myStdStream.utf8();
+- const int len = cstr.size()-1;
++ QIODevice *fd= KFilterDev::deviceForFile(filename);
++
++ if ( !fd || !fd->open(IO_ReadOnly))
++ {
++ delete fd;
++ return 0;
++ }
++ QByteArray array(fd->readAll());
++ kdDebug(7107) << "read " << array.size() << endl;
++ fd->close();
++ delete fd;
++
++ if (array.isEmpty())
++ return 0;
++
++ const int len = array.size();
+ buf = new char[len + 4];
+- qmemmove(buf + 1, cstr.data(), len);
++ qmemmove(buf + 1, array.data(), len);
+ buf[0]=buf[len]='\n'; // Start and end with a end of line
+ buf[len+1]=buf[len+2]='\0'; // Two NUL characters at end
+ }