diff options
Diffstat (limited to 'src/classlist.cpp')
-rw-r--r-- | src/classlist.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/classlist.cpp b/src/classlist.cpp index 518f757..d775679 100644 --- a/src/classlist.cpp +++ b/src/classlist.cpp @@ -2,7 +2,7 @@ * * $Id$ * - * Copyright (C) 1997-1999 by Dimitri van Heesch. + * Copyright (C) 1997-2000 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -15,6 +15,7 @@ */ #include "classlist.h" +#include "config.h" ClassList::ClassList() : QList<ClassDef>() { @@ -28,7 +29,11 @@ int ClassList::compareItems(GCI item1, GCI item2) { ClassDef *c1=(ClassDef *)item1; ClassDef *c2=(ClassDef *)item2; - return strcmp(c1->name(),c2->name()); + + 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); } ClassListIterator::ClassListIterator(const ClassList &cllist) : |