Commit dc6a95e9 authored by René J.V. Bertin's avatar René J.V. Bertin

2 missing KTextEditorPluginIntegration::MainWindow slots

This adds 2 missing slots to the KTextEditorPlugin integration
layer: MainWindow::openUrl() and MainWindow::showToolView().

Differential Revision: https://phabricator.kde.org/D17465
parent 18c0c968
......@@ -351,6 +351,20 @@ void MainWindow::addWidgetToViewBar(KTextEditor::View *view, QWidget *widget)
m_mainWindow->viewBarContainer()->addViewBar(widget);
}
KTextEditor::View *MainWindow::openUrl(const QUrl &url, const QString &encoding)
{
return activateView(KTextEditor::Editor::instance()->application()->openUrl(url, encoding));
}
bool MainWindow::showToolView(QWidget *widget)
{
if (widget->parentWidget()) {
Core::self()->uiController()->raiseToolView(widget->parentWidget());
return true;
}
return false;
}
KTextEditor::MainWindow *MainWindow::interface() const
{
return m_interface;
......
......@@ -89,6 +89,9 @@ public Q_SLOTS:
void hideViewBar(KTextEditor::View *view);
void addWidgetToViewBar(KTextEditor::View *view, QWidget *widget);
KTextEditor::View *openUrl(const QUrl &url, const QString &encoding = QString());
bool showToolView(QWidget *widget);
public:
KTextEditor::MainWindow *interface() const;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment