https://bugs.kde.org/show_bug.cgi?id=526173

            Bug ID: 526173
           Summary: QAbstractItemModel contract violation in
                    CompletionModel
    Classification: Applications
           Product: NeoChat
      Version First git master
       Reported In:
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: General
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
  Target Milestone: ---

At the time that it calls beginInsertRows() or beginRemoveRows(), the row count
should not have changed yet.
The following code added at the end of CompletionModelTest::multipleLists()
demonstrates the problem:

list3->setSize(list3->size() + 1); // error occurs here already
QCOMPARE(model->rowCount(), 8);

QCOMPARE(model->index(5).data(CompletionModel::TitleRole), u"Title 3 Index
5"_s);
QCOMPARE(model->index(6).data(CompletionModel::TitleRole), u"Title 3 Index
0"_s);

It results in:
FAIL!  : CompletionModelTest::multipleLists() Compared values are not the same
   Actual   (model->rowCount(parent))      : 7
   Expected (c.oldSize + (end - start + 1)): 8
   Loc:
[/home/horst/ksrc6/qt/dev/qtbase/src/testlib/qabstractitemmodeltester.cpp(866)]

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to