From 6552c15756b4b114633fa83aa999e14974ddbba8 Mon Sep 17 00:00:00 2001 From: Frederik Gladhorn Date: Wed, 26 May 2010 13:27:00 +0000 Subject: [PATCH] only skip writing if text and practice count are empty svn path=/branches/KDE/4.5/kdeedu/libkdeedu/; revision=1130813 --- keduvocdocument/keduvoctext.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keduvocdocument/keduvoctext.cpp b/keduvocdocument/keduvoctext.cpp index 9a58fcc..4df6bd7 100644 --- a/keduvocdocument/keduvoctext.cpp +++ b/keduvocdocument/keduvoctext.cpp @@ -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 ); //2 -- 2.47.3