[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 22:23:05
Message-ID: 20131011222305.17334.51823 () vidsolbach ! de
[Download RAW message or body]

On Oct. 11, 2013, 9:51 p.m., Mark Gaiser wrote:
> > 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.
> 
> Mark Gaiser wrote:
> Interesting.
> So that mean we simply can't use the new signal/slot syntax because of it? That \
> would seem rather strange to me.. 
> If you do a stat call, or listEntry or <any of the others>...
> Then you are supposed to connect to the result slot. For listEntry you are supposed \
> to connect to the finished signal. Both of those are defined as: signals:
> private:
> 
> AKA. Private signals.
> I really don't see how you can work around this besides perhaps QSignalMapper, but \
> that would be very odd as well. I'm really curious to see how that "bit of magic" \
> is supposed to work. Do you have some links for me there?

I'm not saying we can't use the new syntax because of it. I'm saying it needs a bit \
more work, and before a 'stable' version is needed.

There is a solution out there. It's applied to QAIM and others.


- Sune


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


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 />













<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <p style="margin-top: 0;">On October 11th, 2013, 9:51 p.m. UTC, <b>Sune \
Vuorela</b> wrote:</p>  <blockquote style="margin-left: 1em; border-left: 2px solid \
#d0d0d0; padding-left: 10px;">  <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>  </blockquote>




 <p>On October 11th, 2013, 10:06 p.m. UTC, <b>Mark Gaiser</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Interesting. So that \
mean we simply can&#39;t use the new signal/slot syntax because of it? That would \
seem rather strange to me..

If you do a stat call, or listEntry or &lt;any of the others&gt;...
Then you are supposed to connect to the result slot. For listEntry you are supposed \
to connect to the finished signal. Both of those are defined as: signals:
private:

AKA. Private signals.
I really don&#39;t see how you can work around this besides perhaps QSignalMapper, \
but that would be very odd as well. I&#39;m really curious to see how that &quot;bit \
of magic&quot; is supposed to work. Do you have some links for me there?</pre>  \
</blockquote>








</blockquote>

<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I&#39;m not saying we \
can&#39;t use the new syntax because of it. I&#39;m saying it needs a bit more work, \
and before a &#39;stable&#39; version is needed.

There is a solution out there. It&#39;s applied to QAIM and others.</pre>
<br />


<p>- Sune</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