Skip to content
GitLab
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
3903ae1b
Commit
3903ae1b
authored
Feb 05, 2022
by
Andrius Štikonas
Browse files
Rename CopyBlocks to CopyFileData.
parent
949ce01a
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/util/externalcommand.cpp
View file @
3903ae1b
...
...
@@ -160,7 +160,7 @@ bool ExternalCommand::copyBlocks(const CopySource& source, CopyTarget& target)
connect
(
interface
,
&
OrgKdeKpmcoreExternalcommandInterface
::
progress
,
this
,
&
ExternalCommand
::
progress
);
connect
(
interface
,
&
OrgKdeKpmcoreExternalcommandInterface
::
report
,
this
,
&
ExternalCommand
::
reportSignal
);
QDBusPendingCall
pcall
=
interface
->
Copy
Blocks
(
source
.
path
(),
source
.
firstByte
(),
source
.
length
(),
QDBusPendingCall
pcall
=
interface
->
Copy
FileData
(
source
.
path
(),
source
.
firstByte
(),
source
.
length
(),
target
.
path
(),
target
.
firstByte
(),
blockSize
);
QDBusPendingCallWatcher
*
watcher
=
new
QDBusPendingCallWatcher
(
pcall
,
this
);
...
...
src/util/externalcommandhelper.cpp
View file @
3903ae1b
...
...
@@ -156,7 +156,7 @@ bool ExternalCommandHelper::CreateFile(const QString &filePath, const QByteArray
}
// If targetDevice is empty then return QByteArray with data that was read from disk.
QVariantMap
ExternalCommandHelper
::
Copy
Blocks
(
const
QString
&
sourceDevice
,
const
qint64
sourceOffset
,
const
qint64
sourceLength
,
const
QString
&
targetDevice
,
const
qint64
targetOffset
,
const
qint64
blockSize
)
QVariantMap
ExternalCommandHelper
::
Copy
FileData
(
const
QString
&
sourceDevice
,
const
qint64
sourceOffset
,
const
qint64
sourceLength
,
const
QString
&
targetDevice
,
const
qint64
targetOffset
,
const
qint64
blockSize
)
{
if
(
!
isCallerAuthorized
())
{
return
{};
...
...
src/util/externalcommandhelper.h
View file @
3903ae1b
...
...
@@ -38,7 +38,7 @@ public:
public
Q_SLOTS
:
Q_SCRIPTABLE
QVariantMap
RunCommand
(
const
QString
&
command
,
const
QStringList
&
arguments
,
const
QByteArray
&
input
,
const
int
processChannelMode
);
Q_SCRIPTABLE
QVariantMap
Copy
Blocks
(
const
QString
&
sourceDevice
,
const
qint64
sourceOffset
,
const
qint64
sourceLength
,
Q_SCRIPTABLE
QVariantMap
Copy
FileData
(
const
QString
&
sourceDevice
,
const
qint64
sourceOffset
,
const
qint64
sourceLength
,
const
QString
&
targetDevice
,
const
qint64
targetOffset
,
const
qint64
blockSize
);
Q_SCRIPTABLE
QByteArray
ReadData
(
const
QString
&
device
,
const
qint64
offset
,
const
qint64
length
);
Q_SCRIPTABLE
bool
WriteData
(
const
QByteArray
&
buffer
,
const
QString
&
targetDevice
,
const
qint64
targetOffset
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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