Handling Soprano and Qt4.5 source-incompatibility

Andreas Pakulat apaku at gmx.de
Thu Sep 25 08:27:55 BST 2008


I can't find a dedicated list for soprano, hence I'm raising the issue
here. Yesterday I comitted a change that was proposed here to restore
binary compatibility in Soprano after a change needed for compilation
with Qt4.5.

Short story: Qt4.5 breaks source compatibility by moving the QHash
#include a bit further up in the chain of includes (into QVariant). This
causes problems when you're defining your own global qHash function for
a class that lives in a namespace. The fix is to move the qHash function
into the same namespace as the class for which its being used. 

The move is binary incompatible, so in theory leaving the old global
qHash and just adding another thats inside the namespace should solve
this. Unfortunately this doesn't work. When both functions exists gcc
cannot decide which one to use, the qHash call is ambiguous and there's
no way to help it resolve that.

Mostly I'm writing this to check wether I should restore BC and
compilability (which then breaks compilation with Qt4.5 for now) or do
the BiC change and Sebastian will release a new version of soprano
before Qt4.5 hits the streets?


Excellent day for putting Slinkies on an escalator.

More information about the kde-core-devel mailing list