]> git.lyx.org Git - lyx.git/commit
Allow compiling with Qt6
authorEnrico Forestieri <forenr@lyx.org>
Mon, 15 Mar 2021 16:09:09 +0000 (17:09 +0100)
committerEnrico Forestieri <forenr@lyx.org>
Mon, 15 Mar 2021 16:09:09 +0000 (17:09 +0100)
commit635a7d77ddc94c63d52494dc4d68a930faccf45f
tree09930925157e17e338940149497f96a6422ef30e
parentd5263f857e8e9b7736494b39cfaa2efe1c1d9535
Allow compiling with Qt6

This commit allows compiling LyX with Qt6 when using autotools.
For a successful compilation the following 2 conditions must be met.

1) The Qt6 qmake has to come first in PATH, so that the command
   "qmake -v | grep -o 'Qt version .'" returns "Qt version 6".
2) The --enable-qt6 switch has to be passed to the configure command.

If --enable-qt6 is used but Qt6 is not found, Qt5 is tried as a fallback.
If also Qt5 is not found, configuring for Qt4 is attempted.
If --enable-qt6 is not used, then things go as usual. This means that Qt5
is tried first and then Qt4, unless --disable-qt5 is used, in which case
Qt4 is directly attempted. This means that existing scripts should
continue working unmodified.

LyX should compile with Qt6 on windows and linux, and possibly also on
mac, but I could not test that. However, it is not guaranteed that it
works as it should. In particular I am not sure that I got right the
conversion from QRegExp to QRegularExpression. For sure, the syntax
highlighting seems to not work right. Someone in the know should take
a look at that. I am able to load documents and compile them but some
thourough testing is needed. However, when compiling for Qt5 or Qt4,
I tried to make sure that the functionality is preserved.
22 files changed:
config/lyxinclude.m4
config/qt.m4
configure.ac
src/frontends/qt/CategorizedCombo.cpp
src/frontends/qt/GuiAbout.cpp
src/frontends/qt/GuiApplication.cpp
src/frontends/qt/GuiClipboard.cpp
src/frontends/qt/GuiCommandBuffer.cpp
src/frontends/qt/GuiFontLoader.cpp
src/frontends/qt/GuiListings.cpp
src/frontends/qt/GuiLog.cpp
src/frontends/qt/GuiLog.h
src/frontends/qt/GuiPrefs.cpp
src/frontends/qt/GuiTabular.cpp
src/frontends/qt/GuiThesaurus.cpp
src/frontends/qt/GuiView.cpp
src/frontends/qt/IconPalette.cpp
src/frontends/qt/IconPalette.h
src/frontends/qt/LaTeXHighlighter.cpp
src/frontends/qt/LayoutBox.cpp
src/frontends/qt/Validator.cpp
src/support/mutex.cpp