]> Git trees. - libqmvoc.git/commitdiff
Added new function indexOfIdentifier() [no const]
authorAvgoustinos Kadis <avgoustinos.kadis@kdemail.net>
Wed, 30 Jul 2008 07:55:45 +0000 (07:55 +0000)
committerAvgoustinos Kadis <avgoustinos.kadis@kdemail.net>
Wed, 30 Jul 2008 07:55:45 +0000 (07:55 +0000)
svn path=/trunk/KDE/kdeedu/libkdeedu/; revision=839513

keduvocdocument/keduvocdocument.cpp
keduvocdocument/keduvocdocument.h

index 169a348e22a88e3516903d982e937db5bfeed252..7b7f07ca1d4fa2ab5e3c16b4b7e4e0e57977e0f1 100644 (file)
@@ -695,13 +695,13 @@ void KEduVocDocument::setTenseDescriptions( const QStringList &names )
 }
 
 // works if const is removed
-// int KEduVocDocument::indexOfIdentifier( const QString &name ) const
-// {
-//     for (int i = 0; i < identifierCount(); i++)
-//         if (identifier(i).locale() == name)
-//             return i;
-//     return -1;
-// }
+int KEduVocDocument::indexOfIdentifier( const QString &name )
+{
+    for (int i = 0; i < identifierCount(); i++)
+        if (identifier(i).locale() == name)
+            return i;
+    return -1;
+}
 
 
 void KEduVocDocument::removeIdentifier( int index )
index 063c0f12329eb6473f0beeea88370fd2f207fc99..01da28ca692d3938c39a4d3698731367487cd7da 100644 (file)
@@ -251,6 +251,8 @@ public:
      */
     int indexOfIdentifier( const QString &name ) const;
 
+    int indexOfIdentifier( const QString &name );
+
     // *** tense methods ***
 
     /**