Merge lp://qastaging/~aacid/dee-qt/more_tests into lp://qastaging/dee-qt

Proposed by Albert Astals Cid
Status: Rejected
Rejected by: Albert Astals Cid
Proposed branch: lp://qastaging/~aacid/dee-qt/more_tests
Merge into: lp://qastaging/dee-qt
Diff against target: 617 lines (+301/-96)
13 files modified
debian/control (+3/-0)
deelistmodel.cpp (+4/-55)
deelistmodel.h (+4/-2)
deelistmodel_p.h (+73/-0)
modules/Dee/CMakeLists.txt (+1/-0)
tests/CMakeLists.txt (+22/-7)
tests/conversiontest.cpp (+2/-0)
tests/deelistmodelqmltest.cpp (+70/-0)
tests/deelistmodeltest.cpp (+40/-2)
tests/test-helper.cpp (+2/-0)
tests/test_qtquick1.qml (+0/-15)
tests/test_qtquick2.qml (+0/-15)
tests/tst_deelistmodel.qml (+80/-0)
To merge this branch: bzr merge lp://qastaging/~aacid/dee-qt/more_tests
Reviewer Review Type Date Requested Status
Michal Hruby (community) Needs Fixing
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+197220@code.qastaging.launchpad.net

Commit message

Add more tests

To post a comment you must log in.
86. By Albert Astals Cid

forgot to kill this

87. By Albert Astals Cid

We don't need this, do we?

88. By Albert Astals Cid

We don't need this either

89. By Albert Astals Cid

Why remove this?

90. By Albert Astals Cid

Not needed

91. By Albert Astals Cid

not really test related

Revision history for this message
Albert Astals Cid (aacid) wrote :

Question, do we want to leave the append/remove functions in DeeListModel or move them to TestDeeListModel since we only use it for the QML tests?

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Michal Hruby (mhr3) wrote :

> Question, do we want to leave the append/remove functions in DeeListModel or
> move them to TestDeeListModel since we only use it for the QML tests?

Definitely not for the public DeeListModel, if we want to turn the wrapper into a read-write model, there should be a good reason (not just add some tests).

review: Needs Fixing
Revision history for this message
Michal Hruby (mhr3) wrote :

What are the actual coverage numbers for before and after?

92. By Albert Astals Cid

Do not make test stuff public

93. By Albert Astals Cid

Forgot this file ^_^

Revision history for this message
Albert Astals Cid (aacid) wrote :

> > Question, do we want to leave the append/remove functions in DeeListModel or
> > move them to TestDeeListModel since we only use it for the QML tests?
>
> Definitely not for the public DeeListModel, if we want to turn the wrapper
> into a read-write model, there should be a good reason (not just add some
> tests).

Done

Revision history for this message
Paweł Stołowski (stolowski) wrote :

41 - m_parent->beginResetModel();
42 m_count = dee_model_get_n_rows(m_deeModel);
43 - m_parent->endResetModel();
44 Q_EMIT m_parent->countChanged();
45 }
46 else
47 @@ -156,6 +155,7 @@
48 g_signal_connect(m_deeModel, "notify::synchronized", G_CALLBACK(onSynchronizedChanged), m_parent);
49 m_listeningSynchronized = true;
50 }
51 + m_parent->endResetModel();

One observation: with that change we emit countChanged inside beginResetModel() -- endResetModel(), however if the backend dee model is not synchronized yet, we emit countChanged in onSynchronizedChanged() and it's outside of beginResetModel() -- endResetModel() there. I'm not sure if this is can have any side effects (probably not), but just mentioning it; perhaps it makes sense to make it consistent?

Unmerged revisions

93. By Albert Astals Cid

Forgot this file ^_^

92. By Albert Astals Cid

Do not make test stuff public

91. By Albert Astals Cid

not really test related

90. By Albert Astals Cid

Not needed

89. By Albert Astals Cid

Why remove this?

88. By Albert Astals Cid

We don't need this either

87. By Albert Astals Cid

We don't need this, do we?

86. By Albert Astals Cid

forgot to kill this

85. By Albert Astals Cid

Reuse tests from p:~unity-team/dee-qt/deevarianttext-and-tests

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to all changes: