New santizer warning in KF 5.98 headers
Milian Wolff
mail at milianw.de
Wed Jan 11 12:06:41 GMT 2023
On Mittwoch, 11. Januar 2023 11:26:42 CET Ingo Klöcker wrote:
> 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<Qt::ConnectionType>(-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<Qt::ConnectionType>(-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.
Indeed, I should have read the body of the function and not stop at the
signature only :)
Thanks for the explanation Ingo! And std::optional for KF6 would be great imo,
if this is really needed.
> 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
--
Milian Wolff
mail at milianw.de
http://milianw.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20230111/47da6adc/attachment.sig>
More information about the kde-core-devel
mailing list