[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdevelop/lib/util
From: Harald Fernengel <harry () kdevelop ! org>
Date: 2005-10-30 18:36:08
Message-ID: 1130697368.381963.2723.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 475831 by harald:
contains is a bit too slow, use startsWith by default
M +2 -2 kfiltermodel.cpp
--- trunk/KDE/kdevelop/lib/util/kfiltermodel.cpp #475830:475831
@@ -207,7 +207,7 @@
}
/**
- * Matches an index in the model. The default implementation checks whether the item contains
+ * Matches an index in the model. The default implementation checks whether the item starts with
* the string set by setFilter().
*
* @param index The index to match
@@ -217,7 +217,7 @@
{
Q_ASSERT(index.isValid());
- return d->sourceModel->data(index).toString().contains(d->filterStr);
+ return d->sourceModel->data(index).toString().startsWith(d->filterStr);
}
QString KFilterModel::filter() const
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic