From ac2a44c716d84979747e166f43129e59612e1a97 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 10 Jun 2015 14:27:22 +0200 Subject: Add QPlatformWindow::windowClosestAcceptableGeometry(). Add a function to determine the closest acceptable geometry (height-for-width) to QPlatformWindow similar to the existing QPlatformWindow::windowMinimumSize(), windowMaximumSize()... Clean up the hack in the Windows platform plugin accordingly. Change-Id: I96e943cfdbafdd0ff444e0d53ee0bdf8603d33df Reviewed-by: Paul Olav Tvete --- src/plugins/platforms/windows/qwindowswindow.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/plugins') diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp index d6677bb228..0f32ff1f98 100644 --- a/src/plugins/platforms/windows/qwindowswindow.cpp +++ b/src/plugins/platforms/windows/qwindowswindow.cpp @@ -1811,8 +1811,7 @@ bool QWindowsWindow::handleGeometryChangingMessage(MSG *message, const QWindow * const QRect suggestedFrameGeometry(windowPos->x, windowPos->y, windowPos->cx, windowPos->cy); const QRect suggestedGeometry = suggestedFrameGeometry - margins; - const QRectF correctedGeometryF = - qt_window_private(const_cast(qWindow))->closestAcceptableGeometry(suggestedGeometry); + const QRectF correctedGeometryF = qWindow->handle()->windowClosestAcceptableGeometry(suggestedGeometry); if (!correctedGeometryF.isValid()) return false; const QRect correctedFrameGeometry = correctedGeometryF.toRect() + margins; -- cgit v1.2.3