summaryrefslogtreecommitdiffstats
path: root/src/core/web_event_factory.h
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2022-06-09 11:58:41 +0200
committerMarc Mutz <marc.mutz@qt.io>2022-06-10 08:21:36 +0000
commitbe4c684be7c2fa91f7df3d7cccfb6999aecfc967 (patch)
treed847a3d11e3c4769772b1d4bbb3ed9979866a293 /src/core/web_event_factory.h
parent5d1ef38f9f6815807596d0606cf7ed06b7930aac (diff)
Switch from QT_NO macros to feature checks
This is safer by ensuring we are checking for a feature that is defined. For some reason, the openssl feature is a private feature, so we need to include the private header to access it. Pick-to: 6.4 Change-Id: Idf7f3baba33e5188f206f5be1b8a0bfd75e79d03 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Diffstat (limited to 'src/core/web_event_factory.h')
-rw-r--r--src/core/web_event_factory.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/core/web_event_factory.h b/src/core/web_event_factory.h
index df2f26694..9e0d89b3e 100644
--- a/src/core/web_event_factory.h
+++ b/src/core/web_event_factory.h
@@ -40,25 +40,25 @@
#ifndef WEB_EVENT_FACTORY_H
#define WEB_EVENT_FACTORY_H
+#include "QtGui/qtguiglobal.h"
+
#include "content/public/browser/native_web_keyboard_event.h"
-#ifndef QT_NO_GESTURES
+#if QT_CONFIG(gestures)
#include "third_party/blink/public/common/input/web_gesture_event.h"
#endif
#include "third_party/blink/public/common/input/web_mouse_event.h"
#include "third_party/blink/public/common/input/web_mouse_wheel_event.h"
-#include <QtGlobal>
-
QT_BEGIN_NAMESPACE
class QEvent;
class QHoverEvent;
class QKeyEvent;
class QMouseEvent;
-#ifndef QT_NO_TABLETEVENT
+#if QT_CONFIG(tabletevent)
class QTabletEvent;
#endif
class QWheelEvent;
-#ifndef QT_NO_GESTURES
+#if QT_CONFIG(gestures)
class QNativeGestureEvent;
#endif
QT_END_NAMESPACE
@@ -72,11 +72,11 @@ class WebEventFactory {
public:
static blink::WebMouseEvent toWebMouseEvent(QMouseEvent *);
static blink::WebMouseEvent toWebMouseEvent(QHoverEvent *);
-#ifndef QT_NO_TABLETEVENT
+#if QT_CONFIG(tabletevent)
static blink::WebMouseEvent toWebMouseEvent(QTabletEvent *);
#endif
static blink::WebMouseEvent toWebMouseEvent(QEvent *);
-#ifndef QT_NO_GESTURES
+#if QT_CONFIG(gestures)
static blink::WebGestureEvent toWebGestureEvent(QNativeGestureEvent *);
#endif
static blink::WebMouseWheelEvent toWebWheelEvent(QWheelEvent *);