Commit 551654de authored by Andrius Štikonas's avatar Andrius Štikonas
Browse files

Also rename source/targetFirstByte ot offsets in function declarations.

parent d34b6172
...@@ -87,7 +87,7 @@ bool ExternalCommandHelper::readData(const QString& sourceDevice, QByteArray& bu ...@@ -87,7 +87,7 @@ bool ExternalCommandHelper::readData(const QString& sourceDevice, QByteArray& bu
if (size != buffer.size()) { if (size != buffer.size()) {
qCritical() << xi18n("Could not read from device <filename>%1</filename>.", sourceDevice); qCritical() << xi18n("Could not read from device <filename>%1</filename>.", sourceDevice);
return false; return false;
} }
return true; return true;
...@@ -274,7 +274,7 @@ QVariantMap ExternalCommandHelper::CopyBlocks(const QString& sourceDevice, const ...@@ -274,7 +274,7 @@ QVariantMap ExternalCommandHelper::CopyBlocks(const QString& sourceDevice, const
return reply; return reply;
} }
bool ExternalCommandHelper::WriteData(const QByteArray& buffer, const QString& targetDevice, const qint64 targetFirstByte) bool ExternalCommandHelper::WriteData(const QByteArray& buffer, const QString& targetDevice, const qint64 targetOffset)
{ {
if (!isCallerAuthorized()) { if (!isCallerAuthorized()) {
return false; return false;
...@@ -283,7 +283,7 @@ bool ExternalCommandHelper::WriteData(const QByteArray& buffer, const QString& t ...@@ -283,7 +283,7 @@ bool ExternalCommandHelper::WriteData(const QByteArray& buffer, const QString& t
if ( targetDevice.left(5) != QStringLiteral("/dev/") ) if ( targetDevice.left(5) != QStringLiteral("/dev/") )
return false; return false;
return writeData(targetDevice, buffer, targetFirstByte); return writeData(targetDevice, buffer, targetOffset);
} }
QVariantMap ExternalCommandHelper::RunCommand(const QString& command, const QStringList& arguments, const QByteArray& input, const int processChannelMode) QVariantMap ExternalCommandHelper::RunCommand(const QString& command, const QStringList& arguments, const QByteArray& input, const int processChannelMode)
......
...@@ -37,8 +37,8 @@ public: ...@@ -37,8 +37,8 @@ public:
public Q_SLOTS: public Q_SLOTS:
Q_SCRIPTABLE QVariantMap RunCommand(const QString& command, const QStringList& arguments, const QByteArray& input, const int processChannelMode); Q_SCRIPTABLE QVariantMap RunCommand(const QString& command, const QStringList& arguments, const QByteArray& input, const int processChannelMode);
Q_SCRIPTABLE QVariantMap CopyBlocks(const QString& sourceDevice, const qint64 sourceFirstByte, const qint64 sourceLength, const QString& targetDevice, const qint64 targetFirstByte, const qint64 blockSize); Q_SCRIPTABLE QVariantMap CopyBlocks(const QString& sourceDevice, const qint64 sourceOffset, const qint64 sourceLength, const QString& targetDevice, const qint64 targetOffset, const qint64 blockSize);
Q_SCRIPTABLE bool WriteData(const QByteArray& buffer, const QString& targetDevice, const qint64 targetFirstByte); Q_SCRIPTABLE bool WriteData(const QByteArray& buffer, const QString& targetDevice, const qint64 targetOffset);
Q_SCRIPTABLE bool CreateFile(const QString& filePath, const QByteArray& fileContents); Q_SCRIPTABLE bool CreateFile(const QString& filePath, const QByteArray& fileContents);
private: private:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment