KTextEditor

Command Extension Interfaces

A KTextEditor command-line Command can use extension interfaces, but it does not need to.

So as a KTextEditor implementator you have to cast the Command to the desired interface and then check, whether the cast returns NULL or the valid interface.

Use qobject_cast to cast a Command cmd into the DesiredExtensionInterface, example:

// cmd is of type KTextEditor::Command*
auto iface = qobject_cast<KTextEditor::DesiredExtensionInterface*>(cmd);
if (iface) {
// the implementation supports the interface
// do stuff
} else {
// the implementation does not support the interface
}
See also
KTextEditor::Command
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Mon Sep 27 2021 22:59:49 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.