svn path=/trunk/KDE/kdeedu/libkdeedu/; revision=847446
void KEduVocExpression::removeTranslation( int index )
{
+ int count = d->m_translations.count();
+
// remove the index we delete
- d->m_translations.remove(index);
+ delete d->m_translations.take(index);
- // shift all other indexes
- for ( int j = index; j < d->m_translations.count() - 1; j++ ) {
+ // shift all other indexes, +1 for the deleted
+ for (int j = index; j < count-1; j++) {
d->m_translations[j] = d->m_translations.take(j+1);
}
}