Resolve compiler warning for use of deprecated `KDeclarative::setupBindings`

Authored by sharvey on Mar 18 2018, 11:46 PM.

Description

Resolve compiler warning for use of deprecated KDeclarative::setupBindings

Summary: Version 5.45 of KDeclarative deprecates setupBindings in favor of setupContext and setupEngine, used together. Perform version check of KDeclarative and continue using setupBindings when older versions of KDeclarative are present. This resolves the compiler warning while allowing most users to successfully compile the application.

Test Plan:

  • Compile Spectacle normally
  • Note that compiler warning at QuickEditor.cpp line 77 is eliminated
  • Take a rectangular region screenshot; ensure proper operation of QML engine
  • If possible, test compiling against multiple versions of KDeclarative (5.45 versus minimum requirement of 5.29)

Reviewers: Spectacle, rkflx, ngraham

Reviewed By: Spectacle, rkflx

Differential Revision: https://phabricator.kde.org/D11415