[kdelibs/f16] Revert "4.7.3"
Rex Dieter
rdieter at fedoraproject.org
Sat Oct 29 11:41:24 UTC 2011
commit a73f58c80448fba23652d32acad275c8f089ba64
Author: Rex Dieter <rdieter at fedoraproject.org>
Date: Sat Oct 29 06:48:45 2011 -0500
Revert "4.7.3"
This reverts commit 01e9eb6ce20bbdd861d03fc011fe90648d40144a.
.gitignore | 1 -
kdelibs-4.7.2-nepomuk_unicode.patch | 65 +++++++++++++++++++++++++++++++++++
kdelibs.spec | 10 +++---
sources | 2 +-
4 files changed, 71 insertions(+), 7 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 4c2b015..490a614 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1 @@
/kdelibs-4.7.2.tar.bz2
-/kdelibs-4.7.3.tar.bz2
diff --git a/kdelibs-4.7.2-nepomuk_unicode.patch b/kdelibs-4.7.2-nepomuk_unicode.patch
new file mode 100644
index 0000000..819a429
--- /dev/null
+++ b/kdelibs-4.7.2-nepomuk_unicode.patch
@@ -0,0 +1,65 @@
+diff --git a/nepomuk/query/querybuilderdata_p.h b/nepomuk/query/querybuilderdata_p.h
+index 055482e..3880e13 100644
+--- a/nepomuk/query/querybuilderdata_p.h
++++ b/nepomuk/query/querybuilderdata_p.h
+@@ -32,6 +32,28 @@
+ #include "query_p.h"
+ #include "groupterm_p.h"
+
++namespace {
++/// A hack to avoid passing extended chars to the bif:search_excerpts method which cannot handle
++/// utf8 chars which use more than one char, ie. wide chars.
++/// Thus, we simply truncate each term at the first wide char.
++QStringList stripExtendedCharsHack(const QStringList& terms) {
++ QStringList newTerms;
++ foreach(const QString& term, terms) {
++ int i = 0;
++ while(i < term.length()) {
++ if(term[i].unicode() > 0x7f) {
++ break;
++ }
++ ++i;
++ }
++ if(i > 0) {
++ newTerms.append(term.left(i));
++ }
++ }
++ return newTerms;
++}
++}
++
+ namespace Nepomuk {
+ namespace Query {
+ class QueryBuilderData
+@@ -246,16 +268,23 @@ namespace Nepomuk {
+ for( QHash<QString, QStringList>::const_iterator it = m_fullTextSearchTerms.constBegin();
+ it != m_fullTextSearchTerms.constEnd(); ++it ) {
+ const QString& varName = it.key();
+- const QStringList& terms = it.value();
+- // bif:search_excerpt wants a vector of all search terms
+- excerptParts
+- << QString::fromLatin1("bif:search_excerpt(bif:vector(bif:charset_recode('%1', '_WIDE_', 'UTF-8')), %2)")
+- .arg( terms.join(QLatin1String("','")),
+- varName );
++ const QStringList terms = stripExtendedCharsHack(it.value());
++ if(terms.count()) {
++ // bif:search_excerpt wants a vector of all search terms
++ excerptParts
++ << QString::fromLatin1("bif:search_excerpt(bif:vector('%1'), %2)")
++ .arg( terms.join(QLatin1String("','")),
++ varName );
++ }
+ }
+
+- return QString::fromLatin1("(bif:concat(%1)) as ?_n_f_t_m_ex_")
+- .arg(excerptParts.join(QLatin1String(",")));
++ if(excerptParts.count()) {
++ return QString::fromLatin1("(bif:concat(%1)) as ?_n_f_t_m_ex_")
++ .arg(excerptParts.join(QLatin1String(",")));
++ }
++ else {
++ return QString();
++ }
+ }
+ else {
+ return QString();
diff --git a/kdelibs.spec b/kdelibs.spec
index 755d6ed..3859ed4 100644
--- a/kdelibs.spec
+++ b/kdelibs.spec
@@ -22,8 +22,8 @@
#define no_libkactivities 1
Summary: KDE Libraries
-Version: 4.7.3
-Release: 1%{?dist}
+Version: 4.7.2
+Release: 5%{?dist}
Name: kdelibs
Epoch: 6
@@ -125,6 +125,8 @@ Patch50: kdelibs-4.7.0-knewstuff2_gpg2.patch
Patch51: kdelibs-4.6.2-uri_mimetypes.patch
## upstream
+# fix nepomuk queries *not* using wide-unicode
+Patch100: kdelibs-4.7.2-nepomuk_unicode.patch
## security fix
# Not Upstreamed? why not ? -- Rex
@@ -319,6 +321,7 @@ sed -i -e "s|@@VERSION_RELEASE@@|%{version}-%{release}|" kio/kio/kprotocolmanage
%patch51 -p1 -b .uri_mimetypes
# upstream patches
+%patch100 -p1 -b .nepomuk_unicode
# security fixes
%patch200 -p1 -b .CVE-2009-2702
@@ -571,9 +574,6 @@ rm -rf %{buildroot}
%changelog
-* Sat Oct 29 2011 Rex Dieter <rdieter at fedoraproject.org> 4.7.3-1
-- 4.7.3
-
* Thu Oct 27 2011 Rex Dieter <rdieter at fedoraproject.org> 4.7.2-5
- omit knotify hack, fix in qt instead
diff --git a/sources b/sources
index 998b056..7b744ff 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-57fdc211995a6846b15dfdbf40a3e2e3 kdelibs-4.7.3.tar.bz2
+abe4c8f848366bcab16c57bbaeb86f1f kdelibs-4.7.2.tar.bz2
More information about the scm-commits
mailing list