Skip to content

Dispatch to newly added main window functions as slots

This follows the dispatch logic in KTextEditor::MainWindow, and allows other hosting apps to provide implementations, even if the new methods are not (yet) formalized, there.

Notes:

  • Omitting showDiff() for now. I'll address that, separately, later.
  • In subsequent steps, it will make sense to a) add corresponding methods to KTextEditor::MainWindow, and b) once kate depends on a sufficiently recent KTextEditor, call those, directly.
  • As this is taking the API into the direction of prospectively official, I will note (without any strong feelings):
    • addWidget() may sound a bit too generic. addDocumentWidget(), perhaps, to signify this belongs into the document area?
    • In QVariantMap parameter to showMessage(), perhaps it would make sense to keep the MessageType as an integer-based type, after all (and rename it to "severity")? The advantage being that it will be easier to handle further extensions to the severity range such as "Debug" or "Critical", gracefully. There already is a separate parameter for category, so this should not limit versatility.

Merge request reports