rpms/kdelibs/devel kdelibs-4.0.2-no-cache-kdeglobals-paths.patch, NONE, 1.1 kdelibs.spec, 1.289, 1.290

Kevin Kofler (kkofler) fedora-extras-commits at redhat.com
Mon Mar 10 00:24:29 UTC 2008


Author: kkofler

Update of /cvs/pkgs/rpms/kdelibs/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv23743/devel

Modified Files:
	kdelibs.spec 
Added Files:
	kdelibs-4.0.2-no-cache-kdeglobals-paths.patch 
Log Message:
* Mon Mar 10 2008 Kevin Kofler <Kevin at tigcc.ticalc.org> 4.0.2-9
- fix kdeglobals not being found in profile (e.g. kde-settings) directory

kdelibs-4.0.2-no-cache-kdeglobals-paths.patch:

--- NEW FILE kdelibs-4.0.2-no-cache-kdeglobals-paths.patch ---
diff -ur kdelibs-4.0.2/kdecore/config/kconfig.cpp kdelibs-4.0.2-no-cache-kdeglobals-paths/kdecore/config/kconfig.cpp
--- kdelibs-4.0.2/kdecore/config/kconfig.cpp	2008-01-05 01:00:39.000000000 +0100
+++ kdelibs-4.0.2-no-cache-kdeglobals-paths/kdecore/config/kconfig.cpp	2008-03-09 23:58:41.000000000 +0100
@@ -60,12 +60,6 @@
 {
     sGlobalFileName = componentData.dirs()->saveLocation("config") +
                           QString::fromLatin1("kdeglobals");
-    if (wantGlobals()) {
-        const KStandardDirs *const dirs = componentData.dirs();
-        foreach(const QString& dir, dirs->findAllResources("config", QLatin1String("kdeglobals")) +
-                                    dirs->findAllResources("config", QLatin1String("system.kdeglobals")))
-            globalFiles.push_front(dir);
-    }
     const QString etc_kderc =
 #ifdef Q_WS_WIN
         QFile::decodeName( QByteArray(::getenv("WINDIR")) + "\\kde4rc" );
@@ -75,15 +69,11 @@
     KEntryMap tmp;
     // first entry is always /etc/kderc or empty if cannot read
     if (KStandardDirs::checkAccess(etc_kderc, R_OK)) {
-        if (!globalFiles.contains(etc_kderc))
-            globalFiles.push_front(etc_kderc);
-
         if (!mappingsRegistered) {
             KSharedPtr<KConfigBackend> backend = KConfigBackend::create(componentData, etc_kderc, QLatin1String("INI"));
             backend->parseConfig( "en_US", tmp, KConfigBackend::ParseDefaults);
         }
     } else {
-        globalFiles.push_front(QString());
         mappingsRegistered = true;
     }
 
@@ -372,10 +362,31 @@
 
 void KConfigPrivate::parseGlobalFiles()
 {
+    QStringList globalFiles;
+
+    if (wantGlobals()) {
+        const KStandardDirs *const dirs = componentData.dirs();
+        foreach(const QString& dir, dirs->findAllResources("config", QLatin1String("kdeglobals")) +
+                                    dirs->findAllResources("config", QLatin1String("system.kdeglobals")))
+            globalFiles.push_front(dir);
+    }
+    const QString etc_kderc =
+#ifdef Q_WS_WIN
+        QFile::decodeName( QByteArray(::getenv("WINDIR")) + "\\kde4rc" );
+#else
+        QLatin1String("/etc/kde4rc");
+#endif
+    KEntryMap tmp;
+    // first entry is always /etc/kderc or empty if cannot read
+    if (KStandardDirs::checkAccess(etc_kderc, R_OK)) {
+        if (!globalFiles.contains(etc_kderc))
+            globalFiles.push_front(etc_kderc);
+    } else {
+        globalFiles.push_front(QString());
+    }
+
 //    qDebug() << "parsing global files" << globalFiles;
 
-    // TODO: can we cache the values in etc_kderc / other global files
-    //       on a per-application basis?
     const QByteArray utf8Locale = locale.toUtf8();
     foreach(const QString& file, globalFiles) {
         KConfigBackend::ParseOptions parseOpts = KConfigBackend::ParseGlobal|KConfigBackend::ParseExpansions;
diff -ur kdelibs-4.0.2/kdecore/config/kconfig_p.h kdelibs-4.0.2-no-cache-kdeglobals-paths/kdecore/config/kconfig_p.h
--- kdelibs-4.0.2/kdecore/config/kconfig_p.h	2008-01-05 01:00:39.000000000 +0100
+++ kdelibs-4.0.2-no-cache-kdeglobals-paths/kdecore/config/kconfig_p.h	2008-03-09 23:50:26.000000000 +0100
@@ -82,7 +82,6 @@
 
     KEntryMap entryMap;
     QString backendType;
-    QStringList globalFiles;
     QStack<QString> extraFiles;
 
     QString locale;


Index: kdelibs.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kdelibs/devel/kdelibs.spec,v
retrieving revision 1.289
retrieving revision 1.290
diff -u -r1.289 -r1.290
--- kdelibs.spec	7 Mar 2008 20:57:11 -0000	1.289
+++ kdelibs.spec	10 Mar 2008 00:23:52 -0000	1.290
@@ -3,7 +3,7 @@
 
 Summary: K Desktop Environment 4 - Libraries
 Version: 4.0.2
-Release: 8%{?dist}
+Release: 9%{?dist}
 
 %if 0%{?fedora} > 8
 Name: kdelibs
@@ -65,6 +65,9 @@
 Patch8: kdelibs-4.0.2-install-all-css.patch
 # add Fedora/V-R to KHTML UA string
 Patch9: kdelibs-4.0.2-branding.patch
+# don't cache kdeglobals paths because they change after profile directories
+# are loaded from kde4rc
+Patch10: kdelibs-4.0.2-no-cache-kdeglobals-paths.patch
 
 # upstream patches
 Patch100: kdelibs-4.0.x-kio.patch
@@ -178,6 +181,7 @@
 %patch8 -p1 -b .all-css
 %patch9 -p1 -b .branding
 sed -i -e "s|@@VERSION_RELEASE@@|%{version}-%{release}|" kio/kio/kprotocolmanager.cpp
+%patch10 -p1 -b .no-cache-kdeglobals-paths
 
 # upstream patches
 %patch100 -p1 -b .kio
@@ -332,6 +336,9 @@
 
 
 %changelog
+* Mon Mar 10 2008 Kevin Kofler <Kevin at tigcc.ticalc.org> 4.0.2-9
+- fix kdeglobals not being found in profile (e.g. kde-settings) directory
+
 * Fri Mar 07 2008 Rex Dieter <rdieter at fedoraproject.org> 4.0.2-8
 - touchup KDE_DISTRIBUTION_TEXT
 - add Fedora/V-R to KHTML UA string (thanks caillon)




More information about the fedora-extras-commits mailing list