[Interest] QT_DISABLE_DEPRECATED_BEFORE and external headers

Olivier B. perso.olivier.barthelemy at gmail.com
Tue Feb 11 08:41:42 CET 2020

If you are using a qwt you build yourself, please find attached a patch for
some public qwt 6.1.2 header to stop depending on QString::null when i
incliude them.
I apply it before building qwt, but it might also work if applied on the
installed headers, not sure. Redeclaring some methods with an other default
argument value should be OK. In that case, the relative paths to the
includes will have to be adjusted obviously

Le mar. 11 févr. 2020 à 07:33, Nyall Dawson <nyall.dawson at gmail.com> a
écrit :

>  Hi list,
> I've been defining QT_DISABLE_DEPRECATED_BEFORE in one of my projects
> to avoid use of deprecated Qt methods (in prep for Qt 6!).
> Unfortunately, one of the external libraries in use by my project
> (qwt) uses the deprecated QString::null member in a public header. If
> I try to bump the DEPRECATED_BEFORE version to 5.9 or later, the
> compilation (rightly) breaks when the headers for this library are
> imported.
> I'm wondering if there's anyway around this so that I can avoid
> applying QT_DISABLE_DEPRECATED_BEFORE to these external headers.
> As further info:
> - QT_DISABLE_DEPRECATED_BEFORE is defined via cmake
> - I tried inserting a
> #include "..."
> block around the library includes, but that had no effect and the
> compilation block still occurred at the point of the #include
> Any tips?
> Nyall
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> https://lists.qt-project.org/listinfo/interest
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20200211/5a5bc146/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: qstring_null.patch
Type: application/octet-stream
Size: 8626 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20200211/5a5bc146/attachment.obj>

More information about the Interest mailing list