2018-05-05 3:56 GMT+02:00 Lisandro Damián Nicanor Pérez Meyer <perezme...@gmail.com>: > I was about to upload qt4 when I found: > > -Q_GLOBAL_STATIC_WITH_ARGS(const QString, orgFreedesktopDBusString, > (QLatin1String(DBUS_SERVICE_DBUS))) > +Q_GLOBAL_STATIC_WITH_ARGS(QString, orgFreedesktopDBusString, > (QLatin1String(DBUS_SERVICE_DBUS))) > > This clearly does not looks ok. Probably a mistake?
I changed this because the compilation fails otherwise: ============================================ ../../include/QtCore/../../src/corelib/arch/qatomic_generic.h:197:49: error: invalid conversion from 'const void*' to 'void*' [-fpermissive] return QBasicAtomicPointer_testAndSetOrdered(pointer.voidp, expectedValue, newValue); ../../include/QtCore/../../src/corelib/arch/qatomic_generic.h:108:20: note: initializing argument 3 of 'bool QBasicAtomicPointer_testAndSetOrdered(void* volatile*, void*, void*)' Q_CORE_EXPORT bool QBasicAtomicPointer_testAndSetOrdered(void * volatile *, void *, void *); ============================================ Indeed the definition in "qatomic_generic" is void*, ============================================ ./src/corelib/arch/qatomic_generic.h:Q_CORE_EXPORT bool QBasicAtomicPointer_testAndSetOrdered(void * volatile *, void *, void *); ============================================ And that line that I patch is the only one that uses "const QString" instead of non-const: ============================================ $ rgrep 'Q_GLOBAL_STATIC_WITH_ARGS(.*QString' . ./src/gui/embedded/qwindowsystem_qws.cpp:Q_GLOBAL_STATIC_WITH_ARGS(QString, defaultMouse, (QLatin1String("Auto"))) ./src/gui/embedded/qwindowsystem_qws.cpp:Q_GLOBAL_STATIC_WITH_ARGS(QString, defaultKeyboard, (QLatin1String("TTY"))) ./src/dbus/qdbusservicewatcher.cpp:Q_GLOBAL_STATIC_WITH_ARGS(QString, busService, (QLatin1String(DBUS_SERVICE_DBUS))) ./src/dbus/qdbusservicewatcher.cpp:Q_GLOBAL_STATIC_WITH_ARGS(QString, busInterface, (QLatin1String(DBUS_INTERFACE_DBUS))) ./src/dbus/qdbusservicewatcher.cpp:Q_GLOBAL_STATIC_WITH_ARGS(QString, signalName, (QLatin1String("NameOwnerChanged"))) ./src/dbus/qdbusintegrator.cpp:Q_GLOBAL_STATIC_WITH_ARGS(const QString, orgFreedesktopDBusString, (QLatin1String(DBUS_SERVICE_DBUS))) ============================================ The alternative would be to use -fpermissive globally, I think, but this would mask other similar problems, so I patched that one and it was the only such problematic line in the whole code. My best guess is that no other [popular] platforms are using "generic" but its own, so this code is never compiled in Debian for other arches and thus it doesn't fail, it's a latent error in code of unused code-paths. I somehow prefer to use generic, because there's no point in low-level porting Qt4 at this point. Cheers. -- Manuel A. Fernandez Montecelo <manuel.montez...@gmail.com>