forked from qt-creator/qt-creator
UnifiedDiffData: Rename setDiff into diffOutput and make it static
Conform to sibling struct SideDiffData. Change-Id: I7630ec7480c34a94f17ef09904e332da768f0c37 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -24,23 +24,13 @@ class ChunkSelection;
|
||||
namespace Internal {
|
||||
|
||||
class DiffEditorDocument;
|
||||
|
||||
class UnifiedDiffOutput
|
||||
{
|
||||
public:
|
||||
QString diffText;
|
||||
// 'foldingIndent' is populated with <block number> and folding indentation
|
||||
// value where 1 indicates start of new file and 2 indicates a diff chunk.
|
||||
// Remaining lines (diff contents) are assigned 3.
|
||||
QHash<int, int> foldingIndent;
|
||||
DiffSelections selections;
|
||||
};
|
||||
class UnifiedDiffOutput;
|
||||
|
||||
class UnifiedDiffData
|
||||
{
|
||||
public:
|
||||
UnifiedDiffOutput setDiff(QFutureInterface<void> &fi, int progressMin, int progressMax,
|
||||
const DiffEditorInput &input);
|
||||
static UnifiedDiffOutput diffOutput(QFutureInterface<void> &fi, int progressMin, int progressMax,
|
||||
const DiffEditorInput &input);
|
||||
|
||||
// block number, visual line number, chunk row number
|
||||
using LineNumbers = QMap<int, QPair<int, int>>;
|
||||
@@ -61,6 +51,18 @@ private:
|
||||
DiffSelections *selections);
|
||||
};
|
||||
|
||||
class UnifiedDiffOutput
|
||||
{
|
||||
public:
|
||||
UnifiedDiffData diffData;
|
||||
QString diffText;
|
||||
// 'foldingIndent' is populated with <block number> and folding indentation
|
||||
// value where 1 indicates start of new file and 2 indicates a diff chunk.
|
||||
// Remaining lines (diff contents) are assigned 3.
|
||||
QHash<int, int> foldingIndent;
|
||||
DiffSelections selections;
|
||||
};
|
||||
|
||||
class UnifiedDiffEditorWidget final : public SelectableTextEditorWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
Reference in New Issue
Block a user