<br><br><div class="gmail_quote">On Mon, Feb 7, 2011 at 22:52, Andrea Diamantini <span dir="ltr">&lt;<a href="mailto:adjam7@gmail.com">adjam7@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">




 <div>
  <div style="font-family: Verdana,Arial,Helvetica,Sans-Serif;"><div class="im">
   <table style="border: 1px solid rgb(201, 195, 153);" bgcolor="#f9f3c9" cellpadding="8" width="100%">
    <tbody><tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="http://git.reviewboard.kde.org/r/100538/" target="_blank">http://git.reviewboard.kde.org/r/100538/</a>
     </td>
    </tr>
   </tbody></table>
   <br>








</div><div class="im"><blockquote style="margin-left: 1em; border-left: 2px solid rgb(208, 208, 208); padding-left: 10px;">
 <p style="margin-top: 0pt;">On February 7th, 2011, 9:21 p.m., <b>Pierre Rossi</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid rgb(208, 208, 208); padding-left: 10px;">
  



<table style="border: 1px solid rgb(192, 192, 192); border-collapse: collapse;" bgcolor="white" border="0" width="100%">
 <thead>
  <tr>
   <th colspan="4" style="border-bottom: 1px solid rgb(192, 192, 192); font-size: 9pt; padding: 4px 8px; text-align: left;" bgcolor="#f0f0f0">
    <a href="http://git.reviewboard.kde.org/r/100538/diff/5/?file=8552#file8552line1123" style="color: black; font-weight: bold; text-decoration: underline;" target="_blank">src/mainwindow.cpp</a>
    <span style="font-weight: normal;">

     (Diff revision 5)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="background-color: rgb(228, 217, 203); padding: 4px 8px; text-align: center;">
  <tr>

   <td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0pt;"></pre></td>
   <td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0pt;">bool MainWindow::event(QEvent *event)</pre></td>

  </tr>
 </tbody>




 
 



 <tbody>

  <tr>
    <th style="border-right: 1px solid rgb(192, 192, 192);" align="right" bgcolor="#b1ebb0"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0pt;"></pre></td>
    <th style="border-left: 1px solid rgb(192, 192, 192); border-right: 1px solid rgb(192, 192, 192);" align="right" bgcolor="#b1ebb0"><font size="2">1115</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0pt;">        <span>QKeyEvent</span> <span>*</span><span>kev</span> <span>=</span> <span>static_cast</span><span>&lt;</span><span>QKeyEvent</span> <span>*&gt;</span><span>(</span><span>event</span><span>);</span></pre>
</td>
  </tr>

 </tbody>

</table>

  <pre style="white-space: pre-wrap; word-wrap: break-word;">What if it&#39;s a QShortcutEvent ?
</pre>
 </blockquote>





</blockquote>
</div><pre style="margin-left: 1em; white-space: pre-wrap; word-wrap: break-word;">I&#39;m seeing in the docs that QEvent::ShortcutOverride &amp;&amp; QEvent::KeyPress ARE QKeyEvent(s). So, the assertion and the static_cast are safe. Am I missing something?</pre>

<br></div></div></blockquote><div><br>My bad ! I never used it before and the name lead me to believe it was a QShortcutEvent, you&#39;re absolutely right, then everything is fine for me too. Just fix  the whitespace and &quot;Ship It !&quot;™<br>
<br>Cheers,<br>--<br>Pierre<br></div></div>