[Development] Moving QDesktopServices from Gui to Core?
Thiago Macieira
thiago.macieira at intel.com
Mon May 6 22:11:13 CEST 2024
On Monday 6 May 2024 11:48:31 GMT-7 Allan Sandfeld Jensen wrote:
> Out of purely academic interest, how would I go about searching for those
> problems? Would I be lucky enough they would all be conviently gathered in a
> JIRA ticket?
Unfortunately, no. But if you search JIRA for Qt 4.x-time QXmlStream problems,
you may find some of them.
The issue is that there are two platforms where symbol resolution at runtime
is tied to the library they were found in at link time (so-called "two-level
symbol resolution"). Therefore, for those two platforms, whatever we do, to
keep BC, we must retain QDesktopServices in QtGui.
On one of those two platforms, duplicating the symbols in the libraries is not
a problem; but for the other one it is, therefore we must rename them when
importing to QtCore. That's why we had this:
https://github.com/qt/qt/blob/4.8/src/corelib/xml/qxmlstream.h#L100-L114
For QXmlStream classes, this was a big problem because one had objects of the
types being renamed, so this caused cascading mangling changes in user code
wherever they used our classes. This is the same BC break as libstdc++ did
with std::__cxx11::basic_string. For QDesktopServices, at least there is no
object and therefore no one is expecting to have functions with it as part of
the mangled name.
Those two platforms are:
- Darwin (macOS, iOS, etc.)
- Windows
So not insignificant. And moreover, the two platforms where no one EVER runs
without a GUI.
--
Thiago Macieira - thiago.macieira (AT) intel.com
Principal Engineer - Intel DCAI Cloud Engineering
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5152 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/development/attachments/20240506/9422eac7/attachment-0001.bin>
More information about the Development
mailing list