Mark deprecated functions with QT_DEPRECATED
QWidget::isEnabledToTLW() and QApplication::setKeypadNavigationEnabled() are deprecated for a long time but not marked as deprecated. Therefore add QT_DEPRECATED and guard them with QT_DEPRECATED_SINCE(5, 13). Change-Id: I12a76597aaad71025e4b7ad251dd67be55f8f966 Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>bb10
parent
54e74c515c
commit
a7518a11b6
|
|
@ -3908,6 +3908,7 @@ Qt::NavigationMode QApplication::navigationMode()
|
|||
return QApplicationPrivate::navigationMode;
|
||||
}
|
||||
|
||||
# if QT_DEPRECATED_SINCE(5, 13)
|
||||
/*!
|
||||
Sets whether Qt should use focus navigation suitable for use with a
|
||||
minimal keypad.
|
||||
|
|
@ -3950,6 +3951,7 @@ bool QApplication::keypadNavigationEnabled()
|
|||
return QApplicationPrivate::navigationMode == Qt::NavigationModeKeypadTabOrder ||
|
||||
QApplicationPrivate::navigationMode == Qt::NavigationModeKeypadDirectional;
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/*!
|
||||
|
|
|
|||
|
|
@ -180,8 +180,12 @@ public:
|
|||
bool notify(QObject *, QEvent *) override;
|
||||
|
||||
#ifdef QT_KEYPAD_NAVIGATION
|
||||
static Q_DECL_DEPRECATED void setKeypadNavigationEnabled(bool);
|
||||
static bool keypadNavigationEnabled();
|
||||
# if QT_DEPRECATED_SINCE(5, 13)
|
||||
static QT_DEPRECATED_X ("Use QApplication::setNavigationMode() instead")
|
||||
void setKeypadNavigationEnabled(bool);
|
||||
static QT_DEPRECATED_X ("Use QApplication::navigationMode() instead")
|
||||
bool keypadNavigationEnabled();
|
||||
# endif
|
||||
static void setNavigationMode(Qt::NavigationMode mode);
|
||||
static Qt::NavigationMode navigationMode();
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -235,7 +235,10 @@ 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);
|
||||
|
|
@ -769,8 +772,10 @@ 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