//<query>true</query>
currentElement = lessonElement.firstChildElement( KVTML_QUERY );
- if ( !currentElement.isNull() ) {
- m_doc->lesson(lessonId).setInQuery(currentElement.text() == KVTML_TRUE);
- }
+ m_doc->lesson(lessonId).setInQuery(currentElement.text() == KVTML_TRUE);
//<current>true</current>
currentElement = lessonElement.firstChildElement( KVTML_CURRENT );
}
}
- bool inQuery;
+ bool inQuery = false;
attribute = currentElement.attributeNode( KV_LESS_QUERY );
if ( !attribute.isNull() ) {
- inQuery = attribute.value().toInt() != 0;
+ inQuery = (attribute.value().toInt() != 0);
}
s = currentElement.text();
{
d->m_entries = other.d->m_entries;
d->m_name = other.d->m_name;
+ d->m_inQuery = other.d->m_inQuery;
}
KEduVocLesson::~KEduVocLesson()
{
d->m_entries = other.d->m_entries;
d->m_name = other.d->m_name;
+ d->m_inQuery = other.d->m_inQuery;
return *this;
}
bool KEduVocLesson::operator==(const KEduVocLesson &other)
{
- return d->m_entries == other.d->m_entries && d->m_name == other.d->m_name;
+ return d->m_entries == other.d->m_entries &&
+ d->m_name == other.d->m_name &&
+ d->m_inQuery == other.d->m_inQuery;;
}
void KEduVocLesson::setName( const QString &name )