QFramePrivate & subclasses: declare dtor out-of-line

De-duplicates vtables and enables RTTI on this class
hierarchy.

Export QFramePrivate, as QAbstractScrollAreaPrivate
(a subclass) is exported, too.

Change-Id: I541886373435dc49c4267190a7191e2436f4c95e
Reported-by: Volker Krause <volker.krause@kdab.com>
Task-number: QTBUG-45582
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Marc Mutz 2015-05-26 22:16:25 +02:00
parent 6a86b8fa78
commit 933bf178aa
8 changed files with 24 additions and 1 deletions

View File

@ -168,6 +168,10 @@ QAbstractScrollAreaPrivate::QAbstractScrollAreaPrivate()
{
}
QAbstractScrollAreaPrivate::~QAbstractScrollAreaPrivate()
{
}
QAbstractScrollAreaScrollBarContainer::QAbstractScrollAreaScrollBarContainer(Qt::Orientation orientation, QWidget *parent)
:QWidget(parent), scrollBar(new QScrollBar(orientation, this)),
layout(new QBoxLayout(orientation == Qt::Horizontal ? QBoxLayout::LeftToRight : QBoxLayout::TopToBottom)),

View File

@ -54,12 +54,15 @@ QT_BEGIN_NAMESPACE
class QScrollBar;
class QAbstractScrollAreaScrollBarContainer;
// ### Qt 6: is the export still needed? If not, unexport QFramePrivate, too.
class Q_WIDGETS_EXPORT QAbstractScrollAreaPrivate: public QFramePrivate
{
Q_DECLARE_PUBLIC(QAbstractScrollArea)
public:
QAbstractScrollAreaPrivate();
~QAbstractScrollAreaPrivate();
void replaceScrollBar(QScrollBar *scrollBar, Qt::Orientation orientation);

View File

@ -55,6 +55,10 @@ QFramePrivate::QFramePrivate()
{
}
QFramePrivate::~QFramePrivate()
{
}
inline void QFramePrivate::init()
{
setLayoutItemMargins(QStyle::SE_FrameLayoutItem);

View File

@ -50,11 +50,13 @@
QT_BEGIN_NAMESPACE
class QFramePrivate : public QWidgetPrivate
// ### unexport this class when and if QAbstractScrollAreaPrivate is unexported
class Q_WIDGETS_EXPORT QFramePrivate : public QWidgetPrivate
{
Q_DECLARE_PUBLIC(QFrame)
public:
QFramePrivate();
~QFramePrivate();
void updateFrameWidth();
void updateStyledFrameWidths();

View File

@ -53,6 +53,10 @@
QT_BEGIN_NAMESPACE
QLabelPrivate::~QLabelPrivate()
{
}
/*!
\class QLabel
\brief The QLabel widget provides a text or image display.

View File

@ -65,6 +65,7 @@ class QLabelPrivate : public QFramePrivate
Q_DECLARE_PUBLIC(QLabel)
public:
QLabelPrivate() {}
~QLabelPrivate();
void init();
void clearContents();

View File

@ -58,6 +58,10 @@ QT_BEGIN_NAMESPACE
//#define QSPLITTER_DEBUG
QSplitterPrivate::~QSplitterPrivate()
{
}
/*!
\class QSplitterHandle
\brief The QSplitterHandle class provides handle functionality for the splitter.

View File

@ -76,6 +76,7 @@ class QSplitterPrivate : public QFramePrivate
public:
QSplitterPrivate() : rubberBand(0), opaque(true), firstShow(true),
childrenCollapsible(true), compatMode(false), handleWidth(-1), blockChildAdd(false), opaqueResizeSet(false) {}
~QSplitterPrivate();
QPointer<QRubberBand> rubberBand;
mutable QList<QSplitterLayoutStruct *> list;