diff options
author | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2018-04-16 15:31:20 +0200 |
---|---|---|
committer | Christian Ehrlicher <ch.ehrlicher@gmx.de> | 2018-04-26 16:01:52 +0000 |
commit | fcc94b1442ce910231a4267bd56822d616984683 (patch) | |
tree | a0354ce1973f94ea7e200a3af262fbc5b3e5c8ed /src | |
parent | b3ebe8713b28a3bb7dedc0821bed6f6141d67d53 (diff) |
QColorDialog: deprecate rgba()
It was already deprecated in the documentation, just use
the QT_DEPRECATED macros.
Change-Id: Ie9ba7dd36af8e4eb5bddb7429182db98c7c638f5
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/widgets/dialogs/qcolordialog.cpp | 2 | ||||
-rw-r--r-- | src/widgets/dialogs/qcolordialog.h | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/widgets/dialogs/qcolordialog.cpp b/src/widgets/dialogs/qcolordialog.cpp index cf1119254b..fdbcdd12e9 100644 --- a/src/widgets/dialogs/qcolordialog.cpp +++ b/src/widgets/dialogs/qcolordialog.cpp @@ -2160,6 +2160,7 @@ QColor QColorDialog::getColor(const QColor &initial, QWidget *parent, const QStr return dlg.selectedColor(); } +#if QT_DEPRECATED_SINCE(5, 12) /*! \obsolete @@ -2185,6 +2186,7 @@ QRgb QColorDialog::getRgba(QRgb initial, bool *ok, QWidget *parent) *ok = color.isValid(); return result; } +#endif /*! Destroys the color dialog. diff --git a/src/widgets/dialogs/qcolordialog.h b/src/widgets/dialogs/qcolordialog.h index 6451ff9bde..cdbe0e7fb4 100644 --- a/src/widgets/dialogs/qcolordialog.h +++ b/src/widgets/dialogs/qcolordialog.h @@ -92,8 +92,9 @@ public: const QString &title = QString(), ColorDialogOptions options = ColorDialogOptions()); - // obsolete - static QRgb getRgba(QRgb rgba = 0xffffffff, bool *ok = nullptr, QWidget *parent = nullptr); +#if QT_DEPRECATED_SINCE(5, 12) + QT_DEPRECATED_X("Use getColor()") static QRgb getRgba(QRgb rgba = 0xffffffff, bool *ok = nullptr, QWidget *parent = nullptr); +#endif static int customCount(); static QColor customColor(int index); |