summaryrefslogtreecommitdiffstats
path: root/src/gui/painting
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2022-07-21 15:39:56 +0200
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2022-07-21 22:31:59 +0200
commita18a88b19bbae81a407645df2bfdd7faa180e323 (patch)
tree6926c1a7574de095d4a9e7dc11ed620dcbd5d8fd /src/gui/painting
parente5a7f021cd42540b16065baa7eb522c30b13df00 (diff)
Undeprecate QColor(string) constructors
They are used in a lot of code, deprecating them now just creates noise and porting effort without adding any value. For Qt 7 we can remove them if we deprecate them in time for the last Qt 6 release, at which point porting effort is expected anway. Leave a ### comment behind to that effect. Pick-to: 6.4 Change-Id: I0a4e78cf1723b02373d23d7cd52783b3f7095428 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Diffstat (limited to 'src/gui/painting')
-rw-r--r--src/gui/painting/qcolor.cpp9
-rw-r--r--src/gui/painting/qcolor.h6
2 files changed, 1 insertions, 14 deletions
diff --git a/src/gui/painting/qcolor.cpp b/src/gui/painting/qcolor.cpp
index 4a04eb3907..9494aa70e2 100644
--- a/src/gui/painting/qcolor.cpp
+++ b/src/gui/painting/qcolor.cpp
@@ -784,12 +784,10 @@ QColor::QColor(Spec spec) noexcept
}
}
-#if QT_DEPRECATED_SINCE(6, 6)
+// ### Qt 7: remove those after deprecating them for the last Qt 6 LTS release
/*!
\fn QColor::QColor(const QString &name)
- \deprecated [6.6] Use fromString() instead.
-
Constructs a named color in the same way as setNamedColor() using
the given \a name.
@@ -801,8 +799,6 @@ QColor::QColor(Spec spec) noexcept
/*!
\fn QColor::QColor(const char *name)
- \deprecated [6.6] Use fromString() instead.
-
Constructs a named color in the same way as setNamedColor() using
the given \a name.
@@ -813,8 +809,6 @@ QColor::QColor(Spec spec) noexcept
/*!
\fn QColor::QColor(QLatin1StringView name)
- \deprecated [6.6] Use fromString() instead.
-
Constructs a named color in the same way as setNamedColor() using
the given \a name.
@@ -822,7 +816,6 @@ QColor::QColor(Spec spec) noexcept
\since 5.8
\sa setNamedColor(), name(), isValid()
*/
-#endif // QT_DEPRECATED_SINCE(6, 6)
/*!
\fn bool QColor::isValid() const
diff --git a/src/gui/painting/qcolor.h b/src/gui/painting/qcolor.h
index ba2621968b..420e44b086 100644
--- a/src/gui/painting/qcolor.h
+++ b/src/gui/painting/qcolor.h
@@ -47,16 +47,10 @@ public:
0) {}
QColor(QRgb rgb) noexcept;
QColor(QRgba64 rgba64) noexcept;
-#if QT_DEPRECATED_SINCE(6, 6)
- QT_DEPRECATED_VERSION_X_6_6("Use QColor::fromString() instead.")
inline QColor(const QString& name);
- QT_DEPRECATED_VERSION_X_6_6("Use QColor::fromString() instead.")
explicit inline QColor(QStringView name);
- QT_DEPRECATED_VERSION_X_6_6("Use QColor::fromString() instead.")
inline QColor(const char *aname);
- QT_DEPRECATED_VERSION_X_6_6("Use QColor::fromString() instead.")
inline QColor(QLatin1StringView name);
-#endif
QColor(Spec spec) noexcept;
static QColor fromString(QAnyStringView name) noexcept;