D10417: messagelist: Fix default aggregation and theme inconstancy
Алексей Шилин
noreply at phabricator.kde.org
Fri Feb 9 21:13:55 GMT 2018
aleksejshilin created this revision.
aleksejshilin added a reviewer: KDE PIM.
Restricted Application added a project: KDE PIM.
aleksejshilin requested review of this revision.
REVISION SUMMARY
When no default aggregation or theme is selected by user, Core::Manager
picks the first one. The available ones were stored in QHash containers
which, per Qt documentation, are ordered randomly:
When iterating over a QMap, the items are always sorted by key. With
QHash, the items are arbitrarily ordered.
Given that keys are generated in a way that they differ each time, the
result of picking the first item was unpredictable.
This commit changes containers' type to QMap which guarantees order.
REPOSITORY
R94 PIM: Message Library
BRANCH
fix_aggregations_and_themes_shuffle
REVISION DETAIL
https://phabricator.kde.org/D10417
AFFECTED FILES
messagelist/src/core/manager.cpp
messagelist/src/core/manager.h
messagelist/src/utils/configureaggregationsdialog.cpp
messagelist/src/utils/configurethemesdialog.cpp
To: aleksejshilin, #kde_pim
Cc: dvasin, winterz, vkrause, mlaurent, knauss, dvratil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20180209/98fb82d9/attachment.html>
More information about the kde-pim
mailing list