On Thu, Feb 27, 2025 at 10:06:42PM +0100, Scott Kostyshak wrote:
> On Thu, Feb 27, 2025 at 09:59:06PM +0900, Koji Yokota wrote:
> > > 2025/02/27 17:57、Kornel Benko <kor...@lyx.org>のメール:
> > > 
> > > after this commit, I get error compiling with clang-15 ang QT 6.2.4.
> > > 
> > >   Kornel
> > 
> > 
> > Thank you, Kornel.
> > 
> > The operator “+” to combine keys is replaced by “|” as of Qt 6.0.
> > 
> > It is now fixed at 16d1133.
> 
> The fix works for me for Qt 6 (specifically, 6.4.2). But I get a failure
> with Qt 5.15.13 (with -Werror). Both variants fail for me.
> 
> This is the initial failure:
> 
> /home/scott/lyxbuilds/master-master/repo/src/frontends/qt/GuiPrefs.cpp:1047:46:
>  error: arithmetic between different enumeration types ('Qt::Modifier' and 
> 'Qt::Key') is deprecated [-Werror,-Wdeprecated-enum-enum-conversion]
>  1047 |                 new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_L), 
> this);
>       |                                            ~~~~~~~~ ^ ~~~~~~~~~
> 
> And if I change the condition to be < 5.15.0, then I get the following
> failure:
> 
> /home/scott/lyxbuilds/master-master/repo/src/frontends/qt/GuiPrefs.cpp:1050:46:
>  error: bitwise operation between different enumeration types ('Qt::Modifier' 
> and 'Qt::Key') is deprecated [-Werror,-Wdeprecated-enum-enum-conversion]
>  1050 |                 new QShortcut(QKeySequence(Qt::CTRL | Qt::Key_L), 
> this);
>       |                                            ~~~~~~~~ ^ ~~~~~~~~~
> 
> Any idea?

The following works for me:

  new QShortcut(QKeySequence(tr("Ctrl+l")), this);

I took this form from here: 
https://doc.qt.io/qtforpython-5/PySide2/QtGui/QKeySequence.html

I don't know how to test it though. How do I test this control sequence?

Scott

Attachment: signature.asc
Description: PGP signature

-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
https://lists.lyx.org/mailman/listinfo/lyx-devel

Reply via email to