[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: Review Request 113205: Make KJob::result public for the new signal/slot syntax.
From:       "Sune Vuorela" <kde () pusling ! com>
Date:       2013-10-11 21:51:18
Message-ID: 20131011215118.9457.77220 () vidsolbach ! de
[Download RAW message or body]

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/113205/#review41570
-----------------------------------------------------------



tier1/kcoreaddons/src/lib/jobs/kjob.h
<http://git.reviewboard.kde.org/r/113205/#comment30378>

    You are kind of now actually making it fully public so that it can be emitted by \
others, contrary to what the documentation seems to imply.  
    I think QAIM had a similar thing that steve solved with a bit of magic.


We are here making a 'hole' for people to do  'bad things' that wasn't possible in \
the past. I'm not sure we want that.

- Sune Vuorela


On Oct. 11, 2013, 5:59 p.m., Mark Gaiser wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/113205/
> -----------------------------------------------------------
> 
> (Updated Oct. 11, 2013, 5:59 p.m.)
> 
> 
> Review request for KDE Frameworks and kdelibs.
> 
> 
> Repository: kdelibs
> 
> 
> Description
> -------
> 
> The new signal/slot connection:
> connect(job, &KJob::result,...
> 
> does't like result to be private and throws an compile error:
> error: 'void KJob::result(KJob*)' is private
> 
> Making it public resolves the issue and makes this slot usable in the new syntax. \
> In my case i wanted to use the new syntax and directly use a lambda as slot. Which \
> isn't possible on this signal if it isn't public. 
> 
> Diffs
> -----
> 
> tier1/kcoreaddons/src/lib/jobs/kjob.h d663530 
> 
> Diff: http://git.reviewboard.kde.org/r/113205/diff/
> 
> 
> Testing
> -------
> 
> Works just fine.
> 
> 
> Thanks,
> 
> Mark Gaiser
> 
> 


[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/113205/">http://git.reviewboard.kde.org/r/113205/</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/113205/diff/1/?file=200776#file200776line399" \
style="color: black; font-weight: bold; text-decoration: \
underline;">tier1/kcoreaddons/src/lib/jobs/kjob.h</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="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; \
">private: // don&#39;t tell moc, doxygen or kdevelop, but those signals are in fact \
private</pre></td>  <td colspan="2"><pre style="font-size: 8pt; line-height: 140%; \
margin: 0; ">Q_SIGNALS:</pre></td>

  </tr>
 </tbody>



 
 

 <tbody>

  <tr>
    <th bgcolor="#f0f0f0" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2">398</font></th>  <td bgcolor="#ffffff" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="cm">     * This \
is a private signal, it can&#39;t be emitted directly by subclasses \
of</span></pre></td>  <th bgcolor="#f0f0f0" style="border-left: 1px solid #C0C0C0; \
border-right: 1px solid #C0C0C0;" align="right"><font size="2">399</font></th>  <td \
bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: \
0; "><span class="cm">     * This is a private signal, it can&#39;t be emitted \
directly by subclasses of</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;">You are \
kind of now actually making it fully public so that it can be emitted by others, \
contrary to what the documentation seems to imply.

I think QAIM had a similar thing that steve solved with a bit of magic.</pre>
</div>
<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;">We are here making a \
&#39;hole&#39; for people to do  &#39;bad things&#39; that wasn&#39;t possible in the \
past. I&#39;m not sure we want that.</pre>

<p>- Sune Vuorela</p>


<br />
<p>On October 11th, 2013, 5:59 p.m. UTC, Mark Gaiser 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 Frameworks and kdelibs.</div>
<div>By Mark Gaiser.</div>


<p style="color: grey;"><i>Updated Oct. 11, 2013, 5:59 p.m.</i></p>









<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
kdelibs
</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;">The new signal/slot connection: connect(job, &amp;KJob::result,...

does&#39;t like result to be private and throws an compile error:
error: &#39;void KJob::result(KJob*)&#39; is private

Making it public resolves the issue and makes this slot usable in the new syntax. In \
my case i wanted to use the new syntax and directly use a lambda as slot. Which \
isn&#39;t possible on this signal if it isn&#39;t public.</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;">Works just fine.</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>tier1/kcoreaddons/src/lib/jobs/kjob.h <span style="color: \
grey">(d663530)</span></li>

</ul>

<p><a href="http://git.reviewboard.kde.org/r/113205/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