diff --git a/shell/documentcontroller.h b/shell/documentcontroller.h --- a/shell/documentcontroller.h +++ b/shell/documentcontroller.h @@ -154,7 +154,6 @@ // Returns all open documents in the current area Q_SCRIPTABLE QStringList activeDocumentPaths() const; - void vcsAnnotateCurrentDocument(); private Q_SLOTS: virtual void slotOpenDocument(const QUrl &url); diff --git a/shell/documentcontroller.cpp b/shell/documentcontroller.cpp --- a/shell/documentcontroller.cpp +++ b/shell/documentcontroller.cpp @@ -43,7 +43,6 @@ #include #include #include -#include #include #include @@ -65,9 +64,6 @@ #include "savedialog.h" #include "debug.h" -#include -#include - #define EMPTY_DOCUMENT_URL i18n("Untitled") namespace KDevelop @@ -650,12 +646,6 @@ action->setToolTip( i18n( "Close all other documents" ) ); action->setWhatsThis( i18n( "Close all open documents, with the exception of the currently active document." ) ); action->setEnabled(false); - - action = ac->addAction( QStringLiteral("vcsannotate_current_document") ); - connect( action, &QAction::triggered, this, &DocumentController::vcsAnnotateCurrentDocument ); - action->setText( i18n( "Show Annotate on current document") ); - action->setIconText( i18n( "Annotate" ) ); - action->setIcon( QIcon::fromTheme(QStringLiteral("user-properties")) ); } void DocumentController::slotOpenDocument(const QUrl &url) @@ -1205,32 +1195,6 @@ return ret; } -void DocumentController::vcsAnnotateCurrentDocument() -{ - IDocument* doc = activeDocument(); - if (!doc) - return; - - QUrl url = doc->url(); - IProject* project = KDevelop::ICore::self()->projectController()->findProjectForUrl(url); - if(project && project->versionControlPlugin()) { - IBasicVersionControl* iface = project->versionControlPlugin()->extension(); - auto helper = new VcsPluginHelper(project->versionControlPlugin(), iface); - connect(doc->textDocument(), &KTextEditor::Document::aboutToClose, - helper, static_cast(&VcsPluginHelper::disposeEventually)); - Q_ASSERT(qobject_cast(doc->activeTextView())); - // can't use new signal slot syntax here, AnnotationViewInterface is not a QObject - connect(doc->activeTextView(), SIGNAL(annotationBorderVisibilityChanged(View*,bool)), - helper, SLOT(disposeEventually(View*,bool))); - helper->addContextDocument(url); - helper->annotation(); - } - else { - KMessageBox::error(nullptr, i18n("Could not annotate the document because it is not " - "part of a version-controlled project.")); - } -} - } #include "moc_documentcontroller.cpp"