Remove deprecated members from QtWidgets/kernel classes

Cleaning up those that are trivial to remove because they have direct
replacements.

Change-Id: Ie8ac02c3d6273110f1f11e17fdeae496bc66321f
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
This commit is contained in:
Volker Hilsheimer 2020-04-16 14:56:59 +02:00
parent 09dd94091f
commit ea7cc7f6f9
5 changed files with 1 additions and 86 deletions

View File

@ -331,7 +331,7 @@ void QMessageBoxPrivate::setupLayout()
} }
#ifdef Q_OS_MAC #ifdef Q_OS_MAC
grid->addWidget(buttonBox, grid->rowCount(), hasIcon ? 2 : 1, 1, 1); grid->addWidget(buttonBox, grid->rowCount(), hasIcon ? 2 : 1, 1, 1);
grid->setMargin(0); grid->setContentsMargins(0, 0, 0, 0);
grid->setVerticalSpacing(8); grid->setVerticalSpacing(8);
grid->setHorizontalSpacing(0); grid->setHorizontalSpacing(0);
q->setContentsMargins(24, 15, 24, 20); q->setContentsMargins(24, 15, 24, 20);

View File

@ -282,40 +282,6 @@ bool QLayout::setAlignment(QLayout *l, Qt::Alignment alignment)
return false; return false;
} }
#if QT_DEPRECATED_SINCE(5, 13)
/*!
\property QLayout::margin
\brief the width of the outside border of the layout
\obsolete
Use setContentsMargins() and getContentsMargins() instead.
\sa contentsRect(), spacing
*/
/*!
\obsolete
*/
int QLayout::margin() const
{
int left, top, right, bottom;
getContentsMargins(&left, &top, &right, &bottom);
if (left == top && top == right && right == bottom) {
return left;
} else {
return -1;
}
}
/*!
\obsolete
*/
void QLayout::setMargin(int margin)
{
setContentsMargins(margin, margin, margin, margin);
}
#endif
/*! /*!
\property QLayout::spacing \property QLayout::spacing
\brief the spacing between widgets inside the layout \brief the spacing between widgets inside the layout

View File

@ -63,9 +63,6 @@ class Q_WIDGETS_EXPORT QLayout : public QObject, public QLayoutItem
Q_OBJECT Q_OBJECT
Q_DECLARE_PRIVATE(QLayout) Q_DECLARE_PRIVATE(QLayout)
#if QT_DEPRECATED_SINCE(5, 13)
Q_PROPERTY(int margin READ margin WRITE setMargin)
#endif
Q_PROPERTY(int spacing READ spacing WRITE setSpacing) Q_PROPERTY(int spacing READ spacing WRITE setSpacing)
Q_PROPERTY(SizeConstraint sizeConstraint READ sizeConstraint WRITE setSizeConstraint) Q_PROPERTY(SizeConstraint sizeConstraint READ sizeConstraint WRITE setSizeConstraint)
public: public:
@ -83,11 +80,6 @@ public:
QLayout(); QLayout();
~QLayout(); ~QLayout();
#if QT_DEPRECATED_SINCE(5, 13)
int margin() const;
void setMargin(int);
#endif
int spacing() const; int spacing() const;
void setSpacing(int); void setSpacing(int);

View File

@ -3193,13 +3193,6 @@ QList<QAction*> QWidget::actions() const
} }
#endif // QT_NO_ACTION #endif // QT_NO_ACTION
/*!
\fn bool QWidget::isEnabledToTLW() const
\obsolete
This function is deprecated. It is equivalent to isEnabled()
*/
/*! /*!
\property QWidget::enabled \property QWidget::enabled
\brief whether the widget is enabled \brief whether the widget is enabled
@ -7420,29 +7413,6 @@ void QWidgetPrivate::updateContentsRect()
QCoreApplication::sendEvent(q, &e); QCoreApplication::sendEvent(q, &e);
} }
#if QT_DEPRECATED_SINCE(5, 14)
/*!
\obsolete
Use contentsMargins().
Returns the widget's contents margins for \a left, \a top, \a
right, and \a bottom.
\sa setContentsMargins(), contentsRect()
*/
void QWidget::getContentsMargins(int *left, int *top, int *right, int *bottom) const
{
QMargins m = contentsMargins();
if (left)
*left = m.left();
if (top)
*top = m.top();
if (right)
*right = m.right();
if (bottom)
*bottom = m.bottom();
}
#endif
// FIXME: Move to qmargins.h for next minor Qt release // FIXME: Move to qmargins.h for next minor Qt release
QMargins operator|(const QMargins &m1, const QMargins &m2) QMargins operator|(const QMargins &m1, const QMargins &m2)

View File

@ -238,10 +238,6 @@ public:
bool isEnabled() const; bool isEnabled() const;
bool isEnabledTo(const QWidget *) const; bool isEnabledTo(const QWidget *) const;
#if QT_DEPRECATED_SINCE(5, 13)
QT_DEPRECATED_X ("Use isEnabled() instead")
bool isEnabledToTLW() const;
#endif
public Q_SLOTS: public Q_SLOTS:
void setEnabled(bool); void setEnabled(bool);
@ -527,10 +523,6 @@ public:
void setContentsMargins(int left, int top, int right, int bottom); void setContentsMargins(int left, int top, int right, int bottom);
void setContentsMargins(const QMargins &margins); void setContentsMargins(const QMargins &margins);
#if QT_DEPRECATED_SINCE(5, 14)
QT_DEPRECATED_X("use contentsMargins()")
void getContentsMargins(int *left, int *top, int *right, int *bottom) const;
#endif
QMargins contentsMargins() const; QMargins contentsMargins() const;
QRect contentsRect() const; QRect contentsRect() const;
@ -782,11 +774,6 @@ inline bool QWidget::isEnabled() const
inline bool QWidget::isModal() const inline bool QWidget::isModal() const
{ return data->window_modality != Qt::NonModal; } { return data->window_modality != Qt::NonModal; }
#if QT_DEPRECATED_SINCE(5, 13)
inline bool QWidget::isEnabledToTLW() const
{ return isEnabled(); }
#endif
inline int QWidget::minimumWidth() const inline int QWidget::minimumWidth() const
{ return minimumSize().width(); } { return minimumSize().width(); }