QtWidgets: Fix warnings about providing function for DESIGNABLE in property declaration
Set them to be designable by default, fixing: kernel/qaction.h:66: Warning: Providing a function for DESIGNABLE in a property declaration is deprecated and will not be supported in Qt 6 anymore. kernel/qwidget.h:178: Warning: Providing a function for DESIGNABLE in a property declaration is deprecated and will not be supported in Qt 6 anymore. kernel/qwidget.h:179: Warning: Providing a function for DESIGNABLE in a property declaration is deprecated and will not be supported in Qt 6 anymore. kernel/qwidget.h:180: Warning: Providing a function for DESIGNABLE in a property declaration is deprecated and will not be supported in Qt 6 anymore. kernel/qwidget.h:181: Warning: Providing a function for DESIGNABLE in a property declaration is deprecated and will not be supported in Qt 6 anymore. kernel/qwidget.h:182: Warning: Providing a function for DESIGNABLE in a property declaration is deprecated and will not be supported in Qt 6 anymore. kernel/qwidget.h:204: Warning: Providing a function for DESIGNABLE in a property declaration is deprecated and will not be supported in Qt 6 anymore. widgets/qabstractbutton.h:67: Warning: Providing a function for DESIGNABLE in a property declaration is deprecated and will not be supported in Qt 6 anymore. widgets/qgroupbox.h:60: Warning: Providing a function for DESIGNABLE in a property declaration is deprecated and will not be supported in Qt 6 anymore. The toolbar properties were not caught by the warnings, but it appears the checks do not work; the properties are designable when parented on a non-QMainWindow parent. Change-Id: Ib7dfb878ba593f2dfa05b85db2c384bf3d860e46 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
This commit is contained in:
parent
d556d7a6b8
commit
1825426187
@ -63,7 +63,7 @@ class Q_WIDGETS_EXPORT QAction : public QObject
|
||||
Q_DECLARE_PRIVATE(QAction)
|
||||
|
||||
Q_PROPERTY(bool checkable READ isCheckable WRITE setCheckable NOTIFY changed)
|
||||
Q_PROPERTY(bool checked READ isChecked WRITE setChecked DESIGNABLE isCheckable NOTIFY toggled)
|
||||
Q_PROPERTY(bool checked READ isChecked WRITE setChecked NOTIFY toggled)
|
||||
Q_PROPERTY(bool enabled READ isEnabled WRITE setEnabled NOTIFY changed)
|
||||
Q_PROPERTY(QIcon icon READ icon WRITE setIcon NOTIFY changed)
|
||||
Q_PROPERTY(QString text READ text WRITE setText NOTIFY changed)
|
||||
|
@ -175,11 +175,11 @@ class Q_WIDGETS_EXPORT QWidget : public QObject, public QPaintDevice
|
||||
Q_PROPERTY(QSize sizeHint READ sizeHint)
|
||||
Q_PROPERTY(QSize minimumSizeHint READ minimumSizeHint)
|
||||
Q_PROPERTY(bool acceptDrops READ acceptDrops WRITE setAcceptDrops)
|
||||
Q_PROPERTY(QString windowTitle READ windowTitle WRITE setWindowTitle NOTIFY windowTitleChanged DESIGNABLE isWindow)
|
||||
Q_PROPERTY(QIcon windowIcon READ windowIcon WRITE setWindowIcon NOTIFY windowIconChanged DESIGNABLE isWindow)
|
||||
Q_PROPERTY(QString windowIconText READ windowIconText WRITE setWindowIconText NOTIFY windowIconTextChanged DESIGNABLE isWindow) // deprecated
|
||||
Q_PROPERTY(double windowOpacity READ windowOpacity WRITE setWindowOpacity DESIGNABLE isWindow)
|
||||
Q_PROPERTY(bool windowModified READ isWindowModified WRITE setWindowModified DESIGNABLE isWindow)
|
||||
Q_PROPERTY(QString windowTitle READ windowTitle WRITE setWindowTitle NOTIFY windowTitleChanged)
|
||||
Q_PROPERTY(QIcon windowIcon READ windowIcon WRITE setWindowIcon NOTIFY windowIconChanged)
|
||||
Q_PROPERTY(QString windowIconText READ windowIconText WRITE setWindowIconText NOTIFY windowIconTextChanged) // deprecated
|
||||
Q_PROPERTY(double windowOpacity READ windowOpacity WRITE setWindowOpacity)
|
||||
Q_PROPERTY(bool windowModified READ isWindowModified WRITE setWindowModified)
|
||||
#ifndef QT_NO_TOOLTIP
|
||||
Q_PROPERTY(QString toolTip READ toolTip WRITE setToolTip)
|
||||
Q_PROPERTY(int toolTipDuration READ toolTipDuration WRITE setToolTipDuration)
|
||||
@ -201,7 +201,7 @@ class Q_WIDGETS_EXPORT QWidget : public QObject, public QPaintDevice
|
||||
Q_PROPERTY(QString styleSheet READ styleSheet WRITE setStyleSheet)
|
||||
#endif
|
||||
Q_PROPERTY(QLocale locale READ locale WRITE setLocale RESET unsetLocale)
|
||||
Q_PROPERTY(QString windowFilePath READ windowFilePath WRITE setWindowFilePath DESIGNABLE isWindow)
|
||||
Q_PROPERTY(QString windowFilePath READ windowFilePath WRITE setWindowFilePath)
|
||||
Q_PROPERTY(Qt::InputMethodHints inputMethodHints READ inputMethodHints WRITE setInputMethodHints)
|
||||
|
||||
public:
|
||||
|
@ -64,7 +64,7 @@ class Q_WIDGETS_EXPORT QAbstractButton : public QWidget
|
||||
Q_PROPERTY(QKeySequence shortcut READ shortcut WRITE setShortcut)
|
||||
#endif
|
||||
Q_PROPERTY(bool checkable READ isCheckable WRITE setCheckable)
|
||||
Q_PROPERTY(bool checked READ isChecked WRITE setChecked DESIGNABLE isCheckable NOTIFY toggled USER true)
|
||||
Q_PROPERTY(bool checked READ isChecked WRITE setChecked NOTIFY toggled USER true)
|
||||
Q_PROPERTY(bool autoRepeat READ autoRepeat WRITE setAutoRepeat)
|
||||
Q_PROPERTY(bool autoExclusive READ autoExclusive WRITE setAutoExclusive)
|
||||
Q_PROPERTY(int autoRepeatDelay READ autoRepeatDelay WRITE setAutoRepeatDelay)
|
||||
|
@ -57,7 +57,7 @@ class Q_WIDGETS_EXPORT QGroupBox : public QWidget
|
||||
Q_PROPERTY(Qt::Alignment alignment READ alignment WRITE setAlignment)
|
||||
Q_PROPERTY(bool flat READ isFlat WRITE setFlat)
|
||||
Q_PROPERTY(bool checkable READ isCheckable WRITE setCheckable)
|
||||
Q_PROPERTY(bool checked READ isChecked WRITE setChecked DESIGNABLE isCheckable NOTIFY toggled USER true)
|
||||
Q_PROPERTY(bool checked READ isChecked WRITE setChecked NOTIFY toggled USER true)
|
||||
public:
|
||||
explicit QGroupBox(QWidget *parent = nullptr);
|
||||
explicit QGroupBox(const QString &title, QWidget *parent = nullptr);
|
||||
|
@ -59,15 +59,9 @@ class Q_WIDGETS_EXPORT QToolBar : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
Q_PROPERTY(bool movable READ isMovable WRITE setMovable
|
||||
DESIGNABLE (qobject_cast<QMainWindow *>(parentWidget()) != 0)
|
||||
NOTIFY movableChanged)
|
||||
Q_PROPERTY(Qt::ToolBarAreas allowedAreas READ allowedAreas WRITE setAllowedAreas
|
||||
DESIGNABLE (qobject_cast<QMainWindow *>(parentWidget()) != 0)
|
||||
NOTIFY allowedAreasChanged)
|
||||
Q_PROPERTY(Qt::Orientation orientation READ orientation WRITE setOrientation
|
||||
DESIGNABLE (qobject_cast<QMainWindow *>(parentWidget()) == 0)
|
||||
NOTIFY orientationChanged)
|
||||
Q_PROPERTY(bool movable READ isMovable WRITE setMovable NOTIFY movableChanged)
|
||||
Q_PROPERTY(Qt::ToolBarAreas allowedAreas READ allowedAreas WRITE setAllowedAreas NOTIFY allowedAreasChanged)
|
||||
Q_PROPERTY(Qt::Orientation orientation READ orientation WRITE setOrientation NOTIFY orientationChanged)
|
||||
Q_PROPERTY(QSize iconSize READ iconSize WRITE setIconSize NOTIFY iconSizeChanged)
|
||||
Q_PROPERTY(Qt::ToolButtonStyle toolButtonStyle READ toolButtonStyle WRITE setToolButtonStyle
|
||||
NOTIFY toolButtonStyleChanged)
|
||||
|
Loading…
x
Reference in New Issue
Block a user