Fixed compilation of Wayland plugin.
This commit is contained in:
parent
acf56efdc7
commit
f9442d7c51
@ -45,26 +45,26 @@
|
|||||||
#include "qwaylandwindow.h"
|
#include "qwaylandwindow.h"
|
||||||
#include <QtGui/private/qapplication_p.h>
|
#include <QtGui/private/qapplication_p.h>
|
||||||
|
|
||||||
void *QWaylandNativeInterface::nativeResourceForWidget(const QByteArray &resourceString, QWidget *widget)
|
void *QWaylandNativeInterface::nativeResourceForWindow(const QByteArray &resourceString, QWindow *window)
|
||||||
{
|
{
|
||||||
QByteArray lowerCaseResource = resourceString.toLower();
|
QByteArray lowerCaseResource = resourceString.toLower();
|
||||||
|
|
||||||
if (lowerCaseResource == "display")
|
if (lowerCaseResource == "display")
|
||||||
return qPlatformScreenForWidget(widget)->display()->wl_display();
|
return qPlatformScreenForWindow(window)->display()->wl_display();
|
||||||
if (lowerCaseResource == "surface") {
|
if (lowerCaseResource == "surface") {
|
||||||
return ((QWaylandWindow *) widget->platformWindow())->wl_surface();
|
return ((QWaylandWindow *) window->handle())->wl_surface();
|
||||||
}
|
}
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
QWaylandScreen * QWaylandNativeInterface::qPlatformScreenForWidget(QWidget *widget)
|
QWaylandScreen * QWaylandNativeInterface::qPlatformScreenForWindow(QWindow *window)
|
||||||
{
|
{
|
||||||
QWaylandScreen *screen;
|
QWaylandScreen *screen;
|
||||||
|
|
||||||
if (widget) {
|
if (window) {
|
||||||
screen = static_cast<QWaylandScreen *>(QPlatformScreen::platformScreenForWidget(widget));
|
screen = static_cast<QWaylandScreen *>(QPlatformScreen::platformScreenForWindow(window));
|
||||||
} else {
|
} else {
|
||||||
screen = static_cast<QWaylandScreen *>(QApplicationPrivate::platformIntegration()->screens()[0]);
|
screen = static_cast<QWaylandScreen *>(QApplicationPrivate::platformIntegration()->screens()[0]);
|
||||||
}
|
}
|
||||||
|
@ -49,11 +49,11 @@
|
|||||||
class QWaylandNativeInterface : public QPlatformNativeInterface
|
class QWaylandNativeInterface : public QPlatformNativeInterface
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
void *nativeResourceForWidget(const QByteArray &resourceString,
|
void *nativeResourceForWindow(const QByteArray &resourceString,
|
||||||
QWidget *widget);
|
QWindow *window);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static QWaylandScreen *qPlatformScreenForWidget(QWidget *widget);
|
static QWaylandScreen *qPlatformScreenForWindow(QWindow *window);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -33,6 +33,10 @@ QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_WAYLAND
|
|||||||
|
|
||||||
INCLUDEPATH += $$PWD
|
INCLUDEPATH += $$PWD
|
||||||
|
|
||||||
|
QT += gui-private
|
||||||
|
QT += opengl-private
|
||||||
|
QT += core-private
|
||||||
|
|
||||||
include ($$PWD/gl_integration/gl_integration.pri)
|
include ($$PWD/gl_integration/gl_integration.pri)
|
||||||
|
|
||||||
include (../fontdatabases/genericunix/genericunix.pri)
|
include (../fontdatabases/genericunix/genericunix.pri)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user