use upstream fix (by David Faure) for kde#149704
This commit is contained in:
parent
8554c6109e
commit
e9bdb5224f
@ -1,15 +1,71 @@
|
||||
diff -ur kdelibs-3.93.0/kdeui/xmlgui/kxmlguiclient.cpp kdelibs-3.93.0-kde149704/kdeui/xmlgui/kxmlguiclient.cpp
|
||||
--- kdelibs-3.93.0/kdeui/xmlgui/kxmlguiclient.cpp 2007-08-29 23:53:46.000000000 +0200
|
||||
+++ kdelibs-3.93.0-kde149704/kdeui/xmlgui/kxmlguiclient.cpp 2007-09-10 06:09:18.000000000 +0200
|
||||
@@ -341,6 +341,11 @@
|
||||
Index: xmlgui/kxmlguiclient.cpp
|
||||
===================================================================
|
||||
--- xmlgui/kxmlguiclient.cpp (revision 709581)
|
||||
+++ xmlgui/kxmlguiclient.cpp (working copy)
|
||||
@@ -785,11 +785,11 @@
|
||||
allDocuments.append( d );
|
||||
}
|
||||
|
||||
QStringList allFiles = componentData().dirs()->findAllResources("data", filter) + componentData().dirs()->findAllResources("data", _file);
|
||||
- QList<DocStruct>::Iterator best = allDocuments.end();
|
||||
+ QList<DocStruct>::const_iterator best = allDocuments.end();
|
||||
uint bestVersion = 0;
|
||||
|
||||
+ if (allFiles.isEmpty() || allFiles.first().startsWith("/usr/"))
|
||||
+ {
|
||||
+ allFiles.prepend(KStandardDirs::locateLocal("data", filter));
|
||||
+ }
|
||||
+
|
||||
file = findMostRecentXMLFile( allFiles, doc );
|
||||
- QList<DocStruct>::Iterator docIt = allDocuments.begin();
|
||||
- QList<DocStruct>::Iterator docEnd = allDocuments.end();
|
||||
+ QList<DocStruct>::const_iterator docIt = allDocuments.begin();
|
||||
+ const QList<DocStruct>::const_iterator docEnd = allDocuments.end();
|
||||
for (; docIt != docEnd; ++docIt )
|
||||
{
|
||||
QString versionStr = findVersionNumber( (*docIt).data );
|
||||
@@ -814,19 +814,19 @@
|
||||
{
|
||||
if ( best != allDocuments.begin() )
|
||||
{
|
||||
- QList<DocStruct>::Iterator local = allDocuments.begin();
|
||||
+ QList<DocStruct>::iterator local = allDocuments.begin();
|
||||
+ if ( (*local).file.startsWith(KGlobal::dirs()->localkdedir()) ) {
|
||||
|
||||
if ( file.isEmpty() )
|
||||
- // load the local document and extract the action properties
|
||||
- QDomDocument document;
|
||||
- document.setContent( (*local).data );
|
||||
+ // load the local document and extract the action properties
|
||||
+ QDomDocument document;
|
||||
+ document.setContent( (*local).data );
|
||||
|
||||
- ActionPropertiesMap properties = extractActionProperties( document );
|
||||
+ ActionPropertiesMap properties = extractActionProperties( document );
|
||||
|
||||
- // in case the document has a ActionProperties section
|
||||
- // we must not delete it but copy over the global doc
|
||||
- // to the local and insert the ActionProperties section
|
||||
- if ( !properties.isEmpty() )
|
||||
- {
|
||||
+ // in case the document has a ActionProperties section
|
||||
+ // we must not delete it but copy over the global doc
|
||||
+ // to the local and insert the ActionProperties section
|
||||
+ if ( !properties.isEmpty() ) {
|
||||
// now load the global one with the higher version number
|
||||
// into memory
|
||||
document.setContent( (*best).data );
|
||||
@@ -845,14 +845,14 @@
|
||||
f.write( utf8data.constData(), utf8data.length() );
|
||||
f.close();
|
||||
}
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ QString f = (*local).file;
|
||||
+ QString backup = f + QLatin1String( ".backup" );
|
||||
+ QFile::rename( f, backup );
|
||||
+ }
|
||||
}
|
||||
- else
|
||||
- {
|
||||
- QString f = (*local).file;
|
||||
- QString backup = f + QLatin1String( ".backup" );
|
||||
- QDir dir;
|
||||
- dir.rename( f, backup );
|
||||
- }
|
||||
}
|
||||
doc = (*best).data;
|
||||
return (*best).file;
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
Summary: K Desktop Environment 4 - Libraries
|
||||
Version: 3.93.0
|
||||
Release: 3%{?dist}
|
||||
Release: 4%{?dist}
|
||||
|
||||
%if 0%{?fedora} > 8
|
||||
Name: kdelibs
|
||||
@ -108,7 +108,9 @@ Also, the API and ABI are NOT fully stable yet (soft freeze only).
|
||||
%setup -q -n kdelibs-%{version}
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
pushd kdeui
|
||||
%patch2 -p0
|
||||
popd
|
||||
%patch3 -p1
|
||||
|
||||
|
||||
@ -215,6 +217,9 @@ rm -rf %{buildroot}
|
||||
|
||||
|
||||
%changelog
|
||||
* Mon Sep 10 2007 Kevin Kofler <Kevin@tigcc.ticalc.org> 3.93.0-4
|
||||
- use upstream fix (by David Faure) for kde#149704
|
||||
|
||||
* Mon Sep 10 2007 Kevin Kofler <Kevin@tigcc.ticalc.org> 3.93.0-3
|
||||
- fix kde#149703, kde#149704, kde#149705
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user