Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 9c5b582e authored by Shubham  .'s avatar Shubham . Committed by Caio Jordão Carvalho

Constantify function parameters

Summary: Even though constantifying these parameters won't change anything(since they are being passed by value), it is done to assure they conform to rest of the coding style

Reviewers: stikonas, cjlcarvalho, #kde_partition_manager

Reviewed By: cjlcarvalho

Subscribers: #kde_partition_manager

Tags: #kde_partition_manager

Differential Revision: https://phabricator.kde.org/D20106
parent c78b35eb
......@@ -102,7 +102,7 @@ quint64 ExternalCommandHelper::getNonce()
@param size the number of bytes to read
@return true on success
*/
bool ExternalCommandHelper::readData(const QString& sourceDevice, QByteArray& buffer, qint64 offset, qint64 size)
bool ExternalCommandHelper::readData(const QString& sourceDevice, QByteArray& buffer, const qint64 offset, const qint64 size)
{
QFile device(sourceDevice);
......@@ -132,7 +132,7 @@ bool ExternalCommandHelper::readData(const QString& sourceDevice, QByteArray& bu
@param offset offset where to begin writing
@return true on success
*/
bool ExternalCommandHelper::writeData(const QString &targetDevice, const QByteArray& buffer, qint64 offset)
bool ExternalCommandHelper::writeData(const QString &targetDevice, const QByteArray& buffer, const qint64 offset)
{
QFile device(targetDevice);
if (!device.open(QIODevice::WriteOnly | QIODevice::Append | QIODevice::Unbuffered)) {
......
......@@ -42,8 +42,8 @@ Q_SIGNALS:
void quit();
public:
bool readData(const QString& sourceDevice, QByteArray& buffer, qint64 offset, qint64 size);
bool writeData(const QString& targetDevice, const QByteArray& buffer, qint64 offset);
bool readData(const QString& sourceDevice, QByteArray& buffer, const qint64 offset, const qint64 size);
bool writeData(const QString& targetDevice, const QByteArray& buffer, const qint64 offset);
public Q_SLOTS:
ActionReply init(const QVariantMap& args);
......
Markdown is supported
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