Wednesday, April 5, 2017

Make the compiler warn you of deprecated Qt features

QT_DEPRECATED_WARNINGS is a keyword that can be used in your Qt's project files (.pro) so qmake makes your compiler emit warnings if you use any feature of Qt which as been marked deprecated. The exact warnings depend on your compiler, but it'll be easy to spot any location in your source base that might be affected for any Qt's API changing soon.

I guess it pays off when moving from one Qt's version to a newer one, as that change in the framework may impact parts of your code currently using an API method that is now deprecated in the new Qt's version. If that's the case, please consult the documentation of the deprecated API in order to know how to port your code away from it.

No comments:

Post a Comment