diff options
author | Liang Qi <liang.qi@qt.io> | 2016-10-31 20:09:14 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2016-11-01 06:02:55 +0100 |
commit | a732576a66ff2bbd9c0b41cd5f3505a4d2fbf043 (patch) | |
tree | d09875c3543ad837fbfaaf10bd4eef1d3de42941 /src/widgets/kernel | |
parent | cd9de59177ccbeb7fdfacf8716af7bb20112c880 (diff) | |
parent | 8e20daae9fee5f3b999daffce0d7156015ee974b (diff) |
Merge remote-tracking branch 'origin/5.7' into 5.8
Conflicts:
config.tests/win/msvc_version.cpp
configure.pri
mkspecs/macx-ios-clang/features/default_post.prf
mkspecs/macx-ios-clang/features/resolve_config.prf
mkspecs/features/uikit/default_post.prf
mkspecs/features/uikit/resolve_config.prf
src/corelib/io/qsettings_mac.cpp
src/corelib/json/qjsondocument.cpp
src/plugins/platforms/cocoa/qcocoawindow.h
src/plugins/platforms/cocoa/qcocoawindow.mm
src/plugins/platforms/cocoa/qnswindowdelegate.h
src/plugins/platforms/cocoa/qnswindowdelegate.mm
src/plugins/platforms/ios/ios.pro
src/plugins/platforms/ios/kernel.pro
src/plugins/platforms/ios/qiosintegration.h
src/plugins/platforms/minimalegl/qminimaleglintegration.cpp
tests/auto/gui/painting/qpainter/tst_qpainter.cpp
tools/configure/environment.cpp
Change-Id: I654845e54e40f5951fb78aab349ca667e9f27843
Diffstat (limited to 'src/widgets/kernel')
-rw-r--r-- | src/widgets/kernel/qapplication.cpp | 9 | ||||
-rw-r--r-- | src/widgets/kernel/qwidget.cpp | 4 | ||||
-rw-r--r-- | src/widgets/kernel/qwidget_p.h | 3 | ||||
-rw-r--r-- | src/widgets/kernel/qwidgetbackingstore.cpp | 10 | ||||
-rw-r--r-- | src/widgets/kernel/qwidgetwindow.cpp | 2 |
5 files changed, 16 insertions, 12 deletions
diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp index b94aa826d3..89eff898fe 100644 --- a/src/widgets/kernel/qapplication.cpp +++ b/src/widgets/kernel/qapplication.cpp @@ -4160,13 +4160,10 @@ void QApplication::beep() \relates QApplication A global pointer referring to the unique application object. It is - equivalent to the pointer returned by the QCoreApplication::instance() - function except that, in GUI applications, it is a pointer to a - QApplication instance. + equivalent to QCoreApplication::instance(), but cast as a QApplication pointer, + so only valid when the unique application object is a QApplication. - Only one application object can be created. - - \sa QCoreApplication::instance() + \sa QCoreApplication::instance(), qGuiApp */ /*! diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp index c7026781b5..dc04bfb632 100644 --- a/src/widgets/kernel/qwidget.cpp +++ b/src/widgets/kernel/qwidget.cpp @@ -809,6 +809,10 @@ void QWidget::setAutoFillBackground(bool enabled) parentWidget(), window(), setParent(), winId(), find(), metric(). + \row \li Context menu \li + contextMenuPolicy, contextMenuEvent(), + customContextMenuRequested(), actions() + \row \li Interactive help \li setToolTip(), setWhatsThis() diff --git a/src/widgets/kernel/qwidget_p.h b/src/widgets/kernel/qwidget_p.h index 2720c0dc31..68e063c25a 100644 --- a/src/widgets/kernel/qwidget_p.h +++ b/src/widgets/kernel/qwidget_p.h @@ -402,9 +402,6 @@ public: const QRegion &rgn, const QPoint &offset, int flags, QPainter *sharedPainter, QWidgetBackingStore *backingStore); - - QPainter *beginSharedPainter(); - bool endSharedPainter(); #ifndef QT_NO_GRAPHICSVIEW static QGraphicsProxyWidget * nearestGraphicsProxyWidget(const QWidget *origin); #endif diff --git a/src/widgets/kernel/qwidgetbackingstore.cpp b/src/widgets/kernel/qwidgetbackingstore.cpp index a10c88308c..910704498c 100644 --- a/src/widgets/kernel/qwidgetbackingstore.cpp +++ b/src/widgets/kernel/qwidgetbackingstore.cpp @@ -112,6 +112,7 @@ void QWidgetBackingStore::qt_flush(QWidget *widget, const QRegion ®ion, QBack if (widget != tlw) offset += widget->mapTo(tlw, QPoint()); + QRegion effectiveRegion = region; #ifndef QT_NO_OPENGL const bool compositionWasActive = widget->d_func()->renderToTextureComposeActive; if (!widgetTextures) { @@ -125,6 +126,11 @@ void QWidgetBackingStore::qt_flush(QWidget *widget, const QRegion ®ion, QBack } else { widget->d_func()->renderToTextureComposeActive = true; } + // When changing the composition status, make sure the dirty region covers + // the entire widget. Just having e.g. the shown/hidden render-to-texture + // widget's area marked as dirty is incorrect when changing flush paths. + if (compositionWasActive != widget->d_func()->renderToTextureComposeActive) + effectiveRegion = widget->rect(); // re-test since we may have been forced to this path via the dummy texture list above if (widgetTextures) { @@ -136,12 +142,12 @@ void QWidgetBackingStore::qt_flush(QWidget *widget, const QRegion ®ion, QBack const bool translucentBackground = widget->testAttribute(Qt::WA_TranslucentBackground); // Use the tlw's context, not widget's. The difference is important with native child // widgets where tlw != widget. - backingStore->handle()->composeAndFlush(widget->windowHandle(), region, offset, widgetTextures, + backingStore->handle()->composeAndFlush(widget->windowHandle(), effectiveRegion, offset, widgetTextures, tlw->d_func()->shareContext(), translucentBackground); widget->window()->d_func()->sendComposeStatus(widget->window(), true); } else #endif - backingStore->flush(region, widget->windowHandle(), offset); + backingStore->flush(effectiveRegion, widget->windowHandle(), offset); } #ifndef QT_NO_PAINT_DEBUG diff --git a/src/widgets/kernel/qwidgetwindow.cpp b/src/widgets/kernel/qwidgetwindow.cpp index f3fbe13763..3e15b6977a 100644 --- a/src/widgets/kernel/qwidgetwindow.cpp +++ b/src/widgets/kernel/qwidgetwindow.cpp @@ -535,7 +535,7 @@ void QWidgetWindow::handleMouseEvent(QMouseEvent *event) // activate window of the widget under mouse pointer if (!w->isActiveWindow()) { w->activateWindow(); - w->raise(); + w->window()->raise(); } QWindow *win = w->windowHandle(); |