Merge lp:~mardy/accounts-qml-module/packaging into lp:accounts-qml-module

Proposed by Alberto Mardegan
Status: Merged
Approved by: Ken VanDine
Approved revision: no longer in the source branch.
Merged at revision: 42
Proposed branch: lp:~mardy/accounts-qml-module/packaging
Merge into: lp:accounts-qml-module
Diff against target: 21 lines (+2/-2)
1 file modified
src/account-service-model.cpp (+2/-2)
To merge this branch: bzr merge lp:~mardy/accounts-qml-module/packaging
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Ken VanDine Approve
Review via email: mp+202942@code.launchpad.net

Commit message

Merge from upstream

Do not pass negative ranges to model calls

Description of the change

Merge from upstream

Do not pass negative ranges to model calls

To post a comment you must log in.
Revision history for this message
Ken VanDine (ken-vandine) :
review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
42. By Albert Astals Cid

Merge from upstream

Do not pass negative ranges to model calls. Fixes: https://bugs.launchpad.net/bugs/1231697, https://bugs.launchpad.net/bugs/1255343, https://bugs.launchpad.net/bugs/1271039.

Approved by PS Jenkins bot, Ken VanDine.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/account-service-model.cpp'
2--- src/account-service-model.cpp 2013-11-13 11:48:31 +0000
3+++ src/account-service-model.cpp 2014-01-23 20:20:59 +0000
4@@ -285,7 +285,7 @@
5 updateQueued = false;
6 DEBUG();
7
8- q->beginRemoveRows(QModelIndex(), 0, modelItems.count() - 1);
9+ q->beginRemoveRows(QModelIndex(), 0, qMax(0, modelItems.count() - 1));
10 modelItems.clear();
11 qDeleteAll(allItems);
12 allItems.clear();
13@@ -341,7 +341,7 @@
14 }
15 }
16
17- q->beginInsertRows(QModelIndex(), 0, newModelItems.count() - 1);
18+ q->beginInsertRows(QModelIndex(), 0, qMax(0, newModelItems.count() - 1));
19 modelItems = newModelItems;
20 sortItems();
21 q->endInsertRows();

Subscribers

People subscribed via source and target branches