[Qt-creator] Policy regarding Qt Creator and Qt5 deprecated methods

Ziller Eike Eike.Ziller at digia.com
Wed Feb 27 10:32:37 CET 2013


Since the issue arised, this is the policy that I think we should follow regarding the usage of methods/classes that are deprecated in Qt5:

As long as we still support Qt4 for building Qt Creator, we should:
1) Remove the use of Qt5 deprecated methods, if the result still runs fine with Qt4 without introducing ifdefs
2) Still use Qt5 deprecated methods, if the corresponding non-deprecated way does not exist/work in Qt4

As an example, we should (1) exchange uses of QWeakPointer<QObject> with QPointer, because that is deprecated in Qt5, even though QWeakPointer was the preferred way in Qt4. We should (2) *not* introduce ifdefs for using toHtmlEscaped in Qt5 over Qt::escape in Qt4.

Ifdef'ing in the second case is detrimental to
* our efforts to reduce ifdef'ing to avoid unnoticed compilation issues in different platform configurations (e.g. why we introduced Utils::HostOSInfo)
* having Qt Creator as a showcase for transitioning from Qt4 to Qt5

Br, Eike

-- 
Eike Ziller, Senior Software Engineer - Digia, Qt
 
Digia Germany GmbH, Rudower Chaussee 13, D-12489 Berlin
Geschäftsführer: Mika Pälsi, Juha Varelius, Anja Wasenius
Sitz der Gesellschaft: Berlin, Registergericht: Amtsgericht Charlottenburg, HRB 144331 B




More information about the Qt-creator mailing list