]> Git trees. - libqmvoc.git/commitdiff
only skip writing if text and practice count are empty
authorFrederik Gladhorn <gladhorn@kde.org>
Wed, 26 May 2010 13:27:00 +0000 (13:27 +0000)
committerFrederik Gladhorn <gladhorn@kde.org>
Wed, 26 May 2010 13:27:00 +0000 (13:27 +0000)
svn path=/branches/KDE/4.5/kdeedu/libkdeedu/; revision=1130813

keduvocdocument/keduvoctext.cpp

index 9a58fcc25f360ce51ae08936e588b5fb95395e37..4df6bd75ae24681e42faf717616fb383d303f890 100644 (file)
@@ -175,7 +175,7 @@ bool KEduVocText::operator ==(const KEduVocText & other) const
 void KEduVocText::toKVTML2(QDomElement& parent)
 {
     QDomDocument domDoc = parent.ownerDocument();
-    if (text().isEmpty()) {
+    if (d->m_text.isEmpty() && d->m_totalPracticeCount == 0) {
         return;
     }
 
@@ -183,7 +183,7 @@ void KEduVocText::toKVTML2(QDomElement& parent)
     KEduVocKvtml2Writer::appendTextElement( parent, KVTML_TEXT, text() );
 
     // grades
-    if ( practiceCount() > 0 ) {
+    if ( d->m_totalPracticeCount > 0 ) {
         QDomElement gradeElement = domDoc.createElement( KVTML_GRADE );
 
             //<currentgrade>2</currentgrade>