forked from qt-creator/qt-creator
Git: Support staging a single chunk.
Add context menu in diff editor to stage/unstage a single chunk from the diff. Task-number: QTCREATORBUG-5875 Change-Id: Ic244a0d84b5ed5f66b90d7fe8784fc1b8041d183 Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
c372f7b601
commit
367cfc8419
@@ -83,6 +83,7 @@ public:
|
||||
|
||||
QString fileName;
|
||||
QByteArray chunk;
|
||||
QByteArray header;
|
||||
};
|
||||
|
||||
class VCSBASE_EXPORT VcsBaseEditorWidget : public TextEditor::BaseTextEditorWidget
|
||||
@@ -234,6 +235,8 @@ protected:
|
||||
* source and version control. */
|
||||
virtual QString findDiffFile(const QString &f) const;
|
||||
|
||||
virtual void addDiffActions(QMenu *menu, const DiffChunk &chunk);
|
||||
|
||||
virtual void addChangeActions(QMenu *menu, const QString &change);
|
||||
|
||||
// Implement to return a set of change identifiers in
|
||||
@@ -245,7 +248,7 @@ protected:
|
||||
virtual BaseAnnotationHighlighter *createAnnotationHighlighter(const QSet<QString> &changes) const = 0;
|
||||
// Returns a local file name from the diff file specification
|
||||
// (text cursor at position above change hunk)
|
||||
QString fileNameFromDiffSpecification(const QTextBlock &inBlock) const;
|
||||
QString fileNameFromDiffSpecification(const QTextBlock &inBlock, QString *header = 0) const;
|
||||
|
||||
// Implement to return decorated annotation change for "Annotate version"
|
||||
virtual QString decorateVersion(const QString &revision) const;
|
||||
|
||||
Reference in New Issue
Block a user