--nextPart4774531.GXAFRqVoOG Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii"; protected-headers="v1" From: Ingo =?ISO-8859-1?Q?Kl=F6cker?= Cc: Milian Wolff Subject: Re: New santizer warning in KF 5.98 headers Date: Wed, 11 Jan 2023 11:26:42 +0100 Message-ID: <2271372.ElGaqSPkdT@daneel> In-Reply-To: <1882073.EpdhjzaFSe@milian-workstation> MIME-Version: 1.0 On Mittwoch, 11. Januar 2023 11:02:04 CET Milian Wolff wrote: > On Dienstag, 10. Januar 2023 23:45:26 CET Michael Reeves wrote: > > Thanks. I would say your right there this would definitely have caught > > someone's attention if didn't work in practice with what kde needs. > > Santizers are by design quite pedantic as serves there purpose well. > > I agree, the code is clearly wrong and it's unclear what it's trying to > achieve here. Does anyone know what this is trying to do? > > Qt::ConnectionType connectionType = static_cast(-1) > > Should this maybe just be changed to use Qt::AutoConnection? The code: https://invent.kde.org/frameworks/kconfigwidgets/-/blob/master/src/ kstandardaction.h#L253 What the code does: The default value `static_cast(-1)` serves as hint that the function should decide what kind of connection type to use and for some reason the `ConfigureToolbars` action explicitly needs to use a `Qt::QueuedConnection` instead of a `Qt::AutoConnection`. This could be changed to a std::optional (for KF6) to make the intention clear. Why the code does what it does: One could question whether this special casing for `ConfigureToolbars` is still necessary. The bug report about the crash that this seems to have fixed is from 2009: https://bugs.kde.org/show_bug.cgi?id=200815 Regards, Ingo --nextPart4774531.GXAFRqVoOG Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQTbjgIOMowwlCBgvyGxb1mVFkdKugUCY76O4gAKCRCxb1mVFkdK uh/0AP4imyZ8ntCjxkLvOLWtc7JJiIhVIBCh/up5bcRhy2IJYAD/dbnh4IrX367c Fi1S9fjSeVxtdQaptGZskke+FxXqugQ= =8KIn -----END PGP SIGNATURE----- --nextPart4774531.GXAFRqVoOG--