Skip to content

Commit

Permalink
Fix qChecksum for Qt6
Browse files Browse the repository at this point in the history
  • Loading branch information
Pedro-Beirao committed Nov 23, 2024
1 parent 3c916aa commit 07c74b2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,12 @@ void MainWindow::SaveHistory(QStringList args)
for (qsizetype i = 0; i < args.size(); i++)
checksumString += args.at(i);
QByteArray checksumByteArray = checksumString.toLatin1();

#if QT_VERSION > QT_VERSION_CHECK(6, 0, 0)
checksum = qChecksum(checksumByteArray.data());
#else
checksum = qChecksum(checksumByteArray.data(), checksumByteArray.length());
#endif

QFile file(historyListWindow->historyPath);
file.open(QIODevice::ReadOnly | QIODevice::Text);
Expand Down

0 comments on commit 07c74b2

Please sign in to comment.