<table><tr><td style="">staniek 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/D2577" rel="noreferrer">View Revision</a></tr></table><br /><div><div><p>Nice, some early notes.</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/D2577#inline-10288" rel="noreferrer">View Inline</a><span style="color: #4b4d51; font-weight: bold;">KoResourcePaths.cpp:43</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: #d0ffd0;"><span style="color: #74777d">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;"><span style="color: #74777d"> static const QLoggingCategory category("calligra.lib.widgets.koresourcepaths");</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;"><span style="color: #74777d"> return category;</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">Can we drop the "ko" legacy here?</p>
<p style="padding: 0; margin: 8px;">Or even: do we really need a category per class/namespace or per lib?</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/D2577#inline-10289" rel="noreferrer">View Inline</a><span style="color: #4b4d51; font-weight: bold;">KoResourcePaths.cpp:47</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: #d0ffd0;"><span style="color: #74777d">#define debugKoResourcePaths qCDebug(KORESOURCEPATHS_LOG)<<QString("%1:").arg(__func__)</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;"><span style="color: #74777d">#define warnKoResourcePaths qCWarning(KORESOURCEPATHS_LOG)<<QString("%1:").arg(__func__)</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">Isn't the modern like this?</p>
<p style="padding: 0; margin: 8px;">// in a header<br />
Q_DECLARE_LOGGING_CATEGORY(driverUsb)</p>
<p style="padding: 0; margin: 8px;">// in one source file<br />
Q_LOGGING_CATEGORY(driverUsb, "driver.usb")</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/D2577#inline-10290" rel="noreferrer">View Inline</a><span style="color: #4b4d51; font-weight: bold;">KoResourcePaths.cpp:59</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: #d0ffd0;"><span style="color: #74777d"> {</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;"><span style="color: #74777d"> QStandardPaths::StandardLocation l = QStandardPaths::GenericDataLocation;</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;"><span style="color: #74777d"> if (m_standardlocations.contains(type)) {</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">let's avoid variables 'l' too much similar to 1 :)</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/D2577#inline-10284" rel="noreferrer">View Inline</a><span style="color: #4b4d51; font-weight: bold;">KoResourcePaths.h:122</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; "> <span style="color: #aa2211">*</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;"> <span style="color: #aa2211">*</span> <span style="color: #a0a000">Limitation</span><span class="p">:</span> <span class="n">Wildcards</span> <span class="n">is</span> <span class="n">not</span> <span class="n">supported</span><span class="p">.</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;"> <span style="color: #aa2211">*</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">is -> are ?</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/D2577#inline-10285" rel="noreferrer">View Inline</a><span style="color: #4b4d51; font-weight: bold;">KoResourcePaths.h:143</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: #ffd0d0;"> <span style="color: #aa2211">*</span> <span class="n">may</span> <span class="n">consist</span> <span class="n">of</span> <span class="n">an</span> <span class="n">optional</span> <span class="n">directory</span> <span class="n">and</span> <span class="n">a</span> <span class="bright"></span><span class="n"><span class="bright">QRegExp</span></span>
</div><div style="padding: 0 8px; margin: 0 4px; background: #ffd0d0;"> <span style="color: #aa2211">*</span> <span class="bright"></span><span class="n"><span class="bright">wildcard</span></span><span class="bright"> </span><span class="n"><span class="bright">expression</span></span><span class="p">.</span> <span class="n">E</span><span class="p">.</span><span class="n">g</span><span class="p">.</span> <span style="color: #aa2211"><</span><span class="n">tt</span><span style="color: #aa2211">></span><span style="color: #766510">"images\*.jpg"</span><span style="color: #aa2211"></</span><span class="n">tt</span><span style="color: #aa2211">></span><span class="p">.</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;"> <span style="color: #aa2211">*</span> <span class="n">may</span> <span class="n">consist</span> <span class="n">of</span> <span class="n">an</span> <span class="n">optional</span> <span class="n">directory</span> <span class="n">and</span> <span class="n">a</span> <span class="bright"></span><span style="color: #766510"><span class="bright">'*'</span></span><span class="bright"> </span><span class="n"><span class="bright">wildcard</span></span><span class="bright"></span><span class="p"><span class="bright">.</span></span><span class="bright"> </span><span class="n"><span class="bright">E</span></span><span class="bright"></span><span class="p"><span class="bright">.</span></span><span class="bright"></span><span class="n"><span class="bright">g</span></span><span class="bright"></span><span class="p"><span class="bright">.</span></span><span class="bright"> </span><span style="color: #aa2211"><span class="bright"><</span></span><span class="bright"></span><span class="n"><span class="bright">tt</span></span><span class="bright"></span><span style="color: #aa2211"><span class="bright">></span></span><span class="bright"></span><span style="color: #766510"><span class="bright">"images\*.jpg"</span></span><span class="bright"></span><span style="color: #aa2211"><span class="bright"></</span></span><span class="bright"></span><span class="n"><span class="bright">tt</span></span><span class="bright"></span><span style="color: #aa2211"><span class="bright">></span></span><span class="bright"></span><span class="p"><span class="bright">.</span></span>
</div><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;"> <span style="color: #aa2211">*</span> <span class="bright"></span><span class="n"><span class="bright">Also</span></span><span class="bright"> </span><span class="n"><span class="bright">directories</span></span><span class="bright"> </span><span class="n"><span class="bright">may</span></span><span class="bright"> </span><span class="n"><span class="bright">contain</span></span><span class="bright"> </span><span class="n"><span class="bright">wildcard</span></span><span class="p">.</span> <span class="n">E</span><span class="p">.</span><span class="n">g</span><span class="p">.</span> <span style="color: #aa2211"><</span><span class="n">tt</span><span style="color: #aa2211">></span><span style="color: #766510">"images\*<span class="bright">\stop</span>.jpg"</span><span style="color: #aa2211"></</span><span class="n">tt</span><span style="color: #aa2211">></span><span class="p">.</span>
</div><div style="padding: 0 8px; margin: 0 4px; "> <span style="color: #aa2211">*</span> <span class="n">Use</span> <span class="n">QString</span><span class="p">()</span> <span style="color: #aa4000">if</span> <span class="n">you</span> <span style="color: #aa4000">do</span> <span class="n">not</span> <span class="n">want</span> <span class="n">a</span> <span class="n">filter</span><span class="p">.</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">What does the \s mean? Perhaps you meant /s ?</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/D2577#inline-10286" rel="noreferrer">View Inline</a><span style="color: #4b4d51; font-weight: bold;">KoResourcePaths.h:181</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; "> <span style="color: #aa2211">*</span> <span class="n">saved</span><span class="p">,</span> <span class="n">or</span> <span class="n">QString</span><span class="p">()</span> <span style="color: #aa4000">if</span> <span class="n">the</span> <span class="n">resource</span> <span class="n">type</span> <span class="n">is</span> <span class="n">unknown</span><span class="p">.</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;"> <span style="color: #aa2211">*</span> <span class="n">The</span> <span class="n">returned</span> <span class="n">path</span> <span class="n">always</span> <span class="n">have</span> <span class="n">a</span> <span class="n">trailing</span> <span style="color: #766510">'/'</span><span class="p">.</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;"> <span style="color: #aa2211">*</span> <span class="n">If</span> <span class="n">type</span> <span class="n">does</span> <span class="n">not</span> <span class="n">exist</span><span class="p">,</span> <span class="n">QString</span><span class="p">()</span> <span class="n">is</span> <span class="n">returned</span><span class="p">.</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">has</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/D2577#inline-10287" rel="noreferrer">View Inline</a><span style="color: #4b4d51; font-weight: bold;">KoResourcePaths.h:215</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: #d0ffd0;"><span style="color: #304a96">#ifndef NDEBUG</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;"> <span style="color: #74777d">// for unit tests</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">Perhaps it's not the most accurate approach. Better is to #ifdef COMPILING_TESTS.</p>
<p style="padding: 0; margin: 8px;">See also all other uses of #ifndef NDEBUG in this patch.</p></div></div></div></div></div><br /><div><strong>REPOSITORY</strong><div><div>rCALLIGRA Calligra</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D2577" rel="noreferrer">https://phabricator.kde.org/D2577</a></div></div><br /><div><strong>EMAIL PREFERENCES</strong><div><a href="https://phabricator.kde.org/settings/panel/emailpreferences/" rel="noreferrer">https://phabricator.kde.org/settings/panel/emailpreferences/</a></div></div><br /><div><strong>To: </strong>danders, Calligra: 3.0, Calligra-Devel-list<br /><strong>Cc: </strong>staniek<br /></div>