<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://git.reviewboard.kde.org/r/121448/">https://git.reviewboard.kde.org/r/121448/</a>
</td>
</tr>
</table>
<br />
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">The assumptions this funciton makes about the form of the arguments it is passed and the form of the file names need to be made explicit in the documentation, otherwise I can't judge whether the code is correct.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">I've made some suggestions for improvements, but I would actually recommend ignoring those and redoing the calling style completely to match how <a href="http://api.kde.org/ecm/module/ECMInstallIcons.html" style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">ecm_install_icons</a> works - ie: you expect the files to be explicitly listed, but with the filenames in a certain form (the same form as for ecm_install_icons, but maybe with less constraints - just that the size is at the start followed by a hyphen, say), so you can extract the icon size easily. The syntax would then be</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;"><div class="codehilite" style="background: #f8f8f8"><pre style="line-height: 125%">ecm_add_app_icons(<span style="color: #666666"><</span>sources_var<span style="color: #666666">></span> ICONS <span style="color: #666666"><</span>icon<span style="color: #666666">></span> <span style="border: 1px solid #FF0000">[</span><span style="color: #666666"><</span>icon<span style="color: #666666">></span> <span style="border: 1px solid #FF0000">[</span>...<span style="color: #BC7A00">]</span>])
</pre></div>
</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">This has the dual advantage of behaving similarly to ecm_install_icons (predictability) and allowing the benefits of explicitly listing the icons in the CMakeLists.txt file without the drawbacks of having to manually exclude certain sizes on Windows.</p></pre>
<br />
<div>
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
<thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
<a href="https://git.reviewboard.kde.org/r/121448/diff/1/?file=332663#file332663line5" style="color: black; font-weight: bold; text-decoration: underline;">modules/ECMAddAppIcon.cmake</a>
<span style="font-weight: normal;">
(Diff revision 1)
</span>
</th>
</tr>
</thead>
<tbody>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
<th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">5</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="c"># ecm_add_app_icon(SRCS_VAR pattern)</span></pre></td>
</tr>
</tbody>
</table>
<div style="margin-left: 2em;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">I would rather have the syntax be something like</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;"><div class="codehilite" style="background: #f8f8f8"><pre style="line-height: 125%">ecm_add_app_icon(<span style="color: #666666"><</span>sources_var<span style="color: #666666">></span>
GLOBS pat <span style="border: 1px solid #FF0000">[</span>pat <span style="border: 1px solid #FF0000">[</span>...<span style="color: #BC7A00">]</span>])
</pre></div>
</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">or maybe even</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;"><div class="codehilite" style="background: #f8f8f8"><pre style="line-height: 125%">ecm_add_app_icon(<span style="color: #666666"><</span>sources_var<span style="color: #666666">></span>
<span style="border: 1px solid #FF0000">[</span>GLOBS <span style="color: #666666"><</span>pat<span style="color: #666666">></span> <span style="border: 1px solid #FF0000">[</span><span style="color: #666666"><</span>pat<span style="color: #666666">></span> <span style="border: 1px solid #FF0000">[</span>...<span style="color: #BC7A00">]</span>]]
<span style="color: #BC7A00">[</span>FILES <span style="color: #666666"><</span><span style="color: #008000">file</span><span style="color: #666666">></span> <span style="border: 1px solid #FF0000">[</span><span style="color: #666666"><</span><span style="color: #008000">file</span><span style="color: #666666">></span> <span style="border: 1px solid #FF0000">[</span>...<span style="color: #BC7A00">]</span>]])
</pre></div>
</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">where FILES arguments would not be globbed, but GLOBS would be. You could use PATTERNS if you don't like GLOBS - I was going for similarity with the file(GLOB) command, since that's what's ultimately used.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Having keyword arguments makes calls clearer, and gives greater scope for future changes to the argument list.</p></pre>
</div>
</div>
<br />
<div>
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
<thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
<a href="https://git.reviewboard.kde.org/r/121448/diff/1/?file=332663#file332663line13" style="color: black; font-weight: bold; text-decoration: underline;">modules/ECMAddAppIcon.cmake</a>
<span style="font-weight: normal;">
(Diff revision 1)
</span>
</th>
</tr>
</thead>
<tbody>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
<th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">13</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="c"># pattern - regular expression for searching application icons</span></pre></td>
</tr>
</tbody>
</table>
<div style="margin-left: 2em;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">You say regular expression, but it's actually a very restrained glob pattern - you have to put a * where the icon size would go.</p></pre>
</div>
</div>
<br />
<div>
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
<thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
<a href="https://git.reviewboard.kde.org/r/121448/diff/1/?file=332663#file332663line15" style="color: black; font-weight: bold; text-decoration: underline;">modules/ECMAddAppIcon.cmake</a>
<span style="font-weight: normal;">
(Diff revision 1)
</span>
</th>
</tr>
</thead>
<tbody>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
<th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">15</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="c"># example: ecm_app_app_icon(myapp_SRCS "pics/cr16-myapp.png;pics/cr32-myapp.png")</span></pre></td>
</tr>
</tbody>
</table>
<div style="margin-left: 2em;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Would this actually work? The code looks to me like pattern_rx would just be the filename again, so fn would be empty, and the icon would never be appended to _list.</p></pre>
</div>
</div>
<br />
<p>- Alex Merry</p>
<br />
<p>On December 12th, 2014, 1:34 p.m. UTC, Ralf Habacker wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: 1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
<tr>
<td>
<div>Review request for Extra Cmake Modules, KDE Frameworks and Laurent Navet.</div>
<div>By Ralf Habacker.</div>
<p style="color: grey;"><i>Updated Dec. 12, 2014, 1:34 p.m.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
extra-cmake-modules
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">This module, which has been migrated from the related KDE4 macto kde4_app_app_icon,
supports platform specific application icon for Windows and Mac OSX.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">On Windows this function depends on the external tool png2ico, which is
provided by the kdewin-tools binary package. Sources are available at
https://projects.kde.org/projects/kdesupport/kdewin.</p></pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>modules/ECMAddAppIcon.cmake <span style="color: grey">(PRE-CREATION)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/121448/diff/" style="margin-left: 3em;">View Diff</a></p>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">File Attachments </h1>
<li><a href="https://git.reviewboard.kde.org/media/uploaded/files/2014/12/12/a05ee2b5-64e3-4e44-ae34-4e1b7110e5f1__ECMAddAppIcon.cmake">ECMAddAppIcon.cmake</a></li>
</ul>
</td>
</tr>
</table>
</div>
</body>
</html>