Reserve the virtual viewportSizeHint method in QAbstractScrollArea.
authorStephen Kelly <stephen.kelly@kdab.com>
Mon, 19 Mar 2012 11:21:11 +0000 (12:21 +0100)
committerQt by Nokia <qt-info@nokia.com>
Tue, 20 Mar 2012 18:09:27 +0000 (19:09 +0100)
The virtual method will be used to implement
the patch at http://codereview.qt-project.org/#change,11763

Change-Id: I6d6ffbb8aaaba73e5c769f3435cc60323c77b75a
Reviewed-by: Christoph Schleifenbaum <christoph.schleifenbaum@kdab.com>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
src/widgets/widgets/qabstractscrollarea.cpp
src/widgets/widgets/qabstractscrollarea.h

index a960ce8..dc96321 100644 (file)
@@ -1489,6 +1489,16 @@ void QAbstractScrollArea::setupViewport(QWidget *viewport)
     Q_UNUSED(viewport);
 }
 
+/*!
+    \internal
+
+    This method is reserved for future use.
+*/
+QSize QAbstractScrollArea::viewportSizeHint() const
+{
+    return QSize();
+}
+
 QT_END_NAMESPACE
 
 #include "moc_qabstractscrollarea.cpp"
index f155f52..2f1168a 100644 (file)
@@ -122,6 +122,8 @@ protected:
 
     virtual void scrollContentsBy(int dx, int dy);
 
+    virtual QSize viewportSizeHint() const;
+
 private:
     Q_DECLARE_PRIVATE(QAbstractScrollArea)
     Q_DISABLE_COPY(QAbstractScrollArea)