<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/117573/">https://git.reviewboard.kde.org/r/117573/</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="https://git.reviewboard.kde.org/r/117573/diff/3/?file=266242#file266242line23" style="color: black; font-weight: bold; text-decoration: underline;">image-sharer/CMakeLists.txt</a>
    <span style="font-weight: normal;">

     (Diff revision 3)

    </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">23</font></th>
    <td bgcolor="#c5ffc4" 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">image-sharer</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;">we need to make this name less generic to avoid lib clashes.

OR 

build it static and don't install 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="https://git.reviewboard.kde.org/r/117573/diff/3/?file=266243#file266243line83" style="color: black; font-weight: bold; text-decoration: underline;">image-sharer/abstractsharer.h</a>
    <span style="font-weight: normal;">

     (Diff revision 3)

    </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">83</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="nl">protected:</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;">Don't change this now, but as a learning experience I suggest you read about d-pointers. You would need this if this was to become a public lib (which right now it isn't)

http://zchydem.enume.net/2010/01/19/qt-howto-private-classes-and-d-pointers/</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/117573/diff/3/?file=266246#file266246line7" style="color: black; font-weight: bold; text-decoration: underline;">image-sharer/cmake/modules/FindQJson.cmake</a>
    <span style="font-weight: normal;">

     (Diff revision 3)

    </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">7</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="err">#</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;">Where did you copy this from?

We historically have had problems with FindQJson files</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/117573/diff/3/?file=266260#file266260line136" style="color: black; font-weight: bold; text-decoration: underline;">lib/chat-widget.cpp</a>
    <span style="font-weight: normal;">

     (Diff revision 3)

    </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; ">ChatWidget::ChatWidget(const Tp::TextChannelPtr & channel, const Tp::AccountPtr &account, QWidget *parent)</pre></td>

  </tr>
 </tbody>



 
 

 <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">136</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="n">ShareProvider</span><span class="o">::</span><span class="n">ShareService</span> <span class="n">serviceType</span> <span class="o">=</span> <span class="k">static_cast</span><span class="o"><</span><span class="n">ShareProvider</span><span class="o">::</span><span class="n">ShareService</span><span class="o">></span><span class="p">(</span><span class="n">TextChatConfig</span><span class="o">::</span><span class="n">instance</span><span class="p">()</span><span class="o">-></span><span class="n">imageShareServiceType</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 do we need to cast?</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/117573/diff/3/?file=266260#file266260line410" style="color: black; font-weight: bold; text-decoration: underline;">lib/chat-widget.cpp</a>
    <span style="font-weight: normal;">

     (Diff revision 3)

    </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; ">void ChatWidget::temporaryFileTransferChannelCreated(Tp::PendingOperation *operation)</pre></td>

  </tr>
 </tbody>



 
 

 <tbody>

  <tr>
    <th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">378</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span class="n">KTp</span><span class="o">::</span><span class="n">Actions</span><span class="o">::</span><span class="n">startFileTransfer</span><span class="p">(</span><span class="n">d</span><span class="o">-></span><span class="n">account</span><span class="p">,</span> <span class="n">d</span><span class="o">-></span><span class="n">channel</span><span class="o">-></span><span class="n">targetContact</span><span class="p">(),</span> <span class="n">url</span><span class="p">.</span><span class="n">toLocalFile</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">410</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb">   </span><span class="tb">  </span> <span class="c1">// Not sure if this the best way to determine the MIME type of the file</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;">looks best to me.</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/117573/diff/3/?file=266260#file266260line417" style="color: black; font-weight: bold; text-decoration: underline;">lib/chat-widget.cpp</a>
    <span style="font-weight: normal;">

     (Diff revision 3)

    </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; ">void ChatWidget::temporaryFileTransferChannelCreated(Tp::PendingOperation *operation)</pre></td>

  </tr>
 </tbody>



 
 

 <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">417</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb">   </span><span class="tb">  </span>    <span class="n">KTp</span><span class="o">::</span><span class="n">Actions</span><span class="o">::</span><span class="n">startFileTransfer</span><span class="p">(</span><span class="n">d</span><span class="o">-></span><span class="n">account</span><span class="p">,</span> <span class="n">d</span><span class="o">-></span><span class="n">channel</span><span class="o">-></span><span class="n">targetContact</span><span class="p">(),</span> <span class="n">url</span><span class="p">.</span><span class="n">toLocalFile</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'd quite like the menu on here too, just without the imagebin option. </pre>
</div>
<br />



<p>- David Edmundson</p>


<br />
<p>On April 15th, 2014, 10:57 p.m. UTC, Ahmed Ibrahim 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 Telepathy and David Edmundson.</div>
<div>By Ahmed Ibrahim.</div>


<p style="color: grey;"><i>Updated April 15, 2014, 10:57 p.m.</i></p>







<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>


 <a href="http://bugs.kde.org/show_bug.cgi?id=322874">322874</a>


</div>



<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
ktp-text-ui
</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;">I've wrote an extensible image sharer library that can upload images to Imgur, Simplest Image Host and ImageBin, the library can be extended to support other services like wstaw.org for example. I've integrated the library with text-ui and used it to share images to the choosed service when dragging it to the text-ui. 

I've added a new "Image Sharing" configuration item under the Chat Tab Behaviour, you will find the screenshot attached.</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;">Dragged an image to the text-ui and the image url is appended and sent to the other endpoint of the conversation.</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">(eabecd9)</span></li>

 <li>config/CMakeLists.txt <span style="color: grey">(a8e7cd9)</span></li>

 <li>config/behavior-config.h <span style="color: grey">(d57fd90)</span></li>

 <li>config/behavior-config.cpp <span style="color: grey">(eeb3597)</span></li>

 <li>config/behavior-config.ui <span style="color: grey">(c8e731c)</span></li>

 <li>image-sharer/CMakeLists.txt <span style="color: grey">(PRE-CREATION)</span></li>

 <li>image-sharer/abstractsharer.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>image-sharer/abstractsharer.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>image-sharer/cmake/CMakeLists.txt <span style="color: grey">(PRE-CREATION)</span></li>

 <li>image-sharer/cmake/modules/FindQJson.cmake <span style="color: grey">(PRE-CREATION)</span></li>

 <li>image-sharer/imagebinsharer.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>image-sharer/imagebinsharer.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>image-sharer/imagesharer_export.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>image-sharer/imgursharer.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>image-sharer/imgursharer.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>image-sharer/mpform.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>image-sharer/mpform.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>image-sharer/shareprovider.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>image-sharer/shareprovider.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>image-sharer/simplestimagehostingsharer.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>image-sharer/simplestimagehostingsharer.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>lib/CMakeLists.txt <span style="color: grey">(d640536)</span></li>

 <li>lib/chat-widget.h <span style="color: grey">(d9c4e60)</span></li>

 <li>lib/chat-widget.cpp <span style="color: grey">(d130529)</span></li>

 <li>lib/text-chat-config.h <span style="color: grey">(e0ba24f)</span></li>

 <li>lib/text-chat-config.cpp <span style="color: grey">(57c7c0c)</span></li>

</ul>

<p><a href="https://git.reviewboard.kde.org/r/117573/diff/" style="margin-left: 3em;">View Diff</a></p>



<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">File Attachments </h1>

<ul>

 <li><a href="https://git.reviewboard.kde.org/media/uploaded/files/2014/04/14/1a00a5d6-dd2e-4b58-a25b-c456d4adc89e__ktp-text-ui-share.png">A screenshot of an uploaded image to the three supported image sharing services </a></li>

 <li><a href="https://git.reviewboard.kde.org/media/uploaded/files/2014/04/14/546bdac8-a803-48ac-a79c-0b5a8ba2a392__snapshot4.png">Image Sharing Settings under the Chat Tab Behaviour</a></li>

 <li><a href="https://git.reviewboard.kde.org/media/uploaded/files/2014/04/15/9e23d7e0-4e79-4053-83f4-9062ef290647__ktp-text-ui-share-menu.png">Share Context Menu</a></li>

</ul>





  </td>
 </tr>
</table>








  </div>
 </body>
</html>