<table><tr><td style="">aleksejshilin created this revision.<br />aleksejshilin added a reviewer: KDE PIM.<br />Restricted Application added a project: KDE PIM.<br />aleksejshilin requested review of this revision.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D10417" rel="noreferrer">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>When no default aggregation or theme is selected by user, Core::Manager<br />
picks the first one. The available ones were stored in QHash containers<br />
which, per Qt documentation, are ordered randomly:</p>

<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);">When iterating over a QMap, the items are always sorted by key. With
QHash, the items are arbitrarily ordered.</pre></div>

<p>Given that keys are generated in a way that they differ each time, the<br />
result of picking the first item was unpredictable.</p>

<p>This commit changes containers' type to QMap which guarantees order.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R94 PIM: Message Library</div></div></div><br /><div><strong>BRANCH</strong><div><div>fix_aggregations_and_themes_shuffle</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D10417" rel="noreferrer">https://phabricator.kde.org/D10417</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>messagelist/src/core/manager.cpp<br />
messagelist/src/core/manager.h<br />
messagelist/src/utils/configureaggregationsdialog.cpp<br />
messagelist/src/utils/configurethemesdialog.cpp</div></div></div><br /><div><strong>To: </strong>aleksejshilin, KDE PIM<br /><strong>Cc: </strong>dvasin, winterz, vkrause, mlaurent, knauss, dvratil<br /></div>