Some refactor

This commit is contained in:
Agel committed 2026-04-08 14:01:03 +02:00
1 parent 7ecb7f4f4f
commit 9280c838b2
37 files changed
+1599 -981

No files matched your search

+8
View File
@@ -1,5 +1,6 @@
#include "TxtReader.h"
#include <QCryptographicHash>
#include <QFileInfo>
#include <QRegularExpression>
#include <QTextStream>
@@ -110,6 +111,8 @@ bool TxtReader::open(const QString &filePath)
QByteArray raw = file.readAll();
file.close();
m_contentHash = QCryptographicHash::hash(raw, QCryptographicHash::Md5);
uchardet_t ud = uchardet_new();
if (uchardet_handle_data(ud, raw.constData(), raw.size()) == 0) {
uchardet_data_end(ud);
@@ -206,3 +209,8 @@ QString TxtReader::coverImagePath()
{
return {};
}
QByteArray TxtReader::contentHash()
{
return m_contentHash;
}