libqt5-qtbase/Make-sure-theres-a-scene-before-using-it.patch
Dominique Leuenberger 7169baff88 Accepting request 286573 from KDE:Qt5
- Added patches from upstream:
  Fix-Meta-shortcuts-on-XCB.patch (qtbug#43572),
  Fix-detection-of-GCC5.patch,
  Fix-physical-DPI-and-size-for-rotated-screens-on-X11.patch
  (qtbug#43688), Fix-typo-in-Qt5CoreMacroscmake.patch,
  Make-sure-theres-a-scene-before-using-it.patch (qtbug#44509),
  Multi-screen-DPI-support-for-X11.patch (qtbug#43713),
  QSystemTrayIcon-handle-submenus-correctly.patch,
  Update-mouse-buttons-from-MotionNotify-events.patch
  (qtbug#32609, qtbug#35065, qtbug#43776, qtbug#44166, qtbug#44231),
  X11-devicePixelRatio-screen-mapping-fix.patch (qtbug#43713) and
  xcb-Dont-return-0-from-QXcbKeyboard-possibleKeys.patch
  (qtcreatorbug#9589)

OBS-URL: https://build.opensuse.org/request/show/286573
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libqt5-qtbase?expand=0&rev=37
2015-02-20 11:43:00 +00:00

38 lines
1.5 KiB
Diff

From: Albert Astals Cid <albert.astals@canonical.com>
Date: Tue, 17 Feb 2015 08:53:27 +0000
Subject: Make sure there's a scene before using it
X-Git-Url: http://quickgit.kde.org/?p=qt%2Fqtbase.git&a=commitdiff&h=8fccfef424e7d2b7a2019b1f828234145d4011df
---
Make sure there's a scene before using it
Fixes crash hovering links in quassel
Task-number: QTBUG-44509
Change-Id: I77d8d9118ad185ed70a46e91445e2960200e562b
Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
---
--- a/src/widgets/kernel/qwidget.cpp
+++ b/src/widgets/kernel/qwidget.cpp
@@ -12272,7 +12272,7 @@
{
#ifndef QT_NO_GRAPHICSVIEW
Q_D(const QWidget);
- if (d->extra && d->extra->proxyWidget) {
+ if (d->extra && d->extra->proxyWidget && d->extra->proxyWidget->scene()) {
const QList <QGraphicsView *> views = d->extra->proxyWidget->scene()->views();
if (!views.isEmpty()) {
const QPointF scenePos = d->extra->proxyWidget->mapToScene(pos);
@@ -12307,7 +12307,7 @@
{
#ifndef QT_NO_GRAPHICSVIEW
Q_D(const QWidget);
- if (d->extra && d->extra->proxyWidget) {
+ if (d->extra && d->extra->proxyWidget && d->extra->proxyWidget->scene()) {
const QList <QGraphicsView *> views = d->extra->proxyWidget->scene()->views();
if (!views.isEmpty()) {
const QPoint viewPortPos = views.first()->viewport()->mapFromGlobal(pos);