diff options
Diffstat (limited to 'src/classlist.cpp')
-rw-r--r-- | src/classlist.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/classlist.cpp b/src/classlist.cpp index d775679..d660102 100644 --- a/src/classlist.cpp +++ b/src/classlist.cpp @@ -16,6 +16,7 @@ #include "classlist.h" #include "config.h" +#include "util.h" ClassList::ClassList() : QList<ClassDef>() { @@ -30,10 +31,12 @@ int ClassList::compareItems(GCI item1, GCI item2) ClassDef *c1=(ClassDef *)item1; ClassDef *c2=(ClassDef *)item2; - int prefixLength = Config::ignorePrefix.length(); - int i1 = c1->name().left(prefixLength)==Config::ignorePrefix ? prefixLength : 0; - int i2 = c2->name().left(prefixLength)==Config::ignorePrefix ? prefixLength : 0; - return strcmp(c1->name().data()+i1,c2->name().data()+i2); + //int prefixLength = Config::ignorePrefix.length(); + //int i1 = c1->name().left(prefixLength)==Config::ignorePrefix ? prefixLength : 0; + //int i2 = c2->name().left(prefixLength)==Config::ignorePrefix ? prefixLength : 0; + return strcmp(c1->name().data()+getPrefixIndex(c1->name()), + c2->name().data()+getPrefixIndex(c2->name()) + ); } ClassListIterator::ClassListIterator(const ClassList &cllist) : |