Bug 487075 - silent ABI change in qt breaks po2xml (renamed XML parser features)
silent ABI change in qt breaks po2xml (renamed XML parser features)
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: qt (Show other bugs)
rawhide
All Linux
low Severity medium
: ---
: ---
Assigned To: Ngo Than
Fedora Extras Quality Assurance
:
Depends On:
Blocks: 486162 487078
  Show dependency treegraph
 
Reported: 2009-02-23 20:06 EST by Hans Ulrich Niedermann
Modified: 2009-03-03 09:02 EST (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-03-03 09:02:43 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
UNTESTED patch trying to fix the issue (4.78 KB, patch)
2009-02-26 19:19 EST, Hans Ulrich Niedermann
no flags Details | Diff

  None (edit)
Description Hans Ulrich Niedermann 2009-02-23 20:06:39 EST
Description of problem:

  po2xml parses an XML file by constructing an QXmlSimpleReader object
  and setting the "http://trolltech.com/xml/features/report-start-end-entity"
  feature on it.

  Unfortunately, upstream Qt appear to have renamed that feature to
  "http://qtsoftware.com/xml/features/report-start-end-entity".

Version-Release number of selected component (if applicable):

  kdesdk-4.2.0-2.fc11
  qt-4.5.0-0.5.rc1.fc11

How reproducible:

  100%

Steps to Reproduce:
1. po2xml /dev/null /dev/null
  
Actual results:

  Unknown feature http://trolltech.com/xml/features/report-start-end-entity

Expected results:

  Some error about empty input or something similar.

Additional info:

  "po2xml /dev/null /dev/null" is just the most simple test case
  I could find. Ask me if you need a more elaborate test case
  involving actual XML and po files.
Comment 1 Kevin Kofler 2009-02-23 20:13:57 EST
I'd blame Qt for breaking backwards compatibility there. They should be converting trolltech.com URLs to qtsoftware.com URLs automatically, it's pretty easy to do.
Comment 2 Kevin Kofler 2009-02-23 20:19:40 EST
Something like:
feature.replace(QRegExp(QLatin1String("^http://trolltech.com/")), "http://qtsoftware.com/");
or, probably more efficient:
if (feature.startsWith(QLatin1String("http://trolltech.com/"))
  feature.replace(0, 21, "http://qtsoftware.com/");
at an appropriate place in Qt should fix it.
Comment 3 Hans Ulrich Niedermann 2009-02-23 20:38:09 EST
For the record (and while I still have the file open in my editor)...

That would affect the methods

  QXmlSimpleReader::feature()
  QXmlSimpleReader::setFeature()
  QXmlSimpleReader::hasFeature()

in the file

  qt-x11-opensource-src-4.5.0-rc1/src/xml/sax/qxml.cpp
Comment 4 Hans Ulrich Niedermann 2009-02-26 19:19:35 EST
Created attachment 333412 [details]
UNTESTED patch trying to fix the issue

I could not actually test this patch yet, as qt is taking ages to compile. However, someone else might want to so something with this in the mean time...

At the very least, someone with knowledge of C++, qt's string API and how to create and prevent memory leaks and similar fun things while using the two should take a good look at the patch before it is included in any packages or even upstream qt.
Comment 5 Rex Dieter 2009-02-27 13:04:50 EST
Working on a newer qt snapshot (20090224), and it looks fixed upstream.
Comment 6 Rex Dieter 2009-02-27 14:50:58 EST
ok, qt-4.5.0-0.8 should fix this, building now... should land soon in a friendly rawhide mirror near you.
Comment 7 Rex Dieter 2009-03-01 15:05:49 EST
boo, the -0.8 build failed on the buildsys, more snapshot breakage.  I'll try to fix that asap.
Comment 8 Rex Dieter 2009-03-03 09:02:43 EST
woo, qt-4.5.0-1 (final) released today, and than heroically built it for rawhide.

Note You need to log in before you can comment on or make changes to this bug.