* Fri Aug 29 2008 Kevin Kofler <Kevin@tigcc.ticalc.org> 4.1.1-2

- fix #455130 (kinit crashing in kglobalconfig with no KComponentData) properly
- drop revert-kinit-regression hack (fixes ioslave translations)
This commit is contained in:
Kevin Kofler 2008-08-29 14:54:03 +00:00
parent 6fc3c96dfa
commit 69835801c4
3 changed files with 20 additions and 41 deletions

View File

@ -1,36 +0,0 @@
Index: kinit.cpp
===================================================================
--- kinit/kinit.cpp (revision 829264)
+++ kinit/kinit.cpp (revision 828077)
@@ -49,10 +49,9 @@
#include <QtCore/QTextStream>
#include <QtCore/QRegExp>
#include <QtGui/QFont>
-#include <QDir>
#include <kcomponentdata.h>
#include <kstandarddirs.h>
-#include <kconfiggroup.h>
+#include <kglobalsettings.h>
#include <kglobal.h>
#include <kconfig.h>
#include <klibloader.h>
@@ -530,17 +529,8 @@
if (cwd && *cwd)
chdir(cwd);
else {
- // Can't use KGlobalSettings::documentPath() here, we don't have a main component set,
- // and we don't want to set one; e.g. kioslaves will do that.
- // So we have to duplicate this stuff from KGlobalSettings.
- KConfigGroup g(s_instance->config(), "Paths");
- const QString documentPath = g.readPathEntry("Documents",
-#ifdef Q_WS_WIN
- getWin32ShellFoldersPath("Personal")
-#else
- QDir::homePath());
-#endif
- const QByteArray docPath = QFile::encodeName(documentPath);
+ KComponentData componentData("klauncher"); // needed for KConfig usage
+ const QByteArray docPath = QFile::encodeName(KGlobalSettings::documentPath());
chdir(docPath.constData());
}

View File

@ -0,0 +1,12 @@
diff -ur kdelibs-4.1.0/kdecore/config/kconfiggroup.cpp kdelibs-4.1.0-#455130/kdecore/config/kconfiggroup.cpp
--- kdelibs-4.1.0/kdecore/config/kconfiggroup.cpp 2008-06-25 09:57:24.000000000 +0200
+++ kdelibs-4.1.0-#455130/kdecore/config/kconfiggroup.cpp 2008-08-29 14:48:54.000000000 +0200
@@ -393,7 +393,7 @@
QString result;
QByteArray oldpath = qgetenv( "PATH" );
- QByteArray newpath = QFile::encodeName( KGlobal::dirs()->resourceDirs( "exe" ).join( QChar( KPATH_SEPARATOR ) ) );
+ QByteArray newpath = QFile::encodeName( KGlobal::hasMainComponent() ? KGlobal::dirs()->resourceDirs( "exe" ).join( QChar( KPATH_SEPARATOR ) ) : QString() );
if( !newpath.isEmpty() && !oldpath.isEmpty() )
newpath += KPATH_SEPARATOR;
newpath += oldpath;

View File

@ -2,7 +2,7 @@
Summary: K Desktop Environment 4 - Libraries
Version: 4.1.1
Release: 1%{?dist}
Release: 2%{?dist}
%if 0%{?fedora} > 8
Name: kdelibs
@ -77,9 +77,8 @@ Patch13: kdelibs-4.0.5-fedora-buildtype.patch
Patch14: kdelibs-4.0.85-libexecdir.patch
# kstandarddirs changes: search /etc/kde, find /usr/libexec/kde4
Patch18: kdelibs-4.1.0-kstandarddirs.patch
# revert a kinit patch which triggers an assertion failure in KComponentData
# (and its followup) (#455130)
Patch19: kdelibs-4.0.98-revert-kinit-regression.patch
# fix running commands in kglobalconfig before KComponentData init (#455130)
Patch19: kdelibs-4.1.0-#455130.patch
## upstream patches
@ -205,7 +204,7 @@ sed -i -e "s|@@VERSION_RELEASE@@|%{version}-%{release}|" kio/kio/kprotocolmanage
%patch13 -p1 -b .fedora-buildtype
%patch14 -p1 -b .libexecdir
%patch18 -p1 -b .kstandarddirs
%patch19 -p0 -b .kinit-regression
%patch19 -p1 -b .#455130
## upstream patches
@ -368,6 +367,10 @@ rm -rf %{buildroot}
%changelog
* Fri Aug 29 2008 Kevin Kofler <Kevin@tigcc.ticalc.org> 4.1.1-2
- fix #455130 (kinit crashing in kglobalconfig with no KComponentData) properly
- drop revert-kinit-regression hack (fixes ioslave translations)
* Fri Aug 29 2008 Than Ngo <than@redhat.com> 4.1.1-1
- 4.1.1