mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJClient.git
synced 2026-03-28 05:25:39 +03:00
35 lines
719 B
C++
35 lines
719 B
C++
#ifndef FASTHASHCALCULATOR_H
|
|
#define FASTHASHCALCULATOR_H
|
|
|
|
#include <QHash>
|
|
#include <QMutex>
|
|
#include <QObject>
|
|
#include <QFile>
|
|
#include <QDirIterator>
|
|
#include <Data/FileData.h>
|
|
#include "tools.h"
|
|
|
|
|
|
class FastHashCalculator : public QObject
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit FastHashCalculator(QObject *parent = nullptr);
|
|
void calculateHashes(const QString& path, const QString& ignoreName);
|
|
QList<FileData> *getHashList() const;
|
|
|
|
signals:
|
|
void finished();
|
|
|
|
private:
|
|
QByteArray calculateFileHashOptimized(const QString &filePath);
|
|
void calculateSingleHash(const QString &filePath);
|
|
|
|
QList<FileData>* hashList;
|
|
QMutex _mutex;
|
|
quint64 currentSize;
|
|
|
|
};
|
|
|
|
#endif // FASTHASHCALCULATOR_H
|