This is basically a cherry-pick of the patch from:
https://codereview.qt-project.org/#/c/140319/
Probably also fixes the following compile error on macOS Sierra:
:info:build In file included from
/opt/local/var/macports/build/_Users_marko_WC_GIT_macstrop_kf5_kdevelop5/kf5-kdevelop/work/kdevelop-5.0.2/languages/qmljs/libs/utils/autoreleasepool.h:35:
:info:build In file included from
/System/Library/Frameworks/Foundation.framework/Headers/NSAutoreleasePool.h:5:
:info:build
/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:44:12:
error: unknown property attribute 'class'
:info:build @property (class, readonly) BOOL supportsSecureCoding;
:info:build ^