De-inline some destructors in QtWidgets
Destructors should be out-of-line so that the compiler doesn't generate one per translation unit. Apart from creating more work for the compiler, it can also lead to duplicated vtables if the dtor is the first virtual function (reimplementation), and all other virtuals are inline, too. Duplicate vtables then break RTTI. In addition, having virtual dtors de-inlined allows us to add code to them in a BC way. As a final argument, this change may lead to less code app-side, since a sequence of cross-DLL calls (to member variable dtors) is replaced by a single cross-DLL call to the new out-of-line dtor. Change-Id: Ifb8c4aa992c75d61ba9ac8de5ab41d1e96b0a0b1 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>bb10
parent
65755f9a68
commit
9d95bc58e8
|
|
@ -3383,6 +3383,13 @@ QWizardPage::QWizardPage(QWidget *parent)
|
|||
connect(this, SIGNAL(completeChanged()), this, SLOT(_q_updateCachedCompleteState()));
|
||||
}
|
||||
|
||||
/*!
|
||||
Destructor.
|
||||
*/
|
||||
QWizardPage::~QWizardPage()
|
||||
{
|
||||
}
|
||||
|
||||
/*!
|
||||
\property QWizardPage::title
|
||||
\brief the title of the page
|
||||
|
|
|
|||
|
|
@ -218,6 +218,7 @@ class Q_WIDGETS_EXPORT QWizardPage : public QWidget
|
|||
|
||||
public:
|
||||
explicit QWizardPage(QWidget *parent = 0);
|
||||
~QWizardPage();
|
||||
|
||||
void setTitle(const QString &title);
|
||||
QString title() const;
|
||||
|
|
|
|||
|
|
@ -7575,6 +7575,13 @@ QGraphicsObject::QGraphicsObject(QGraphicsItemPrivate &dd, QGraphicsItem *parent
|
|||
QGraphicsItem::d_ptr->isObject = true;
|
||||
}
|
||||
|
||||
/*!
|
||||
Destructor.
|
||||
*/
|
||||
QGraphicsObject::~QGraphicsObject()
|
||||
{
|
||||
}
|
||||
|
||||
/*!
|
||||
\reimp
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -563,6 +563,7 @@ class Q_WIDGETS_EXPORT QGraphicsObject : public QObject, public QGraphicsItem
|
|||
Q_INTERFACES(QGraphicsItem)
|
||||
public:
|
||||
explicit QGraphicsObject(QGraphicsItem *parent = 0);
|
||||
~QGraphicsObject();
|
||||
|
||||
#ifdef Q_NO_USING_KEYWORD
|
||||
const QObjectList &children() const { return QObject::children(); }
|
||||
|
|
|
|||
|
|
@ -295,6 +295,12 @@ QPanGesture::QPanGesture(QObject *parent)
|
|||
d_func()->gestureType = Qt::PanGesture;
|
||||
}
|
||||
|
||||
/*!
|
||||
Destructor.
|
||||
*/
|
||||
QPanGesture::~QPanGesture()
|
||||
{
|
||||
}
|
||||
|
||||
QPointF QPanGesture::lastOffset() const
|
||||
{
|
||||
|
|
@ -486,6 +492,13 @@ QPinchGesture::QPinchGesture(QObject *parent)
|
|||
d_func()->gestureType = Qt::PinchGesture;
|
||||
}
|
||||
|
||||
/*!
|
||||
Destructor.
|
||||
*/
|
||||
QPinchGesture::~QPinchGesture()
|
||||
{
|
||||
}
|
||||
|
||||
QPinchGesture::ChangeFlags QPinchGesture::totalChangeFlags() const
|
||||
{
|
||||
return d_func()->totalChangeFlags;
|
||||
|
|
@ -673,6 +686,13 @@ QSwipeGesture::QSwipeGesture(QObject *parent)
|
|||
d_func()->gestureType = Qt::SwipeGesture;
|
||||
}
|
||||
|
||||
/*!
|
||||
Destructor.
|
||||
*/
|
||||
QSwipeGesture::~QSwipeGesture()
|
||||
{
|
||||
}
|
||||
|
||||
QSwipeGesture::SwipeDirection QSwipeGesture::horizontalDirection() const
|
||||
{
|
||||
Q_D(const QSwipeGesture);
|
||||
|
|
@ -732,6 +752,13 @@ QTapGesture::QTapGesture(QObject *parent)
|
|||
d_func()->gestureType = Qt::TapGesture;
|
||||
}
|
||||
|
||||
/*!
|
||||
Destructor.
|
||||
*/
|
||||
QTapGesture::~QTapGesture()
|
||||
{
|
||||
}
|
||||
|
||||
QPointF QTapGesture::position() const
|
||||
{
|
||||
return d_func()->position;
|
||||
|
|
@ -769,6 +796,13 @@ QTapAndHoldGesture::QTapAndHoldGesture(QObject *parent)
|
|||
d_func()->gestureType = Qt::TapAndHoldGesture;
|
||||
}
|
||||
|
||||
/*!
|
||||
Destructor.
|
||||
*/
|
||||
QTapAndHoldGesture::~QTapAndHoldGesture()
|
||||
{
|
||||
}
|
||||
|
||||
QPointF QTapAndHoldGesture::position() const
|
||||
{
|
||||
return d_func()->position;
|
||||
|
|
|
|||
|
|
@ -118,6 +118,7 @@ class Q_WIDGETS_EXPORT QPanGesture : public QGesture
|
|||
|
||||
public:
|
||||
explicit QPanGesture(QObject *parent = 0);
|
||||
~QPanGesture();
|
||||
|
||||
QPointF lastOffset() const;
|
||||
QPointF offset() const;
|
||||
|
|
@ -164,6 +165,7 @@ public:
|
|||
|
||||
public:
|
||||
explicit QPinchGesture(QObject *parent = 0);
|
||||
~QPinchGesture();
|
||||
|
||||
ChangeFlags totalChangeFlags() const;
|
||||
void setTotalChangeFlags(ChangeFlags value);
|
||||
|
|
@ -219,6 +221,7 @@ public:
|
|||
enum SwipeDirection { NoDirection, Left, Right, Up, Down };
|
||||
|
||||
explicit QSwipeGesture(QObject *parent = 0);
|
||||
~QSwipeGesture();
|
||||
|
||||
SwipeDirection horizontalDirection() const;
|
||||
SwipeDirection verticalDirection() const;
|
||||
|
|
@ -239,6 +242,7 @@ class Q_WIDGETS_EXPORT QTapGesture : public QGesture
|
|||
|
||||
public:
|
||||
explicit QTapGesture(QObject *parent = 0);
|
||||
~QTapGesture();
|
||||
|
||||
QPointF position() const;
|
||||
void setPosition(const QPointF &pos);
|
||||
|
|
@ -256,6 +260,7 @@ class Q_WIDGETS_EXPORT QTapAndHoldGesture : public QGesture
|
|||
|
||||
public:
|
||||
explicit QTapAndHoldGesture(QObject *parent = 0);
|
||||
~QTapAndHoldGesture();
|
||||
|
||||
QPointF position() const;
|
||||
void setPosition(const QPointF &pos);
|
||||
|
|
|
|||
|
|
@ -262,6 +262,11 @@ void QLayoutItem::setAlignment(Qt::Alignment alignment)
|
|||
nothing else wants the space.
|
||||
*/
|
||||
|
||||
/*!
|
||||
Destructor.
|
||||
*/
|
||||
QSpacerItem::~QSpacerItem() {}
|
||||
|
||||
/*!
|
||||
Changes this spacer item to have preferred width \a w, preferred
|
||||
height \a h, horizontal size policy \a hPolicy and vertical size
|
||||
|
|
@ -290,6 +295,11 @@ void QSpacerItem::changeSize(int w, int h, QSizePolicy::Policy hPolicy,
|
|||
Creates an item containing the given \a widget.
|
||||
*/
|
||||
|
||||
/*!
|
||||
Destructor.
|
||||
*/
|
||||
QWidgetItem::~QWidgetItem() {}
|
||||
|
||||
/*!
|
||||
Destroys the QLayoutItem.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -99,6 +99,8 @@ public:
|
|||
QSizePolicy::Policy hData = QSizePolicy::Minimum,
|
||||
QSizePolicy::Policy vData = QSizePolicy::Minimum)
|
||||
: width(w), height(h), sizeP(hData, vData) { }
|
||||
~QSpacerItem();
|
||||
|
||||
void changeSize(int w, int h,
|
||||
QSizePolicy::Policy hData = QSizePolicy::Minimum,
|
||||
QSizePolicy::Policy vData = QSizePolicy::Minimum);
|
||||
|
|
@ -124,6 +126,8 @@ class Q_WIDGETS_EXPORT QWidgetItem : public QLayoutItem
|
|||
|
||||
public:
|
||||
explicit QWidgetItem(QWidget *w) : wid(w) { }
|
||||
~QWidgetItem();
|
||||
|
||||
QSize sizeHint() const;
|
||||
QSize minimumSize() const;
|
||||
QSize maximumSize() const;
|
||||
|
|
|
|||
|
|
@ -3888,6 +3888,13 @@ QStyleHintReturnMask::QStyleHintReturnMask() : QStyleHintReturn(Version, Type)
|
|||
{
|
||||
}
|
||||
|
||||
/*!
|
||||
Destructor.
|
||||
*/
|
||||
QStyleHintReturnMask::~QStyleHintReturnMask()
|
||||
{
|
||||
}
|
||||
|
||||
/*!
|
||||
\enum QStyleHintReturnMask::StyleOptionType
|
||||
|
||||
|
|
@ -3941,6 +3948,13 @@ QStyleHintReturnVariant::QStyleHintReturnVariant() : QStyleHintReturn(Version, T
|
|||
{
|
||||
}
|
||||
|
||||
/*!
|
||||
Destructor.
|
||||
*/
|
||||
QStyleHintReturnVariant::~QStyleHintReturnVariant()
|
||||
{
|
||||
}
|
||||
|
||||
/*!
|
||||
\enum QStyleHintReturnVariant::StyleOptionType
|
||||
|
||||
|
|
|
|||
|
|
@ -709,6 +709,7 @@ public:
|
|||
enum StyleOptionVersion { Version = 1 };
|
||||
|
||||
QStyleHintReturnMask();
|
||||
~QStyleHintReturnMask();
|
||||
|
||||
QRegion region;
|
||||
};
|
||||
|
|
@ -719,6 +720,7 @@ public:
|
|||
enum StyleOptionVersion { Version = 1 };
|
||||
|
||||
QStyleHintReturnVariant();
|
||||
~QStyleHintReturnVariant();
|
||||
|
||||
QVariant variant;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -80,6 +80,10 @@ QWindowsCEStyle::QWindowsCEStyle() : QWindowsStyle() {
|
|||
qApp->setEffectEnabled(Qt::UI_AnimateMenu, false);
|
||||
}
|
||||
|
||||
QWindowsCEStyle::~QWindowsCEStyle()
|
||||
{
|
||||
}
|
||||
|
||||
void QWindowsCEStyle::drawPrimitive(PrimitiveElement element, const QStyleOption *option,
|
||||
QPainter *painter, const QWidget *widget) const {
|
||||
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@ class Q_WIDGETS_EXPORT QWindowsCEStyle : public QWindowsStyle
|
|||
Q_OBJECT
|
||||
public:
|
||||
QWindowsCEStyle();
|
||||
~QWindowsCEStyle();
|
||||
|
||||
void drawPrimitive(PrimitiveElement element, const QStyleOption *option,
|
||||
QPainter *painter, const QWidget *widget = 0) const;
|
||||
|
|
|
|||
|
|
@ -4515,6 +4515,10 @@ QWindowsMobileStyle::QWindowsMobileStyle() : QWindowsStyle(*new QWindowsMobileSt
|
|||
qApp->setEffectEnabled(Qt::UI_AnimateMenu, false);
|
||||
}
|
||||
|
||||
QWindowsMobileStyle::~QWindowsMobileStyle()
|
||||
{
|
||||
}
|
||||
|
||||
QWindowsMobileStylePrivate::QWindowsMobileStylePrivate() :QWindowsStylePrivate() {
|
||||
|
||||
#ifdef Q_OS_WINCE
|
||||
|
|
|
|||
|
|
@ -58,6 +58,7 @@ class Q_WIDGETS_EXPORT QWindowsMobileStyle : public QWindowsStyle
|
|||
Q_OBJECT
|
||||
public:
|
||||
QWindowsMobileStyle();
|
||||
~QWindowsMobileStyle();
|
||||
|
||||
void drawPrimitive(PrimitiveElement element, const QStyleOption *option,
|
||||
QPainter *painter, const QWidget *widget = 0) const;
|
||||
|
|
|
|||
|
|
@ -203,6 +203,13 @@ QWindowsVistaStyle::QWindowsVistaStyle()
|
|||
{
|
||||
}
|
||||
|
||||
/*!
|
||||
Destructor.
|
||||
*/
|
||||
QWindowsVistaStyle::~QWindowsVistaStyle()
|
||||
{
|
||||
}
|
||||
|
||||
//convert Qt state flags to uxtheme button states
|
||||
static int buttonStateId(int flags, int partId)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -57,6 +57,7 @@ class Q_WIDGETS_EXPORT QWindowsVistaStyle : public QWindowsXPStyle
|
|||
Q_OBJECT
|
||||
public:
|
||||
QWindowsVistaStyle();
|
||||
~QWindowsVistaStyle();
|
||||
|
||||
void drawPrimitive(PrimitiveElement element, const QStyleOption *option,
|
||||
QPainter *painter, const QWidget *widget = 0) const;
|
||||
|
|
|
|||
|
|
@ -216,6 +216,13 @@ QCheckBox::QCheckBox(const QString &text, QWidget *parent)
|
|||
setText(text);
|
||||
}
|
||||
|
||||
/*!
|
||||
Destructor.
|
||||
*/
|
||||
QCheckBox::~QCheckBox()
|
||||
{
|
||||
}
|
||||
|
||||
void QCheckBox::setTristate(bool y)
|
||||
{
|
||||
Q_D(QCheckBox);
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ class Q_WIDGETS_EXPORT QCheckBox : public QAbstractButton
|
|||
public:
|
||||
explicit QCheckBox(QWidget *parent=0);
|
||||
explicit QCheckBox(const QString &text, QWidget *parent=0);
|
||||
|
||||
~QCheckBox();
|
||||
|
||||
QSize sizeHint() const;
|
||||
QSize minimumSizeHint() const;
|
||||
|
|
|
|||
|
|
@ -302,6 +302,13 @@ QCommandLinkButton::QCommandLinkButton(const QString &text, const QString &descr
|
|||
d->init();
|
||||
}
|
||||
|
||||
/*!
|
||||
Destructor.
|
||||
*/
|
||||
QCommandLinkButton::~QCommandLinkButton()
|
||||
{
|
||||
}
|
||||
|
||||
/*! \reimp */
|
||||
bool QCommandLinkButton::event(QEvent *e)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -62,6 +62,7 @@ public:
|
|||
explicit QCommandLinkButton(QWidget *parent=0);
|
||||
explicit QCommandLinkButton(const QString &text, QWidget *parent=0);
|
||||
explicit QCommandLinkButton(const QString &text, const QString &description, QWidget *parent=0);
|
||||
~QCommandLinkButton();
|
||||
|
||||
QString description() const;
|
||||
void setDescription(const QString &description);
|
||||
|
|
|
|||
|
|
@ -218,6 +218,13 @@ QDateTimeEdit::QDateTimeEdit(const QVariant &var, QVariant::Type parserType, QWi
|
|||
d->init(var);
|
||||
}
|
||||
|
||||
/*!
|
||||
Destructor.
|
||||
*/
|
||||
QDateTimeEdit::~QDateTimeEdit()
|
||||
{
|
||||
}
|
||||
|
||||
/*!
|
||||
\property QDateTimeEdit::dateTime
|
||||
\brief the QDateTime that is set in the QDateTimeEdit
|
||||
|
|
@ -1561,6 +1568,13 @@ QTimeEdit::QTimeEdit(const QTime &time, QWidget *parent)
|
|||
{
|
||||
}
|
||||
|
||||
/*!
|
||||
Destructor.
|
||||
*/
|
||||
QTimeEdit::~QTimeEdit()
|
||||
{
|
||||
}
|
||||
|
||||
/*!
|
||||
\property QTimeEdit::time
|
||||
\internal
|
||||
|
|
@ -1630,6 +1644,13 @@ QDateEdit::QDateEdit(const QDate &date, QWidget *parent)
|
|||
{
|
||||
}
|
||||
|
||||
/*!
|
||||
Destructor.
|
||||
*/
|
||||
QDateEdit::~QDateEdit()
|
||||
{
|
||||
}
|
||||
|
||||
/*!
|
||||
\property QDateEdit::date
|
||||
\internal
|
||||
|
|
|
|||
|
|
@ -100,6 +100,7 @@ public:
|
|||
explicit QDateTimeEdit(const QDateTime &dt, QWidget *parent = 0);
|
||||
explicit QDateTimeEdit(const QDate &d, QWidget *parent = 0);
|
||||
explicit QDateTimeEdit(const QTime &t, QWidget *parent = 0);
|
||||
~QDateTimeEdit();
|
||||
|
||||
QDateTime dateTime() const;
|
||||
QDate date() const;
|
||||
|
|
@ -209,6 +210,7 @@ class Q_WIDGETS_EXPORT QTimeEdit : public QDateTimeEdit
|
|||
public:
|
||||
explicit QTimeEdit(QWidget *parent = 0);
|
||||
explicit QTimeEdit(const QTime &time, QWidget *parent = 0);
|
||||
~QTimeEdit();
|
||||
|
||||
Q_SIGNALS:
|
||||
void userTimeChanged(const QTime &time);
|
||||
|
|
@ -221,6 +223,7 @@ class Q_WIDGETS_EXPORT QDateEdit : public QDateTimeEdit
|
|||
public:
|
||||
explicit QDateEdit(QWidget *parent = 0);
|
||||
explicit QDateEdit(const QDate &date, QWidget *parent = 0);
|
||||
~QDateEdit();
|
||||
|
||||
Q_SIGNALS:
|
||||
void userDateChanged(const QDate &date);
|
||||
|
|
|
|||
|
|
@ -243,6 +243,13 @@ QProgressBar::QProgressBar(QWidget *parent)
|
|||
d_func()->init();
|
||||
}
|
||||
|
||||
/*!
|
||||
Destructor.
|
||||
*/
|
||||
QProgressBar::~QProgressBar()
|
||||
{
|
||||
}
|
||||
|
||||
/*!
|
||||
Reset the progress bar. The progress bar "rewinds" and shows no
|
||||
progress.
|
||||
|
|
|
|||
|
|
@ -73,6 +73,7 @@ public:
|
|||
enum Direction { TopToBottom, BottomToTop };
|
||||
|
||||
explicit QProgressBar(QWidget *parent = 0);
|
||||
~QProgressBar();
|
||||
|
||||
int minimum() const;
|
||||
int maximum() const;
|
||||
|
|
|
|||
|
|
@ -143,6 +143,13 @@ QRadioButton::QRadioButton(QWidget *parent)
|
|||
d->init();
|
||||
}
|
||||
|
||||
/*!
|
||||
Destructor.
|
||||
*/
|
||||
QRadioButton::~QRadioButton()
|
||||
{
|
||||
}
|
||||
|
||||
/*!
|
||||
Constructs a radio button with the given \a parent and a \a text string.
|
||||
|
||||
|
|
|
|||
|
|
@ -59,6 +59,7 @@ class Q_WIDGETS_EXPORT QRadioButton : public QAbstractButton
|
|||
public:
|
||||
explicit QRadioButton(QWidget *parent=0);
|
||||
explicit QRadioButton(const QString &text, QWidget *parent=0);
|
||||
~QRadioButton();
|
||||
|
||||
QSize sizeHint() const;
|
||||
QSize minimumSizeHint() const;
|
||||
|
|
|
|||
|
|
@ -209,6 +209,10 @@ QSpinBox::QSpinBox(QWidget *parent)
|
|||
d->init();
|
||||
}
|
||||
|
||||
/*!
|
||||
Destructor.
|
||||
*/
|
||||
QSpinBox::~QSpinBox() {}
|
||||
|
||||
/*!
|
||||
\property QSpinBox::value
|
||||
|
|
@ -579,6 +583,11 @@ QDoubleSpinBox::QDoubleSpinBox(QWidget *parent)
|
|||
d->init();
|
||||
}
|
||||
|
||||
/*!
|
||||
Destructor.
|
||||
*/
|
||||
QDoubleSpinBox::~QDoubleSpinBox() {}
|
||||
|
||||
/*!
|
||||
\property QDoubleSpinBox::value
|
||||
\brief the value of the spin box
|
||||
|
|
|
|||
|
|
@ -66,6 +66,7 @@ class Q_WIDGETS_EXPORT QSpinBox : public QAbstractSpinBox
|
|||
|
||||
public:
|
||||
explicit QSpinBox(QWidget *parent = 0);
|
||||
~QSpinBox();
|
||||
|
||||
int value() const;
|
||||
|
||||
|
|
@ -124,6 +125,7 @@ class Q_WIDGETS_EXPORT QDoubleSpinBox : public QAbstractSpinBox
|
|||
Q_PROPERTY(double value READ value WRITE setValue NOTIFY valueChanged USER true)
|
||||
public:
|
||||
explicit QDoubleSpinBox(QWidget *parent = 0);
|
||||
~QDoubleSpinBox();
|
||||
|
||||
double value() const;
|
||||
|
||||
|
|
|
|||
|
|
@ -123,6 +123,13 @@ QSplitterHandle::QSplitterHandle(Qt::Orientation orientation, QSplitter *parent)
|
|||
setOrientation(orientation);
|
||||
}
|
||||
|
||||
/*!
|
||||
Destructor.
|
||||
*/
|
||||
QSplitterHandle::~QSplitterHandle()
|
||||
{
|
||||
}
|
||||
|
||||
/*!
|
||||
Sets the orientation of the splitter handle to \a orientation.
|
||||
This is usually propagated from the QSplitter.
|
||||
|
|
|
|||
|
|
@ -141,6 +141,7 @@ class Q_WIDGETS_EXPORT QSplitterHandle : public QWidget
|
|||
Q_OBJECT
|
||||
public:
|
||||
explicit QSplitterHandle(Qt::Orientation o, QSplitter *parent);
|
||||
~QSplitterHandle();
|
||||
|
||||
void setOrientation(Qt::Orientation o);
|
||||
Qt::Orientation orientation() const;
|
||||
|
|
|
|||
Loading…
Reference in New Issue