[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-frameworks-devel
Subject: Re: Review Request 118192: Fix/replace CMake macros provided by kdesignerplugin
From: Aurélien Gâteau <agateau () kde ! org>
Date: 2014-05-28 12:41:07
Message-ID: 20140528124107.1538.88060 () probe ! kde ! org
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/118192/#review58656
-----------------------------------------------------------
The name of the functions are a bit confusing: it is not obvious to me that \
kf5designerplugin_generate_plugin() just creates some source code, whereas \
kf5designerplugin_add_plugin() declares a library. I am having a hard time coming up \
with something better though :/
KF5DesignerPluginMacros.cmake
<https://git.reviewboard.kde.org/r/118192/#comment40830>
typo: extension
KF5DesignerPluginMacros.cmake
<https://git.reviewboard.kde.org/r/118192/#comment40828>
typo: extension
KF5DesignerPluginMacros.cmake
<https://git.reviewboard.kde.org/r/118192/#comment40829>
typo: Qt Designer
KF5DesignerPluginMacros.cmake
<https://git.reviewboard.kde.org/r/118192/#comment40831>
Can kf5designerplugin_add_plugin be turned into a function?
- Aurélien Gâteau
On May 19, 2014, 11:57 p.m., Alex Merry wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/118192/
> -----------------------------------------------------------
>
> (Updated May 19, 2014, 11:57 p.m.)
>
>
> Review request for KDE Frameworks and Alex Merry.
>
>
> Repository: kdesignerplugin
>
>
> Description
> -------
>
> Do not set the INSTALL_RPATH_USE_LINK_PATH and INSTALL_RPATH properties
>
> INSTALL_RPATH_USE_LINK_PATH already defaults to TRUE, and INSTALL_RPATH
> already has a sensible default, because of the KDECMakeSettings module
> from ECM.
>
> This also adds a comment explaining why the other RPath properties are
> set.
>
> Replace the installed macros
>
> The existing macro (kf5designerplugin_add_widget_files) did not work (it
> tried to iterate of the name of the sources variable instead of
> ${ARGN}), and the API didn't really make sense anyway (you cannot
> combine multiple plugin instance classes into a single plugin library,
> so accepting multiple .widgets files does not make sense).
>
> kf5designerplugin_add_widget_files is therefore replaced with
> kf5designerplugin_generate_plugin (which does the same, but for a single
> widget file), and we also have kf5designerplugin_add_plugin, which
> replaces the usual add_library call, and automagically deals with
> .widgets files and .qrc files it is passed.
>
> The two designer plugins provided by KDesignerPlugin are then generated
> using kf5designerplugin_add_plugin, so we can be sure it actually works.
>
>
> Diffs
> -----
>
> CMakeLists.txt c90208bc13a13b6dc8824c86ee102c5b42369331
> KF5DesignerPluginMacros.cmake 43fde97f0e07a9d00d79f92bee1888bf8fcbf70c
> src/CMakeLists.txt 2e7b9f0aa3a2ba5adc388961919a635b8ec6a2c2
>
> Diff: https://git.reviewboard.kde.org/r/118192/diff/
>
>
> Testing
> -------
>
> Builds, installs, plugins seem to work in designer. I'm planning to write some \
> autotests as well.
>
> Thanks,
>
> Alex Merry
>
>
[Attachment #5 (text/html)]
<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 \
solid;"> <tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://git.reviewboard.kde.org/r/118192/">https://git.reviewboard.kde.org/r/118192/</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;">The name of the \
functions are a bit confusing: it is not obvious to me that \
kf5designerplugin_generate_plugin() just creates some source code, whereas \
kf5designerplugin_add_plugin() declares a library. I am having a hard time coming up \
with something better though :/</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/118192/diff/2/?file=273487#file273487line20" \
style="color: black; font-weight: bold; text-decoration: \
underline;">KF5DesignerPluginMacros.cmake</a> <span style="font-weight: normal;">
(Diff revision 2)
</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">20</font></th> <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span \
class="c"># if one of the source files has the extention ".widgets", \
kgendesignerplugin</span></pre></td> </tr>
</tbody>
</table>
<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">typo: \
extension</pre> </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/118192/diff/2/?file=273487#file273487line22" \
style="color: black; font-weight: bold; text-decoration: \
underline;">KF5DesignerPluginMacros.cmake</a> <span style="font-weight: normal;">
(Diff revision 2)
</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">22</font></th> <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span \
class="c"># any source files with the extention ".qrc" will be dealt with \
appropriately</span></pre></td> </tr>
</tbody>
</table>
<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">typo: \
extension</pre> </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/118192/diff/2/?file=273487#file273487line25" \
style="color: black; font-weight: bold; text-decoration: \
underline;">KF5DesignerPluginMacros.cmake</a> <span style="font-weight: normal;">
(Diff revision 2)
</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">25</font></th> <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span \
class="c"># The OPTIONAL argument specifies that if QDesigner was not found, the \
macro</span></pre></td> </tr>
</tbody>
</table>
<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">typo: Qt \
Designer</pre> </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/118192/diff/2/?file=273487#file273487line83" \
style="color: black; font-weight: bold; text-decoration: \
underline;">KF5DesignerPluginMacros.cmake</a> <span style="font-weight: normal;">
(Diff revision 2)
</span>
</th>
</tr>
</thead>
<tbody>
<tr>
<th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2">41</font></th> <td bgcolor="#fdfebc" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "><span \
class="nb">endmacro</span> <span class="p">(</span><span \
class="s">KF5DESIGNERPLUGIN_ADD_WIDGET_FILES</span><span \
class="p">)</span></pre></td> <th bgcolor="#e9eaa8" style="border-left: 1px solid \
#C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font \
size="2">67</font></th> <td bgcolor="#fdfebc" width="50%"><pre style="font-size: \
8pt; line-height: 140%; margin: 0; "><span class="nb">macro</span><span \
class="p">(</span><span class="s">kf5designerplugin_add_plugin</span> <span \
class="s">target</span><span class="p">)</span></pre></td> </tr>
</tbody>
</table>
<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Can \
kf5designerplugin_add_plugin be turned into a function?</pre> </div>
<br />
<p>- Aurélien Gâteau</p>
<br />
<p>On May 19th, 2014, 11:57 p.m. CEST, Alex Merry wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('https://git.reviewboard.kde.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px black \
solid;"> <tr>
<td>
<div>Review request for KDE Frameworks and Alex Merry.</div>
<div>By Alex Merry.</div>
<p style="color: grey;"><i>Updated May 19, 2014, 11:57 p.m.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
kdesignerplugin
</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;">Do not set the INSTALL_RPATH_USE_LINK_PATH and INSTALL_RPATH properties
INSTALL_RPATH_USE_LINK_PATH already defaults to TRUE, and INSTALL_RPATH
already has a sensible default, because of the KDECMakeSettings module
from ECM.
This also adds a comment explaining why the other RPath properties are
set.
Replace the installed macros
The existing macro (kf5designerplugin_add_widget_files) did not work (it
tried to iterate of the name of the sources variable instead of
${ARGN}), and the API didn't really make sense anyway (you cannot
combine multiple plugin instance classes into a single plugin library,
so accepting multiple .widgets files does not make sense).
kf5designerplugin_add_widget_files is therefore replaced with
kf5designerplugin_generate_plugin (which does the same, but for a single
widget file), and we also have kf5designerplugin_add_plugin, which
replaces the usual add_library call, and automagically deals with
.widgets files and .qrc files it is passed.
The two designer plugins provided by KDesignerPlugin are then generated
using kf5designerplugin_add_plugin, so we can be sure it actually works.</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </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;">Builds, installs, plugins seem to work in designer. I'm planning to \
write some autotests as well.</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>CMakeLists.txt <span style="color: \
grey">(c90208bc13a13b6dc8824c86ee102c5b42369331)</span></li>
<li>KF5DesignerPluginMacros.cmake <span style="color: \
grey">(43fde97f0e07a9d00d79f92bee1888bf8fcbf70c)</span></li>
<li>src/CMakeLists.txt <span style="color: \
grey">(2e7b9f0aa3a2ba5adc388961919a635b8ec6a2c2)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/118192/diff/" style="margin-left: \
3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>
_______________________________________________
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic