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=0x060000 (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).