diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/core/api/qwebenginepage.cpp | 12 | ||||
-rw-r--r-- | src/core/api/qwebenginepage.h | 8 | ||||
-rw-r--r-- | src/core/web_contents_delegate_qt.cpp | 2 | ||||
-rw-r--r-- | src/core/web_event_factory.cpp | 2 | ||||
-rw-r--r-- | src/core/web_event_factory.h | 14 | ||||
-rw-r--r-- | src/webenginequick/api/qquickwebengineview.cpp | 4 | ||||
-rw-r--r-- | src/webenginequick/api/qquickwebengineview_p.h | 4 | ||||
-rw-r--r-- | src/webenginewidgets/api/qwebenginenotificationpresenter.cpp | 6 | ||||
-rw-r--r-- | src/webenginewidgets/api/qwebengineview.cpp | 12 | ||||
-rw-r--r-- | src/webenginewidgets/api/qwebengineview.h | 2 |
10 files changed, 33 insertions, 33 deletions
diff --git a/src/core/api/qwebenginepage.cpp b/src/core/api/qwebenginepage.cpp index a893d5a80..8a49e6577 100644 --- a/src/core/api/qwebenginepage.cpp +++ b/src/core/api/qwebenginepage.cpp @@ -559,7 +559,7 @@ QObject *QWebEnginePagePrivate::accessibilityParentObject() void QWebEnginePagePrivate::updateAction(QWebEnginePage::WebAction action) const { -#ifdef QT_NO_ACTION +#if !QT_CONFIG(action) Q_UNUSED(action); #else QAction *a = actions[action]; @@ -602,7 +602,7 @@ void QWebEnginePagePrivate::updateAction(QWebEnginePage::WebAction action) const } a->setEnabled(enabled); -#endif // QT_NO_ACTION +#endif // QT_CONFIG(action) } void QWebEnginePagePrivate::updateNavigationActions() @@ -627,7 +627,7 @@ void QWebEnginePagePrivate::updateEditActions() updateAction(QWebEnginePage::Unselect); } -#ifndef QT_NO_ACTION +#if QT_CONFIG(action) void QWebEnginePagePrivate::_q_webActionTriggered(bool checked) { Q_Q(QWebEnginePage); @@ -637,7 +637,7 @@ void QWebEnginePagePrivate::_q_webActionTriggered(bool checked) QWebEnginePage::WebAction action = static_cast<QWebEnginePage::WebAction>(a->data().toInt()); q->triggerAction(action, checked); } -#endif // QT_NO_ACTION +#endif // QT_CONFIG(action) void QWebEnginePagePrivate::recreateFromSerializedHistory(QDataStream &input) { @@ -1057,7 +1057,7 @@ QString QWebEnginePage::selectedText() const return d->adapter->selectedText(); } -#ifndef QT_NO_ACTION +#if QT_CONFIG(action) QAction *QWebEnginePage::action(WebAction action) const { Q_D(const QWebEnginePage); @@ -1219,7 +1219,7 @@ QAction *QWebEnginePage::action(WebAction action) const d->updateAction(action); return a; } -#endif // QT_NO_ACTION +#endif // QT_CONFIG(action) void QWebEnginePage::triggerAction(WebAction action, bool) { diff --git a/src/core/api/qwebenginepage.h b/src/core/api/qwebenginepage.h index 68fee0f84..3a9d2a611 100644 --- a/src/core/api/qwebenginepage.h +++ b/src/core/api/qwebenginepage.h @@ -251,7 +251,7 @@ public: QWebEngineProfile *profile() const; -#ifndef QT_NO_ACTION +#if QT_CONFIG(action) QAction *action(WebAction action) const; #endif virtual void triggerAction(WebAction action, bool checked = false); @@ -398,16 +398,16 @@ private: Q_DISABLE_COPY(QWebEnginePage) Q_DECLARE_PRIVATE(QWebEnginePage) QScopedPointer<QWebEnginePagePrivate> d_ptr; -#ifndef QT_NO_ACTION +#if QT_CONFIG(action) Q_PRIVATE_SLOT(d_func(), void _q_webActionTriggered(bool checked)) #endif friend class QContextMenuBuilder; friend class QWebEngineView; friend class QWebEngineViewPrivate; -#ifndef QT_NO_ACCESSIBILITY +#if QT_CONFIG(accessibility) friend class QWebEngineViewAccessible; -#endif // QT_NO_ACCESSIBILITY +#endif // QT_CONFIG(accessibility) }; Q_DECLARE_OPERATORS_FOR_FLAGS(QWebEnginePage::FindFlags) diff --git a/src/core/web_contents_delegate_qt.cpp b/src/core/web_contents_delegate_qt.cpp index bbd15a35d..f1002652c 100644 --- a/src/core/web_contents_delegate_qt.cpp +++ b/src/core/web_contents_delegate_qt.cpp @@ -726,7 +726,7 @@ void WebContentsDelegateQt::launchExternalURL(const QUrl &url, ui::PageTransitio if (navigationAllowedByPolicy) { m_viewClient->navigationRequested(pageTransitionToNavigationType(page_transition), url, navigationRequestAccepted, is_main_frame); -#ifndef QT_NO_DESKTOPSERVICES +#if QT_CONFIG(desktopservices) if (navigationRequestAccepted) QDesktopServices::openUrl(url); #endif diff --git a/src/core/web_event_factory.cpp b/src/core/web_event_factory.cpp index d7dceb30c..ee8be5f61 100644 --- a/src/core/web_event_factory.cpp +++ b/src/core/web_event_factory.cpp @@ -1516,7 +1516,7 @@ WebMouseEvent WebEventFactory::toWebMouseEvent(QEvent *ev) return webKitEvent; } -#ifndef QT_NO_GESTURES +#if QT_CONFIG(gestures) WebGestureEvent WebEventFactory::toWebGestureEvent(QNativeGestureEvent *ev) { WebGestureEvent webKitEvent; 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 *); diff --git a/src/webenginequick/api/qquickwebengineview.cpp b/src/webenginequick/api/qquickwebengineview.cpp index 24c059d39..babd0ade7 100644 --- a/src/webenginequick/api/qquickwebengineview.cpp +++ b/src/webenginequick/api/qquickwebengineview.cpp @@ -2197,14 +2197,14 @@ void QQuickWebEngineView::componentComplete() QQuickItem::componentComplete(); Q_D(QQuickWebEngineView); d->initializeProfile(); -#ifndef QT_NO_ACCESSIBILITY +#if QT_CONFIG(accessibility) // Enable accessibility via a dynamic QQmlProperty, instead of using private API call // QQuickAccessibleAttached::qmlAttachedProperties(this). The qmlContext is required, otherwise // it is not possible to reference attached properties. QQmlContext *qmlContext = QQmlEngine::contextForObject(this); QQmlProperty role(this, QStringLiteral("Accessible.role"), qmlContext); role.write(QAccessible::Grouping); -#endif // QT_NO_ACCESSIBILITY +#endif // QT_CONFIG(accessibility) QTimer::singleShot(0, this, &QQuickWebEngineView::lazyInitialize); } diff --git a/src/webenginequick/api/qquickwebengineview_p.h b/src/webenginequick/api/qquickwebengineview_p.h index 46b92b9c6..e025c896d 100644 --- a/src/webenginequick/api/qquickwebengineview_p.h +++ b/src/webenginequick/api/qquickwebengineview_p.h @@ -588,9 +588,9 @@ private: friend class QQuickContextMenuBuilder; friend class FaviconImageResponse; friend class FaviconImageResponseRunnable; -#ifndef QT_NO_ACCESSIBILITY +#if QT_CONFIG(accessibility) friend class QQuickWebEngineViewAccessible; -#endif // QT_NO_ACCESSIBILITY +#endif // QT_CONFIG(accessibility) }; QT_END_NAMESPACE diff --git a/src/webenginewidgets/api/qwebenginenotificationpresenter.cpp b/src/webenginewidgets/api/qwebenginenotificationpresenter.cpp index 9a2ba7dee..6a4a74ea8 100644 --- a/src/webenginewidgets/api/qwebenginenotificationpresenter.cpp +++ b/src/webenginewidgets/api/qwebenginenotificationpresenter.cpp @@ -46,7 +46,7 @@ QT_BEGIN_NAMESPACE DefaultNotificationPresenter::DefaultNotificationPresenter(QObject *parent) : QObject(parent) { -#ifndef QT_NO_SYSTEMTRAYICON +#if QT_CONFIG(systemtrayicon) m_systemTrayIcon = new QSystemTrayIcon(this); connect(m_systemTrayIcon, &QSystemTrayIcon::messageClicked, this, &DefaultNotificationPresenter::messageClicked); #endif @@ -66,7 +66,7 @@ void DefaultNotificationPresenter::show(std::unique_ptr<QWebEngineNotification> m_activeNotification = std::move(notification); -#ifndef QT_NO_SYSTEMTRAYICON +#if QT_CONFIG(systemtrayicon) if (m_activeNotification && m_systemTrayIcon) { m_systemTrayIcon->setIcon(qApp->windowIcon()); m_systemTrayIcon->show(); @@ -90,7 +90,7 @@ void DefaultNotificationPresenter::messageClicked() void DefaultNotificationPresenter::closeNotification() { -#ifndef QT_NO_SYSTEMTRAYICON +#if QT_CONFIG(systemtrayicon) const QWebEngineNotification *canceled = static_cast<const QWebEngineNotification *>(QObject::sender()); if (m_systemTrayIcon && canceled->matches(m_activeNotification.get())) m_systemTrayIcon->hide(); diff --git a/src/webenginewidgets/api/qwebengineview.cpp b/src/webenginewidgets/api/qwebengineview.cpp index b3bba7d9e..cf8af53e3 100644 --- a/src/webenginewidgets/api/qwebengineview.cpp +++ b/src/webenginewidgets/api/qwebengineview.cpp @@ -305,7 +305,7 @@ bool WebEngineQuickWidget::event(QEvent *event) case QEvent::ContextMenu: case QEvent::KeyPress: case QEvent::KeyRelease: -#ifndef QT_NO_WHEELEVENT +#if QT_CONFIG(wheelevent) case QEvent::Wheel: #endif return false; @@ -629,14 +629,14 @@ bool QWebEngineViewPrivate::passOnFocus(bool reverse) return q->focusNextPrevChild(!reverse); } -#ifndef QT_NO_ACCESSIBILITY +#if QT_CONFIG(accessibility) static QAccessibleInterface *webAccessibleFactory(const QString &, QObject *object) { if (QWebEngineView *v = qobject_cast<QWebEngineView*>(object)) return new QWebEngineViewAccessible(v); return nullptr; } -#endif // QT_NO_ACCESSIBILITY +#endif // QT_CONFIG(accessibility) QWebEngineViewPrivate::QWebEngineViewPrivate() : page(0) @@ -644,9 +644,9 @@ QWebEngineViewPrivate::QWebEngineViewPrivate() , m_ownsPage(false) , m_contextRequest(nullptr) { -#ifndef QT_NO_ACCESSIBILITY +#if QT_CONFIG(accessibility) QAccessible::installFactory(&webAccessibleFactory); -#endif // QT_NO_ACCESSIBILITY +#endif // QT_CONFIG(accessibility) } QWebEngineViewPrivate::~QWebEngineViewPrivate() = default; @@ -1085,7 +1085,7 @@ QString QWebEngineView::selectedText() const return page()->selectedText(); } -#ifndef QT_NO_ACTION +#if QT_CONFIG(action) QAction* QWebEngineView::pageAction(QWebEnginePage::WebAction action) const { return page()->action(action); diff --git a/src/webenginewidgets/api/qwebengineview.h b/src/webenginewidgets/api/qwebengineview.h index 658b73da1..cc1495d24 100644 --- a/src/webenginewidgets/api/qwebengineview.h +++ b/src/webenginewidgets/api/qwebengineview.h @@ -98,7 +98,7 @@ public: bool hasSelection() const; QString selectedText() const; -#ifndef QT_NO_ACTION +#if QT_CONFIG(action) QAction *pageAction(QWebEnginePage::WebAction action) const; #endif void triggerPageAction(QWebEnginePage::WebAction action, bool checked = false); |