qt4-mac +KDE variant.
This one has (also) already been presented (because included) in my qt4-mac concurrent ticket, but a bit of independent exposure might be good.
KDE4 applications expose a certain number of issues within Qt4 that are not or much less troublesome with "pure Qt" applications. I've created patches for them, which I propose to make available through a KDE variant:
variant KDE description {Include patches for use with KDE} {
patchfiles-append qt4-correct-systraymenu-iconhandling.patch \
qt4-deactivate-menurole-heuristics.patch \
prevent_addTitleRelated_crash.patch \
debug-negative-qtimerint.patch \
silence-qfilesystemwatcher.patch \
patch-QAction_isEnabled.diff \
qt4-prevent-mousevent-for-deleted-object.diff
}
In the post-destroot:
post-destroot {
...
if {[variant_isset KDE]} {
# expose KDE4 styles to Qt4:
ln -s ${prefix}/lib/kde4/plugins/styles ${destroot}${qt_plugins_dir}/
}
...
}
- qt4-correct-systraymenu-iconhandling.patch : makes Qt respect the "icons in menus" setting in the systray menu (dropdown "menu-extra" menu under an icon installed alongside the wifi, FUS, sound volume, TimeMachine etc. icons). This issue should be patched in Qt 4.8.7 if and when it is released.
- qt4-deactivate-menurole-heuristics.patch : this prevents Qt from making a text-heuristics based guess which menu actions should be installed as the About and Preferences menu items of the Application menu; applications should use
QAction::setMenuRole
or KAction::setMenuRole
explicitly. Failing that, these menu items will appear where the application expects to put them, for instance in (respectively the Help and Settings menus for KDE apps. This is the only patch of the set that could have an unexpected impact on pure Qt applications.
- prevent_addTitleRelated_crash.patch : does what it says. It prevents a crash when applications use a certain KDE function.
- debug-negative-qtimerint.patch : adds some information to the warning Qt print when you attempt to start a QTimer with a negative interval.
- silence-qfilesystemwatcher.patch : removes the debug output from QFileSystemWatcher when (and after) the max. number of files to watch is reached, thus reducing noise (and log pollution when apps are started through LaunchServices)
- patch-QAction_isEnabled.diff : symptom workaround that avoids a (rare but reproducible) crash caused by accessing an object after it's deleted
- qt4-prevent-mousevent-for-deleted-object.diff : a (still tentative) fix for a not-so-rare but "randomly reproducable" crash when closing a complex user interface could lead to pending events being delivered to already deleted objects. This is not a workaround, it changes a single line to what the preceding comments say it should be in my understanding.
Re: patch-QAction_isEnabled.diff : the stale pointer access prevented by this patch is most likely also due to a pending event being delivered to an already deleted object. It's not a proper fix (unless you believe in defensive programming). If my assessment is correct, the real bug is in client code that does
delete object
instead ofobject->deleteLater()
(which is comparable to ObjC's[obj release]
). The problem is that it is neigh impossible to determine whichobject
that is; the address stored in the stale pointer corresponds to a (member of a ) member variable of that object, and the crash occurs at some undeterminate moment after that object was deleted.