Skip to content

Commit

Permalink
[qtwayland] MER: Build on Qt 5.6. Contributes to JB#35409
Browse files Browse the repository at this point in the history
  • Loading branch information
martinjones committed Oct 8, 2016
1 parent 66be489 commit 79cc77e
Show file tree
Hide file tree
Showing 10 changed files with 25 additions and 22 deletions.
2 changes: 1 addition & 1 deletion examples/examples.pro
Expand Up @@ -9,5 +9,5 @@ contains(CONFIG, wayland-compositor) {
SUBDIRS += qml-compositor
}

SUBDIRS += server-buffer
# SUBDIRS += server-buffer
}
3 changes: 2 additions & 1 deletion examples/qml-compositor/qml-compositor.pro
@@ -1,3 +1,4 @@
TARGET = qml-compositor
DEFINES += QT_COMPOSITOR_QUICK

LIBS += -L ../../lib
Expand All @@ -16,7 +17,7 @@ SOURCES += main.cpp

OTHER_FILES = ContrastEffect.qml main.qml WindowChrome.qml WindowContainer.qml background.jpg closebutton.png compositor.js

target.path = $$[QT_INSTALL_EXAMPLES]/qtwayland/qml-compositor
target.path = $$[QT_INSTALL_EXAMPLES]/qml-compositor
sources.files = $$OTHER_FILES $$SOURCES $$HEADERS $$RESOURCES $$FORMS qml-compositor.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/qtwayland/qml-compositor
INSTALLS += target sources
4 changes: 2 additions & 2 deletions examples/qwindow-compositor/qwindow-compositor.pro
Expand Up @@ -23,7 +23,7 @@ INCLUDEPATH += $$PWD/../../include

RESOURCES += qwindow-compositor.qrc

target.path = $$[QT_INSTALL_EXAMPLES]/qtwayland/qwindow-compositor
target.path = $$[QT_INSTALL_EXAMPLES]/qwindow-compositor
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS qwindow-compositor.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/qtwayland/qwindow-compositor
#sources.path = $$[QT_INSTALL_EXAMPLES]/qtwayland/qwindow-compositor
INSTALLS += target sources
1 change: 1 addition & 0 deletions examples/server-buffer/compositor/compositor.pro
@@ -1,3 +1,4 @@
TARGET = compositor
QT += core-private gui-private quick-private compositor-private

LIBS += -lwayland-server
Expand Down
14 changes: 8 additions & 6 deletions rpm/qtwayland.spec
Expand Up @@ -9,11 +9,12 @@ License: LGPLv2.1 with exception or GPLv3
URL: http://qt.nokia.com
Source0: %{name}-%{version}.tar.bz2
Source100: precheckin.sh
BuildRequires: pkgconfig(Qt5Core) >= 5.2.1
BuildRequires: pkgconfig(Qt5PlatformSupport) >= 5.2.1
BuildRequires: qt5-qmake >= 5.6.2
BuildRequires: pkgconfig(Qt5Core) >= 5.6.2
BuildRequires: qt5-qtplatformsupport-devel >= 5.6.2
BuildRequires: pkgconfig(Qt5Qml) >= 5.2.1
BuildRequires: pkgconfig(Qt5Quick) >= 5.2.1+git37
BuildRequires: pkgconfig(Qt5DBus) >= 5.2.1
BuildRequires: pkgconfig(Qt5DBus) >= 5.6.2
BuildRequires: pkgconfig(wayland-server) >= 1.2.0
BuildRequires: pkgconfig(wayland-client) >= 1.2.0
%if "%{_qtwayland_variant}" == "wayland_egl"
Expand All @@ -23,8 +24,8 @@ BuildRequires: pkgconfig(wayland-egl)
BuildRequires: pkgconfig(xcomposite)
%endif

BuildRequires: qt5-qtgui-devel >= 5.2.1+git24
Requires: qt5-qtgui >= 5.2.1+git24
BuildRequires: qt5-qtgui-devel >= 5.6.2
Requires: qt5-qtgui >= 5.6.2

BuildRequires: libxkbcommon-devel
BuildRequires: pkgconfig(glib-2.0)
Expand Down Expand Up @@ -146,5 +147,6 @@ rm -r %{buildroot}/%{_libdir}/qt5/plugins/wayland-decoration-client/libbradient.

%files examples
%defattr(-,root,root,-)
%{_libdir}/qt5/examples/qtwayland/
%{_libdir}/qt5/examples/qwindow-compositor
%{_libdir}/qt5/examples/qml-compositor

2 changes: 1 addition & 1 deletion src/client/client.pro
@@ -1,5 +1,5 @@
TARGET = QtWaylandClient
QT += core-private gui-private
QT += core-private gui-private dbus
QT_FOR_PRIVATE += platformsupport-private

MODULE=waylandclient
Expand Down
8 changes: 4 additions & 4 deletions src/client/qwaylanddnd.cpp
Expand Up @@ -88,15 +88,15 @@ void QWaylandDrag::cancel()
m_display->currentInputDevice()->dataDevice()->cancelDrag();
}

void QWaylandDrag::move(const QMouseEvent *me)
void QWaylandDrag::move(const QPoint &globalPos)
{
Q_UNUSED(me);
Q_UNUSED(globalPos);
// Do nothing
}

void QWaylandDrag::drop(const QMouseEvent *me)
void QWaylandDrag::drop(const QPoint &globalPos)
{
Q_UNUSED(me);
Q_UNUSED(globalPos);
// Do nothing
}

Expand Down
4 changes: 2 additions & 2 deletions src/client/qwaylanddnd_p.h
Expand Up @@ -69,8 +69,8 @@ class Q_WAYLAND_CLIENT_EXPORT QWaylandDrag : public QBasicDrag
protected:
void startDrag() Q_DECL_OVERRIDE;
void cancel() Q_DECL_OVERRIDE;
void move(const QMouseEvent *me) Q_DECL_OVERRIDE;
void drop(const QMouseEvent *me) Q_DECL_OVERRIDE;
void move(const QPoint &globalPos) Q_DECL_OVERRIDE;
void drop(const QPoint &globalPos) Q_DECL_OVERRIDE;
void endDrag() Q_DECL_OVERRIDE;


Expand Down
3 changes: 1 addition & 2 deletions src/client/qwaylandscreen.cpp
Expand Up @@ -220,8 +220,7 @@ void QWaylandScreen::output_done()
QWindowSystemInterface::handleScreenOrientationChange(screen(), m_orientation);
mTransform = -1;
}
QWindowSystemInterface::handleScreenGeometryChange(screen(), mGeometry);
QWindowSystemInterface::handleScreenAvailableGeometryChange(screen(), mGeometry);
QWindowSystemInterface::handleScreenGeometryChange(screen(), mGeometry, mGeometry);
QWindowSystemInterface::handleScreenRefreshRateChange(screen(), refreshRate());
}

Expand Down
6 changes: 3 additions & 3 deletions src/qtwaylandscanner/qtwaylandscanner.cpp
Expand Up @@ -203,7 +203,7 @@ QByteArray waylandToCType(const QByteArray &waylandType, const QByteArray &inter
else if (waylandType == "array")
return "wl_array *";
else if (waylandType == "object" || waylandType == "new_id")
return isServerSide() ? "struct ::wl_resource *" : interface.isEmpty() ? "struct ::wl_object *" : "struct ::" + interface + " *";
return isServerSide() ? "struct ::wl_resource *" : interface.isEmpty() ? QByteArray("struct ::wl_object *") : QByteArray("struct ::") + interface + QByteArray(" *");
return waylandType;
}

Expand Down Expand Up @@ -845,7 +845,7 @@ void process(QXmlStreamReader &xml, const QByteArray &headerPath, const QByteArr
printf("\n");
foreach (const WaylandEvent &e, interface.requests) {
const WaylandArgument *new_id = newIdArgument(e.arguments);
printf(" %s", new_id ? (new_id->interface.isEmpty() ? "void *" : "struct ::" + new_id->interface + " *").constData() : "void ");
printf(" %s", new_id ? (new_id->interface.isEmpty() ? QByteArray("void *") : QByteArray("struct ::") + new_id->interface + QByteArray(" *")).constData() : "void ");
printEvent(e);
printf(";\n");
}
Expand Down Expand Up @@ -961,7 +961,7 @@ void process(QXmlStreamReader &xml, const QByteArray &headerPath, const QByteArr
printf("\n");
const WaylandEvent &e = interface.requests.at(i);
const WaylandArgument *new_id = newIdArgument(e.arguments);
printf(" %s%s::", new_id ? (new_id->interface.isEmpty() ? "void *" : "struct ::" + new_id->interface + " *").constData() : "void ", interfaceName);
printf(" %s%s::", new_id ? (new_id->interface.isEmpty() ? QByteArray("void *") : QByteArray("struct ::") + new_id->interface + QByteArray(" *")).constData() : "void ", interfaceName);
printEvent(e);
printf("\n");
printf(" {\n");
Expand Down

0 comments on commit 79cc77e

Please sign in to comment.