Commit aae3056b authored by Andre Hartmann's avatar Andre Hartmann Committed by André Hartmann

DiffEditor: Modernize

* Use member init
* Use nullptr
* Use range-for
* omit QLatin1{String|Char} where possible

Change-Id: Ib231b747cdd9073b3d4fc6779b8e0afb2b404a31
Reviewed-by: Orgad Shaneh's avatarOrgad Shaneh <orgads@gmail.com>
Reviewed-by: default avatarAndré Hartmann <aha_1980@gmx.de>
parent 53a15107
......@@ -191,7 +191,7 @@ void DescriptionEditorWidget::mouseReleaseEvent(QMouseEvent *e)
bool DescriptionEditorWidget::findContentsUnderCursor(const QTextCursor &cursor)
{
m_currentCursor = cursor;
return cursor.block().text() == QLatin1String(Constants::EXPAND_BRANCHES);
return cursor.block().text() == Constants::EXPAND_BRANCHES;
}
void DescriptionEditorWidget::highlightCurrentContents()
......@@ -210,28 +210,13 @@ void DescriptionEditorWidget::handleCurrentContents()
{
m_currentCursor.select(QTextCursor::LineUnderCursor);
m_currentCursor.removeSelectedText();
m_currentCursor.insertText(QLatin1String("Branches: Expanding..."));
m_currentCursor.insertText("Branches: Expanding...");
emit requestBranchList();
}
///////////////////////////////// DiffEditor //////////////////////////////////
DiffEditor::DiffEditor()
: m_document(0)
, m_descriptionWidget(0)
, m_stackedWidget(0)
, m_toolBar(0)
, m_entriesComboBox(0)
, m_contextSpinBox(0)
, m_toggleSyncAction(0)
, m_whitespaceButtonAction(0)
, m_toggleDescriptionAction(0)
, m_reloadAction(0)
, m_viewSwitcherAction(0)
, m_currentViewIndex(-1)
, m_currentDiffFileIndex(-1)
, m_sync(false)
, m_showDescription(true)
{
// Editor:
setDuplicateSupported(true);
......@@ -458,7 +443,7 @@ void DiffEditor::toggleDescription()
return;
m_showDescription = !m_showDescription;
saveSetting(QLatin1String(descriptionVisibleKeyC), m_showDescription);
saveSetting(descriptionVisibleKeyC, m_showDescription);
updateDescription();
}
......@@ -486,7 +471,7 @@ void DiffEditor::contextLineCountHasChanged(int lines)
return;
m_document->setContextLineCount(lines);
saveSetting(QLatin1String(contextLineCountKeyC), lines);
saveSetting(contextLineCountKeyC, lines);
m_document->reload();
}
......@@ -498,7 +483,7 @@ void DiffEditor::ignoreWhitespaceHasChanged()
if (m_ignoreChanges.isLocked() || ignore == m_document->ignoreWhitespace())
return;
m_document->setIgnoreWhitespace(ignore);
saveSetting(QLatin1String(ignoreWhitespaceKeyC), ignore);
saveSetting(ignoreWhitespaceKeyC, ignore);
m_document->reload();
}
......@@ -605,7 +590,7 @@ void DiffEditor::toggleSync()
QTC_ASSERT(currentView(), return);
m_sync = !m_sync;
saveSetting(QLatin1String(horizontalScrollBarSynchronizationKeyC), m_sync);
saveSetting(horizontalScrollBarSynchronizationKeyC, m_sync);
currentView()->setSync(m_sync);
}
......@@ -615,12 +600,12 @@ IDiffView *DiffEditor::loadSettings()
QSettings *s = Core::ICore::settings();
// Read current settings:
s->beginGroup(QLatin1String(settingsGroupC));
m_showDescription = s->value(QLatin1String(descriptionVisibleKeyC), true).toBool();
m_sync = s->value(QLatin1String(horizontalScrollBarSynchronizationKeyC), true).toBool();
m_document->setIgnoreWhitespace(s->value(QLatin1String(ignoreWhitespaceKeyC), false).toBool());
m_document->setContextLineCount(s->value(QLatin1String(contextLineCountKeyC), 3).toInt());
Core::Id id = Core::Id::fromSetting(s->value(QLatin1String(diffViewKeyC)));
s->beginGroup(settingsGroupC);
m_showDescription = s->value(descriptionVisibleKeyC, true).toBool();
m_sync = s->value(horizontalScrollBarSynchronizationKeyC, true).toBool();
m_document->setIgnoreWhitespace(s->value(ignoreWhitespaceKeyC, false).toBool());
m_document->setContextLineCount(s->value(contextLineCountKeyC, 3).toInt());
Core::Id id = Core::Id::fromSetting(s->value(diffViewKeyC));
s->endGroup();
IDiffView *view = Utils::findOr(m_views, m_views.at(0),
......@@ -633,7 +618,7 @@ IDiffView *DiffEditor::loadSettings()
void DiffEditor::saveSetting(const QString &key, const QVariant &value) const
{
QSettings *s = Core::ICore::settings();
s->beginGroup(QLatin1String(settingsGroupC));
s->beginGroup(settingsGroupC);
s->setValue(key, value);
s->endGroup();
}
......@@ -677,7 +662,7 @@ void DiffEditor::setupView(IDiffView *view)
QTC_ASSERT(view, return);
setCurrentView(view);
saveSetting(QLatin1String(diffViewKeyC), currentView()->id().toSetting());
saveSetting(diffViewKeyC, currentView()->id().toSetting());
{
Utils::GuardLocker guard(m_ignoreChanges);
......
......@@ -93,14 +93,14 @@ private:
void setupView(IDiffView *view);
QSharedPointer<DiffEditorDocument> m_document;
DescriptionEditorWidget *m_descriptionWidget;
UnifiedView *m_unifiedView;
SideBySideView *m_sideBySideView;
QStackedWidget *m_stackedWidget;
DescriptionEditorWidget *m_descriptionWidget = nullptr;
UnifiedView *m_unifiedView = nullptr;
SideBySideView *m_sideBySideView = nullptr;
QStackedWidget *m_stackedWidget = nullptr;
QVector<IDiffView *> m_views;
QToolBar *m_toolBar;
QComboBox *m_entriesComboBox;
QSpinBox *m_contextSpinBox;
QToolBar *m_toolBar = nullptr;
QComboBox *m_entriesComboBox = nullptr;
QSpinBox *m_contextSpinBox = nullptr;
QAction *m_contextSpinBoxAction = nullptr;
QAction *m_toggleSyncAction;
QAction *m_whitespaceButtonAction;
......@@ -109,11 +109,11 @@ private:
QAction *m_contextLabelAction = nullptr;
QAction *m_viewSwitcherAction;
QPair<QString, QString> m_currentFileChunk;
int m_currentViewIndex;
int m_currentDiffFileIndex;
int m_currentViewIndex = -1;
int m_currentDiffFileIndex = -1;
Utils::Guard m_ignoreChanges;
bool m_sync;
bool m_showDescription;
bool m_sync = false;
bool m_showDescription = true;
};
} // namespace Internal
......
......@@ -39,10 +39,7 @@ namespace DiffEditor {
DiffEditorController::DiffEditorController(Core::IDocument *document) :
QObject(document),
m_document(qobject_cast<Internal::DiffEditorDocument *>(document)),
m_isReloading(false),
m_diffFileIndex(-1),
m_chunkIndex(-1)
m_document(qobject_cast<Internal::DiffEditorDocument *>(document))
{
QTC_ASSERT(m_document, return);
m_document->setController(this);
......@@ -109,7 +106,7 @@ void DiffEditorController::setDescription(const QString &description)
void DiffEditorController::branchesReceived(const QString &branches)
{
QString tmp = m_document->description();
tmp.replace(QLatin1String(Constants::EXPAND_BRANCHES), branches);
tmp.replace(Constants::EXPAND_BRANCHES, branches);
m_document->setDescription(tmp);
}
......
......@@ -85,9 +85,9 @@ private:
Internal::DiffEditorDocument *const m_document;
bool m_isReloading;
int m_diffFileIndex;
int m_chunkIndex;
bool m_isReloading = false;
int m_diffFileIndex = -1;
int m_chunkIndex = -1;
friend class Internal::DiffEditorDocument;
};
......
......@@ -46,14 +46,10 @@ namespace DiffEditor {
namespace Internal {
DiffEditorDocument::DiffEditorDocument() :
Core::BaseTextDocument(),
m_controller(0),
m_contextLineCount(3),
m_isContextLineCountForced(false),
m_ignoreWhitespace(false)
Core::BaseTextDocument()
{
setId(Constants::DIFF_EDITOR_ID);
setMimeType(QLatin1String(Constants::DIFF_EDITOR_MIMETYPE));
setMimeType(Constants::DIFF_EDITOR_MIMETYPE);
setTemporary(true);
}
......@@ -111,8 +107,8 @@ QString DiffEditorDocument::makePatch(int fileIndex, int chunkIndex,
QString leftPrefix, rightPrefix;
if (addPrefix) {
leftPrefix = QLatin1String("a/");
rightPrefix = QLatin1String("b/");
leftPrefix = "a/";
rightPrefix = "b/";
}
return DiffUtils::makePatch(chunkData,
leftPrefix + fileName,
......@@ -287,10 +283,10 @@ QString DiffEditorDocument::fallbackSaveAsFileName() const
const QString desc = description();
if (!desc.isEmpty()) {
QString name = QString::fromLatin1("0001-%1").arg(desc.left(desc.indexOf(QLatin1Char('\n'))));
QString name = QString::fromLatin1("0001-%1").arg(desc.left(desc.indexOf('\n')));
name = FileUtils::fileSystemFriendlyName(name);
name.truncate(maxSubjectLength);
name.append(QLatin1String(".patch"));
name.append(".patch");
return name;
}
return QStringLiteral("0001.patch");
......@@ -303,17 +299,17 @@ static void formatGitDescription(QString *description)
{
QString result;
result.reserve(description->size());
foreach (QString line, description->split(QLatin1Char('\n'))) {
if (line.startsWith(QLatin1String("commit "))
|| line.startsWith(QLatin1String("Branches: <Expand>"))) {
const auto descriptionList = description->split('\n');
for (QString line : descriptionList) {
if (line.startsWith("commit ") || line.startsWith("Branches: <Expand>"))
continue;
}
if (line.startsWith(QLatin1String("Author: ")))
line.replace(0, 8, QStringLiteral("From: "));
else if (line.startsWith(QLatin1String(" ")))
if (line.startsWith("Author: "))
line.replace(0, 8, "From: ");
else if (line.startsWith(" "))
line.remove(0, 4);
result.append(line);
result.append(QLatin1Char('\n'));
result.append('\n');
}
*description = result;
}
......@@ -328,7 +324,7 @@ QString DiffEditorDocument::plainText() const
const QString diff = DiffUtils::makePatch(diffFiles(), formattingOptions);
if (!diff.isEmpty()) {
if (!result.isEmpty())
result += QLatin1Char('\n');
result += '\n';
result += diff;
}
return result;
......
......@@ -98,14 +98,14 @@ private:
void endReload(bool success);
void setController(DiffEditorController *controller);
DiffEditorController *m_controller;
DiffEditorController *m_controller = nullptr;
QList<FileData> m_diffFiles;
QString m_baseDirectory;
QString m_startupFile;
QString m_description;
int m_contextLineCount;
bool m_isContextLineCountForced;
bool m_ignoreWhitespace;
int m_contextLineCount = 3;
bool m_isContextLineCountForced = false;
bool m_ignoreWhitespace = false;
State m_state = LoadOK;
friend class ::DiffEditor::DiffEditorController;
......
......@@ -31,11 +31,11 @@ namespace DiffEditor {
namespace Icons {
const Utils::Icon TOP_BAR({
{QLatin1String(":/diffeditor/images/topbar.png"), Utils::Theme::IconsBaseColor}});
{":/diffeditor/images/topbar.png", Utils::Theme::IconsBaseColor}});
const Utils::Icon UNIFIED_DIFF({
{QLatin1String(":/diffeditor/images/unifieddiff.png"), Utils::Theme::IconsBaseColor}});
{":/diffeditor/images/unifieddiff.png", Utils::Theme::IconsBaseColor}});
const Utils::Icon SIDEBYSIDE_DIFF({
{QLatin1String(":/diffeditor/images/sidebysidediff.png"), Utils::Theme::IconsBaseColor}});
{":/diffeditor/images/sidebysidediff.png", Utils::Theme::IconsBaseColor}});
} // namespace Icons
} // namespace DiffEditor
This diff is collapsed.
......@@ -289,7 +289,7 @@ void DiffEditorWidgetController::slotSendChunkToCodePaster()
if (patch.isEmpty())
return;
pasteService->postText(patch, QLatin1String(Constants::DIFF_EDITOR_MIMETYPE));
pasteService->postText(patch, Constants::DIFF_EDITOR_MIMETYPE);
}
void DiffEditorWidgetController::slotApplyChunk()
......
......@@ -81,7 +81,7 @@ private:
void showProgress();
void hideProgress();
QWidget *m_diffEditorWidget;
QWidget *m_diffEditorWidget = nullptr;
DiffEditorDocument *m_document = nullptr;
......
......@@ -236,14 +236,14 @@ static int cleanupSemanticsScore(const QString &text1, const QString &text2)
static bool isWhitespace(const QChar &c)
{
if (c == QLatin1Char(' ') || c == QLatin1Char('\t'))
if (c == ' ' || c == '\t')
return true;
return false;
}
static bool isNewLine(const QChar &c)
{
if (c == QLatin1Char('\n'))
if (c == '\n')
return true;
return false;
}
......@@ -362,7 +362,7 @@ static QString encodeReducedWhitespace(const QString &input,
QChar c = input.at(inputIndex);
if (isWhitespace(c)) {
output.append(QLatin1Char(' '));
output.append(' ');
codeMap->insert(outputIndex, QString(c));
++inputIndex;
......@@ -564,7 +564,7 @@ static QString encodeExpandedWhitespace(const QString &leftEquality,
if (leftWhitespaces.count() && rightWhitespaces.count()) {
const int replacementPosition = output.count();
const int replacementSize = qMax(leftWhitespaces.count(), rightWhitespaces.count());
const QString replacement(replacementSize, QLatin1Char(' '));
const QString replacement(replacementSize, ' ');
leftCodeMap->insert(replacementPosition,
qMakePair(replacementSize, leftWhitespaces));
rightCodeMap->insert(replacementPosition,
......@@ -968,17 +968,14 @@ QString Diff::toString() const
{
QString prettyText = text;
// Replace linebreaks with pretty char
prettyText.replace(QLatin1Char('\n'), QLatin1Char('\xb6'));
return commandString(command) + QLatin1String(" \"")
+ prettyText + QLatin1String("\"");
prettyText.replace('\n', '\xb6');
return commandString(command) + " \"" + prettyText + "\"";
}
///////////////
Differ::Differ(QFutureInterfaceBase *jobController)
: m_diffMode(Differ::LineMode),
m_currentDiffMode(Differ::LineMode),
m_jobController(jobController)
: m_jobController(jobController)
{
}
......@@ -1288,7 +1285,7 @@ int Differ::findSubtextEnd(const QString &text,
int subtextStart)
{
if (m_currentDiffMode == Differ::LineMode) {
int subtextEnd = text.indexOf(QLatin1Char('\n'), subtextStart);
int subtextEnd = text.indexOf('\n', subtextStart);
if (subtextEnd == -1)
subtextEnd = text.count() - 1;
return ++subtextEnd;
......
......@@ -109,8 +109,8 @@ private:
QMap<QString, int> *lineToCode);
int findSubtextEnd(const QString &text,
int subTextStart);
DiffMode m_diffMode;
DiffMode m_currentDiffMode;
DiffMode m_diffMode = Differ::LineMode;
DiffMode m_currentDiffMode = Differ::LineMode;
QFutureInterfaceBase *m_jobController = nullptr;
};
......
......@@ -84,7 +84,7 @@ static void handleDifference(const QString &text,
QList<TextLineData> *lines,
int *lineNumber)
{
const QStringList newLines = text.split(QLatin1Char('\n'));
const QStringList newLines = text.split('\n');
for (int line = 0; line < newLines.count(); ++line) {
const int startPos = line > 0
? -1
......@@ -133,7 +133,7 @@ ChunkData DiffUtils::calculateOriginalData(const QList<Diff> &leftDiffList,
: Diff(Diff::Equal);
if (leftDiff.command == Diff::Delete) {
if (j == rightDiffList.count() && lastLineEqual && leftDiff.text.startsWith(QLatin1Char('\n')))
if (j == rightDiffList.count() && lastLineEqual && leftDiff.text.startsWith('\n'))
equalLines.insert(leftLineNumber, rightLineNumber);
// process delete
handleDifference(leftDiff.text, &leftLines, &leftLineNumber);
......@@ -143,7 +143,7 @@ ChunkData DiffUtils::calculateOriginalData(const QList<Diff> &leftDiffList,
i++;
}
if (rightDiff.command == Diff::Insert) {
if (i == leftDiffList.count() && lastLineEqual && rightDiff.text.startsWith(QLatin1Char('\n')))
if (i == leftDiffList.count() && lastLineEqual && rightDiff.text.startsWith('\n'))
equalLines.insert(leftLineNumber, rightLineNumber);
// process insert
handleDifference(rightDiff.text, &rightLines, &rightLineNumber);
......@@ -154,8 +154,8 @@ ChunkData DiffUtils::calculateOriginalData(const QList<Diff> &leftDiffList,
}
if (leftDiff.command == Diff::Equal && rightDiff.command == Diff::Equal) {
// process equal
const QStringList newLeftLines = leftDiff.text.split(QLatin1Char('\n'));
const QStringList newRightLines = rightDiff.text.split(QLatin1Char('\n'));
const QStringList newLeftLines = leftDiff.text.split('\n');
const QStringList newRightLines = rightDiff.text.split('\n');
int line = 0;
......@@ -347,9 +347,9 @@ QString DiffUtils::makePatchLine(const QChar &startLineCharacter,
|| addNoNewline; // no addNoNewline case
if (addLine) {
line = startLineCharacter + textLine + QLatin1Char('\n');
line = startLineCharacter + textLine + '\n';
if (addNoNewline)
line += QLatin1String("\\ No newline at end of file\n");
line += "\\ No newline at end of file\n";
}
return line;
......@@ -404,7 +404,7 @@ QString DiffUtils::makePatch(const ChunkData &chunkData,
if (rowData.equal && i != rowToBeSplit) {
if (leftBuffer.count()) {
for (int j = 0; j < leftBuffer.count(); j++) {
const QString line = makePatchLine(QLatin1Char('-'),
const QString line = makePatchLine('-',
leftBuffer.at(j).text,
lastChunk,
i == chunkData.rows.count()
......@@ -419,7 +419,7 @@ QString DiffUtils::makePatch(const ChunkData &chunkData,
}
if (rightBuffer.count()) {
for (int j = 0; j < rightBuffer.count(); j++) {
const QString line = makePatchLine(QLatin1Char('+'),
const QString line = makePatchLine('+',
rightBuffer.at(j).text,
lastChunk,
i == chunkData.rows.count()
......@@ -433,7 +433,7 @@ QString DiffUtils::makePatch(const ChunkData &chunkData,
rightBuffer.clear();
}
if (i < chunkData.rows.count()) {
const QString line = makePatchLine(QLatin1Char(' '),
const QString line = makePatchLine(' ',
rowData.rightLine.text,
lastChunk,
i == chunkData.rows.count() - 1);
......@@ -453,17 +453,17 @@ QString DiffUtils::makePatch(const ChunkData &chunkData,
}
}
const QString chunkLine = QLatin1String("@@ -")
const QString chunkLine = "@@ -"
+ QString::number(chunkData.leftStartingLineNumber + 1)
+ QLatin1Char(',')
+ ','
+ QString::number(leftLineCount)
+ QLatin1String(" +")
+ " +"
+ QString::number(chunkData.rightStartingLineNumber + 1)
+ QLatin1Char(',')
+ ','
+ QString::number(rightLineCount)
+ QLatin1String(" @@")
+ " @@"
+ chunkData.contextInfo
+ QLatin1Char('\n');
+ '\n';
diffText.prepend(chunkLine);
......@@ -477,8 +477,8 @@ QString DiffUtils::makePatch(const ChunkData &chunkData,
{
QString diffText = makePatch(chunkData, lastChunk);
const QString rightFileInfo = QLatin1String("+++ ") + rightFileName + QLatin1Char('\n');
const QString leftFileInfo = QLatin1String("--- ") + leftFileName + QLatin1Char('\n');
const QString rightFileInfo = "+++ " + rightFileName + '\n';
const QString leftFileInfo = "--- " + leftFileName + '\n';
diffText.prepend(rightFileInfo);
diffText.prepend(leftFileInfo);
......@@ -568,7 +568,7 @@ static QList<RowData> readLines(QStringRef patch,
{
QList<Diff> diffList;
const QChar newLine = QLatin1Char('\n');
const QChar newLine = '\n';
int lastEqual = -1;
int lastDelete = -1;
......@@ -588,7 +588,7 @@ static QList<RowData> readLines(QStringRef patch,
break;
}
const QChar firstCharacter = line.at(0);
if (firstCharacter == QLatin1Char('\\')) { // no new line marker
if (firstCharacter == '\\') { // no new line marker
if (!lastChunk) // can only appear in last chunk of the file
break;
if (!diffList.isEmpty()) {
......@@ -612,11 +612,11 @@ static QList<RowData> readLines(QStringRef patch,
}
} else {
Diff::Command command = Diff::Equal;
if (firstCharacter == QLatin1Char(' ')) { // common line
if (firstCharacter == ' ') { // common line
command = Diff::Equal;
} else if (firstCharacter == QLatin1Char('-')) { // deleted line
} else if (firstCharacter == '-') { // deleted line
command = Diff::Delete;
} else if (firstCharacter == QLatin1Char('+')) { // inserted line
} else if (firstCharacter == '+') { // inserted line
command = Diff::Insert;
} else { // no other character may exist as the first character
if (lastChunk)
......@@ -1074,9 +1074,9 @@ static bool detectIndexAndBinary(QStringRef patch,
const QString rightFileName = fileData->fileOperation == FileData::DeleteFile
? devNull : QLatin1String("b/") + fileData->rightFileInfo.fileName;
const QString binaryLine = QLatin1String("Binary files ")
+ leftFileName + QLatin1String(" and ")
+ rightFileName + QLatin1String(" differ");
const QString binaryLine = "Binary files "
+ leftFileName + " and "
+ rightFileName + " differ";
if (*remainingPatch == binaryLine) {
fileData->binaryFiles = true;
......@@ -1084,7 +1084,7 @@ static bool detectIndexAndBinary(QStringRef patch,
return true;
}
const QString leftStart = QLatin1String("--- ") + leftFileName;
const QString leftStart = "--- " + leftFileName;
QStringRef afterMinuses;
// --- leftFileName
const QStringRef minuses = readLine(*remainingPatch, &afterMinuses, &hasNewLine);
......@@ -1094,7 +1094,7 @@ static bool detectIndexAndBinary(QStringRef patch,
if (!minuses.startsWith(leftStart))
return false;
const QString rightStart = QLatin1String("+++ ") + rightFileName;
const QString rightStart = "+++ " + rightFileName;
QStringRef afterPluses;
// +++ rightFileName
const QStringRef pluses = readLine(afterMinuses, &afterPluses, &hasNewLine);
......
......@@ -63,10 +63,10 @@ public:
Separator,
Invalid
};
TextLineData() : textLineType(Invalid) {}
TextLineData() {}
TextLineData(const QString &txt) : textLineType(TextLine), text(txt) {}
TextLineData(TextLineType t) : textLineType(t) {}
TextLineType textLineType;
TextLineType textLineType = Invalid;
QString text;
/*
* <start position, end position>
......@@ -79,24 +79,23 @@ public:
class DIFFEDITOR_EXPORT RowData {
public:
RowData() : equal(false) {}
RowData() {}
RowData(const TextLineData &l)
: leftLine(l), rightLine(l), equal(true) {}
RowData(const TextLineData &l, const TextLineData &r)
: leftLine(l), rightLine(r), equal(false) {}
: leftLine(l), rightLine(r) {}
TextLineData leftLine;
TextLineData rightLine;
bool equal;
bool equal = false;
};
class DIFFEDITOR_EXPORT ChunkData {
public:
ChunkData() : contextChunk(false),
leftStartingLineNumber(0), rightStartingLineNumber(0) {}
ChunkData() {}
QList<RowData> rows;
bool contextChunk;
int leftStartingLineNumber;
int rightStartingLineNumber;
bool contextChunk = false;
int leftStartingLineNumber = 0;
int rightStartingLineNumber = 0;
QString contextInfo;
};
......@@ -111,23 +110,15 @@ public:
RenameFile
};
FileData()
: fileOperation(ChangeFile),
binaryFiles(false),
lastChunkAtTheEndOfFile(false),
contextChunksIncluded(false) {}
FileData(const ChunkData &chunkData)
: fileOperation(ChangeFile),
binaryFiles(false),