]> Git trees. - libqmvoc.git/commitdiff
Remove very old search method. Never got used.
authorFrederik Gladhorn <gladhorn@kde.org>
Wed, 29 Aug 2007 17:06:48 +0000 (17:06 +0000)
committerFrederik Gladhorn <gladhorn@kde.org>
Wed, 29 Aug 2007 17:06:48 +0000 (17:06 +0000)
svn path=/trunk/KDE/kdeedu/libkdeedu/; revision=706187

keduvocdocument/keduvocdocument.cpp
keduvocdocument/keduvocdocument.h

index d5a267162bc1966b6e66b7b926d850e2e4296a89..4345abd91eb352f2015ec0e37cb5cb314c322b77 100644 (file)
@@ -1156,31 +1156,6 @@ bool KEduVocDocument::deleteLesson( int lessonIndex, int deleteMode )
 //  }
 //}
 
-int KEduVocDocument::search( const QString &substr, int id, int first, int last, bool word_start )
-{
-    if ( last >= entryCount() || last < 0 )
-        last = entryCount();
-
-    if ( first < 0 )
-        first = 0;
-
-    if ( id >= identifierCount() || last < first )
-        return -1;
-
-
-    for ( int i = first; i < last; i++ ) {
-        if ( word_start ) {
-            if ( entry( i )->translation( id ).text().indexOf( substr, 0, Qt::CaseInsensitive ) == 0 )    // case insensitive
-                return i;
-        } else {
-            if ( entry( i )->translation( id ).text().indexOf( substr, 0, Qt::CaseInsensitive ) > -1 )    // case insensitive
-                return i;
-        }
-
-    }
-    return -1;
-}
-
 
 QString KEduVocDocument::csvDelimiter() const
 {
index abd8183075409e2a9ebb741db4eb271379fb52a6..94cfd76185717f543a7272b5ea7bab95deda6f2a 100644 (file)
@@ -355,18 +355,6 @@ public:
      */
     KEduVocExpression *entry( int index );
 
-    /**
-     * Search substring in vocabulary (case insensitive always)
-     *
-     * @param substr     partial string to search
-     * @param id         which language to search: 0=org, 1..x=translation
-     * @param first      index from where to start
-     * @param last       index of last entry, -1 goes till end
-     * @param word_start false: search partial string,
-     *                   true:always from beginning of word
-     * @returns          the index of found entry, -1 if none
-     */
-    int search( const QString &substr, int id, int first=0, int last=-1, bool word_start = false );
 
     /**
      * Retrieves the identifiers for the current query