forked from qt-creator/qt-creator
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:
committed by
Orgad Shaneh
parent
5832f52cee
commit
414f49ea19
@@ -1170,11 +1170,10 @@ IEditor *PerforcePlugin::showOutputInEditor(const QString &title,
|
||||
}
|
||||
IEditor *editor = EditorManager::openEditorWithContents(id, &s, content.toUtf8());
|
||||
QTC_ASSERT(editor, return 0);
|
||||
connect(editor, SIGNAL(annotateRevisionRequested(QString,QString,QString,int)),
|
||||
this, SLOT(vcsAnnotate(QString,QString,QString,int)));
|
||||
auto e = qobject_cast<PerforceEditorWidget*>(editor->widget());
|
||||
if (!e)
|
||||
return 0;
|
||||
connect(e, &VcsBaseEditorWidget::annotateRevisionRequested, this, &PerforcePlugin::annotate);
|
||||
e->setForceReadOnly(true);
|
||||
e->setSource(source);
|
||||
s.replace(QLatin1Char(' '), QLatin1Char('_'));
|
||||
|
||||
Reference in New Issue
Block a user