From 0250c943006bb500aa32073b1bd4492392bf4045 Mon Sep 17 00:00:00 2001 From: Lukas Tinkl Date: Fri, 23 May 2008 00:45:20 +0000 Subject: [PATCH] fix #447840: Konquerorsu crash in KDE 4 --- kdelibs-4.0.4-kdesu.patch | 23 +++++++++++++++++++++++ kdelibs.spec | 7 ++++++- 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 kdelibs-4.0.4-kdesu.patch diff --git a/kdelibs-4.0.4-kdesu.patch b/kdelibs-4.0.4-kdesu.patch new file mode 100644 index 0000000..a8f4e60 --- /dev/null +++ b/kdelibs-4.0.4-kdesu.patch @@ -0,0 +1,23 @@ +--- kdelibs/kdesu/client.cpp 2008/01/04 09:09:11 757128 ++++ kdelibs/kdesu/client.cpp 2008/05/20 14:24:27 810350 +@@ -55,7 +55,7 @@ + :d(new KDEsuClientPrivate) + { + #ifdef Q_WS_X11 +- QByteArray display(getenv("DISPLAY")); ++ QString display = QString::fromAscii(qgetenv("DISPLAY")); + if (display.isEmpty()) + { + kWarning(900) << k_lineinfo << "$DISPLAY is not set\n"; +@@ -63,10 +63,7 @@ + } + + // strip the screen number from the display +- while (QChar::fromLatin1(display.at(display.count() - 1)).isDigit()) +- display.chop(1); +- if (display.endsWith('.')) +- display.chop(1); ++ display.replace(QRegExp("\\.[0-9]+$"), ""); + #elif defined(Q_WS_QWS) + QByteArray display("QWS"); + #else diff --git a/kdelibs.spec b/kdelibs.spec index 35243d5..d85039f 100644 --- a/kdelibs.spec +++ b/kdelibs.spec @@ -1,7 +1,7 @@ Summary: K Desktop Environment 4 - Libraries Version: 4.0.4 -Release: 6%{?dist} +Release: 7%{?dist} %if 0%{?fedora} > 8 Name: kdelibs @@ -86,6 +86,7 @@ Patch16: kdelibs-4.0.4-phonon-hal.patch Patch17: kdelibs-4.0.4-remote-encoding.patch # forward port kstandarddirs hack to search /etc/kde Patch18: kdelibs-4.0.4-kstandarddirs.patch +Patch19: kdelibs-4.0.4-kdesu.patch ## upstream patches @@ -208,6 +209,7 @@ sed -i -e "s|@@VERSION_RELEASE@@|%{version}-%{release}|" kio/kio/kprotocolmanage %patch16 -p1 -b .phonon-hal %patch17 -p1 -b .remote-encoding %patch18 -p1 -b .kstandarddirs +%patch19 -p1 -b .kdesu %build @@ -365,6 +367,9 @@ rm -rf %{buildroot} %changelog +* Fri May 23 2008 Lukáš Tinkl - 4.0.4-7 +- fix #447840: Konquerorsu crash in KDE 4 + * Thu May 22 2008 Rex Dieter - 4.0.4-6 - kstandarddirs hack to search /etc/kde