Junior tasks for coding: port deprecated Qt3 methods to Qt4 versions

Zoltan Padrah zoltan.padrah at gmail.com
Wed Aug 22 09:29:24 BST 2018


Hi,

in the code-base, on the wip-canvas-qt4-v1 branch now there are no
Qt3Support classes used, but there are still Qt3Support methods in use in
various places. Most of these uses are trivial tu fix -- some methods are
have been renamed, parameters have been changed between Qt3 and Qt4, and so
on. So if you feel like fixing some of the easy ones, I'm sending a quick
guide below.

Easy way of finding Qt3Support dependencies:

1. in the source tree, open CMakeLists.txt from the root, and find the line
~14:

#add_definitions ( -DQT3_SUPPORT_WARNINGS )

uncomment that line by removing the hash (#) from the front of it.

2. build KTechLab, you will get _lots_ of warnings about deprecated
methods. These should be fixed for to completely removing Qt3Support
dependency.

Fixing deprecated methods:

Most of the times, if you look in the headers of Qt ( in an IDE ctrl-click
the method which generated warning), the method just calls another,
non-deprecated method on the same object. Just replace the call with direct
call of the non-deprecated method. This should fix the warning.

There are cases when the situation is not trivial, for now leave those to
the end of the list of things to fix.

Have fun,

 Zoltan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/ktechlab-devel/attachments/20180822/80d818f6/attachment.html>


More information about the Ktechlab-devel mailing list