[LyX/master] Enable QWindowsMimeMetafile with Qt6
Enrico Forestieri
forenr at lyx.org
Sun Oct 17 17:21:52 UTC 2021
On Sun, Oct 17, 2021 at 04:16:22PM +0200, Kornel Benko wrote:
> Am Sun, 17 Oct 2021 15:29:09 +0200
> schrieb Enrico Forestieri <forenr at lyx.org>:
>
> > On Sun, Oct 17, 2021 at 02:48:31PM +0200, Enrico Forestieri wrote:
> > > commit 771f30e9463d8d7bf7acd4dfc564f462b28eae16
> > > Author: Enrico Forestieri <forenr at lyx.org>
> > > Date: Sun Oct 17 15:06:05 2021 +0200
> > >
> > > Enable QWindowsMimeMetafile with Qt6
> > >
> > > The QWinMime class has been removed in Qt6 but the functionality
> > > is still present. However, one has to allow inclusion of private
> > > headers and register the mime handling to the QWindowsApplication
> > > native interface.
> >
> > Kornel, according to
> > https://www.qt.io/blog/qt-extras-modules-in-qt-6#qwinmime
> > to enable private headers with cmake one has to add a project dependency
> > to Qt::GuiPrivate. I honestly don't know how to do that. This only
> > matters for Windows and after this commit compilation cannot succeed
> > when configuring with cmake if private headers are not enabled.
> >
>
> My only idea is to use
> if (MINGW AND LYX_USE_QT MATCHES "QT6")
> add_dependencies(${_lyx} Qt::CorePrivate Qt::GuiPrivate)
> endif()
> somewhere at src/CMakeLists.txt:125
That did not work. However, I found a solution here:
https://stackoverflow.com/questions/65060435/add-qt-private-headers-to-cmake-project
and committed the corresponding patch at e8b366d4.
--
Enrico
More information about the lyx-devel
mailing list