summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2014-10-28 14:20:46 +0100
committerFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2014-11-27 11:10:31 +0100
commitcb679241b1df9117ef50664dcf5549341bac8c3e (patch)
treedad16969d4a176266e929ee196ba97fd88bd116d /src/gui/kernel
parentc6aa76122e209350b8a7b3cb8b5bc8127a3722e7 (diff)
Implement heightForWidth().
Add a virtual function QWindowPrivate::closestAcceptableGeometry() which is called from the platform plugin. Task-number: QTBUG-36220 Task-number: QTBUG-36318 Change-Id: I2b3d205e2c75f1d4dd2ba1d333b0d89bc0fcf13a Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
Diffstat (limited to 'src/gui/kernel')
-rw-r--r--src/gui/kernel/qwindow.cpp9
-rw-r--r--src/gui/kernel/qwindow_p.h1
2 files changed, 10 insertions, 0 deletions
diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp
index c6dd0955aa..c5d88b198b 100644
--- a/src/gui/kernel/qwindow.cpp
+++ b/src/gui/kernel/qwindow.cpp
@@ -411,6 +411,15 @@ void QWindowPrivate::clearFocusObject()
{
}
+// Allows for manipulating the suggested geometry before a resize/move
+// event in derived classes for platforms that support it, for example to
+// implement heightForWidth().
+QRectF QWindowPrivate::closestAcceptableGeometry(const QRectF &rect) const
+{
+ Q_UNUSED(rect)
+ return QRectF();
+}
+
/*!
Sets the \a surfaceType of the window.
diff --git a/src/gui/kernel/qwindow_p.h b/src/gui/kernel/qwindow_p.h
index 46dc2e463c..bc5dfa4876 100644
--- a/src/gui/kernel/qwindow_p.h
+++ b/src/gui/kernel/qwindow_p.h
@@ -132,6 +132,7 @@ public:
void emitScreenChangedRecursion(QScreen *newScreen);
virtual void clearFocusObject();
+ virtual QRectF closestAcceptableGeometry(const QRectF &rect) const;
QWindow::SurfaceType surfaceType;
Qt::WindowFlags windowFlags;