<table><tr><td style="">broulik 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/D28744">View Revision</a></tr></table><br /><div><div><p>Very nice!<br />
I really like the default shortcuts with checkboxes with additional ones to the right.</p></div></div><br /><div><strong>INLINE COMMENTS</strong><div><div style="margin: 6px 0 12px 0;"><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D28744#inline-164193">View Inline</a><span style="color: #4b4d51; font-weight: bold;">filteredmodel.cpp:40</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">const</span> <span class="n">QModelIndex</span> <span class="n">index</span> <span style="color: #aa2211">=</span> <span class="n">sourceModel</span><span class="p">()</span><span style="color: #aa2211">-></span><span class="n">index</span><span class="p">(</span><span class="n">source_row</span><span class="p">,</span> <span style="color: #601200">0</span><span class="p">,</span> <span class="n">source_parent</span><span class="p">);</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">bool</span> <span class="n">displayMatches</span> <span style="color: #aa2211">=</span> <span class="n">index</span><span class="p">.</span><span class="n">data</span><span class="p">(</span><span class="n">Qt</span><span style="color: #aa2211">::</span><span class="n">DisplayRole</span><span class="p">).</span><span class="n">toString</span><span class="p">().</span><span class="n">contains</span><span class="p">(</span><span class="n">m_filter</span><span class="p">,</span> <span class="n">Qt</span><span style="color: #aa2211">::</span><span class="n">CaseInsensitive</span><span class="p">);</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">if</span> <span class="p">(</span><span style="color: #aa2211">!</span><span class="n">source_parent</span><span class="p">.</span><span class="n">isValid</span><span class="p">()</span> <span style="color: #aa2211">||</span> <span class="n">displayMatches</span><span class="p">)</span> <span class="p">{</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;"><tt style="background: #ebebeb; font-size: 13px;">const bool</tt></p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D28744#inline-164192">View Inline</a><span style="color: #4b4d51; font-weight: bold;">filteredmodel.cpp:41</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">bool</span> <span class="n">displayMatches</span> <span style="color: #aa2211">=</span> <span class="n">index</span><span class="p">.</span><span class="n">data</span><span class="p">(</span><span class="n">Qt</span><span style="color: #aa2211">::</span><span class="n">DisplayRole</span><span class="p">).</span><span class="n">toString</span><span class="p">().</span><span class="n">contains</span><span class="p">(</span><span class="n">m_filter</span><span class="p">,</span> <span class="n">Qt</span><span style="color: #aa2211">::</span><span class="n">CaseInsensitive</span><span class="p">);</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">if</span> <span class="p">(</span><span style="color: #aa2211">!</span><span class="n">source_parent</span><span class="p">.</span><span class="n">isValid</span><span class="p">()</span> <span style="color: #aa2211">||</span> <span class="n">displayMatches</span><span class="p">)</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">return</span> <span class="n">displayMatches</span><span class="p">;</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">Why this <tt style="background: #ebebeb; font-size: 13px;">!source_parent.isValid()</tt> check?</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D28744#inline-164194">View Inline</a><span style="color: #4b4d51; font-weight: bold;">filteredmodel.cpp:45</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">if</span> <span class="p">(</span><span class="n">index</span><span class="p">.</span><span class="n">parent</span><span class="p">().</span><span class="n">data</span><span class="p">(</span><span class="n">Qt</span><span style="color: #aa2211">::</span><span class="n">DisplayRole</span><span class="p">).</span><span class="n">toString</span><span class="p">().</span><span class="n">contains</span><span class="p">(</span><span class="n">m_filter</span><span class="p">,</span> <span class="n">Qt</span><span style="color: #aa2211">::</span><span class="n">CaseInsensitive</span><span class="p">))</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">return</span> <span style="color: #304a96">true</span><span class="p">;</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">Shouldn't recursive filtering take care of this?</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D28744#inline-164198">View Inline</a><span style="color: #4b4d51; font-weight: bold;">filteredmodel.cpp:50</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">const</span> <span style="color: #aa4000">auto</span> <span style="color: #aa2211">&</span><span class="n">defaultShortcuts</span> <span style="color: #aa2211">=</span> <span class="n">index</span><span class="p">.</span><span class="n">data</span><span class="p">(</span><span class="n">ShortcutsModel</span><span style="color: #aa2211">::</span><span class="n">DefaultShortcutsRole</span><span class="p">);</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">for</span> <span class="p">(</span><span style="color: #aa4000">const</span> <span style="color: #aa4000">auto</span><span style="color: #aa2211">&</span> <span style="color: #a0a000">shortcut</span> <span class="p">:</span> <span class="n">defaultShortcuts</span><span class="p">.</span><span class="n">value</span><span style="color: #aa2211"><</span><span class="n">QSet</span><span style="color: #aa2211"><</span><span class="n">QKeySequence</span><span style="color: #aa2211">>></span><span class="p">())</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">if</span> <span class="p">(</span><span class="n">shortcut</span><span class="p">.</span><span class="n">toString</span><span class="p">(</span><span class="n">QKeySequence</span><span style="color: #aa2211">::</span><span class="n">NativeText</span><span class="p">).</span><span class="n">contains</span><span class="p">(</span><span class="n">m_filter</span><span class="p">,</span> <span class="n">Qt</span><span style="color: #aa2211">::</span><span class="n">CaseInsensitive</span><span class="p">))</span> <span class="p">{</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">Put the <tt style="background: #ebebeb; font-size: 13px;">.value<QSet<...>></tt> in the line above outside the <tt style="background: #ebebeb; font-size: 13px;">for</tt></p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D28744#inline-164189">View Inline</a><span style="color: #4b4d51; font-weight: bold;">filteredmodel.h:26</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"><span class="n">class</span> <span style="color: #a0a000">FilteredShortcutsModel</span> <span class="p">:</span> <span class="n">public</span> <span class="n">QSortFilterProxyModel</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="n">Q_OBJECT</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">Coding style, <tt style="background: #ebebeb; font-size: 13px;">{</tt> on next line</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D28744#inline-164190">View Inline</a><span style="color: #4b4d51; font-weight: bold;">filteredmodel.h:32</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"><span style="color: #a0a000">public</span><span class="p">:</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="n">FilteredShortcutsModel</span><span class="p">(</span><span class="n">QObject</span> <span style="color: #aa2211">*</span><span class="n">parent</span><span class="p">);</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;"><tt style="background: #ebebeb; font-size: 13px;">explicit</tt></p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D28744#inline-164191">View Inline</a><span style="color: #4b4d51; font-weight: bold;">filteredmodel.h:34</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">bool</span> <span style="color: #004012">filterAcceptsRow</span><span class="p">(</span><span style="color: #aa4000">int</span> <span class="n">source_row</span><span class="p">,</span> <span style="color: #aa4000">const</span> <span class="n">QModelIndex</span> <span style="color: #aa2211">&</span> <span class="n">source_parent</span><span class="p">)</span> <span style="color: #aa4000">const</span> <span class="n">override</span><span class="p">;</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">Coding style: <tt style="background: #ebebeb; font-size: 13px;">const QModelIndex &soure_parent</tt></p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D28744#inline-164222">View Inline</a><span style="color: #4b4d51; font-weight: bold;">kcm_keys.cpp:51</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="n">KAboutData</span> <span style="color: #aa2211">*</span><span class="n">about</span> <span style="color: #aa2211">=</span> <span style="color: #aa4000">new</span> <span class="n">KAboutData</span><span class="p">(</span><span class="n">QStringLiteral</span><span class="p">(</span><span style="color: #766510">"kcm_keys"</span><span class="p">),</span> <span class="n">i18n</span><span class="p">(</span><span style="color: #766510">"Global Shortcuts"</span><span class="p">),</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="n">QStringLiteral</span><span class="p">(</span><span style="color: #766510">"1.0"</span><span class="p">),</span> <span class="n">QString</span><span class="p">(),</span> <span class="n">KAboutLicense</span><span style="color: #aa2211">::</span><span class="n">GPL</span><span class="p">);</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="n">about</span><span style="color: #aa2211">-></span><span class="n">addAuthor</span><span class="p">(</span><span class="n">i18n</span><span class="p">(</span><span style="color: #766510">"David Redondo"</span><span class="p">),</span> <span class="n">QString</span><span class="p">(),</span> <span class="n">QStringLiteral</span><span class="p">(</span><span style="color: #766510">"kde@david-redondo.de"</span><span class="p">));</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">I guess this can be 2.0 at this point :)</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D28744#inline-164223">View Inline</a><span style="color: #4b4d51; font-weight: bold;">kcm_keys.cpp:106</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"><span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">return</span> <span class="n">m_lastError</span><span class="p">;</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"><span class="p">}</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">Not a huge fan of this <tt style="background: #ebebeb; font-size: 13px;">lastError</tt> bookkeeping in the KCM</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D28744#inline-164225">View Inline</a><span style="color: #4b4d51; font-weight: bold;">kcm_keys.cpp:153</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"><span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">auto</span> <span class="n">dialog</span> <span style="color: #aa2211">=</span> <span style="color: #aa4000">new</span> <span class="n">KOpenWithDialog</span><span class="p">;</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="n">dialog</span><span style="color: #aa2211">-></span><span class="n">hideRunInTerminal</span><span class="p">();</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">Set a transient parent on the dialog like so:</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);">void KCMKeys::addApplication(QQuickItem *ctx)
{
auto *dialog = new KOpenWithDialog;
if (ctx && ctx->window()) {
dialog->winId(); // so it creates windowHandle
dialog->windowHandle()->setTransientParent(QQuickRenderControl::renderWindowFor(ctx->window()));
dialog->setWindowModality(Qt::WindowModal);
}
...
}</pre></div>
<p style="padding: 0; margin: 8px;">Then call in QML like <tt style="background: #ebebeb; font-size: 13px;">onClicked: kcm.addApplication(this)</tt></p>
<p style="padding: 0; margin: 8px;">Also, you might want to set <tt style="background: #ebebeb; font-size: 13px;">dialog->setAttribute(Qt::WA_DeleteOnClose);</tt> so you don't need to <tt style="background: #ebebeb; font-size: 13px;">deleteLater()</tt> yourself.</p>
<p style="padding: 0; margin: 8px;">(I believe the <tt style="background: #ebebeb; font-size: 13px;">QQuickRenderControl</tt> use may not be necessary when in the same process but I recall it behaving funky in <tt style="background: #ebebeb; font-size: 13px;">QQuickWidget</tt> in some cases on Wayland otherwise)</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D28744#inline-164224">View Inline</a><span style="color: #4b4d51; font-weight: bold;">kcm_keys.cpp:159</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">const</span> <span class="n">KService</span><span style="color: #aa2211">::</span><span class="n">Ptr</span> <span class="n">service</span> <span style="color: #aa2211">=</span> <span class="n">dialog</span><span style="color: #aa2211">-></span><span class="n">service</span><span class="p">();</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="n">QString</span> <span class="n">desktopFileName</span> <span style="color: #aa2211">=</span> <span class="n">service</span><span style="color: #aa2211">-></span><span class="n">entryPath</span><span class="p">().</span><span class="n">split</span><span class="p">(</span><span style="color: #766510">'/'</span><span class="p">).</span><span class="n">last</span><span class="p">();</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">if</span> <span class="p">(</span><span class="n">m_shortcutsModel</span><span style="color: #aa2211">-></span><span class="n">match</span><span class="p">(</span><span class="n">m_shortcutsModel</span><span style="color: #aa2211">-></span><span class="n">index</span><span class="p">(</span><span style="color: #601200">0</span><span class="p">,</span> <span style="color: #601200">0</span><span class="p">),</span> <span class="n">ShortcutsModel</span><span style="color: #aa2211">::</span><span class="n">ComponentRole</span><span class="p">,</span> <span class="n">desktopFileName</span><span class="p">).</span><span class="n">isEmpty</span><span class="p">())</span> <span class="p">{</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">Perhaps use <tt style="background: #ebebeb; font-size: 13px;">KService::desktopEntryName</tt></p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D28744#inline-163786">View Inline</a><span style="color: #4b4d51; font-weight: bold;">kcm_keys.h:51</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="n">Q_INVOKABLE</span> <span style="color: #aa4000">void</span> <span style="color: #004012">loadScheme</span><span class="p">(</span><span style="color: #aa4000">const</span> <span class="n">QUrl</span> <span style="color: #aa2211">&</span><span class="n">url</span><span class="p">);</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="n">Q_INVOKABLE</span> <span class="n">QVariantList</span> <span style="color: #004012">defaultSchemes</span><span class="p">();</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;"><tt style="background: #ebebeb; font-size: 13px;">const</tt></p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D28744#inline-163787">View Inline</a><span style="color: #4b4d51; font-weight: bold;">kcm_keys.h:54</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="n">Q_INVOKABLE</span> <span style="color: #aa4000">void</span> <span style="color: #004012">addApplication</span><span class="p">();</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="n">Q_INVOKABLE</span> <span class="n">QString</span> <span style="color: #004012">keySequenceToString</span><span class="p">(</span><span style="color: #aa4000">const</span> <span class="n">QKeySequence</span> <span style="color: #aa2211">&</span><span class="n">keySequence</span><span class="p">);</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">I presume <tt style="background: #ebebeb; font-size: 13px;">QKeySequence</tt> is opaque to QML? Also, <tt style="background: #ebebeb; font-size: 13px;">const</tt></p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D28744#inline-164243">View Inline</a><span style="color: #4b4d51; font-weight: bold;">ShortcutActionDelegate.qml:30</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #004012">property</span> <span style="color: #304a96">int</span> <span style="color: #aa4000">oldHeight:</span> <span style="color: #004012">height</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">sourceComponent:</span> <span style="color: #004012">ListView</span><span class="p">.</span><span style="color: #004012">isCurrentItem</span> <span style="color: #aa2211">?</span> <span style="color: #aa4000">editRepresentation :</span> <span style="color: #004012">compactRepresentation</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">ListView.onIsCurrentItemChanged:</span> <span class="p">{</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">I find the transition between editing and display state somewhat jarring</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D28744#inline-164244">View Inline</a><span style="color: #4b4d51; font-weight: bold;">ShortcutActionDelegate.qml:58</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">if</span> <span class="p">(</span><span style="color: #004012">model</span><span class="p">.</span><span style="color: #004012">activeShortcuts</span><span class="p">.</span><span style="color: #004012">length</span> <span style="color: #aa2211">!=</span> <span style="color: #601200">0</span><span class="p">)</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">return</span> <span style="color: #004012">model</span><span class="p">.</span><span style="color: #004012">display</span> <span style="color: #aa2211">+</span> <span style="color: #766510">": "</span> <span style="color: #aa2211">+</span> <span style="color: #004012">model</span><span class="p">.</span><span style="color: #004012">activeShortcuts</span><span class="p">.</span><span style="color: #004012">map</span><span class="p">(</span><span style="color: #004012">s</span> <span style="color: #aa2211">=></span> <span style="color: #004012">kcm</span><span class="p">.</span><span style="color: #004012">keySequenceToString</span><span class="p">(</span><span style="color: #004012">s</span><span class="p">)).</span><span style="color: #004012">join</span><span class="p">(</span><span style="color: #766510">", "</span><span class="p">)</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="p">}</span> <span style="color: #aa4000">else</span> <span class="p">{</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">Please use <tt style="background: #ebebeb; font-size: 13px;">i18n</tt></p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D28744#inline-164227">View Inline</a><span style="color: #4b4d51; font-weight: bold;">main.qml:33</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">enabled:</span> <span style="color: #004012">kcm</span><span class="p">.</span><span style="color: #004012">lastError</span> <span style="color: #aa2211">==</span> <span style="color: #766510">""</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #004012">property</span> <span style="color: #004012">bool</span> <span style="color: #aa4000">exportActive:</span> <span style="color: #004012">exportInfo</span><span class="p">.</span><span style="color: #004012">visible</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #004012">ColumnLayout</span><span class="p">{</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">This appears to loop? <tt style="background: #ebebeb; font-size: 13px;">exportInfo</tt>'s <tt style="background: #ebebeb; font-size: 13px;">visible</tt> is bound to this</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D28744#inline-164228">View Inline</a><span style="color: #4b4d51; font-weight: bold;">main.qml:34</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #004012">property</span> <span style="color: #004012">bool</span> <span style="color: #aa4000">exportActive:</span> <span style="color: #004012">exportInfo</span><span class="p">.</span><span style="color: #004012">visible</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #004012">ColumnLayout</span><span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #74777d">// otherwise we get scrollbars</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">Coding style: <tt style="background: #ebebeb; font-size: 13px;">ColumnLayout {</tt></p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D28744#inline-164229">View Inline</a><span style="color: #4b4d51; font-weight: bold;">main.qml:36</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #74777d">// otherwise we get scrollbars</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">height:</span> <span style="color: #004012">root</span><span class="p">.</span><span style="color: #004012">availableHeight</span> <span style="color: #aa2211">-</span> <span style="color: #004012">Kirigami</span><span class="p">.</span><span style="color: #004012">Units</span><span class="p">.</span><span style="color: #004012">smallSpacing</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">width:</span> <span style="color: #004012">root</span><span class="p">.</span><span style="color: #004012">availableWidth</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">Huh?</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D28744#inline-164230">View Inline</a><span style="color: #4b4d51; font-weight: bold;">main.qml:40</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">Layout.fillWidth:</span> <span style="color: #000a65">true</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">visible:</span> <span style="color: #004012">kcm</span><span class="p">.</span><span style="color: #004012">lastError</span> <span style="color: #aa2211">!=</span> <span style="color: #766510">""</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">text:</span> <span style="color: #004012">kcm</span><span class="p">.</span><span style="color: #004012">lastError</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">Coding style, also <tt style="background: #ebebeb; font-size: 13px;">!==</tt></p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D28744#inline-164231">View Inline</a><span style="color: #4b4d51; font-weight: bold;">main.qml:53</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">enabled:</span> <span style="color: #004012">exportWarning</span><span class="p">.</span><span style="color: #004012">visible</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">function</span> <span style="color: #004012">onNeedsSaveChanged</span> <span class="p">()</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #004012">exportWarning</span><span class="p">.</span><span style="color: #004012">visible</span> <span style="color: #aa2211">=</span> <span style="color: #004012">kcm</span><span class="p">.</span><span style="color: #004012">needsSave</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">What Qt version was that changed, 5.14?<br />
Also why not just bind?</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D28744#inline-164232">View Inline</a><span style="color: #4b4d51; font-weight: bold;">main.qml:87</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">Component.onCompleted:</span> <span style="color: #004012">background</span><span class="p">.</span><span style="color: #004012">visible</span> <span style="color: #aa2211">=</span> <span style="color: #000a65">true</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">Layout.preferredWidth:</span> <span style="color: #601200">300</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">Layout.fillHeight:</span><span style="color: #000a65">true</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;"><tt style="background: #ebebeb; font-size: 13px;">Kirigami.Units.gridUnit</tt> and/or maybe proportional to the window width?</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D28744#inline-164233">View Inline</a><span style="color: #4b4d51; font-weight: bold;">main.qml:94</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">delegate:</span> <span style="color: #004012">Kirigami</span><span class="p">.</span><span style="color: #004012">AbstractListItem</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #004012">RowLayout</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #004012">Kirigami</span><span class="p">.</span><span style="color: #004012">Icon</span> <span class="p">{</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">Is <tt style="background: #ebebeb; font-size: 13px;">contentItem</tt> the default property?</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D28744#inline-164234">View Inline</a><span style="color: #4b4d51; font-weight: bold;">main.qml:102</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">Layout.fillWidth:</span> <span style="color: #000a65">true</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">text:</span> <span style="color: #004012">model</span><span class="p">.</span><span style="color: #004012">display</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="p">}</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">Make sure to replicate the color behavior on hover and when selected, right now text stays black with the blue selection background behind it</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D28744#inline-164236">View Inline</a><span style="color: #4b4d51; font-weight: bold;">main.qml:114</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">section.delegate:</span> <span style="color: #004012">Kirigami</span><span class="p">.</span><span style="color: #004012">ListSectionHeader</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">label:</span> <span style="color: #004012">section</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="p">}</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">Perhaps you could put a checkbox here so one check all items in a section</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D28744#inline-164237">View Inline</a><span style="color: #4b4d51; font-weight: bold;">main.qml:141</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">icon.name:</span> <span style="color: #766510">"list-add"</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">text:</span> <span style="color: #004012">i18n</span><span class="p">(</span><span style="color: #766510">"Add application..."</span><span class="p">)</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">onClicked:</span> <span class="p">{</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">Capitalize: "Add Application..."</p>
<p style="padding: 0; margin: 8px;">How do I remove applications again, though?</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D28744#inline-164238">View Inline</a><span style="color: #4b4d51; font-weight: bold;">main.qml:157</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">icon.name:</span> <span style="color: #766510">"document-export"</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">text:</span><span style="color: #004012">i18n</span><span class="p">(</span><span style="color: #766510">"Export Scheme..."</span><span class="p">)</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">onClicked:</span> <span class="p">{</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">I kinda think this button should turn into a "Cancel Export" button when exporting? Not sure that closing the message widget is obvious enough to the user?</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D28744#inline-164239">View Inline</a><span style="color: #4b4d51; font-weight: bold;">main.qml:160</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">if</span> <span class="p">(</span><span style="color: #004012">kcm</span><span class="p">.</span><span style="color: #004012">needsSave</span><span class="p">)</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #004012">exportWarning</span><span class="p">.</span><span style="color: #004012">visible</span> <span style="color: #aa2211">=</span> <span style="color: #000a65">true</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="p">}</span> <span style="color: #aa4000">else</span> <span class="p">{</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">You're doing a <tt style="background: #ebebeb; font-size: 13px;">Connections</tt> above already.</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D28744#inline-164240">View Inline</a><span style="color: #4b4d51; font-weight: bold;">main.qml:163</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #004012">search</span><span class="p">.</span><span style="color: #004012">text</span> <span style="color: #aa2211">=</span> <span style="color: #766510">""</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #004012">kcm</span><span class="p">.</span><span style="color: #004012">filteredModel</span><span class="p">.</span><span style="color: #004012">filter</span> <span style="color: #aa2211">=</span> <span style="color: #766510">""</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #004012">exportInfo</span><span class="p">.</span><span style="color: #004012">visible</span> <span style="color: #aa2211">=</span> <span style="color: #000a65">true</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">This should just be bound to the <tt style="background: #ebebeb; font-size: 13px;">search.text</tt> and work automatically</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D28744#inline-164241">View Inline</a><span style="color: #4b4d51; font-weight: bold;">main.qml:164</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #004012">kcm</span><span class="p">.</span><span style="color: #004012">filteredModel</span><span class="p">.</span><span style="color: #004012">filter</span> <span style="color: #aa2211">=</span> <span style="color: #766510">""</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #004012">exportInfo</span><span class="p">.</span><span style="color: #004012">visible</span> <span style="color: #aa2211">=</span> <span style="color: #000a65">true</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="p">}</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">You seem to love being overly explicit with this? :P You have a binding above already...</p>
<p style="padding: 0; margin: 8px;">Perhaps run the application with <tt style="background: #ebebeb; font-size: 13px;">QT_LOGGING_RULES="qt.qml.binding.removal.info=true"</tt> to clean those up</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D28744#inline-164242">View Inline</a><span style="color: #4b4d51; font-weight: bold;">main.qml:224</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="p">}</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #004012">importSheet</span><span class="p">.</span><span style="color: #004012">close</span><span class="p">()</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="p">}</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">Found it a bit odd that the overlaysheet suddenly closed as a result.<br />
I would have expected clicking "Select File", choosing one, and then it being added to and selected in the combox list and then confirming this by clicking "Import"</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D28744#inline-163792">View Inline</a><span style="color: #4b4d51; font-weight: bold;">main.qml:30</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">id: root</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">implicitWidth:</span> <span style="color: #601200">1000</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">implicitHeight:</span> <span style="color: #601200">400</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;"><tt style="background: #ebebeb; font-size: 13px;">Kirigami.Units.gridUnit</tt></p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D28744#inline-164200">View Inline</a><span style="color: #4b4d51; font-weight: bold;">shortcutsmodel.cpp:38</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"><span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="n">QStringList</span> <span class="n">actionId</span><span class="p">{</span><span style="color: #766510">""</span><span class="p">,</span> <span style="color: #766510">""</span><span class="p">,</span> <span style="color: #766510">""</span><span class="p">,</span> <span style="color: #766510">""</span><span class="p">};</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="n">actionId</span><span class="p">[</span><span class="n">KGlobalAccel</span><span style="color: #aa2211">::</span><span class="n">ComponentUnique</span><span class="p">]</span> <span style="color: #aa2211">=</span> <span class="n">componentUnique</span><span class="p">;</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">Hmm...<br />
how about</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);">QStringList actionId;
actionId.reserve(4);</pre></div></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D28744#inline-164203">View Inline</a><span style="color: #4b4d51; font-weight: bold;">shortcutsmodel.cpp:60</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="n">m_components</span><span class="p">.</span><span class="n">clear</span><span class="p">();</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="n">QDBusReply</span><span style="color: #aa2211"><</span><span class="n">QList</span><span style="color: #aa2211"><</span><span class="n">QStringList</span><span style="color: #aa2211">>></span> <span class="n">componentsReply</span> <span style="color: #aa2211">=</span> <span class="n">m_globalAccelInterface</span><span style="color: #aa2211">-></span><span class="n">allMainComponents</span><span class="p">();</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">if</span> <span class="p">(</span><span style="color: #aa2211">!</span><span class="n">componentsReply</span><span class="p">.</span><span class="n">isValid</span><span class="p">())</span> <span class="p">{</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">Do this asynchronously with <tt style="background: #ebebeb; font-size: 13px;">QDBusPendingCallWatcher</tt>? Not sure if it really matters here</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D28744#inline-164206">View Inline</a><span style="color: #4b4d51; font-weight: bold;">shortcutsmodel.cpp:66</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">const</span> <span style="color: #aa4000">auto</span> <span class="n">components</span> <span style="color: #aa2211">=</span> <span class="n">componentsReply</span><span class="p">.</span><span class="n">value</span><span class="p">();</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">for</span><span class="p">(</span><span style="color: #aa4000">const</span> <span style="color: #aa4000">auto</span> <span style="color: #aa2211">&</span><span style="color: #a0a000">component</span> <span class="p">:</span> <span class="n">components</span><span class="p">)</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="n">m_components</span><span class="p">.</span><span class="n">push_back</span><span class="p">(</span><span class="n">loadComponent</span><span class="p">(</span><span class="n">component</span><span class="p">));</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">Coding style, space after for <tt style="background: #ebebeb; font-size: 13px;">for (const auto &...)</tt></p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D28744#inline-164205">View Inline</a><span style="color: #4b4d51; font-weight: bold;">shortcutsmodel.cpp:70</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="n">std</span><span style="color: #aa2211">::</span><span class="n">sort</span><span class="p">(</span><span class="n">m_components</span><span class="p">.</span><span class="n">begin</span><span class="p">(),</span> <span class="n">m_components</span><span class="p">.</span><span class="n">end</span><span class="p">(),</span> <span class="p">[](</span><span style="color: #aa4000">const</span> <span class="n">Component</span> <span style="color: #aa2211">&</span><span class="n">c1</span><span class="p">,</span> <span style="color: #aa4000">const</span> <span class="n">Component</span> <span style="color: #aa2211">&</span><span class="n">c2</span><span class="p">){</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">return</span> <span class="n">c1</span><span class="p">.</span><span class="n">type</span> <span style="color: #aa2211">!=</span> <span class="n">c2</span><span class="p">.</span><span class="n">type</span> <span style="color: #aa2211">?</span> <span class="n">c1</span><span class="p">.</span><span class="n">type</span> <span style="color: #aa2211"><</span> <span class="n">c2</span><span class="p">.</span><span style="color: #a0a000">type</span> <span class="p">:</span> <span class="n">c1</span><span class="p">.</span><span class="n">friendlyName</span> <span style="color: #aa2211"><</span> <span class="n">c2</span><span class="p">.</span><span class="n">friendlyName</span><span class="p">;</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="p">});</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">for comparing <tt style="background: #ebebeb; font-size: 13px;">friendlyName</tt> use <tt style="background: #ebebeb; font-size: 13px;">QCollator</tt>?</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D28744#inline-164207">View Inline</a><span style="color: #4b4d51; font-weight: bold;">shortcutsmodel.cpp:103</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="n">shortcut</span><span class="p">.</span><span class="n">friendlyName</span> <span style="color: #aa2211">=</span> <span class="n">actionFriendly</span><span class="p">;</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="n">QDBusReply</span><span style="color: #aa2211"><</span><span class="n">QList</span><span style="color: #aa2211"><</span><span style="color: #aa4000">int</span><span style="color: #aa2211">>></span> <span class="n">shortcutsReply</span> <span style="color: #aa2211">=</span> <span class="n">m_globalAccelInterface</span><span style="color: #aa2211">-></span><span class="n">shortcut</span><span class="p">(</span><span class="n">action</span><span class="p">);</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">if</span> <span class="p">(</span><span style="color: #aa2211">!</span><span class="n">shortcutsReply</span><span class="p">.</span><span class="n">isValid</span><span class="p">())</span> <span class="p">{</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">I kinda feel this should be done on demand or asynchronously as it causes a significant load time of the KCM</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D28744#inline-164212">View Inline</a><span style="color: #4b4d51; font-weight: bold;">shortcutsmodel.cpp:130</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="n">std</span><span style="color: #aa2211">::</span><span class="n">sort</span><span class="p">(</span><span class="n">c</span><span class="p">.</span><span class="n">shortcuts</span><span class="p">.</span><span class="n">begin</span><span class="p">(),</span> <span class="n">c</span><span class="p">.</span><span class="n">shortcuts</span><span class="p">.</span><span class="n">end</span><span class="p">(),</span> <span class="p">[]</span> <span class="p">(</span><span style="color: #aa4000">const</span> <span class="n">Shortcut</span> <span style="color: #aa2211">&</span><span class="n">s1</span><span class="p">,</span> <span style="color: #aa4000">const</span> <span class="n">Shortcut</span> <span style="color: #aa2211">&</span><span class="n">s2</span><span class="p">)</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">return</span> <span class="n">s1</span><span class="p">.</span><span class="n">friendlyName</span> <span style="color: #aa2211"><</span> <span class="n">s2</span><span class="p">.</span><span class="n">friendlyName</span><span class="p">;</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="p">});</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">Use <tt style="background: #ebebeb; font-size: 13px;">QCollator</tt></p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D28744#inline-164211">View Inline</a><span style="color: #4b4d51; font-weight: bold;">shortcutsmodel.cpp:140</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">if</span> <span class="p">(</span><span class="n">shortcut</span><span class="p">.</span><span class="n">initialShortcuts</span> <span style="color: #aa2211">!=</span> <span class="n">shortcut</span><span class="p">.</span><span class="n">activeShortcuts</span><span class="p">)</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="n">QStringList</span> <span class="n">actionId</span> <span style="color: #aa2211">=</span> <span class="n">buildActionId</span><span class="p">(</span><span class="n">component</span><span class="p">.</span><span class="n">uniqueName</span><span class="p">,</span> <span class="n">component</span><span class="p">.</span><span class="n">friendlyName</span><span class="p">,</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="n">shortcut</span><span class="p">.</span><span class="n">uniqueName</span><span class="p">,</span> <span class="n">shortcut</span><span class="p">.</span><span class="n">friendlyName</span><span class="p">);</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;"><tt style="background: #ebebeb; font-size: 13px;">const</tt></p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D28744#inline-164214">View Inline</a><span style="color: #4b4d51; font-weight: bold;">shortcutsmodel.cpp:194</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"><span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">if</span> <span class="p">(</span><span class="n">row</span> <span style="color: #aa2211"><</span> <span style="color: #601200">0</span> <span class="p">)</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">return</span> <span class="n">QModelIndex</span><span class="p">();</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">Also check <tt style="background: #ebebeb; font-size: 13px;">if (column != 0) {</tt><br />
(Also, coding style)</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D28744#inline-164215">View Inline</a><span style="color: #4b4d51; font-weight: bold;">shortcutsmodel.cpp:232</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"><span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">if</span> <span class="p">(</span><span style="color: #aa2211">!</span><span class="n">index</span><span class="p">.</span><span class="n">isValid</span><span class="p">())</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">return</span> <span class="n">QVariant</span><span class="p">();</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;"><tt style="background: #ebebeb; font-size: 13px;">checkIndex()</tt>?</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D28744#inline-164218">View Inline</a><span style="color: #4b4d51; font-weight: bold;">shortcutsmodel.cpp:251</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="p">}</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">default</span><span style="color: #aa2211">:</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">return</span> <span class="n">QVariant</span><span class="p">();</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">No <tt style="background: #ebebeb; font-size: 13px;">default</tt> case please in case we add new roles. Just <tt style="background: #ebebeb; font-size: 13px;">return</tt> outside the <tt style="background: #ebebeb; font-size: 13px;">switch</tt>, and below</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D28744#inline-164217">View Inline</a><span style="color: #4b4d51; font-weight: bold;">shortcutsmodel.cpp:260</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">case</span> <span class="n">Qt</span><span style="color: #aa2211">::</span><span style="color: #a0a000">DecorationRole</span><span class="p">:</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">return</span> <span class="n">QIcon</span><span style="color: #aa2211">::</span><span class="n">fromTheme</span><span class="p">(</span><span class="n">component</span><span class="p">.</span><span class="n">icon</span><span class="p">);</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">case</span> <span style="color: #a0a000">SectionRole</span><span class="p">:</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">Do we want a <tt style="background: #ebebeb; font-size: 13px;">QIcon</tt> here? I guess just returning an <tt style="background: #ebebeb; font-size: 13px;">iconName</tt> and using a <tt style="background: #ebebeb; font-size: 13px;">Kirigami.Icon</tt> in the UI should suffice</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D28744#inline-164219">View Inline</a><span style="color: #4b4d51; font-weight: bold;">shortcutsmodel.cpp:274</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"><span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">if</span> <span class="p">(</span><span style="color: #aa2211">!</span><span class="n">checkIndex</span><span class="p">(</span><span class="n">index</span><span class="p">)</span> <span style="color: #aa2211">||</span> <span class="n">index</span><span class="p">.</span><span class="n">parent</span><span class="p">().</span><span class="n">isValid</span><span class="p">()</span> <span style="color: #aa2211">||</span> <span class="n">role</span> <span style="color: #aa2211">!=</span> <span class="n">CheckedRole</span><span class="p">)</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">return</span> <span style="color: #304a96">false</span><span class="p">;</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">Makes me wonder if <tt style="background: #ebebeb; font-size: 13px;">CheckedRole</tt> should be the <tt style="background: #ebebeb; font-size: 13px;">Qt::EditableRole</tt></p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D28744#inline-164220">View Inline</a><span style="color: #4b4d51; font-weight: bold;">shortcutsmodel.cpp:298</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"><span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">if</span> <span class="p">(</span><span style="color: #aa2211">!</span><span class="n">checkIndex</span><span class="p">(</span><span class="n">index</span><span class="p">)</span> <span style="color: #aa2211">||</span> <span style="color: #aa2211">!</span><span class="n">index</span><span class="p">.</span><span class="n">parent</span><span class="p">().</span><span class="n">isValid</span><span class="p">())</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">return</span><span class="p">;</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">You can pass also <tt style="background: #ebebeb; font-size: 13px;">ParentIsInvalid</tt> as flag to <tt style="background: #ebebeb; font-size: 13px;">checkIndex</tt></p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D28744#inline-164221">View Inline</a><span style="color: #4b4d51; font-weight: bold;">shortcutsmodel.cpp:403</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="p">}</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="n">emit</span> <span style="color: #aa4000">this</span><span style="color: #aa2211">-></span><span class="n">error</span><span class="p">(</span><span class="n">i18n</span><span class="p">(</span><span style="color: #766510">"Error while communicating with the global shortcuts daemon"</span><span class="p">));</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">perhaps "service" instead of "daemon"?</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D28744#inline-164196">View Inline</a><span style="color: #4b4d51; font-weight: bold;">shortcutsmodel.h:54</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"><span class="n">class</span> <span style="color: #a0a000">ShortcutsModel</span> <span class="p">:</span> <span class="n">public</span> <span class="n">QAbstractItemModel</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="n">Q_OBJECT</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">Coding style, <tt style="background: #ebebeb; font-size: 13px;">{</tt> on new line</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D28744#inline-164199">View Inline</a><span style="color: #4b4d51; font-weight: bold;">shortcutsmodel.h:58</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"><span style="color: #a0a000">public</span><span class="p">:</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="n">friend</span> <span class="n">FilteredShortcutsModel</span><span class="p">;</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">enum</span> <span class="n">Roles</span> <span class="p">{</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">It doesnt appear to use any private members?</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D28744#inline-164213">View Inline</a><span style="color: #4b4d51; font-weight: bold;">shortcutsmodel.h:83</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">void</span> <span style="color: #004012">save</span><span class="p">();</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">bool</span> <span style="color: #004012">needsSave</span><span class="p">();</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">bool</span> <span style="color: #004012">isDefault</span><span class="p">();</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;"><tt style="background: #ebebeb; font-size: 13px;">const</tt> and below</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D28744#inline-164195">View Inline</a><span style="color: #4b4d51; font-weight: bold;">shortcutsmodel.h:95</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"><span style="color: #a0a000">Q_SIGNALS</span><span class="p">:</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">void</span> <span class="n">error</span><span class="p">(</span><span class="n">QString</span><span class="p">);</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;"><tt style="background: #ebebeb; font-size: 13px;">const QString &</tt>, also perhaps <tt style="background: #ebebeb; font-size: 13px;">errorOccurred</tt>?</p></div></div></div></div></div><br /><div><strong>REPOSITORY</strong><div><div>R119 Plasma Desktop</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D28744">https://phabricator.kde.org/D28744</a></div></div><br /><div><strong>To: </strong>davidre, VDG, Plasma<br /><strong>Cc: </strong>broulik, davidedmundson, nicolasfella, ngraham, iasensio, plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, ragreen, ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart<br /></div>