[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: Review Request 110091: clean up and update FreeBSD support for kinfocenter
From: "Rolf Eike Beer" <kde () opensource ! sf-tec ! de>
Date: 2013-04-20 14:11:35
Message-ID: 20130420141135.18348.93100 () vidsolbach ! de
[Download RAW message or body]
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/110091/#review31332
-----------------------------------------------------------
cmake/modules/FindLibdevinfo.cmake
<http://git.reviewboard.kde.org/r/110091/#comment23350>
Why is this necessary at all? If you don't have a strong reason for it just drop it.
cmake/modules/FindLibdevinfo.cmake
<http://git.reviewboard.kde.org/r/110091/#comment23356>
Please read Modules/readme.txt from CMake about how to name such variables. Short: this should be \
DEVINFO_INCLUDE_DIR, and you should have a DEVINFO_INCLUDE_DIRS later, which is not cached.
cmake/modules/FindLibdevinfo.cmake
<http://git.reviewboard.kde.org/r/110091/#comment23352>
Has the header a version number one could parse out and use?
kinfocenter/Modules/base/CMakeLists.txt
<http://git.reviewboard.kde.org/r/110091/#comment23351>
The TODO comment above can go away now I think.
kinfocenter/Modules/base/info_fbsd.cpp
<http://git.reviewboard.kde.org/r/110091/#comment23353>
Why not just use QProcess here to get the result? I fear this stuff dates back to QT(<=3) times where \
this probably had issues, but that isn't true anymore.
kinfocenter/Modules/base/info_fbsd.cpp
<http://git.reviewboard.kde.org/r/110091/#comment23354>
QProcess here, too. Otherwise it may be a good idea to just put your patch in now as it is and do a \
followup patch that just kills that function and replaces it with QProcess, or keeps that functions and \
gives it a proper QProcess-based interface, i.e. separate arguments passed as a QStringList and such.
kinfocenter/Modules/base/info_fbsd.cpp
<http://git.reviewboard.kde.org/r/110091/#comment23355>
This line is flagged to have inconsistent whitespace.
kinfocenter/Modules/info/CMakeLists.txt
<http://git.reviewboard.kde.org/r/110091/#comment23357>
I miss a include_directories(${DEVINFO_INCLUDE_DIRS}) or something like that here.
- Rolf Eike Beer
On April 19, 2013, 10:14 p.m., Max Brazhnikov wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/110091/
> -----------------------------------------------------------
>
> (Updated April 19, 2013, 10:14 p.m.)
>
>
> Review request for kde-workspace.
>
>
> Description
> -------
>
> Add FindLibdevinfo.cmake
> Clean up info_fbsd.cpp and utilize PCIUtils
>
>
> Diffs
> -----
>
> cmake/modules/FindLibdevinfo.cmake e69de29
> kinfocenter/Modules/base/CMakeLists.txt 2b3c34e
> kinfocenter/Modules/base/info_fbsd.cpp 6bbaa1a
> kinfocenter/Modules/info/CMakeLists.txt dba6bc7
>
> Diff: http://git.reviewboard.kde.org/r/110091/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Max Brazhnikov
>
>
[Attachment #3 (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="http://git.reviewboard.kde.org/r/110091/">http://git.reviewboard.kde.org/r/110091/</a>
</td>
</tr>
</table>
<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="http://git.reviewboard.kde.org/r/110091/diff/1/?file=139990#file139990line8" style="color: black; \
font-weight: bold; text-decoration: underline;">cmake/modules/FindLibdevinfo.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">8</font></th> <td bgcolor="#c5ffc4" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="nb">if</span><span \
class="p">(</span><span class="s">DEVINFO_INCLUDES</span> <span class="s">AND</span> <span \
class="s">DEVINFO_LIBRARIES</span><span class="p">)</span></pre></td> </tr>
<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">9</font></th> <td bgcolor="#c5ffc4" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="nb">set</span><span \
class="p">(</span><span class="s">DEVINFO_FIND_QUIETLY</span> <span class="s">TRUE</span><span \
class="p">)</span></pre></td> </tr>
<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">10</font></th> <td bgcolor="#c5ffc4" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="nb">endif</span><span \
class="p">(</span><span class="s">DEVINFO_INCLUDES</span> <span class="s">AND</span> <span \
class="s">DEVINFO_LIBRARIES</span><span class="p">)</span></pre></td> </tr>
<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">11</font></th> <td bgcolor="#c5ffc4" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "></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;">Why is this necessary at all? If you don't have a \
strong reason for it just drop it.</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="http://git.reviewboard.kde.org/r/110091/diff/1/?file=139990#file139990line12" style="color: black; \
font-weight: bold; text-decoration: underline;">cmake/modules/FindLibdevinfo.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">12</font></th> <td bgcolor="#c5ffc4" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="nb">find_path</span><span \
class="p">(</span><span class="s">DEVINFO_INCLUDES</span> <span class="s">devinfo.h</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;">Please read Modules/readme.txt from CMake about how to \
name such variables. Short: this should be DEVINFO_INCLUDE_DIR, and you should have a \
DEVINFO_INCLUDE_DIRS later, which is not cached.</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="http://git.reviewboard.kde.org/r/110091/diff/1/?file=139990#file139990line16" style="color: black; \
font-weight: bold; text-decoration: underline;">cmake/modules/FindLibdevinfo.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">16</font></th> <td bgcolor="#c5ffc4" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="nb">include</span><span \
class="p">(</span><span class="s">FindPackageHandleStandardArgs</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;">Has the header a version number one could parse out and \
use? </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="http://git.reviewboard.kde.org/r/110091/diff/1/?file=139991#file139991line5" style="color: black; \
font-weight: bold; text-decoration: underline;">kinfocenter/Modules/base/CMakeLists.txt</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="err">macro_bool_to_01(DEVINFO_FOUND</span> <span class="err">HAVE_DEVINFO_H)</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;">The TODO comment above can go away now I think.</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="http://git.reviewboard.kde.org/r/110091/diff/1/?file=139992#file139992line136" style="color: black; \
font-weight: bold; text-decoration: underline;">kinfocenter/Modules/base/info_fbsd.cpp</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">97</font></th> <td bgcolor="#c5ffc4" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb"> </span><span class="k">if</span> \
<span class="p">(</span><span class="n">GetInfo_ReadfromPipe</span><span class="p">(</span><span \
class="n">tree</span><span class="p">,</span> <span class="s">"/sbin/camcontrol devlist \
2>&1"</span><span class="p">,</span> <span class="nb">true</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;">Why not just use QProcess here to get the result? I \
fear this stuff dates back to QT(<=3) times where this probably had issues, but that isn't true \
anymore.</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="http://git.reviewboard.kde.org/r/110091/diff/1/?file=139992#file139992line168" style="color: black; \
font-weight: bold; text-decoration: underline;">kinfocenter/Modules/base/info_fbsd.cpp</a> <span \
style="font-weight: normal;">
(Diff revision 1)
</span>
</th>
</tr>
</thead>
<tbody>
<tr>
<th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font \
size="2">142</font></th> <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: \
140%; margin: 0; "></pre></td> <th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; \
border-right: 1px solid #C0C0C0;" align="right"><font size="2">124</font></th> <td bgcolor="#fdfebc" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb"> </span><span \
class="k">if</span> <span class="p">(</span><span class="n">GetInfo_ReadfromPipe</span><span \
class="p">(</span><span class="n">tree</span><span class="p">,</span> <span \
class="s">"/usr/sbin/pciconf -l -v 2>&1"</span><span class="p">,</span> <span \
class="nb">true</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;">QProcess here, too. Otherwise it may be a good idea to \
just put your patch in now as it is and do a followup patch that just kills that function and replaces it \
with QProcess, or keeps that functions and gives it a proper QProcess-based interface, i.e. separate \
arguments passed as a QStringList and such.</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="http://git.reviewboard.kde.org/r/110091/diff/1/?file=139992#file139992line268" style="color: black; \
font-weight: bold; text-decoration: underline;">kinfocenter/Modules/base/info_fbsd.cpp</a> <span \
style="font-weight: normal;">
(Diff revision 1)
</span>
</th>
</tr>
</thead>
<tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
<tr>
<td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">int print_resource(struct \
devinfo_res *res, void *arg)</pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font \
size="2">239</font></th> <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: \
140%; margin: 0; "><span class="tb"> </span><span class="n">s</span> <span class="o">+=</span> <span \
class="n">tmp</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">190</font></th> <td \
bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span \
class="ew"> <span class="tb"> </span></span><span class="tb"> </span><span class="n">result</span> <span \
class="o"><<</span> <span class="n">showbase</span> <span class="o"><<</span> <span \
class="n">hex</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;">This line is flagged to have inconsistent \
whitespace.</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="http://git.reviewboard.kde.org/r/110091/diff/1/?file=139993#file139993line15" style="color: black; \
font-weight: bold; text-decoration: underline;">kinfocenter/Modules/info/CMakeLists.txt</a> <span \
style="font-weight: normal;">
(Diff revision 1)
</span>
</th>
</tr>
</thead>
<tbody>
<tr>
<th bgcolor="#f0f0f0" style="border-right: 1px solid #C0C0C0;" align="right"><font \
size="2">15</font></th> <td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; \
margin: 0; "><span class="nb">target_link_libraries</span><span class="p">(</span><span \
class="s">kcm_info</span> <span class="o">${</span><span class="nv">KDE4_KDEUI_LIBS</span><span \
class="o">}</span> <span class="o">${</span><span class="nv">QT_QTGUI_LIBRARY</span><span \
class="o">}</span> <span class="o">${</span><span class="nv">X11_X11_LIB</span><span \
class="o">}</span><span class="p">)</span></pre></td> <th bgcolor="#f0f0f0" style="border-left: 1px \
solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">15</font></th> <td \
bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span \
class="nb">target_link_libraries</span><span class="p">(</span><span class="s">kcm_info</span> <span \
class="o">${</span><span class="nv">KDE4_KDEUI_LIBS</span><span class="o">}</span> <span \
class="o">${</span><span class="nv">QT_QTGUI_LIBRARY</span><span class="o">}</span> <span \
class="o">${</span><span class="nv">X11_X11_LIB</span><span class="o">}</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;">I miss a include_directories(${DEVINFO_INCLUDE_DIRS}) \
or something like that here.</pre> </div>
<br />
<p>- Rolf Eike</p>
<br />
<p>On April 19th, 2013, 10:14 p.m. UTC, Max Brazhnikov wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: \
url('http://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-workspace.</div>
<div>By Max Brazhnikov.</div>
<p style="color: grey;"><i>Updated April 19, 2013, 10:14 p.m.</i></p>
<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;">Add FindLibdevinfo.cmake Clean up \
info_fbsd.cpp and utilize PCIUtils </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>cmake/modules/FindLibdevinfo.cmake <span style="color: grey">(e69de29)</span></li>
<li>kinfocenter/Modules/base/CMakeLists.txt <span style="color: grey">(2b3c34e)</span></li>
<li>kinfocenter/Modules/base/info_fbsd.cpp <span style="color: grey">(6bbaa1a)</span></li>
<li>kinfocenter/Modules/info/CMakeLists.txt <span style="color: grey">(dba6bc7)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/110091/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic