From 08c4c5021cb3f1f3023191d4a7ee09d133192f32 Mon Sep 17 00:00:00 2001 From: Marcelo Lira Date: Thu, 26 Jul 2012 09:59:31 -0300 Subject: Some renames to keep up with recent API changes on Qt5. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit QQuickCanvas became QQuickWindow, and its method setClearColor became setColor. See http://lists.qt-project.org/pipermail/development/2012-July/005009.html and qtdeclarative/feb996e3. Reviewed-by: Rafael Brandão --- src/core/PopupWindow.cpp | 8 ++++---- src/core/PopupWindow.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/core/PopupWindow.cpp b/src/core/PopupWindow.cpp index 6c2c61d..1146033 100644 --- a/src/core/PopupWindow.cpp +++ b/src/core/PopupWindow.cpp @@ -19,7 +19,7 @@ #include PopupWindow::PopupWindow(QWindow* parent) - : QQuickCanvas(parent) + : QQuickWindow(parent) { setWindowFlags(Qt::Popup); QSurfaceFormat surfaceFormat; @@ -31,7 +31,7 @@ PopupWindow::PopupWindow(QWindow* parent) void PopupWindow::showEvent(QShowEvent* ev) { - QQuickCanvas::showEvent(ev); + QQuickWindow::showEvent(ev); // In XCB, we are only guaranteed to grab the mouse if there's a platformWindow // created. This happens right after this event is sent. QTimer::singleShot(0, this, SLOT(setMouseGrab())); @@ -39,13 +39,13 @@ void PopupWindow::showEvent(QShowEvent* ev) void PopupWindow::hideEvent(QHideEvent* ev) { - QQuickCanvas::hideEvent(ev); + QQuickWindow::hideEvent(ev); setMouseGrabEnabled(false); } void PopupWindow::mousePressEvent(QMouseEvent* ev) { - QQuickCanvas::mousePressEvent(ev); + QQuickWindow::mousePressEvent(ev); const bool outsideWindow = ev->x() < 0 || ev->x() > width() || ev->y() < 0 || ev->y() > height(); if (outsideWindow) hide(); diff --git a/src/core/PopupWindow.h b/src/core/PopupWindow.h index 189adb3..8b44ccf 100644 --- a/src/core/PopupWindow.h +++ b/src/core/PopupWindow.h @@ -17,9 +17,9 @@ #ifndef PopupWindow_h #define PopupWindow_h -#include +#include -class PopupWindow : public QQuickCanvas { +class PopupWindow : public QQuickWindow { Q_OBJECT public: -- cgit v1.2.1