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.
It turns out that the commit from gadmm's lyx-unstable has been
cherry-picked at the wrong place! However I believe that both changes
are necessary.
With this second patch, I do see that some screen jumping is avoided.
Fixes bug #7457.
Outputing the FuncCode enum to a stream using the << operator does not
work well. Actually I am not sure whether the << operator in LyXAction
is supposed to work (don't we need an enum class for that?).
https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg215733.html
Main issue is git log does not return >0 when file does not exists.
Other possible issues to check - cvs might want to connect to server
with cvs log. In large git archives reaching the proper record might take
longer time than ls-files.
If started from console, the console is the parent process, which can be attached. If started not from console, parent process does not exist and the block is skipped.