summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-01-18 09:32:56 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-01-18 09:32:56 (GMT)
commit437a67eb055c688ea4b778f5cfc9132fe02063c6 (patch)
tree331ec37ebc1b5c2e4080f3038abb1c72e2ac3cef /src/gui
parentdcd7c79357c5ff5096ec4fa13ad16ef8a0497a5f (diff)
parent7e76201808549c0837d1a5154ed8737fb0296c00 (diff)
downloadQt-437a67eb055c688ea4b778f5cfc9132fe02063c6.zip
Qt-437a67eb055c688ea4b778f5cfc9132fe02063c6.tar.gz
Qt-437a67eb055c688ea4b778f5cfc9132fe02063c6.tar.bz2
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2: Fixes: When calling QDesktopWidget::screenGeometry() with a null
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/kernel/qdesktopwidget.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gui/kernel/qdesktopwidget.cpp b/src/gui/kernel/qdesktopwidget.cpp
index c8a4373..24b4e57 100644
--- a/src/gui/kernel/qdesktopwidget.cpp
+++ b/src/gui/kernel/qdesktopwidget.cpp
@@ -47,6 +47,11 @@ QT_BEGIN_NAMESPACE
const QRect QDesktopWidget::screenGeometry(const QWidget *widget) const
{
+ if (!widget) {
+ qWarning("QDesktopWidget::screenGeometry(): Attempt "
+ "to get the screen geometry of a null widget");
+ return QRect();
+ }
QRect rect = QWidgetPrivate::screenGeometry(widget);
if (rect.isNull())
return screenGeometry(screenNumber(widget));
@@ -55,6 +60,11 @@ const QRect QDesktopWidget::screenGeometry(const QWidget *widget) const
const QRect QDesktopWidget::availableGeometry(const QWidget *widget) const
{
+ if (!widget) {
+ qWarning("QDesktopWidget::availableGeometry(): Attempt "
+ "to get the available geometry of a null widget");
+ return QRect();
+ }
QRect rect = QWidgetPrivate::screenGeometry(widget);
if (rect.isNull())
return availableGeometry(screenNumber(widget));