From fe75e70ffa45865a969cc3c6cb7adc033f52bb0f Mon Sep 17 00:00:00 2001 From: zccrs Date: Thu, 23 Nov 2017 14:50:57 +0800 Subject: [PATCH] feat: use D_DECL_DEPRECATED Change-Id: I4530d7940ce7b57b12af9f722364fc0eab45399c --- src/dtkwidget_global.h | 2 +- src/widgets/dapplication.h | 2 +- src/widgets/darrowrectangle.h | 4 ++-- src/widgets/dcombobox.h | 2 +- src/widgets/dsimplecombobox.h | 2 +- src/widgets/dswitchbutton.h | 26 +++++++++++++------------- src/widgets/dtitlebar.h | 6 +++--- src/widgets/dwindow.h | 2 +- src/widgets/dwindowrestorebutton.h | 2 +- 9 files changed, 24 insertions(+), 24 deletions(-) diff --git a/src/dtkwidget_global.h b/src/dtkwidget_global.h index ca6ca11d7..354a68773 100644 --- a/src/dtkwidget_global.h +++ b/src/dtkwidget_global.h @@ -54,7 +54,7 @@ namespace Widget #endif #endif -#define DTKWIDGET_DECL_DEPRECATED Q_DECL_DEPRECATED +#define DTKWIDGET_DECL_DEPRECATED D_DECL_DEPRECATED #define D_THEME_INIT_WIDGET(className, ...) do{\ DThemeManager * manager = DThemeManager::instance(); \ diff --git a/src/widgets/dapplication.h b/src/widgets/dapplication.h index 2267c59ee..d787cca1a 100644 --- a/src/widgets/dapplication.h +++ b/src/widgets/dapplication.h @@ -57,7 +57,7 @@ class LIBDTKWIDGETSHARED_EXPORT DApplication : public QApplication, public DTK_C void setProductName(const QString &productName); const QIcon &productIcon() const; - void Q_DECL_DEPRECATED_X("Use void setProductIcon(const QIcon &productIcon).")setProductIcon(const QPixmap &productIconPixmap); + void D_DECL_DEPRECATED_X("Use void setProductIcon(const QIcon &productIcon).")setProductIcon(const QPixmap &productIconPixmap); void setProductIcon(const QIcon &productIcon); QString applicationLicense() const; diff --git a/src/widgets/darrowrectangle.h b/src/widgets/darrowrectangle.h index 42707dd36..6785a41ab 100644 --- a/src/widgets/darrowrectangle.h +++ b/src/widgets/darrowrectangle.h @@ -111,11 +111,11 @@ class LIBDTKWIDGETSHARED_EXPORT DArrowRectangle : public QWidget, public DTK_COR qreal shadowXOffset() const; qreal shadowYOffset() const; - Q_DECL_DEPRECATED qreal shadowDistance() const; + D_DECL_DEPRECATED qreal shadowDistance() const; qreal shadowBlurRadius() const; void setShadowBlurRadius(const qreal &shadowBlurRadius); - Q_DECL_DEPRECATED void setShadowDistance(const qreal &shadowDistance); + D_DECL_DEPRECATED void setShadowDistance(const qreal &shadowDistance); void setShadowXOffset(const qreal &shadowXOffset); void setShadowYOffset(const qreal &shadowYOffset); diff --git a/src/widgets/dcombobox.h b/src/widgets/dcombobox.h index 57790c942..827ded9ef 100644 --- a/src/widgets/dcombobox.h +++ b/src/widgets/dcombobox.h @@ -35,7 +35,7 @@ DWIDGET_BEGIN_NAMESPACE class DComboBoxPrivate; -class Q_DECL_DEPRECATED_X("Use QCombobBox directly.") DComboBox : public QComboBox, public DTK_CORE_NAMESPACE::DObject +class D_DECL_DEPRECATED_X("Use QCombobBox directly.") DComboBox : public QComboBox, public DTK_CORE_NAMESPACE::DObject { Q_OBJECT diff --git a/src/widgets/dsimplecombobox.h b/src/widgets/dsimplecombobox.h index ab3e6fab2..5fe0e7918 100644 --- a/src/widgets/dsimplecombobox.h +++ b/src/widgets/dsimplecombobox.h @@ -27,7 +27,7 @@ DWIDGET_BEGIN_NAMESPACE -class LIBDTKWIDGETSHARED_EXPORT Q_DECL_DEPRECATED_X("Use QCombobBox directly.") DSimpleComboBox : public DComboBox +class LIBDTKWIDGETSHARED_EXPORT D_DECL_DEPRECATED_X("Use QCombobBox directly.") DSimpleComboBox : public DComboBox { Q_OBJECT public: diff --git a/src/widgets/dswitchbutton.h b/src/widgets/dswitchbutton.h index 33522aaee..95ec57f80 100644 --- a/src/widgets/dswitchbutton.h +++ b/src/widgets/dswitchbutton.h @@ -45,25 +45,25 @@ class LIBDTKWIDGETSHARED_EXPORT DSwitchButton : public QFrame, public DTK_CORE_N bool checked() const; - Q_DECL_DEPRECATED int animationDuration() const; - Q_DECL_DEPRECATED QEasingCurve::Type animationType() const; - Q_DECL_DEPRECATED QString backgroundImageSource() const; - Q_DECL_DEPRECATED double animationStartValue() const; - Q_DECL_DEPRECATED double animationEndValue() const; - Q_DECL_DEPRECATED QString disabledImageSource() const; - Q_DECL_DEPRECATED QString enabledImageSource() const; + D_DECL_DEPRECATED int animationDuration() const; + D_DECL_DEPRECATED QEasingCurve::Type animationType() const; + D_DECL_DEPRECATED QString backgroundImageSource() const; + D_DECL_DEPRECATED double animationStartValue() const; + D_DECL_DEPRECATED double animationEndValue() const; + D_DECL_DEPRECATED QString disabledImageSource() const; + D_DECL_DEPRECATED QString enabledImageSource() const; QSize sizeHint() const Q_DECL_OVERRIDE; public Q_SLOTS: void setChecked(bool arg); - Q_DECL_DEPRECATED void setAnimationDuration(int arg); - Q_DECL_DEPRECATED void setAnimationType(QEasingCurve::Type arg); - Q_DECL_DEPRECATED void setAnimationStartValue(double animationStartValue); - Q_DECL_DEPRECATED void setAnimationEndValue(double animationEndValue); - Q_DECL_DEPRECATED bool setDisabledImageSource(const QString &arg); - Q_DECL_DEPRECATED bool setEnabledImageSource(const QString &arg); + D_DECL_DEPRECATED void setAnimationDuration(int arg); + D_DECL_DEPRECATED void setAnimationType(QEasingCurve::Type arg); + D_DECL_DEPRECATED void setAnimationStartValue(double animationStartValue); + D_DECL_DEPRECATED void setAnimationEndValue(double animationEndValue); + D_DECL_DEPRECATED bool setDisabledImageSource(const QString &arg); + D_DECL_DEPRECATED bool setEnabledImageSource(const QString &arg); Q_SIGNALS: void checkedChanged(bool arg); diff --git a/src/widgets/dtitlebar.h b/src/widgets/dtitlebar.h index 71cc84cc0..6c5d5caec 100644 --- a/src/widgets/dtitlebar.h +++ b/src/widgets/dtitlebar.h @@ -41,7 +41,7 @@ class LIBDTKWIDGETSHARED_EXPORT DTitlebar : public QWidget, public DTK_CORE_NAME QWidget *customWidget() const; void setCustomWidget(QWidget *, bool fixCenterPos = false); void setCustomWidget(QWidget *, Qt::AlignmentFlag flag = Qt::AlignCenter, bool fixCenterPos = false); - Q_DECL_DEPRECATED void setWindowFlags(Qt::WindowFlags type); + D_DECL_DEPRECATED void setWindowFlags(Qt::WindowFlags type); int buttonAreaWidth() const; bool separatorVisible() const; @@ -70,8 +70,8 @@ public Q_SLOTS: void setSeparatorVisible(bool visible); void setTitle(const QString &title); void setIcon(const QIcon &icon); - void Q_DECL_DEPRECATED setIcon(const QPixmap &icon); - Q_DECL_DEPRECATED void setWindowState(Qt::WindowState windowState); + void D_DECL_DEPRECATED setIcon(const QPixmap &icon); + D_DECL_DEPRECATED void setWindowState(Qt::WindowState windowState); /// Maximized/Minumized void toggleWindowState(); diff --git a/src/widgets/dwindow.h b/src/widgets/dwindow.h index 1b71535ea..fdd7abd91 100644 --- a/src/widgets/dwindow.h +++ b/src/widgets/dwindow.h @@ -30,7 +30,7 @@ DWIDGET_BEGIN_NAMESPACE class DWindowPrivate; -class Q_DECL_DEPRECATED_X("Use DMainWindow instead.") DWindow : public DWidget +class D_DECL_DEPRECATED_X("Use DMainWindow instead.") DWindow : public DWidget { Q_OBJECT public: diff --git a/src/widgets/dwindowrestorebutton.h b/src/widgets/dwindowrestorebutton.h index 15a5413e9..24568a5c2 100644 --- a/src/widgets/dwindowrestorebutton.h +++ b/src/widgets/dwindowrestorebutton.h @@ -25,7 +25,7 @@ DWIDGET_BEGIN_NAMESPACE -class Q_DECL_DEPRECATED_X("DWindowMaxButton is sufficient representing the two states.") DWindowRestoreButton : public DImageButton +class D_DECL_DEPRECATED_X("DWindowMaxButton is sufficient representing the two states.") DWindowRestoreButton : public DImageButton { Q_OBJECT public: