Re: [Development] Deprecated functions / procedure of removal in Qt6?
Il 22/10/18 07:05, Christian Ehrlicher ha scritto: Ok, I'll go on with adding Q_DECL_DEPRECATED + QT_VERSION < QT_VERSION_CHECK(6, 0, 0) in the places where only the documentation states that this function is deprecated then. Otherwise they might get forgotten again :) Q_DEPRECATED_SINCE should be enough in this case -- as in Qt 6 we can just bump it to "5.99" and kill all the deprecated code in one go, effectively achieving the same thing one does with QT_VERSION_CHECK. Thanks, -- Giuseppe D'Angelo | giuseppe.dang...@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 smime.p7s Description: Firma crittografica S/MIME ___ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development
Re: [Development] Deprecated functions / procedure of removal in Qt6?
Den mån 22 okt. 2018 kl 00:14 skrev Giuseppe D'Angelo via Development : > > Hi, > > Il 21/10/18 19:59, Christian Ehrlicher ha scritto: > > there are a lot of deprecated functions in qtbase which are only marked > > as deprecated/obsolete in the documentation but don't have a > > Q_DECL_DEPRECATED. Most of them were deprecated in the pre Qt5-era. > > What's the 'correct' way to make sure they can be removed with Qt6? Must > > they marked as QT_DEPRECATED_SINCE(5,x) or is the comment in the > > documentation enough? > > The documentation comment is enough for us to justify the removal -- in > other words, "formally", we have informed the user to move away, and the > rule is that we can drop deprecated functions any time we want to break > source compatibility. > > > However, it's nowhere enough to > > 1) make users _aware_ of the fact that they're using deprecated APIs; > 2) make us _remember_ to remove those functions when we have the chance > (like in Qt 6). > > Thus, adding deprecation warnings is definitely the right thing to do: > users get the deprecation warnings (*), and we have an easy way to find > and drop all those functions. > > The other ways to achieve 2) at the moment are: > > * If possible, all the code to be killed in Qt 6 should already be > protected via > > > #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) > > > * Add some comment in the source code like > > // ### Qt 6: remove this > > > Both ways are more general and apply to functions we can't just > deprecate or remove (f.i., marking an overload to be merged with another > one via a default argument, getting rid of useless special member > function declarations, and the like). > > Of course, simply leaving a comment requires us to remember find those > usages and act on those, and the code is still full of such TODOs for Qt > 5... > > > (*) I don't like that the deprecation warnings are opt-in and not > opt-out. People deserve to know as soon as possible that they're using > deprecated functionality, rather than have a gigantic unpleasant > surprise ("you're using lots of deprecated stuff that got removed!") > when Qt 6 comes. +1 for opt-out from a user. I had forgotten to add this to the build of our application. Will be interesting to see what it'll turn up :p Elvis > > > My 2 c, > -- > Giuseppe D'Angelo | giuseppe.dang...@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 > > ___ > Development mailing list > Development@qt-project.org > http://lists.qt-project.org/mailman/listinfo/development ___ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development
Re: [Development] Deprecated functions / procedure of removal in Qt6?
Am 22.10.2018 um 00:14 schrieb Giuseppe D'Angelo via Development: Hi, Thus, adding deprecation warnings is definitely the right thing to do: users get the deprecation warnings (*), and we have an easy way to find and drop all those functions. Ok, I'll go on with adding Q_DECL_DEPRECATED + QT_VERSION < QT_VERSION_CHECK(6, 0, 0) in the places where only the documentation states that this function is deprecated then. Otherwise they might get forgotten again :) Thx, Christian ___ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development
Re: [Development] Deprecated functions / procedure of removal in Qt6?
Hi, Il 21/10/18 19:59, Christian Ehrlicher ha scritto: there are a lot of deprecated functions in qtbase which are only marked as deprecated/obsolete in the documentation but don't have a Q_DECL_DEPRECATED. Most of them were deprecated in the pre Qt5-era. What's the 'correct' way to make sure they can be removed with Qt6? Must they marked as QT_DEPRECATED_SINCE(5,x) or is the comment in the documentation enough? The documentation comment is enough for us to justify the removal -- in other words, "formally", we have informed the user to move away, and the rule is that we can drop deprecated functions any time we want to break source compatibility. However, it's nowhere enough to 1) make users _aware_ of the fact that they're using deprecated APIs; 2) make us _remember_ to remove those functions when we have the chance (like in Qt 6). Thus, adding deprecation warnings is definitely the right thing to do: users get the deprecation warnings (*), and we have an easy way to find and drop all those functions. The other ways to achieve 2) at the moment are: * If possible, all the code to be killed in Qt 6 should already be protected via #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) * Add some comment in the source code like // ### Qt 6: remove this Both ways are more general and apply to functions we can't just deprecate or remove (f.i., marking an overload to be merged with another one via a default argument, getting rid of useless special member function declarations, and the like). Of course, simply leaving a comment requires us to remember find those usages and act on those, and the code is still full of such TODOs for Qt 5... (*) I don't like that the deprecation warnings are opt-in and not opt-out. People deserve to know as soon as possible that they're using deprecated functionality, rather than have a gigantic unpleasant surprise ("you're using lots of deprecated stuff that got removed!") when Qt 6 comes. My 2 c, -- Giuseppe D'Angelo | giuseppe.dang...@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 smime.p7s Description: Firma crittografica S/MIME ___ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development