]> Git trees. - libqmvoc.git/commitdiff
Fix appending language identifiers - only append them, if they are not already there.
authorFrederik Gladhorn <gladhorn@kde.org>
Thu, 14 Jun 2007 12:27:12 +0000 (12:27 +0000)
committerFrederik Gladhorn <gladhorn@kde.org>
Thu, 14 Jun 2007 12:27:12 +0000 (12:27 +0000)
svn path=/trunk/KDE/kdeedu/libkdeedu/; revision=675545

kdeeducore/keduvockvtmlreader.cpp

index 57534498914ed7e6f6137645b93f05ccd7bddd4d..7309ee82c0c49c84485eeeea3e483f990369f372 100644 (file)
@@ -1175,19 +1175,16 @@ bool KEduVocKvtmlReader::readExpression(QDomElement &domElementParent)
         if (m_doc->entryCount() == 0) { // this is because in kvtml the languages are saved in the FIRST ENTRY ONLY.
 kDebug() << " Read Expression with identifiers: " << i << endl;
             // new translation
-            if (lang.isEmpty())
-            {
-    kDebug() << "LANG IS EMPTY! " << endl;
-            if (i == 0)
-                lang = "original";
-            else
-            {
-                // no definition in first entry ?
-                lang.setNum(m_doc->identifierCount());
-                lang.prepend("translation ");
-            }
+            if (lang.isEmpty()) {
+                if (i == 0) {
+                    lang = "original";
+                } else {
+                    // no definition in first entry ?
+                    lang.setNum(m_doc->identifierCount());
+                    lang.prepend("translation ");
+                }
+                m_doc->appendIdentifier(lang);
             }
-            m_doc->appendIdentifier(lang);
         }
         else
         {