diff options
Diffstat (limited to 'src/quick/items/qquickwindow.cpp')
-rw-r--r-- | src/quick/items/qquickwindow.cpp | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/src/quick/items/qquickwindow.cpp b/src/quick/items/qquickwindow.cpp index 1297dded8c..ef079fdf92 100644 --- a/src/quick/items/qquickwindow.cpp +++ b/src/quick/items/qquickwindow.cpp @@ -74,7 +74,7 @@ #include <private/qqmlmemoryprofiler_p.h> #include <private/qqmldebugserviceinterfaces_p.h> #include <private/qqmldebugconnector_p.h> -#ifndef QT_NO_OPENGL +#if QT_CONFIG(opengl) # include <private/qopenglvertexarrayobject_p.h> # include <private/qsgdefaultrendercontext_p.h> #endif @@ -95,7 +95,7 @@ bool QQuickWindowPrivate::defaultAlphaBuffer = false; void QQuickWindowPrivate::updateFocusItemTransform() { -#ifndef QT_NO_IM +#if QT_CONFIG(im) Q_Q(QQuickWindow); QQuickItem *focus = q->activeFocusItem(); if (focus && QGuiApplication::focusObject() == focus) { @@ -172,7 +172,7 @@ private: #include "qquickwindow.moc" -#ifndef QT_NO_ACCESSIBILITY +#if QT_CONFIG(accessibility) /*! Returns an accessibility interface for this window, or 0 if such an interface cannot be created. @@ -256,7 +256,7 @@ void QQuickWindow::focusInEvent(QFocusEvent *ev) d->updateFocusItemTransform(); } -#ifndef QT_NO_IM +#if QT_CONFIG(im) static bool transformDirtyOnItemOrAncestor(const QQuickItem *item) { while (item) { @@ -297,7 +297,7 @@ void QQuickWindowPrivate::polishItems() if (recursionSafeguard == 0) qWarning("QQuickWindow: possible QQuickItem::polish() loop"); -#ifndef QT_NO_IM +#if QT_CONFIG(im) if (QQuickItem *focusItem = q_func()->activeFocusItem()) { // If the current focus item, or any of its anchestors, has changed location // inside the window, we need inform IM about it. This to ensure that overlays @@ -471,10 +471,10 @@ void QQuickWindowPrivate::renderSceneGraph(const QSize &size) QQuickWindowPrivate::QQuickWindowPrivate() : contentItem(0) , activeFocusItem(0) -#ifndef QT_NO_CURSOR +#if QT_CONFIG(cursor) , cursorItem(0) #endif -#ifndef QT_NO_DRAGANDDROP +#if QT_CONFIG(draganddrop) , dragGrabber(0) #endif , touchMouseId(-1) @@ -500,7 +500,7 @@ QQuickWindowPrivate::QQuickWindowPrivate() , vaoHelper(0) , incubationController(0) { -#ifndef QT_NO_DRAGANDDROP +#if QT_CONFIG(draganddrop) dragGrabber = new QQuickDragGrabber; #endif } @@ -894,7 +894,7 @@ void QQuickWindowPrivate::setFocusInScope(QQuickItem *scope, QQuickItem *item, Q } if (oldActiveFocusItem) { -#ifndef QT_NO_IM +#if QT_CONFIG(im) QGuiApplication::inputMethod()->commit(); #endif @@ -1000,7 +1000,7 @@ void QQuickWindowPrivate::clearFocusInScope(QQuickItem *scope, QQuickItem *item, oldActiveFocusItem = activeFocusItem; newActiveFocusItem = scope; -#ifndef QT_NO_IM +#if QT_CONFIG(im) QGuiApplication::inputMethod()->commit(); #endif @@ -1276,7 +1276,7 @@ QQuickWindow::~QQuickWindow() } delete d->incubationController; d->incubationController = 0; -#ifndef QT_NO_DRAGANDDROP +#if QT_CONFIG(draganddrop) delete d->dragGrabber; d->dragGrabber = 0; #endif delete d->contentItem; d->contentItem = 0; @@ -1545,7 +1545,7 @@ bool QQuickWindow::event(QEvent *e) d->clearHover(); d->lastMousePosition = QPointF(); break; -#ifndef QT_NO_DRAGANDDROP +#if QT_CONFIG(draganddrop) case QEvent::DragEnter: case QEvent::DragLeave: case QEvent::DragMove: @@ -1565,7 +1565,7 @@ bool QQuickWindow::event(QEvent *e) e->setAccepted(qev.isAccepted()); } break; case QEvent::FocusAboutToChange: -#ifndef QT_NO_IM +#if QT_CONFIG(im) if (d->activeFocusItem) qGuiApp->inputMethod()->commit(); #endif @@ -1577,7 +1577,7 @@ bool QQuickWindow::event(QEvent *e) d->windowManager->handleUpdateRequest(this); break; } -#ifndef QT_NO_GESTURES +#if QT_CONFIG(gestures) case QEvent::NativeGesture: d->deliverNativeGestureEvent(d->contentItem, static_cast<QNativeGestureEvent*>(e)); break; @@ -1774,7 +1774,7 @@ bool QQuickWindowPrivate::deliverHoverEvent(QQuickItem *item, const QPointF &sce return false; } -#ifndef QT_NO_WHEELEVENT +#if QT_CONFIG(wheelevent) bool QQuickWindowPrivate::deliverWheelEvent(QQuickItem *item, QWheelEvent *event) { QQuickItemPrivate *itemPrivate = QQuickItemPrivate::get(item); @@ -1828,9 +1828,9 @@ void QQuickWindow::wheelEvent(QWheelEvent *event) d->deliverWheelEvent(d->contentItem, event); d->lastWheelEventAccepted = event->isAccepted(); } -#endif // QT_NO_WHEELEVENT +#endif // wheelevent -#ifndef QT_NO_GESTURES +#if QT_CONFIG(gestures) bool QQuickWindowPrivate::deliverNativeGestureEvent(QQuickItem *item, QNativeGestureEvent *event) { QQuickItemPrivate *itemPrivate = QQuickItemPrivate::get(item); @@ -1862,7 +1862,7 @@ bool QQuickWindowPrivate::deliverNativeGestureEvent(QQuickItem *item, QNativeGes return false; } -#endif // QT_NO_GESTURES +#endif // gestures bool QQuickWindowPrivate::deliverTouchCancelEvent(QTouchEvent *event) { @@ -2043,7 +2043,7 @@ void QQuickWindowPrivate::handleMouseEvent(QMouseEvent *event) qCDebug(DBG_HOVER_TRACE) << this; - #ifndef QT_NO_CURSOR + #if QT_CONFIG(cursor) updateCursor(event->windowPos()); #endif @@ -2358,7 +2358,7 @@ bool QQuickWindowPrivate::deliverMatchingPointsToItem(QQuickItem *item, QQuickPo return eventAccepted; } -#ifndef QT_NO_DRAGANDDROP +#if QT_CONFIG(draganddrop) void QQuickWindowPrivate::deliverDragEvent(QQuickDragGrabber *grabber, QEvent *event) { grabber->resetTarget(); @@ -2479,9 +2479,9 @@ bool QQuickWindowPrivate::deliverDragEvent(QQuickDragGrabber *grabber, QQuickIte return accepted; } -#endif // QT_NO_DRAGANDDROP +#endif // draganddrop -#ifndef QT_NO_CURSOR +#if QT_CONFIG(cursor) void QQuickWindowPrivate::updateCursor(const QPointF &scenePos) { Q_Q(QQuickWindow); @@ -3184,7 +3184,7 @@ void QQuickWindow::maybeUpdate() void QQuickWindow::cleanupSceneGraph() { Q_D(QQuickWindow); -#ifndef QT_NO_OPENGL +#if QT_CONFIG(opengl) delete d->vaoHelper; d->vaoHelper = 0; #endif @@ -3223,7 +3223,7 @@ void QQuickWindow::setTransientParent_helper(QQuickWindow *window) QOpenGLContext *QQuickWindow::openglContext() const { -#ifndef QT_NO_OPENGL +#if QT_CONFIG(opengl) Q_D(const QQuickWindow); if (d->context && d->context->isValid()) { QSGRendererInterface *rif = d->context->sceneGraphContext()->rendererInterface(d->context); @@ -3351,7 +3351,7 @@ bool QQuickWindow::isSceneGraphInitialized() const The corresponding handler is \c onClosing. */ -#ifndef QT_NO_OPENGL +#if QT_CONFIG(opengl) /*! Sets the render target for this window to be \a fbo. @@ -3439,7 +3439,7 @@ QSize QQuickWindow::renderTargetSize() const -#ifndef QT_NO_OPENGL +#if QT_CONFIG(opengl) /*! Returns the render target for this window. @@ -3478,7 +3478,7 @@ QImage QQuickWindow::grabWindow() return d->windowManager->grab(this); } -#ifndef QT_NO_OPENGL +#if QT_CONFIG(opengl) if (!isVisible() && !d->renderControl) { auto openglRenderContext = static_cast<QSGDefaultRenderContext *>(d->context); if (!openglRenderContext->openglContext()) { @@ -3836,7 +3836,7 @@ QSGTexture *QQuickWindow::createTextureFromImage(const QImage &image, CreateText */ QSGTexture *QQuickWindow::createTextureFromId(uint id, const QSize &size, CreateTextureOptions options) const { -#ifndef QT_NO_OPENGL +#if QT_CONFIG(opengl) if (openglContext()) { QSGPlainTexture *texture = new QSGPlainTexture(); texture->setTextureId(id); @@ -3919,7 +3919,7 @@ void QQuickWindow::setDefaultAlphaBuffer(bool useAlpha) { QQuickWindowPrivate::defaultAlphaBuffer = useAlpha; } -#ifndef QT_NO_OPENGL +#if QT_CONFIG(opengl) /*! \since 5.2 |