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:
parent
09dd94091f
commit
ea7cc7f6f9
@ -331,7 +331,7 @@ void QMessageBoxPrivate::setupLayout()
|
||||
}
|
||||
#ifdef Q_OS_MAC
|
||||
grid->addWidget(buttonBox, grid->rowCount(), hasIcon ? 2 : 1, 1, 1);
|
||||
grid->setMargin(0);
|
||||
grid->setContentsMargins(0, 0, 0, 0);
|
||||
grid->setVerticalSpacing(8);
|
||||
grid->setHorizontalSpacing(0);
|
||||
q->setContentsMargins(24, 15, 24, 20);
|
||||
|
@ -282,40 +282,6 @@ bool QLayout::setAlignment(QLayout *l, Qt::Alignment alignment)
|
||||
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
|
||||
\brief the spacing between widgets inside the layout
|
||||
|
@ -63,9 +63,6 @@ class Q_WIDGETS_EXPORT QLayout : public QObject, public QLayoutItem
|
||||
Q_OBJECT
|
||||
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(SizeConstraint sizeConstraint READ sizeConstraint WRITE setSizeConstraint)
|
||||
public:
|
||||
@ -83,11 +80,6 @@ public:
|
||||
QLayout();
|
||||
~QLayout();
|
||||
|
||||
#if QT_DEPRECATED_SINCE(5, 13)
|
||||
int margin() const;
|
||||
void setMargin(int);
|
||||
#endif
|
||||
|
||||
int spacing() const;
|
||||
void setSpacing(int);
|
||||
|
||||
|
@ -3193,13 +3193,6 @@ QList<QAction*> QWidget::actions() const
|
||||
}
|
||||
#endif // QT_NO_ACTION
|
||||
|
||||
/*!
|
||||
\fn bool QWidget::isEnabledToTLW() const
|
||||
\obsolete
|
||||
|
||||
This function is deprecated. It is equivalent to isEnabled()
|
||||
*/
|
||||
|
||||
/*!
|
||||
\property QWidget::enabled
|
||||
\brief whether the widget is enabled
|
||||
@ -7420,29 +7413,6 @@ void QWidgetPrivate::updateContentsRect()
|
||||
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
|
||||
QMargins operator|(const QMargins &m1, const QMargins &m2)
|
||||
|
@ -238,10 +238,6 @@ public:
|
||||
|
||||
bool isEnabled() 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:
|
||||
void setEnabled(bool);
|
||||
@ -527,10 +523,6 @@ public:
|
||||
|
||||
void setContentsMargins(int left, int top, int right, int bottom);
|
||||
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;
|
||||
|
||||
QRect contentsRect() const;
|
||||
@ -782,11 +774,6 @@ inline bool QWidget::isEnabled() const
|
||||
inline bool QWidget::isModal() const
|
||||
{ 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
|
||||
{ return minimumSize().width(); }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user