forked from qt-creator/qt-creator
Vcs: Jump to the current source line in Fossil Annotate editor
* Keep track of the current source line number and pass it to Annotate action. * Add a 'List Versions' toggle in Annotate editor to prepend a list of commits that make up the annotated source. * By default do not show the version list so that annotated line number could be matched to the source line. NOTE: VcsBaseEditorWidget::configurationWidget() query is no longer available, yet Fossil client needs it in order to process the effective arguments. So we re-implement it in FossilEditorWidget sub-class. Change-Id: Idc4c21d074ccf4e1c6d041cce2abceb78665c8f2 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
@@ -27,26 +27,28 @@
|
||||
|
||||
#include <vcsbase/vcsbaseeditor.h>
|
||||
|
||||
#include <QRegularExpression>
|
||||
|
||||
namespace Fossil {
|
||||
namespace Internal {
|
||||
|
||||
class FossilEditorWidgetPrivate;
|
||||
|
||||
class FossilEditorWidget : public VcsBase::VcsBaseEditorWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
FossilEditorWidget();
|
||||
~FossilEditorWidget() final;
|
||||
|
||||
bool setConfigurationWidget(VcsBase::VcsBaseEditorConfig *w);
|
||||
VcsBase::VcsBaseEditorConfig *configurationWidget() const;
|
||||
|
||||
private:
|
||||
QSet<QString> annotationChanges() const final;
|
||||
QString changeUnderCursor(const QTextCursor &cursor) const final;
|
||||
VcsBase::BaseAnnotationHighlighter *createAnnotationHighlighter(const QSet<QString> &changes) const final;
|
||||
|
||||
const QRegularExpression m_exactChangesetId;
|
||||
const QRegularExpression m_firstChangesetId;
|
||||
const QRegularExpression m_nextChangesetId;
|
||||
FossilEditorWidgetPrivate *d;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
Reference in New Issue
Block a user