[prev in list] [next in list] [prev in thread] [next in thread]
List: koffice-devel
Subject: Re: Review Request: fix single key shortcut bug in flake
From: "Thomas Zander" <zander () kde ! org>
Date: 2010-10-07 9:45:34
Message-ID: 20101007094534.10825.49679 () vidsolbach ! de
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
> On 2010-10-07 03:51:07, Thorsten Zachmann wrote:
> > /trunk/koffice/libs/flake/KoToolBase.h, line 303
> > <http://svn.reviewboard.kde.org/r/5507/diff/2/?file=39062#file39062line303>
> >
> > How about using an additional parameter in the KoTextToolBase constructor to set \
> > the value? It is not like that value will be changed ones it is set.
If you refer to The Little Manual of API Design (google for it, its a PDF) it will \
explain why adding stuff to the constructor is not the best way to design a nice API.
- Thomas
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://svn.reviewboard.kde.org/r/5507/#review8005
-----------------------------------------------------------
On 2010-10-06 20:17:53, Adam C. wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://svn.reviewboard.kde.org/r/5507/
> -----------------------------------------------------------
>
> (Updated 2010-10-06 20:17:53)
>
>
> Review request for KOffice.
>
>
> Summary
> -------
>
> this fixes the bug in flake, where single key shortcuts prevented text input.
>
> to reproduce, do the following:
> 1. open shortcuts configuration and assign the shortcut "a" to the about dialogue.
> 2. activate default tool => a shows about dialogue
> 3. create textshape and write something with a => about dialogue shows, but it \
> shouldn't
> In the qt lib textinputs are working, while there are these shortcuts, so in flake \
> it should also work.
> the patch works this way:
> the canvas forwards bool QWidget::event(QEvent* theEvent) to KoToolProxy. The tool \
> proxy asks the current tool, if it is in text mode (isInTextMode) and interrupts \
> the shortcut if so.
> I've tried to change all canvases and all text tools, but i'm not sure, if i found \
> everything.
>
> Diffs
> -----
>
> /trunk/koffice/kformula/flake/KoFormulaTool.h 1182829
> /trunk/koffice/kformula/flake/KoFormulaTool.cpp 1182829
> /trunk/koffice/kspread/ui/CellToolBase.h 1182829
> /trunk/koffice/kspread/ui/CellToolBase.cpp 1182829
> /trunk/koffice/libs/flake/KoToolBase.h 1182829
> /trunk/koffice/libs/flake/KoToolBase.cpp 1182829
> /trunk/koffice/libs/flake/KoToolBase_p.h 1182829
> /trunk/koffice/plugins/artistictextshape/ArtisticTextTool.h 1182829
> /trunk/koffice/plugins/artistictextshape/ArtisticTextTool.cpp 1182829
> /trunk/koffice/plugins/textshape/TextTool.h 1182829
> /trunk/koffice/plugins/textshape/TextTool.cpp 1182829
>
> Diff: http://svn.reviewboard.kde.org/r/5507/diff
>
>
> Testing
> -------
>
> i've tested kword, kspread, kpresenter, kivio, karbon and krita. in kexi it's \
> impossible to set single key shortcuts and in kformula i wasn't able to open a text \
> canvas.
>
> Thanks,
>
> Adam
>
>
[Attachment #5 (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://svn.reviewboard.kde.org/r/5507/">http://svn.reviewboard.kde.org/r/5507/</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 7th, 2010, 3:51 a.m., <b>Thorsten \
Zachmann</b> wrote:</p> <blockquote style="margin-left: 1em; border-left: 2px solid \
#d0d0d0; padding-left: 10px;">
<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://svn.reviewboard.kde.org/r/5507/diff/2/?file=39062#file39062line303" \
style="color: black; font-weight: bold; text-decoration: \
underline;">/trunk/koffice/libs/flake/KoToolBase.h</a> <span style="font-weight: \
normal;">
(Diff revision 2)
</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; \
">public:</pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2">303</font></th> <td bgcolor="#fdfebc" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="hl"> \
</span><span class="k"><span class="hl">virtual</span></span> <span \
class="n">bool</span> <span class="n">isInTextMode</span><span class="p">()</span> \
<span class="k">const</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">303</font></th> <td bgcolor="#fdfebc" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span \
class="n">bool</span> <span class="n">isInTextMode</span><span class="p">()</span> \
<span class="k">const</span><span class="p">;</span></pre></td> </tr>
</tbody>
</table>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">How about using an \
additional parameter in the KoTextToolBase constructor to set the value? It is not \
like that value will be changed ones it is set.</pre> </blockquote>
</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">If you \
refer to The Little Manual of API Design (google for it, its a PDF) it will explain \
why adding stuff to the constructor is not the best way to design a nice API.</pre> \
<br />
<p>- Thomas</p>
<br />
<p>On October 6th, 2010, 8:17 p.m., Adam C. wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('http://svn.reviewboard.kde.orgrb/images/review_request_box_top_bg.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px black \
solid;"> <tr>
<td>
<div>Review request for KOffice.</div>
<div>By Adam C..</div>
<p style="color: grey;"><i>Updated 2010-10-06 20:17:53</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 fixes the bug in flake, where single key shortcuts prevented text \
input.
to reproduce, do the following:
1. open shortcuts configuration and assign the shortcut "a" to the about \
dialogue. 2. activate default tool => a shows about dialogue
3. create textshape and write something with a => about dialogue shows, but it \
shouldn't
In the qt lib textinputs are working, while there are these shortcuts, so in flake it \
should also work.
the patch works this way:
the canvas forwards bool QWidget::event(QEvent* theEvent) to KoToolProxy. The tool \
proxy asks the current tool, if it is in text mode (isInTextMode) and interrupts the \
shortcut if so.
I've tried to change all canvases and all text tools, but i'm not sure, if i \
found everything. </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;">i've tested kword, kspread, kpresenter, kivio, karbon and krita. in \
kexi it's impossible to set single key shortcuts and in kformula i wasn't \
able to open a text canvas.</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>/trunk/koffice/kformula/flake/KoFormulaTool.h <span style="color: \
grey">(1182829)</span></li>
<li>/trunk/koffice/kformula/flake/KoFormulaTool.cpp <span style="color: \
grey">(1182829)</span></li>
<li>/trunk/koffice/kspread/ui/CellToolBase.h <span style="color: \
grey">(1182829)</span></li>
<li>/trunk/koffice/kspread/ui/CellToolBase.cpp <span style="color: \
grey">(1182829)</span></li>
<li>/trunk/koffice/libs/flake/KoToolBase.h <span style="color: \
grey">(1182829)</span></li>
<li>/trunk/koffice/libs/flake/KoToolBase.cpp <span style="color: \
grey">(1182829)</span></li>
<li>/trunk/koffice/libs/flake/KoToolBase_p.h <span style="color: \
grey">(1182829)</span></li>
<li>/trunk/koffice/plugins/artistictextshape/ArtisticTextTool.h <span style="color: \
grey">(1182829)</span></li>
<li>/trunk/koffice/plugins/artistictextshape/ArtisticTextTool.cpp <span \
style="color: grey">(1182829)</span></li>
<li>/trunk/koffice/plugins/textshape/TextTool.h <span style="color: \
grey">(1182829)</span></li>
<li>/trunk/koffice/plugins/textshape/TextTool.cpp <span style="color: \
grey">(1182829)</span></li>
</ul>
<p><a href="http://svn.reviewboard.kde.org/r/5507/diff/" style="margin-left: \
3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>
_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic