Fixed dictionary hashing
authorMateusz Półrola <mateusz.polrola@comarch.pl>
Thu, 9 Sep 2010 13:43:44 +0000 (15:43 +0200)
committerMateusz Półrola <mateusz.polrola@comarch.pl>
Thu, 9 Sep 2010 13:43:44 +0000 (15:43 +0200)
src/include/CommonDictInterface.h
src/plugins/google/GooglePlugin.h
src/plugins/xdxf/xdxfplugin.h

index a3c9790..19266e7 100644 (file)
@@ -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;
 
 };
index a87e7e9..3738664 100644 (file)
@@ -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;
index d47d43f..c81d47a 100644 (file)
@@ -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;