summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2020-04-16 14:56:59 +0200
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2020-04-16 16:53:50 +0200
commitea7cc7f6f95030c38d86c4430ac8ee4386099d6b (patch)
tree1823a7f260b154e7e24a298313a467f57a24f657 /src
parent09dd94091f88ca29b4f829b881fcedda4013e28d (diff)
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>
Diffstat (limited to 'src')
-rw-r--r--src/widgets/dialogs/qmessagebox.cpp2
-rw-r--r--src/widgets/kernel/qlayout.cpp34
-rw-r--r--src/widgets/kernel/qlayout.h8
-rw-r--r--src/widgets/kernel/qwidget.cpp30
-rw-r--r--src/widgets/kernel/qwidget.h13
5 files changed, 1 insertions, 86 deletions
diff --git a/src/widgets/dialogs/qmessagebox.cpp b/src/widgets/dialogs/qmessagebox.cpp
index c24c553e23..513a5c5658 100644
--- a/src/widgets/dialogs/qmessagebox.cpp
+++ b/src/widgets/dialogs/qmessagebox.cpp
@@ -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);
diff --git a/src/widgets/kernel/qlayout.cpp b/src/widgets/kernel/qlayout.cpp
index d4ff9083f1..901e136f61 100644
--- a/src/widgets/kernel/qlayout.cpp
+++ b/src/widgets/kernel/qlayout.cpp
@@ -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
diff --git a/src/widgets/kernel/qlayout.h b/src/widgets/kernel/qlayout.h
index 35a04a35b2..1c06f1e3eb 100644
--- a/src/widgets/kernel/qlayout.h
+++ b/src/widgets/kernel/qlayout.h
@@ -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);
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp
index 08479a4a37..e79c4b9bcd 100644
--- a/src/widgets/kernel/qwidget.cpp
+++ b/src/widgets/kernel/qwidget.cpp
@@ -3194,13 +3194,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)
diff --git a/src/widgets/kernel/qwidget.h b/src/widgets/kernel/qwidget.h
index 68a9b7ca9b..8ca75b67b0 100644
--- a/src/widgets/kernel/qwidget.h
+++ b/src/widgets/kernel/qwidget.h
@@ -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(); }