Skip to content

Draft: Add checks for missing implementation

Could you give some quick feedback, whether (or how, see "Ad a)" below), this seems worth finishing?

My initial motivation was to gain a means to receive automated notifications when new additions to KTextEditor::MainWindow / KTextEditor::Application need my attention. Thus a) the addition of unimplementedMethods(). As a byproduct, b) the addition of hasImplementationFor() could theoretically be useful for plugins to check for host capabilities (e.g. if (!mainWindow()->hasImplementationFor("addWidgetToStatusbar")) myStatusWidget->hide();).

  • Ad b): I am not sure, whether that would actually be used.
  • Ad a): One obvious drawback of this patch is that the list of methods to implement would have to be kept up to date, manually. This could be automated, if the methods in KTextEditor::MainWindow would be marked Q_INVOKABLE. However, I'm not sure, whether that would be worth it.
Edited by Thomas Friedrichsmeier

Merge request reports