D19332: KProcess compile fix for obsolete QProcess members in 5.13
marten abandoned this revision. marten added a comment. Appears to have been already implemented by https://phabricator.kde.org/R244:b2b873d612a018d33866ddfd497f87bb7dd79573 REPOSITORY R244 KCoreAddons REVISION DETAIL https://phabricator.kde.org/D19332 To: marten, #frameworks Cc: apol, kde-frameworks-devel, michaelh, ngraham, bruns
D19332: KProcess compile fix for obsolete QProcess members in 5.13
marten updated this revision to Diff 52898. marten added a comment. Use the same condition as the Qt header uses REPOSITORY R244 KCoreAddons CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D19332?vs=52601=52898 REVISION DETAIL https://phabricator.kde.org/D19332 AFFECTED FILES src/lib/io/kprocess.h To: marten, #frameworks Cc: apol, kde-frameworks-devel, michaelh, ngraham, bruns
D19332: KProcess compile fix for obsolete QProcess members in 5.13
marten added inline comments. INLINE COMMENTS > apol wrote in kprocess.h:332 > Also should check for QT_DISABLE_DEPRECATED_BEFORE no? Do you mean conditionalise instead on #if !QT_DEPRECATED_SINCE(5, 13), so that if the functions are not disabled in Qt then they are hidden here? That would work, although QT_DEPRECATED_SINCE is not public API or defined in the Qt documentation. REPOSITORY R244 KCoreAddons REVISION DETAIL https://phabricator.kde.org/D19332 To: marten, #frameworks Cc: apol, kde-frameworks-devel, michaelh, ngraham, bruns
D19332: KProcess compile fix for obsolete QProcess members in 5.13
apol added inline comments. INLINE COMMENTS > kprocess.h:332 > // hide those > +#if (QT_VERSION < QT_VERSION_CHECK(5, 13, 0)) > using QProcess::setReadChannelMode; Also should check for QT_DISABLE_DEPRECATED_BEFORE no? REPOSITORY R244 KCoreAddons REVISION DETAIL https://phabricator.kde.org/D19332 To: marten, #frameworks Cc: apol, kde-frameworks-devel, michaelh, ngraham, bruns
D19332: KProcess compile fix for obsolete QProcess members in 5.13
marten created this revision. marten added a reviewer: Frameworks. Herald added a project: Frameworks. Herald added a subscriber: kde-frameworks-devel. marten requested review of this revision. REVISION SUMMARY The functions QProcess::setReadChannelMode() and QProcess::readChannelMode() are obsolete, but were not specially treated in any way in earlier Qt versions. In 5.13 they are actually disabled in the header files, using QT_DEPRECATED_SINCE(5, 13). KDE PIM optimistically sets QT_DISABLE_DEPRECATED_BEFORE=0x06 (since May 2017), so the build fails because these functions are no longer available: /usr/include/KF5/KCoreAddons/kprocess.h:332: error: no members matching 'QProcess::setReadChannelMode' in 'class QProcess' /usr/include/KF5/KCoreAddons/kprocess.h:333: error: no members matching 'QProcess::readChannelMode' in 'class QProcess' This does not affect the remainder of Frameworks or Plasma (yet), because they do not use this QT_DISABLE_DEPRECATED_BEFORE setting. This change makes the use of these two members conditional on the Qt version (5.12 or earlier). TEST PLAN Built kcoreaddons with this change, checked that applications using this header build correctly without the above errors. REPOSITORY R244 KCoreAddons REVISION DETAIL https://phabricator.kde.org/D19332 AFFECTED FILES src/lib/io/kprocess.h To: marten, #frameworks Cc: kde-frameworks-devel, michaelh, ngraham, bruns