Enable X11 code paths in the Qt5 build.

Change a number of Q_WS_X11 to HAVE_X11, fix compilation, cleanups.
Ported KWindowSystem to Q_GLOBAL_STATIC, to remove awful K_GLOBAL_STATIC fork.
Delete _qws and _qpa stubs for kwindowsystem, we need the x11 one on x11.
This commit is contained in:
David Faure 2012-06-23 00:21:25 +02:00
parent 5118a8d226
commit 747733bb41

View File

@ -179,7 +179,7 @@ void centerPixmaps(QPixmap &from, QPixmap &to)
QRect fromRect(from.rect()); QRect fromRect(from.rect());
QRect toRect(to.rect()); QRect toRect(to.rect());
QRect actualRect = QRect(QPoint(0,0), fromRect.size().expandedTo(toRect.size())); QRect actualRect = QRect(QPoint(0,0), fromRect.size().expandedTo(toRect.size()));
fromRect.moveCenter(actualRect.center()); fromRect.moveCenter(actualRect.center());
toRect.moveCenter(actualRect.center()); toRect.moveCenter(actualRect.center());
@ -228,7 +228,7 @@ QPixmap transition(const QPixmap &from, const QPixmap &to, qreal amount)
// If the native paint engine supports Porter/Duff compositing and CompositionMode_Plus // If the native paint engine supports Porter/Duff compositing and CompositionMode_Plus
QPaintEngine *paintEngine = from.paintEngine(); QPaintEngine *paintEngine = from.paintEngine();
if (paintEngine && if (paintEngine &&
paintEngine->hasFeature(QPaintEngine::PorterDuff) && paintEngine->hasFeature(QPaintEngine::PorterDuff) &&
paintEngine->hasFeature(QPaintEngine::BlendModes)) { paintEngine->hasFeature(QPaintEngine::BlendModes)) {
QPixmap startPixmap(pixmapSize); QPixmap startPixmap(pixmapSize);
@ -254,7 +254,8 @@ QPixmap transition(const QPixmap &from, const QPixmap &to, qreal amount)
return startPixmap; return startPixmap;
} }
#if defined(Q_WS_X11) && defined(HAVE_XRENDER) #warning Cannot use XRender with QPixmap anymore. Find equivalent with Qt API.
#if 0 // defined(Q_WS_X11) && defined(HAVE_XRENDER)
// We have Xrender support // We have Xrender support
else if (paintEngine && paintEngine->hasFeature(QPaintEngine::PorterDuff)) { else if (paintEngine && paintEngine->hasFeature(QPaintEngine::PorterDuff)) {
// QX11PaintEngine doesn't implement CompositionMode_Plus in Qt 4.3, // QX11PaintEngine doesn't implement CompositionMode_Plus in Qt 4.3,