Skip to content

Commit

Permalink
feat: use D_DECL_DEPRECATED
Browse files Browse the repository at this point in the history
Change-Id: I4530d7940ce7b57b12af9f722364fc0eab45399c
  • Loading branch information
zccrs committed Nov 23, 2017
1 parent be8ea41 commit fe75e70
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion src/dtkwidget_global.h
Original file line number Diff line number Diff line change
Expand Up @@ -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(); \
Expand Down
2 changes: 1 addition & 1 deletion src/widgets/dapplication.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/widgets/darrowrectangle.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion src/widgets/dcombobox.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion src/widgets/dsimplecombobox.h
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
26 changes: 13 additions & 13 deletions src/widgets/dswitchbutton.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
6 changes: 3 additions & 3 deletions src/widgets/dtitlebar.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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();

Expand Down
2 changes: 1 addition & 1 deletion src/widgets/dwindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion src/widgets/dwindowrestorebutton.h
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit fe75e70

Please sign in to comment.