QRegExp is deprecated in qt6
Scott Kostyshak
skostysh at lyx.org
Thu Mar 2 16:17:48 UTC 2023
On Wed, Feb 22, 2023 at 11:34:49AM +0100, Kornel Benko wrote:
> Am Mon, 20 Feb 2023 17:47:29 +0100
> schrieb Jean-Marc Lasgouttes <lasgouttes at lyx.org>:
>
> > Le 13/02/2023 à 21:29, Richard Kimberly Heck a écrit :
> > >>> Indeed! So we should get rid of QRegexp now.
> > >>
> > >> Riki, would that be OK? What I have in mind is that whatever bug with
> > >> this newer code will be found earlier if more users are running it.
> > >
> > > Yes, fine with me.
> > >
> > > I have been waiting to talk about next steps until we have some idea
> > > what to do about the shortcut problem on OSX. That seems a large issue.
> >
> > This patch removes all traces of QRegExp. It will obviously need
> > testing, but this is already the code used with Qt6.
> >
> > What I do not know is whether we can get rid of QtCore5Compat library.
> > Is it useful for anything beyond QRegExp?
> >
> > JMarc
>
> With CMake build I get
> /usr2/src/lyx/lyx-git/src/frontends/qt/GuiKeySymbol.cpp:28:10: fatal error: QTextCodec:
> No such file or directory 28 | #include <QTextCodec>
> | ^~~~~~~~~~~~
> compilation terminated.
>
> if I remove the QtCore5Compat parts.
Indeed it seems we need to adapt, and that QStringConverter looks like a candidate:
https://forum.qt.io/topic/135724/qt-6-replacement-for-qtextcodec
https://embeddeduse.com/2021/01/17/migrating-a-harvester-hmi-from-qt-5-12-to-qt-6-0/
Luckily it seems that GuiKeySymbol is the only code that uses QTextCodec.
Scott
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20230302/979e6aa7/attachment.asc>
More information about the lyx-devel
mailing list