KSelectAction
Clarence Dang
dang at kde.org
Thu Jul 27 02:37:07 BST 2006
On Wednesday 26 July 2006 18:42, Hamish Rodda wrote:
> On Friday 21 July 2006 18:10, Clarence Dang wrote:
> > On Wednesday 19 July 2006 16:11, Stephan Kulow wrote:
> > > Am Dienstag, 18. Juli 2006 15:45 schrieb Clarence Dang:
> > > > 3. currentText() returns "&MyString" (i.e. it adds the accelerator)
> > > > instead of "MyString" (where "MyString" is passed to setItems()).
> > > > This is unexpected and a subtle change from KDE 3.
> > >
> > > The accelerators are added most likely by kcheckaccelerator
[...]
> > I'm not sure whether the new behaviour makes sense. Probably not though
> > as text() and setText() should be "symmetric"?
>
> Secondly, if you read the QAction docs you will see that text()/setText()
> is symmetric...
I mean kcheckaccelerator modifies the text of the action directly - it didn't
in KDE3. Hence, text() returns unexpected results.
> the only trick is that text passed to the constructor will
> have processing applied (ampersands removed and accelerator applied),
> whereas text passed to setText() will not. This means we need to port
> calls to setText() (don't set ampersands, use the shortcut instead); I'll
> add it to
> KDE4PORTING.html.
Well this explains some other bugs I was having :)
More information about the kde-core-devel
mailing list