Summary: | Assert dragging desktop items | ||
---|---|---|---|
Product: | [Plasma] plasmashell | Reporter: | David Edmundson <kde> |
Component: | Folder | Assignee: | Eike Hein <hein> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | CC: | jaak, kdebugs, marv3fan, nate, notmart, plasma-bugs |
Priority: | NOR | ||
Version: | master | ||
Target Milestone: | 1.0 | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | https://commits.kde.org/plasma-desktop/1cb71a2cca8a46512f5ac0cb03da268dde8d9c7d | Version Fixed In: | |
Sentry Crash Report: |
Description
David Edmundson
2018-07-19 12:35:39 UTC
Pasting the code, though you'll see it yourself as soon as you open the file. ...do some changes const int newCount = rowCount(); if (newCount > oldCount) { ... beginInsertRows(QModelIndex(), oldCount, newCount - 1); endInsertRows(); } at the time of beginInsertRows rowCount must be the size it was before any changes, with the correct value at the time of endInsertRows This was always the case, but Qt5.11 now has an assert for it. Whether this has any real impact on non dev builds I don't know, but given how flaky QtQuick models can be, probably best to be as safe as possible. Patch waiting for review for a few days: https://phabricator.kde.org/D14243 Git commit 1cb71a2cca8a46512f5ac0cb03da268dde8d9c7d by Eike Hein. Committed on 01/08/2018 at 10:43. Pushed by hein into branch 'Plasma/5.12'. Fix bad model hygiene in Positioner::move() Summary: Don't change the proxy maps prior to insert/remove transactions so rowCount() at transaction start time matches the count passed into the method. The old code hits an ASSERT in Qt 5.11 otherwise. Care is taken not to emit dataChanged() in the middle of another transaction. Also cleaned up vestiges of caching lastRow(): This cache was evicted all over the places but never actually filled anymore, so maybe we don't need it. Reviewers: davidedmundson Subscribers: plasma-devel Tags: #plasma Differential Revision: https://phabricator.kde.org/D14243 M +32 -21 containments/desktop/plugins/folder/positioner.cpp M +0 -2 containments/desktop/plugins/folder/positioner.h https://commits.kde.org/plasma-desktop/1cb71a2cca8a46512f5ac0cb03da268dde8d9c7d According to the Plasma 5.13.5 changelog, this fix was reverted again in commit https://cgit.kde.org/plasma-desktop.git/commit/?id=f23b9dc0d57df80863e988208e60135a7f42ad12 So probably this issue should be reopened again? *** Bug 400533 has been marked as a duplicate of this bug. *** *** This bug has been marked as a duplicate of bug 421339 *** |