VCS: Use Qt5 connect for annotate

Connect directly to the editor widget, which has a strong type.

Change-Id: I4d9778bc4a3c8ba1b37c5a5c0286fd72cda135de
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
Orgad Shaneh
2016-11-26 22:13:18 +02:00
committed by Orgad Shaneh
parent 5832f52cee
commit 414f49ea19
10 changed files with 5 additions and 40 deletions

View File

@@ -1166,11 +1166,10 @@ IEditor *CvsPlugin::showOutputInEditor(const QString& title, const QString &outp
const Id id = params->id;
QString s = title;
IEditor *editor = EditorManager::openEditorWithContents(id, &s, output.toUtf8());
connect(editor, SIGNAL(annotateRevisionRequested(QString,QString,QString,int)),
this, SLOT(vcsAnnotate(QString,QString,QString,int)));
CvsEditorWidget *e = qobject_cast<CvsEditorWidget*>(editor->widget());
if (!e)
return 0;
connect(e, &VcsBaseEditorWidget::annotateRevisionRequested, this, &CvsPlugin::annotate);
s.replace(QLatin1Char(' '), QLatin1Char('_'));
e->textDocument()->setFallbackSaveAsFileName(s);
e->setForceReadOnly(true);