Bug #1911

Revise SessionItem::setData method

Added by pospelov about 3 years ago. Updated almost 3 years ago.

Status:ResolvedStart date:29 Nov 2017
Priority:NormalDue date:
Assignee:pospelov% Done:

0%

Category:-
Target version:Sprint 36

Description

There is a problem in unit test TestMaterialPropertyController (line 42) which appears only in Appveyor.

The test simply changes the item value once and then checks that ModelMapper emits signal also one time.
On Appveyor the signal emitted twice.

Within this item
  • write extended unit test which will checks signaling directly on SessionModel::setData
  • Investigate SessionItem::setData method, there is a hint from valgrind that something is wrong there

"Conditional jump depends on unitialized value:

bool SessionItem::setData(int role, const QVariant& value)
{
    role = (role == Qt::EditRole) ? Qt::DisplayRole : role;
    QVector<SessionItemData>::iterator it;
    for (it = m_values.begin(); it != m_values.end(); ++it) {
        if ((*it).role == role) {
            if (value.isValid()) {
--> line #414  if ((*it).value.type() == value.type() && (*it).value == value)

History

#1 Updated by pospelov almost 3 years ago

  • Assignee set to pospelov

#2 Updated by pospelov almost 3 years ago

  • Status changed from Sprint to Resolved

Also available in: Atom PDF