Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
System
KPMCore
Commits
d9ceb502
Commit
d9ceb502
authored
Feb 20, 2022
by
Andrius Štikonas
Browse files
Add a few more comments explaining copy direction.
parent
237d2464
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/util/externalcommandhelper.cpp
View file @
d9ceb502
/*
SPDX-FileCopyrightText: 2017-202
0
Andrius Štikonas <andrius@stikonas.eu>
SPDX-FileCopyrightText: 2017-202
2
Andrius Štikonas <andrius@stikonas.eu>
SPDX-FileCopyrightText: 2018 Huzaifa Faruqui <huzaifafaruqui@gmail.com>
SPDX-FileCopyrightText: 2018 Caio Jordão Carvalho <caiojcarvalho@gmail.com>
SPDX-FileCopyrightText: 2018-2019 Harald Sitter <sitter@kde.org>
...
...
@@ -188,11 +188,14 @@ QVariantMap ExternalCommandHelper::CopyFileData(const QString& sourceDevice, con
reply
[
QStringLiteral
(
"success"
)]
=
true
;
// This enum specified whether individual blocks are moved left or right
// When source and target devices are the same we have to be careful not to overwrite
// source data with newly written data. We don't have to do this if sourceDevice is not
// targetDevice but there are no disadvantages in applying the same scheme.
// When partition is moved to the left, we start with the leftmost block,
// and move it further left, then second leftmost block and so on.
// But when we move partition to the right, we start with rightmost block.
// To account for this difference, we introduce CopyDirection variable which takes
// care of some of the differences between these two cases.
// care of some of the differences
in offset calculation
between these two cases.
enum
CopyDirection
:
qint8
{
Left
=
1
,
Right
=
-
1
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment