diff options
Diffstat (limited to 'src/widgets/kernel')
-rw-r--r-- | src/widgets/kernel/qapplication.cpp | 1 | ||||
-rw-r--r-- | src/widgets/kernel/qgridlayout.cpp | 2 | ||||
-rw-r--r-- | src/widgets/kernel/qt_widgets_pch.h | 2 | ||||
-rw-r--r-- | src/widgets/kernel/qwidget.cpp | 6 | ||||
-rw-r--r-- | src/widgets/kernel/qwidgetbackingstore.cpp | 14 | ||||
-rw-r--r-- | src/widgets/kernel/qwidgetwindow.cpp | 2 |
6 files changed, 10 insertions, 17 deletions
diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp index f8f24d1ff0..40b0af359c 100644 --- a/src/widgets/kernel/qapplication.cpp +++ b/src/widgets/kernel/qapplication.cpp @@ -58,7 +58,6 @@ #include "qstyle.h" #include "qstyleoption.h" #include "qstylefactory.h" -#include "qtextcodec.h" #include "qtooltip.h" #include "qtranslator.h" #include "qvariant.h" diff --git a/src/widgets/kernel/qgridlayout.cpp b/src/widgets/kernel/qgridlayout.cpp index db8ef89477..f1c6c96a6d 100644 --- a/src/widgets/kernel/qgridlayout.cpp +++ b/src/widgets/kernel/qgridlayout.cpp @@ -1029,7 +1029,7 @@ QRect QGridLayoutPrivate::cellRect(int row, int col) const This illustration shows a fragment of a dialog with a five-column, three-row grid (the grid is shown overlaid in magenta): - \image gridlayout.png A grid layout + \image qgridlayout.png A grid layout Columns 0, 2 and 4 in this dialog fragment are made up of a QLabel, a QLineEdit, and a QListBox. Columns 1 and 3 are diff --git a/src/widgets/kernel/qt_widgets_pch.h b/src/widgets/kernel/qt_widgets_pch.h index 924a68d62e..bec6536637 100644 --- a/src/widgets/kernel/qt_widgets_pch.h +++ b/src/widgets/kernel/qt_widgets_pch.h @@ -63,7 +63,9 @@ #include <qregexp.h> #include <qstring.h> #include <qstringlist.h> +#if QT_CONFIG(textcodec) #include <qtextcodec.h> +#endif #include <qapplication.h> #include <qbitmap.h> diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp index 4300d83e9c..85a89b717e 100644 --- a/src/widgets/kernel/qwidget.cpp +++ b/src/widgets/kernel/qwidget.cpp @@ -5861,7 +5861,11 @@ QPixmap QWidgetEffectSourcePrivate::pixmap(Qt::CoordinateSystem system, QPoint * pixmapOffset -= effectRect.topLeft(); - const qreal dpr = context->painter->device()->devicePixelRatioF(); + qreal dpr(1.0); + if (const auto *paintDevice = context->painter->device()) + dpr = paintDevice->devicePixelRatioF(); + else + qWarning("QWidgetEffectSourcePrivate::pixmap: Painter not active"); QPixmap pixmap(effectRect.size() * dpr); pixmap.setDevicePixelRatio(dpr); diff --git a/src/widgets/kernel/qwidgetbackingstore.cpp b/src/widgets/kernel/qwidgetbackingstore.cpp index 53769ef9ed..b40c2d12ad 100644 --- a/src/widgets/kernel/qwidgetbackingstore.cpp +++ b/src/widgets/kernel/qwidgetbackingstore.cpp @@ -1053,20 +1053,8 @@ static QPlatformTextureList *widgetTexturesFor(QWidget *tlw, QWidget *widget) static bool switchableWidgetComposition = QGuiApplicationPrivate::instance()->platformIntegration() ->hasCapability(QPlatformIntegration::SwitchableWidgetComposition); - if (!switchableWidgetComposition -// The Windows compositor handles fullscreen OpenGL window specially. Besides -// having trouble with popups, it also has issues with flip-flopping between -// OpenGL-based and normal flushing. Therefore, stick with GL for fullscreen -// windows (QTBUG-53515). Similary, translucent windows should not switch to -// layered native windows (QTBUG-54734). -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) && !defined(Q_OS_WINCE) - || tlw->windowState().testFlag(Qt::WindowFullScreen) - || tlw->testAttribute(Qt::WA_TranslucentBackground) -#endif - ) - { + if (!switchableWidgetComposition) return qt_dummy_platformTextureList(); - } } return 0; diff --git a/src/widgets/kernel/qwidgetwindow.cpp b/src/widgets/kernel/qwidgetwindow.cpp index 7292c795b8..0b2d72f330 100644 --- a/src/widgets/kernel/qwidgetwindow.cpp +++ b/src/widgets/kernel/qwidgetwindow.cpp @@ -521,7 +521,7 @@ void QWidgetWindow::handleMouseEvent(QMouseEvent *event) if (activePopupWidget->isEnabled()) { // deliver event qt_replay_popup_mouse_event = false; - QWidget *receiver = activePopupWidget; + QPointer<QWidget> receiver = activePopupWidget; QPoint widgetPos = mapped; if (qt_button_down) receiver = qt_button_down; |