From 1275ef390da0f90d7749eee9d74f5dc533e69dc9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Mateusz=20P=C3=B3=C5=82rola?= Date: Thu, 9 Sep 2010 15:43:44 +0200 Subject: [PATCH] Fixed dictionary hashing --- src/include/CommonDictInterface.h | 7 +++---- src/plugins/google/GooglePlugin.h | 3 +-- src/plugins/xdxf/xdxfplugin.h | 2 -- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/include/CommonDictInterface.h b/src/include/CommonDictInterface.h index a3c9790..19266e7 100644 --- a/src/include/CommonDictInterface.h +++ b/src/include/CommonDictInterface.h @@ -76,13 +76,13 @@ class CommonDictInterface : public QObject, public AccentsNormalizer { virtual QString search(QString key) = 0; //! \returns unique value (unique for every dictionary, not plugin) - uint hash() const { + virtual uint hash() const { return _hash; } //! sets unique value (unique for every dictionary, not plugin) - void setHash(uint) { - this->_hash=_hash; + virtual void setHash(uint h) { + this->_hash=h; } //! returns current plugin settings @@ -137,7 +137,6 @@ protected: return string; } -private: uint _hash; }; diff --git a/src/plugins/google/GooglePlugin.h b/src/plugins/google/GooglePlugin.h index a87e7e9..3738664 100644 --- a/src/plugins/google/GooglePlugin.h +++ b/src/plugins/google/GooglePlugin.h @@ -140,8 +140,7 @@ private: QString _type; //! information about dictionary QString _infoNote; - //! unique number of a dictionary assigned to it by backbone - uint _hash; + //! icon displayed during translations and when the dictionary is chosen QIcon _icon; Settings *_settings; diff --git a/src/plugins/xdxf/xdxfplugin.h b/src/plugins/xdxf/xdxfplugin.h index d47d43f..c81d47a 100644 --- a/src/plugins/xdxf/xdxfplugin.h +++ b/src/plugins/xdxf/xdxfplugin.h @@ -175,8 +175,6 @@ private: QString _dictionaryInfo; - //! unique number of a dictionary assigned to it by backbone - uint _hash; //! icon displayed during translations and when the dictionary is chosen QIcon _icon; QSqlDatabase db; -- 1.7.9.5