From 29e786a2f26c5914526481aa2aa9cb991d768e8a Mon Sep 17 00:00:00 2001 From: Johannes Sixt Date: Sun, 27 Nov 2016 17:31:08 +0100 Subject: [PATCH] Replace KMD5 by QCryptographicHash. The former is deprecated in KF5 and must be replaced. --- kdbg/debugger.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/kdbg/debugger.cpp b/kdbg/debugger.cpp index 6a6d243..a678afa 100644 --- a/kdbg/debugger.cpp +++ b/kdbg/debugger.cpp @@ -13,7 +13,7 @@ #include #include #include -#include // KMD5 +#include #include #include /* i18n */ #include @@ -719,7 +719,9 @@ QString KDebugger::getConfigForExe(const QString& name) // a hash of the directory, followed by the program name. // Assume that the first 15 positions of the hash are unique; // this keeps the file names short. - QString hash = KMD5(dir.toUtf8()).base64Digest(); + QCryptographicHash dirDigest(QCryptographicHash::Md5); + dirDigest.addData(dir.toUtf8()); + QString hash = dirDigest.result().toBase64(); hash.replace('/', QString()); // avoid directory separators QString pgmConfigFile = hash.left(15) + "-" + fi.fileName(); pgmConfigFile = KStandardDirs::locateLocal("sessions", pgmConfigFile); -- 2.11.4.GIT