<table><tr><td style="">davidre added subscribers: dfaure, davidre.<br />davidre added a comment.
</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/D28649">View Revision</a></tr></table><br /><div><div><p>This causes expired notifications to not vanish any more. This is supposed to work in the following way <tt style="background: #ebebeb; font-size: 13px;">ExpiredRole</tt> is assigned <tt style="background: #ebebeb; font-size: 13px;">true</tt> and <tt style="background: #ebebeb; font-size: 13px;">NotficiationFilterProxyModel</tt> filters expired notifications out. I verified that upon timeout of the timer the data is updated correctly but the filter model behaves in a strange way. Even though filterAcceptsRow returns false the model still includes the index. I added the following debug output to the class: <a href="https://phabricator.kde.org/P584" class="remarkup-link" target="_blank" rel="noreferrer">https://phabricator.kde.org/P584</a><br />
Which results in this debug output</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);">QModelIndex(0,0,0x0,QConcatenateTablesProxyModel(0x557a51b00d90)) is expired
QModelIndex(-1,-1,0x0,QObject(0x0)) not expired
rowCount NotificationManager::NotificationFilterProxyModel(0x557a51f6ab00) QModelIndex(-1,-1,0x0,QObject(0x0)) 1
QModelIndex(0,0,0x0,QConcatenateTablesProxyModel(0x557a51b00d90)) is expired
filter returns for filterAcceptsRow(index(0, mapToSource(parent)) false
rowCount NotificationManager::NotificationFilterProxyModel(0x557a51f6ab00) QModelIndex(-1,-1,0x0,QObject(0x0)) 1
QModelIndex(0,0,0x0,QConcatenateTablesProxyModel(0x557a51b00d90)) is expired
filter returns for filterAcceptsRow(index(0, mapToSource(parent)) false</pre></div>
<p>So it still has one row even though the first row should get filtered.</p>
<p>Adding <a href="https://phabricator.kde.org/p/dfaure/" style="
border-color: #f1f7ff;
color: #19558d;
background-color: #f1f7ff;
border: 1px solid transparent;
border-radius: 3px;
font-weight: bold;
padding: 0 4px;">@dfaure</a> because he wrote both K/QConcatenate... models</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R120 Plasma Workspace</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D28649">https://phabricator.kde.org/D28649</a></div></div><br /><div><strong>To: </strong>broulik, Plasma<br /><strong>Cc: </strong>davidre, dfaure, plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, ragreen, ZrenBot, ngraham, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart<br /></div>