forked from qt-creator/qt-creator
Beautifier: Move formatting tools to TextEditor
Formatting is moved from Beautifier plugin to formattexteditor.h/.cpp. Diff and Differ classes are extracted from DiffEditor to Utils to prevent extra TextEditor dependencies. This change will make possible to use formatCurrentFile and similar functions not only from Beautifier code. Change-Id: Ic5ca668afe88f4e9376d49e6bd3594807172b0dd Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -36,9 +36,9 @@ QT_END_NAMESPACE
|
||||
|
||||
namespace TextEditor { class FontSettings; }
|
||||
|
||||
namespace DiffEditor {
|
||||
namespace Utils { class Diff; }
|
||||
|
||||
class Diff;
|
||||
namespace DiffEditor {
|
||||
|
||||
class DIFFEDITOR_EXPORT DiffFileInfo {
|
||||
public:
|
||||
@@ -128,8 +128,8 @@ public:
|
||||
GitFormat = AddLevel | 0x2, // Add line 'diff ..' as git does
|
||||
};
|
||||
|
||||
static ChunkData calculateOriginalData(const QList<Diff> &leftDiffList,
|
||||
const QList<Diff> &rightDiffList);
|
||||
static ChunkData calculateOriginalData(const QList<Utils::Diff> &leftDiffList,
|
||||
const QList<Utils::Diff> &rightDiffList);
|
||||
static FileData calculateContextData(const ChunkData &originalData,
|
||||
int contextLineCount,
|
||||
int joinChunkThreshold = 1);
|
||||
|
||||
Reference in New Issue
Block a user