summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrius Štikonas <andrius@stikonas.eu>2016-06-03 19:22:44 (GMT)
committerAndrius Štikonas <andrius@stikonas.eu>2016-06-03 19:22:44 (GMT)
commit7232885a3b8b7d3d1510641568b79754a7f14281 (patch)
tree0d0529424f515fd8e1dfeef8e9694e6bb6cad7e9
parent82a51d27bf510fa0663c0a769001b9b38b26e0ab (diff)
Port away from KMD5.
-rw-r--r--editor/kgpgmd5widget.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/editor/kgpgmd5widget.cpp b/editor/kgpgmd5widget.cpp
index 61b8883..c4ec5f2 100644
--- a/editor/kgpgmd5widget.cpp
+++ b/editor/kgpgmd5widget.cpp
@@ -9,13 +9,13 @@
#include "kgpgmd5widget.h"
-#include <QHBoxLayout>
+#include <QCryptographicHash>
+#include <QFile>
#include <QClipboard>
+#include <QHBoxLayout>
#include <QLabel>
-#include <QFile>
#include <KApplication>
-#include <kmd5.h>
#include <KMessageBox>
#include <KLineEdit>
#include <KLocale>
@@ -32,14 +32,14 @@ Md5Widget::Md5Widget(QWidget *parent, const KUrl &url)
setButtonText(Apply, i18n("Compare MD5 with Clipboard"));
QFile f(url.path());
- KMD5 checkfile;
+ QCryptographicHash checkfile(QCryptographicHash::Md5);
if (f.open(QIODevice::ReadOnly)) {
- checkfile.update(f);
+ checkfile.addData(&f);
f.close();
}
- m_md5sum = QLatin1String( checkfile.hexDigest().constData() );
+ m_md5sum = QLatin1String( checkfile.result() );
QWidget *page = new QWidget(this);