When I wrote the code I assumed that by the time it is released the corresponding KDE Connect changes would be released, too. History proved me wrong. The openFile method will only be available with KDE Connect 1.4 whose release
is not yet scheduled.
For older versions of KDE Connect shareUrl is used now. That transfers the file but does not open it.