From: Frederik Gladhorn Date: Wed, 26 May 2010 13:27:00 +0000 (+0000) Subject: only skip writing if text and practice count are empty X-Git-Tag: v4.4.85~1 X-Git-Url: https://git.rmz.fi/?a=commitdiff_plain;h=6552c15756b4b114633fa83aa999e14974ddbba8;p=libqmvoc.git only skip writing if text and practice count are empty svn path=/branches/KDE/4.5/kdeedu/libkdeedu/; revision=1130813 --- 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