diff options
author | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-06-10 14:27:22 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-06-10 13:03:24 +0000 |
commit | ac2a44c716d84979747e166f43129e59612e1a97 (patch) | |
tree | bafaaeeeddcdb8744100fb7c3498b871c05241da /src/plugins/platforms/windows | |
parent | 34e06b48678b60716d614281898fd4e18fb4d586 (diff) |
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 <paul.tvete@theqtcompany.com>
Diffstat (limited to 'src/plugins/platforms/windows')
-rw-r--r-- | src/plugins/platforms/windows/qwindowswindow.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
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 *>(qWindow))->closestAcceptableGeometry(suggestedGeometry); + const QRectF correctedGeometryF = qWindow->handle()->windowClosestAcceptableGeometry(suggestedGeometry); if (!correctedGeometryF.isValid()) return false; const QRect correctedFrameGeometry = correctedGeometryF.toRect() + margins; |