OSDN Git Service

Revert "kcontrol: a bit more collision resilient hashes for font types"
authorIvailo Monev <xakepa10@gmail.com>
Fri, 25 Jun 2021 12:36:24 +0000 (15:36 +0300)
committerIvailo Monev <xakepa10@gmail.com>
Fri, 25 Jun 2021 12:36:24 +0000 (15:36 +0300)
This reverts commit 32a8b214c3d152ea6b532fcfcf5c765e9243f814.

kcontrol/kfontinst/dbus/Folder.h
kcontrol/kfontinst/kcmfontinst/DuplicatesDialog.cpp
kcontrol/kfontinst/lib/File.h
kcontrol/kfontinst/lib/Style.h

index a6fa208..fdc0e97 100644 (file)
@@ -104,7 +104,7 @@ class Folder
 
 inline KDE_EXPORT uint qHash(const Folder::FlatFont &key)
 {
-    return qHash(key.file) + key.scalable;
+    return qHash(key.file); // +qHash(key.index());
 }
 
 }
index 1919da2..91a2c18 100644 (file)
@@ -50,6 +50,9 @@
 #include <QtGui/QApplication>
 #include <QtGui/QDesktopWidget>
 #include <QtCore/QProcess>
+#if defined USE_POLICYKIT && USE_POLICYKIT==1
+#include <QtDBus/QDBusInterface>
+#endif
 
 namespace KFI
 {
index 9a18f48..347c977 100644 (file)
@@ -70,7 +70,7 @@ typedef QSet<File> FileCont;
 
 inline KDE_EXPORT uint qHash(const File &key)
 {
-    return qHash(key.path()) + qHash(key.foundry());
+    return qHash(key.path()); // +qHash(key.index());
 }
 
 }
index 6f3e741..b245081 100644 (file)
@@ -68,7 +68,7 @@ typedef QSet<Style> StyleCont;
 
 inline KDE_EXPORT uint qHash(const Style &key)
 {
-    return key.value() + uint(key.scalable());
+    return key.value();
 }
 
 }