diff options
| author | 2008-01-11 16:38:56 +0000 | |
|---|---|---|
| committer | 2008-01-11 16:38:56 +0000 | |
| commit | 9c57fb511378fabd7ba1ead3400ad19e95f43e66 (patch) | |
| tree | fea33181bcdfa29975cfdf3181f0bfaeb847f015 /src/modules/help | |
| parent | added czech .po (diff) | |
| download | KVIrc-9c57fb511378fabd7ba1ead3400ad19e95f43e66.tar.gz KVIrc-9c57fb511378fabd7ba1ead3400ad19e95f43e66.tar.bz2 KVIrc-9c57fb511378fabd7ba1ead3400ad19e95f43e66.zip | |
More work on the context module and some QT4 port in trunk: no longer use Q3PtrList but also leave the client code untouched
git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@1071 17fca916-40b9-46aa-a4ea-0a15b648b75c
Diffstat (limited to 'src/modules/help')
| -rwxr-xr-x | src/modules/help/index.cpp | 20 | ||||
| -rwxr-xr-x | src/modules/help/index.h | 11 |
2 files changed, 9 insertions, 22 deletions
diff --git a/src/modules/help/index.cpp b/src/modules/help/index.cpp index 540273d0e..d1c629793 100755 --- a/src/modules/help/index.cpp +++ b/src/modules/help/index.cpp @@ -69,23 +69,15 @@ #include <ctype.h> -#ifndef COMPILE_USE_QT4 -int TermList::compareItems( QPtrCollection::Item i1, QPtrCollection::Item i2 ) +int kvi_compare(const Term * p1,const Term * p2) { - - if( ( (Term*)i1 )->frequency == ( (Term*)i2 )->frequency ) - - return 0; - - if( ( (Term*)i1 )->frequency < ( (Term*)i2 )->frequency ) - - return -1; - - return 1; - + if(p1->frequency == p2->frequency) + return 0; + if(p1->frequency < p2->frequency) + return -1; + return 1; } -#endif QDataStream &operator>>( QDataStream &s, Document &l ) diff --git a/src/modules/help/index.h b/src/modules/help/index.h index fc8ab72a9..3d2abd996 100755 --- a/src/modules/help/index.h +++ b/src/modules/help/index.h @@ -116,14 +116,9 @@ struct Term { KviValueList<Document>documents; }; -class TermList : public KviPtrList<Term> -{ -public: - TermList() : KviPtrList<Term>() {} -#ifndef COMPILE_USE_QT4 - int compareItems( QPtrCollection::Item i1, QPtrCollection::Item i2 ); -#endif -}; + + +#define TermList KviPtrList<Term> #endif |
