From 92ea8a1df59cb00178cd7670d2ce167bba3dd953 Mon Sep 17 00:00:00 2001 From: Carlos Manuel Duclos Vergara Date: Fri, 14 May 2010 15:55:48 +0200 Subject: Fix for autotest failure in qwidget::saveRestoreGeometry() The problem was that the fix for bug QTBUG-10519 introduced a new state for saving the geometry. However there is an exception and that exception comes into play when saving a maximized window. This fixes that by making sure we only enter into that state when the window is not currently maximized. Reviewed-by: tbastian --- src/gui/kernel/qwidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index 82eb12b..1f2cd8c 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -6731,7 +6731,7 @@ QByteArray QWidget::saveGeometry() const Q_D(const QWidget); QRect newFramePosition = frameGeometry(); QRect newNormalPosition = normalGeometry(); - if(d->topData()->wasMaximized) { + if(d->topData()->wasMaximized && !(windowState() & Qt::WindowMaximized)) { // Change the starting position newFramePosition.moveTo(0, 0); newNormalPosition.moveTo(0, 0); -- cgit v0.12