On Tue, May 17, 2016 at 02:17:25PM -0400, Scott Kostyshak wrote:
> On Tue, May 17, 2016 at 07:08:17PM +0100, Guillaume Munch wrote:
> > Le 17/05/2016 07:34, Scott Kostyshak a écrit :
> > > On Sat, May 14, 2016 at 01:18:47AM -0400, Scott Kostyshak wrote:
> > > > On Tue, May 10, 2016 at 03:04:13AM -0400, Scott Kostyshak wrote:
> > > > > On Wed, May 04, 2016 at 04:39:54PM -0400, Scott Kostyshak wrote:
> > > > > > Dear all,
> > > > > > 
> > > > > > As new issues have popping up (and will without doubt continue to 
> > > > > > keep popping
> > > > > > up), I want to give an update of how close I think we are to the 
> > > > > > next step in
> > > > > > the release process. The two main issues in my mind are:
> > > > > > 
> > > > > > 1. Cannot create shortcuts. This problem is present with Qt 5.6 and 
> > > > > > on all
> > > > > > platforms. Since we are planning to ship Mac and Windows binaries 
> > > > > > with Qt 5.6,
> > > > > > this is a show stopper. To follow the progress, see #10075 and our 
> > > > > > hijacked
> > > > > > thread at [1]. Stephan is helping out and will follow a lead that 
> > > > > > JMarc
> > > > > > suggested. If that does not work out, then we will contact the Qt 
> > > > > > mailing list
> > > > > > for help.
> > > > > 
> > > > > A Qt bug report is now open to follow:
> > > > > https://bugreports.qt.io/browse/QTBUG-53272
> > > > > It's still not clear whether the change was intended or not.
> > > > 
> > > > I sent an email to inter...@qt-project.org. Hopefully we can draw some
> > > > attention to the potential regression and find a workaround.
> > > 
> > > I did not get any bites there so I emailed the developer list. If there
> > > is no simple workaround posted there, then hopefully the strategy that
> > > JMarc proposed (look at what Qt creator does) leads to a simple
> > > workaround.
> > > 
> > 
> > Where are we on trying to fix it ourselves?
> 
> We have made a few attempts---one attempt worked for Mac but not Linux,
> one on Linux but not Mac. There is always the possibility of using
> different code for Mac and Linux but it would be nice to avoid that.
> The newest development is JMarc's idea to look at what Qt Creator does.
> Ah, now I see you reference this below. Perhaps I misunderstood this
> question.
> 
> > First, the code on master does not make sense to me in light of
> > https://wiki.qt.io/ShortcutOverride:
> > 
> > "The focus item has the option to override the shortcut (by accepting
> > the shortcut override event). If the shortcut override is accepted it
> > will be delivered as normal key press to the focus widget."
> > 
> > This is consistent with the code from qtcreator found by Scott and also:
> > https://github.com/KDE/kdelibs/blob/eb5809ca2d18447af243881dcb7f5a4e70645119/kdeui/widgets/kkeysequencewidget.cpp#L396
> > (noticing that the top of CustomWidgets.cpp indicates "The code for the
> > ShortcutWidget class was adapted from kkeysequencewidget.cpp, which is
> > part of the KDE libraries")
> > 
> > So what about the attached patch? For me it works on qt4.8.7 & qt5.5.1.
> > If it works on qt5.6, I am afraid that all there is to ask to the qt
> > people, if anything, is to clarify the official documentation.
> 
> > Perhaps I
> > misunderstood and something like my patch has already been tried.
> 
> I don't think you misunderstood anything. All attempts are welcome. I
> will try your patch later. Last night I built LyX with Qt 5.6.1dev and
> it still shows the problem.

I tried your patch. I have the same problems as with Stephan's patch
(also reported by Kornel). For example, none of alt+f, alt+f, alt+d,
alt+s work for me.

At this point though, unless someone has a better idea for 2.2.0, we
should just go ahead with your or Stephan's patch (after more testing on
Mac and Windows), or perhaps consider using different code on different
platforms. A better fix can perhaps be worked on for 2.2.1.

Scott

> Scott
> 
> > From 2f695983a1392d95d8c29dfaff98fa16e93250b7 Mon Sep 17 00:00:00 2001
> > From: Guillaume Munch <g...@lyx.org>
> > Date: Tue, 17 May 2016 18:45:37 +0100
> > Subject: [PATCH] bug #10075
> > 
> > ---
> >  src/frontends/qt4/CustomizedWidgets.cpp | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> > 
> > diff --git a/src/frontends/qt4/CustomizedWidgets.cpp 
> > b/src/frontends/qt4/CustomizedWidgets.cpp
> > index b6dc73f..6b0a9ad 100644
> > --- a/src/frontends/qt4/CustomizedWidgets.cpp
> > +++ b/src/frontends/qt4/CustomizedWidgets.cpp
> > @@ -124,11 +124,13 @@ bool ShortcutWidget::event(QEvent * e)
> >                     setFrameShadow(QFrame::Sunken);
> >                     break;
> >             case QEvent::ShortcutOverride:
> > +                   e->accept();
> > +                   return true;
> > +           case QEvent::KeyPress:
> >                     keyPressEvent(static_cast<QKeyEvent *>(e));
> >                     return true;
> >             case QEvent::KeyRelease:
> >             case QEvent::Shortcut:
> > -           case QEvent::KeyPress:
> >                     return true;
> >             default: 
> >                     break;
> > -- 
> > 2.7.4
> > 
> 


Attachment: signature.asc
Description: PGP signature

Reply via email to