public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Thomas Janssen <thomasj@fedoraproject.org>
To: git-commits@fedoraproject.org
Subject: [rpms/amarok] epel10.2: added patch to fix scanning qt bug/regression
Date: Mon, 06 Jul 2026 18:31:16 GMT [thread overview]
Message-ID: <178336267602.1.8723901734911695290.rpms-amarok-85e48ac84a83@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/amarok
Branch : epel10.2
Commit : 85e48ac84a83446ab5f8fb24af0bef8c26f33bec
Author : Thomas Janssen <thomasj@fedoraproject.org>
Date : 2010-09-24T10:31:51+02:00
Stats : +89/-2 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/amarok/c/85e48ac84a83446ab5f8fb24af0bef8c26f33bec?branch=epel10.2
Log:
added patch to fix scanning qt bug/regression
---
diff --git a/amarok-2.3.2_0001-Re-add-some-tests-for-unprintable-but-also-invalid-c.patch b/amarok-2.3.2_0001-Re-add-some-tests-for-unprintable-but-also-invalid-c.patch
new file mode 100644
index 0000000..4e8faec
--- /dev/null
+++ b/amarok-2.3.2_0001-Re-add-some-tests-for-unprintable-but-also-invalid-c.patch
@@ -0,0 +1,83 @@
+From 79d86829294ac54132c01153660e70e30c15c378 Mon Sep 17 00:00:00 2001
+From: Jeff Mitchell <mitchell@kde.org>
+Date: Wed, 22 Sep 2010 18:15:17 -0400
+Subject: [PATCH] Re-add some tests for unprintable but also invalid chars. Apparently Qt's XML classes don't properly check for invalid chars when writing XML, even if you tell them to.
+
+Also switch to QXmlStreamWriter, as apparently going forward it is the more supported class.
+
+BUG: 251762
+---
+ utilities/collectionscanner/CollectionScanner.cpp | 27 +++++++++++++-------
+ 1 files changed, 17 insertions(+), 10 deletions(-)
+
+diff --git a/utilities/collectionscanner/CollectionScanner.cpp b/utilities/collectionscanner/CollectionScanner.cpp
+index 0a23a53..28c554b 100644
+--- a/utilities/collectionscanner/CollectionScanner.cpp
++++ b/utilities/collectionscanner/CollectionScanner.cpp
+@@ -37,13 +37,13 @@
+ #include <QByteArray>
+ #include <QDBusReply>
+ #include <QDir>
+-#include <QDomDocument>
+ #include <QFile>
+ #include <QtDebug>
+ #include <QTextCodec>
+ #include <QTextStream>
+ #include <QTimer>
+ #include <QThread>
++#include <QXmlStreamWriter>
+
+ //Taglib:
+ #include <apetag.h>
+@@ -814,8 +814,10 @@ CollectionScanner::readTags( const QString &path, TagLib::AudioProperties::ReadS
+ void
+ CollectionScanner::writeElement( const QString &name, const AttributeHash &attributes )
+ {
+- QDomDocument doc; // A dummy. We don't really use DOM, but SAX2
+- QDomElement element = doc.createElement( name );
++ QString text;
++ QXmlStreamWriter writer( &text );
++
++ writer.writeStartElement( name );
+
+ QHashIterator<QString, QString> it( attributes );
+ while( it.hasNext() )
+@@ -829,7 +831,15 @@ CollectionScanner::writeElement( const QString &name, const AttributeHash &attri
+ bool noCategory = false;
+ for( unsigned i = 0; i < len; i++ )
+ {
+- if( data[i].category() == QChar::NoCategory )
++ if( data[i].category() == QChar::NoCategory ||
++ data[i].category() == QChar::Other_Surrogate ||
++ (
++ data[i].unicode() < 20 &&
++ data[i].unicode() != 9 &&
++ data[i].unicode() != 10 &&
++ data[i].unicode() != 13
++ )
++ )
+ {
+ noCategory = true;
+ break;
+@@ -838,15 +848,12 @@ CollectionScanner::writeElement( const QString &name, const AttributeHash &attri
+
+ if( noCategory )
+ continue;
+-
+- element.setAttribute( it.key(), it.value() );
++ writer.writeAttribute( it.key(), it.value() );
+ }
+
+- QString text;
+- QTextStream stream( &text, QIODevice::WriteOnly );
+- element.save( stream, 0 );
++ writer.writeEndElement();
+
+- std::cout << text.toUtf8().data() << std::endl;
++ std::cout << text.toUtf8().data() << std::endl << std::endl;
+ }
+
+ // taken verbatim from Qt's sources, since it's stupidly in the QtGui module
+--
+1.7.0.4
+
diff --git a/amarok.spec b/amarok.spec
index 18edd2a..e034715 100644
--- a/amarok.spec
+++ b/amarok.spec
@@ -6,7 +6,7 @@
Name: amarok
Summary: Media player
Version: 2.3.2
-Release: 2%{?dist}
+Release: 3%{?dist}
Group: Applications/Multimedia
License: GPLv2+
@@ -18,6 +18,7 @@ Patch50: amarok-2.2.1.90-qtscript_not_required.patch
## upstream patches
Patch10: amarok-2.3.2_bpm_tags-in-flac_fix.patch
+Patch20: amarok-2.3.2_0001-Re-add-some-tests-for-unprintable-but-also-invalid-c.patch
BuildRequires: curl-devel
BuildRequires: desktop-file-utils
@@ -87,9 +88,9 @@ Obsoletes: amarok-utilities < 2.0.96
%prep
%setup -q
%patch10 -p0
+%patch20 -p1
%patch50 -p1 -b .qtscript_not_required
-
%build
mkdir -p %{_target_platform}
pushd %{_target_platform}
@@ -183,6 +184,9 @@ fi
%changelog
+* Fri Sep 24 2010 Thomas Janssen <thomasj@fedoraproject.org> 2.3.2-3
+- added patch to fix scanning qt bug/regression
+
* Mon Sep 20 2010 Thomas Janssen <thomasj@fedoraproject.org> 2.3.2-2
- added patch to fix BPM tags in flac
reply other threads:[~2026-07-06 18:31 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178336267602.1.8723901734911695290.rpms-amarok-85e48ac84a83@fedoraproject.org \
--to=thomasj@fedoraproject.org \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox