diff --git a/src/include/ktexteditor/mainwindow.h b/src/include/ktexteditor/mainwindow.h --- a/src/include/ktexteditor/mainwindow.h +++ b/src/include/ktexteditor/mainwindow.h @@ -272,6 +272,15 @@ // Application plugin accessors // public: + /** + * Shows the @p plugin's config page. The @p page specifies which + * config page will be shown, see KTextEditor::Plugin::configPages(). + * + * \return \e true on success, otherwise \e false + * \since 5.63 + */ + bool showPluginConfigPage(KTextEditor::Plugin *plugin, int page); + /** * Get a plugin view for the plugin with with identifier \p name. * \param name the plugin's name diff --git a/src/utils/mainwindow.cpp b/src/utils/mainwindow.cpp --- a/src/utils/mainwindow.cpp +++ b/src/utils/mainwindow.cpp @@ -293,6 +293,21 @@ return success; } +bool MainWindow::showPluginConfigPage(KTextEditor::Plugin *plugin, int page) +{ + /** + * dispatch to parent + */ + bool success = false; + QMetaObject::invokeMethod(parent() + , "showPluginConfigPage" + , Qt::DirectConnection + , Q_RETURN_ARG(bool, success) + , Q_ARG(KTextEditor::Plugin*, plugin) + , Q_ARG(int, page)); + return success; +} + QObject *MainWindow::pluginView(const QString &name) { /**