<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/111912/">http://git.reviewboard.kde.org/r/111912/</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/111912/diff/1/?file=176381#file176381line44" style="color: black; font-weight: bold; text-decoration: underline;">tier1/sonnet/src/ui/texteditinstaller.h</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">44</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="k">static</span> <span class="kt">void</span> <span class="nf">install</span><span class="p">(</span><span class="n">QTextEdit</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;">not sure if you really need that, creating an instance looks simple enough</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/111912/diff/1/?file=176382#file176382line117" style="color: black; font-weight: bold; text-decoration: underline;">tier1/sonnet/src/ui/texteditinstaller.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">117</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="n">QMenu</span> <span class="o">*</span><span class="n">menu</span> <span class="o">=</span> <span class="n">m_textEdit</span><span class="o">-></span><span class="n">createStandardContextMenu</span><span class="p">(</span><span class="n">event</span><span class="o">-></span><span class="n">globalPos</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;">how about returning false instead and use that in the event filter to get whatever context menu handling the text edit has configured?</pre>
</div>
<br />
<p>- Kevin</p>
<br />
<p>On August 6th, 2013, 4:23 p.m. UTC, Aurélien Gâteau 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.</div>
<div>By Aurélien Gâteau.</div>
<p style="color: grey;"><i>Updated Aug. 6, 2013, 4:23 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;">This patch introduces a new class: Sonnet::TextEditInstaller. It makes it easy to add spellcheck support to a QTextEdit.
Spellcheck support means two things:
1. Install Sonnet::Highlighter to highlight spelling error.
2. Intercept context menu to replace it with a list of suggestions when user right-clicks on a misspelled word.
Minimal usage is simple: create a new TextEditInstaller, passing it the QTextEdit as argument. The patch adds a test_textedit executable which demonstrates the class.
I am posting it early to get feedback on the API and the class name, I am not completely happy with either.
PS: This patch includes my plugin fixes [1], since it is useless without them.
[1]: https://git.reviewboard.kde.org/r/111895/</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;">Tested with test_textedit.</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/sonnet/src/core/loader.cpp <span style="color: grey">(035cf64)</span></li>
<li>tier1/sonnet/src/plugins/aspell/CMakeLists.txt <span style="color: grey">(70f06d1)</span></li>
<li>tier1/sonnet/src/ui/CMakeLists.txt <span style="color: grey">(723d8f3)</span></li>
<li>tier1/sonnet/src/ui/highlighter.h <span style="color: grey">(c303db1)</span></li>
<li>tier1/sonnet/src/ui/highlighter.cpp <span style="color: grey">(e8ba703)</span></li>
<li>tier1/sonnet/src/ui/texteditinstaller.h <span style="color: grey">(PRE-CREATION)</span></li>
<li>tier1/sonnet/src/ui/texteditinstaller.cpp <span style="color: grey">(PRE-CREATION)</span></li>
<li>tier1/sonnet/tests/CMakeLists.txt <span style="color: grey">(90b3ab0)</span></li>
<li>tier1/sonnet/tests/test_textedit.cpp <span style="color: grey">(PRE-CREATION)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/111912/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>