QT5 -- Enable build on 4.8.4 -OR- 5.2.0

New strategy to enable build on QT5 or QT4.8 is quite
simple to enact as most of the fixes for QT5 can be
applied to earlier releases.

This patch fixes up some of the special cases for QT5 so
they will continue to build on earlier releases.
This commit is contained in:
Mark Liversedge
2013-12-10 16:07:41 +00:00
parent 64c25192ee
commit e6ccd840f2
11 changed files with 108 additions and 24 deletions

View File

@@ -63,10 +63,15 @@ VideoWindow::VideoWindow(Context *context, const QDir &home) :
/* This is a non working code that show how to hooks into a window,
* if we have a window around */
#ifdef Q_OS_LINUX
#if QT_VERSION > 0x050000
x11Container = new QWidget(this); //XXX PORT TO 5.1 BROKEN CODE XXX
#else
x11Container = new QX11EmbedContainer(this);
#endif
layout->addWidget(x11Container);
libvlc_media_player_set_xwindow (mp, x11Container->winId());
#endif
#ifdef WIN32
container = new QWidget(this);
layout->addWidget(container);
@@ -84,9 +89,9 @@ VideoWindow::VideoWindow(Context *context, const QDir &home) :
VideoWindow::~VideoWindow()
{
#ifdef Q_OS_LINUX
#ifdef Q_OS_LINUX && QT_VERSION < 0x050000 //XXX IN PORT TO QT 5.1 THIS IS BROKEN CODE XXX
// unembed vlc backend first
//x11Container->discardClient(); //XXX PORT TO QT 5.1 BROKEN CODE XXX
x11Container->discardClient();
#endif
stopPlayback();