Merge lp:~aacid/accounts-qml-module/negativeIndexRanges into lp:accounts-qml-module

Proposed by Albert Astals Cid
Status: Rejected
Rejected by: Albert Astals Cid
Proposed branch: lp:~aacid/accounts-qml-module/negativeIndexRanges
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:~aacid/accounts-qml-module/negativeIndexRanges
Reviewer Review Type Date Requested Status
Albert Astals Cid (community) Needs Information
PS Jenkins bot (community) continuous-integration Approve
Alberto Mardegan Pending
Review via email: mp+202824@code.launchpad.net

Commit message

Do not pass negative ranges to model calls

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Alberto Mardegan (mardy) wrote :

Oops! Thanks Albert, the change looks good! However, the upstream project is at:
http://code.google.com/p/accounts-sso/source/list?repo=accounts-qml-module

Could you please file a bug there and attach your patch? If not, just let me know and I'll do that.

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

Send you an email with the patch, what should i do with this? Discard it?

review: Needs Information
Revision history for this message
Alberto Mardegan (mardy) wrote :

Yes please. I merged your changes upstream and now I'll bring them to launchpad:
https://code.launchpad.net/~mardy/accounts-qml-module/packaging/+merge/202942

Unmerged revisions

42. By Albert Astals Cid

Do not pass negative ranges to model calls

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/account-service-model.cpp'
--- src/account-service-model.cpp 2013-11-13 11:48:31 +0000
+++ src/account-service-model.cpp 2014-01-23 10:19:48 +0000
@@ -285,7 +285,7 @@
285 updateQueued = false;285 updateQueued = false;
286 DEBUG();286 DEBUG();
287287
288 q->beginRemoveRows(QModelIndex(), 0, modelItems.count() - 1);288 q->beginRemoveRows(QModelIndex(), 0, qMax(0, modelItems.count() - 1));
289 modelItems.clear();289 modelItems.clear();
290 qDeleteAll(allItems);290 qDeleteAll(allItems);
291 allItems.clear();291 allItems.clear();
@@ -341,7 +341,7 @@
341 }341 }
342 }342 }
343343
344 q->beginInsertRows(QModelIndex(), 0, newModelItems.count() - 1);344 q->beginInsertRows(QModelIndex(), 0, qMax(0, newModelItems.count() - 1));
345 modelItems = newModelItems;345 modelItems = newModelItems;
346 sortItems();346 sortItems();
347 q->endInsertRows();347 q->endInsertRows();

Subscribers

People subscribed via source and target branches