On Sun, Mar 23, 2014 at 08:46:15PM -0700, Pavel Sanda wrote:

> Uwe StĂśhr wrote:
> > commit 085b0e6fd1ad316793ad8f4f96cf69a17c667d2d
> > Author: Uwe Stöhr <uwesto...@lyx.org>
> > Date:   Sun Mar 23 14:49:57 2014 +0100
> > 
> >     PrefCompletionUi.ui: port commit 1a137950
> > 
> > diff --git a/src/frontends/qt4/ui/PrefCompletionUi.ui 
> > b/src/frontends/qt4/ui/PrefCompletionUi.ui
> > index 010b308..45faee4 100644
> > --- a/src/frontends/qt4/ui/PrefCompletionUi.ui
> > +++ b/src/frontends/qt4/ui/PrefCompletionUi.ui
> > @@ -1,7 +1,8 @@
> > -<ui version="4.0" >
> > +<?xml version="1.0" encoding="UTF-8"?>
> 
> We claim to support Qt 4.5.0. Does anyone around still has this
> old creature to test whether it's still true? I doubt it...

So do I, but I don't have anymore that version.

> Also adding few lines in RELEASE-NOTES about how we are doing with Qt5 would 
> be
> worth for maintainers of lyx binaries in various linux distros.
> Anyone running it with Qt5 nowadays?

I'm running 2.1.0 with Qt5 since Qt 5.0.0. You need to tweak the configure
script for building it (I attach here the script I use for this purpose),
but then it builds and works without flaws, seemingly. Don't know about
MacOSX, but also the Windows version works well with one exception. In Qt5
they removed the QWindowsMime class so that you are not able to paste vector
graphics anymore. However, that code is protected by a Q_WS_WIN guard, which
is not defined in Qt5 and thus the code doesn't need to be patched.
Only if you build a static version of the Qt libraries you need a small
patch to the LyX sources (see the attached patch).

-- 
Enrico
#!/bin/sh

QTVER=5.2.1
test "$#" -eq 0 -a "$(hostname)" = "zeus" && QTVER=sysqt
test "$#" -eq 0 -a "$(hostname)" = "debjack" && QTVER=sysqt
test "$#" -gt 0 && QTVER=$1

if [ "$QTVER" = "sysqt" ]; then
    echo "Configuring for system Qt"
    ../configure --enable-assertions --enable-warnings --disable-debug \
    --disable-stdlib-debug --disable-pch --disable-concept-checks \
    --with-aspell --enable-optimization=-g --with-version-suffix=-2.1 \
    CC='ccache gcc' CXX='ccache g++'
elif [ -d /usr/local/qt/${QTVER} ]; then
    remind=no
    QTLIBS="QtCore QtConcurrent QtGui QtWidgets"
    if [ ! -f /usr/local/qt/${QTVER}/lib/libQt5Core.so.${QTVER} ]; then
        # static libs: add qxcb
        QTLIBS="${QTLIBS} qxcb"
        remind=yes
    fi
    sed -e "s/QtCore QtGui\([\\\"\`]\)/${QTLIBS}\1/g" \
        ../configure > ../configure-qt5
    touch -r ../configure ../configure-qt5
    mv -f ../configure-qt5 ../configure
    chmod 755 ../configure

    echo "Configuring for Qt ${QTVER}"
    ../configure --enable-assertions --enable-warnings --disable-debug \
    --disable-stdlib-debug --disable-pch --disable-concept-checks \
    --with-aspell --enable-optimization=-g --with-version-suffix=-2.1 \
    --with-qt4-dir=/usr/local/qt/${QTVER} CPPFLAGS=-fPIC \
    CC='ccache gcc' CXX='ccache g++'

    if [ "$remind" = "yes" ]; then
        echo "\n*** static libs: remember to apply the qt5.diff patch ***"
    fi
else
    echo "Unknown Qt version ${QTVER}"
fi
diff --git a/src/frontends/qt4/GuiApplication.cpp 
b/src/frontends/qt4/GuiApplication.cpp
index c319054..449e667 100644
--- a/src/frontends/qt4/GuiApplication.cpp
+++ b/src/frontends/qt4/GuiApplication.cpp
@@ -140,6 +140,8 @@
 using namespace std;
 using namespace lyx::support;
 
+Q_IMPORT_PLUGIN(QXcbIntegrationPlugin)
+
 
 static void initializeResources()
 {

Reply via email to