summaryrefslogtreecommitdiffstats
path: root/lib/render_widget_host_view_qt_delegate.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/render_widget_host_view_qt_delegate.h')
-rw-r--r--lib/render_widget_host_view_qt_delegate.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/render_widget_host_view_qt_delegate.h b/lib/render_widget_host_view_qt_delegate.h
index c73aa9aec..f84d1a085 100644
--- a/lib/render_widget_host_view_qt_delegate.h
+++ b/lib/render_widget_host_view_qt_delegate.h
@@ -42,6 +42,15 @@
#ifndef RENDER_WIDGET_HOST_VIEW_QT_DELEGATE_H
#define RENDER_WIDGET_HOST_VIEW_QT_DELEGATE_H
+// On Mac we need to reset this define in order to prevent definition
+// of "check" macros etc. The "check" macro collides with a member function name in QtQuick.
+// See AssertMacros.h in the Mac SDK.
+#include <QtGlobal> // We need this for the Q_OS_MAC define.
+#if defined(Q_OS_MAC)
+#undef __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES
+#define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0
+#endif
+
#include "qtwebengineglobal.h"
#include <QRect>
@@ -54,6 +63,8 @@ QT_BEGIN_NAMESPACE
class QCursor;
class QEvent;
class QPainter;
+class QQuickWindow;
+class QSGNode;
class QWindow;
QT_END_NAMESPACE
@@ -80,6 +91,9 @@ public:
protected:
RenderWidgetHostViewQtDelegate();
void paint(QPainter*, const QRectF& boundingRect);
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 2, 0))
+ QSGNode *updatePaintNode(QSGNode *, QQuickWindow *);
+#endif
void fetchBackingStore();
void notifyResize();
bool forwardEvent(QEvent*);