diff --git a/src/g.cpp b/src/g.cpp index 3dc4fca..40ebd8f 100644 --- a/src/g.cpp +++ b/src/g.cpp @@ -220,7 +220,7 @@ QString hash(const QByteArray &data) return hash; } -QString hash(QFile file) +QString hash(QFile&& file) { if (not file.open(QIODevice::ReadOnly)) { diff --git a/src/g.h b/src/g.h index 4bc2396..2f2d7b8 100644 --- a/src/g.h +++ b/src/g.h @@ -83,6 +83,6 @@ enum class GetValueType { // QString getValue() QString getValue(const QString &string, const QString &key, GetValueType type = GetValueType::Default); QString randomString(int length = 10); QString hash(const QByteArray &data); -QString hash(QFile file); +QString hash(QFile&& file); } // namespace g