[Qt-creator] HowTo get rid of QNetworkConfigurationManager-is-deprecated-warnings

Giuseppe D'Angelo giuseppe.dangelo at kdab.com
Wed Jun 16 20:36:21 CEST 2021


On 16/06/2021 19:09, ekke wrote:
> Of course I would like to get all other deprecation warnings to fix 
> them, but for QNCM and network accessibility there is no way to fix them 
> because the new QNetworkInformation class doesn’t exist in 5.15.
> Found https://www.kdab.com/un-deprecate-qt-project/ 
> <https://www.kdab.com/un-deprecate-qt-project/>
> It seems we have many ways to deprecate, but not to undeprecate a 
> specific one ? I’m looking for something similar to Q_UNUSED() to get 
> rid of a -Wunused-parameter warning

Just a random note: that blog post of mine is a bit outdated. A few 
things have been changed in Qt's deprecation mechanisms in the meanwhile
(warnings have been made versioned, deprecation warnings are enabled by 
default, and so on).

Anyway: there's unfortunately no solution to your issue except for 
disabling deprecating warnings altogether. For the record, I did propose 
to have special deprecation markers (special in the sense that you could 
enable/disable them independently from the other deprecation warnings) 
in Qt 5.15 for:

1) APIs that are deprecated in Qt 5 but without a replacement in Qt 5 
itself (but eventually only in Qt 6), like indeed QNCM (AFAICT), so for 
which having a warning is "useless" as there's nothing one can do about it;

2) APIs that exist in Qt 5.15.x only to ease the transition towards Qt 
6, i.e. are only meant to be used during a port, and absolutely not for 
"ordinary" development (like a lot of QStringView-related functionality 
in 5.15 which has been implemented by doing view.toString().foo(), i.e. 
throwing QStringView advantages out of the window).

The patches unfortunately were not merged before 5.15 was made closed 
source, so I gave up. You can find them in the relation chain here.


My 2 c,
Giuseppe D'Angelo | giuseppe.dangelo at kdab.com | Senior Software Engineer
KDAB (France) S.A.S., a KDAB Group company
Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com
KDAB - The Qt, C++ and OpenGL Experts

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4329 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.qt-project.org/pipermail/qt-creator/attachments/20210616/b64fe601/attachment.bin>

More information about the Qt-creator mailing list