Fix CMake run with BUILD_TESTING=OFF

REVIEW: 115539
Fix compilation with latest KTextEditor

KTextEditor::TextHintProvider::needTextHint() -> textHint()

REVIEW: 115539
Don't include QJson header

REVIEW: 115539