[Eric] Mac Fonts and Keyboard Shortcuts

detlev detlev at die-offenbachs.de
Wed Jan 20 18:39:05 GMT 2010


Hi Larry,

thanks for identifying this problem. It was some really old code from Qt 4.0 
where this method didn't exist. It was part of the export function as well. 
Fixed both places and committed to the repo.

Regards,
Detlev

On Mittwoch, 20. Januar 2010, Larry Shaffer wrote:
> Detlev,
> 
> Got it working. Settings now save and reload in their QKeySequence textual
> representation without error.
> 
> Instead of:
> QVariant(QString(act.shortcut()))
> 
> I substituted the QKeySequence.toString() method (see attachment):
> QVariant(act.shortcut().toString()))
> 
> I did the same for alternateShortcut. This produced the correct key
>  sequence text in eric4.ini. I tested it with Return and Enter and
>  everything works as expected (saves, and respective keys stay mapped).
>  toString() returns a QString as well, but maybe does a little something
>  extra that deals with this issue.
> 
> Thanks for the help.
> 
> > From: detlev <detlev at die-offenbachs.de>
> > Date: Tue, 19 Jan 2010 20:35:59 +0100
> > To: "eric at riverbankcomputing.com" <eric at riverbankcomputing.com>
> > Cc: Larry Shaffer <larrys at dakotacarto.com>
> > Subject: Re: [Eric] Mac Fonts and Keyboard Shortcuts
> >
> > Hi,
> >
> > on my system they are not saved as hexadecimal. Actually the code uses
> > "QString(act.alternateShortcut())" where act is a reference to the action
> > and this string is encoded as utf-8. So it's
> > str(QString(act.alternateShortcut())).encode("utf-8").
> >
> > Does your shortcut return something different?
> >
> > Detlev
> >
> > On Dienstag, 19. Januar 2010, Larry Shaffer wrote:
> 


-- 
Detlev Offenbach
detlev at die-offenbachs.de


More information about the Eric mailing list