diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:51:49 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:51:49 +0000 |
commit | 4ae0c208b66e0f7954e194384464fe2d0a2c56dd (patch) | |
tree | b0a7cd1c184f0003c0292eb416ed27f674f9cc43 /kbabel/common/stringdistance.h | |
parent | 1964ea0fb4ab57493ca2ebb709c8d3b5395fd653 (diff) | |
download | tdesdk-4ae0c208b66e0f7954e194384464fe2d0a2c56dd.tar.gz tdesdk-4ae0c208b66e0f7954e194384464fe2d0a2c56dd.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdesdk@1157652 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kbabel/common/stringdistance.h')
-rw-r--r-- | kbabel/common/stringdistance.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/kbabel/common/stringdistance.h b/kbabel/common/stringdistance.h index 6f5aa185..89c60627 100644 --- a/kbabel/common/stringdistance.h +++ b/kbabel/common/stringdistance.h @@ -34,7 +34,7 @@ #ifndef STRINGDISTANCE_H #define STRINGDISTANCE_H -#include <qstring.h> +#include <tqstring.h> //#include <boost/numeric/ublas/matrix.hpp> @@ -69,20 +69,20 @@ class Distance : public NonCopyable { public: virtual ~Distance(){} - double operator()(const QString& left, const QString& right); + double operator()(const TQString& left, const TQString& right); int editCostReplace() { return editCost_replace_base; } static int debug; protected: - virtual double calculate(const QString& left_string, const QString& right_string) = 0; - int nodeDistance(const QString& left_letter, const QString& right_letter); + virtual double calculate(const TQString& left_string, const TQString& right_string) = 0; + int nodeDistance(const TQString& left_letter, const TQString& right_letter); static const int editCost_replace_base; double m_distance; }; -double relativeDistance(double distance, const QString& left_string, const QString right_string); +double relativeDistance(double distance, const TQString& left_string, const TQString right_string); /** @@ -96,7 +96,7 @@ double relativeDistance(double distance, const QString& left_string, const QStri class HammingDistance : public Distance { protected: - virtual double calculate(const QString& left_string, const QString& right_string); + virtual double calculate(const TQString& left_string, const TQString& right_string); int editCostReplace() { return editCost; } static const int editCost; }; @@ -113,7 +113,7 @@ protected: class LevenshteinDistance : public Distance { protected: - virtual double calculate(const QString& left_string, const QString& right_string); + virtual double calculate(const TQString& left_string, const TQString& right_string); int editCostReplace() { return editCost_replace; } static const int editCost_replace; static const int editCost_insert; @@ -122,7 +122,7 @@ protected: /** wrapper function for replacement of fstrcmp from gettext */ -inline double fstrcmp(const QString& left, const QString& right) +inline double fstrcmp(const TQString& left, const TQString& right) { return LevenshteinDistance()(left,right); } |