Use QT_DEPRECATED_X instead of Q_DECL_DEPRECATED_X
Allow deprecation warnings to be controlled with QT_NO_DEPRECATED_WARNINGS. Fixes: QTBUG-82424 Change-Id: I6df55ee2abaf4c141ac9b0e7661e46ba3706b20e Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This commit is contained in:
parent
4403ec3bc1
commit
e59e5643b5
@ -406,16 +406,16 @@ public:
|
||||
static QList<T> fromVector(const QVector<T> &vector);
|
||||
QVector<T> toVector() const;
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6,0,0)
|
||||
Q_DECL_DEPRECATED_X("Use QList<T>(set.begin(), set.end()) instead.")
|
||||
#if QT_DEPRECATED_SINCE(5, 14) && QT_VERSION < QT_VERSION_CHECK(6,0,0)
|
||||
QT_DEPRECATED_X("Use QList<T>(set.begin(), set.end()) instead.")
|
||||
static QList<T> fromSet(const QSet<T> &set);
|
||||
Q_DECL_DEPRECATED_X("Use QSet<T>(list.begin(), list.end()) instead.")
|
||||
QT_DEPRECATED_X("Use QSet<T>(list.begin(), list.end()) instead.")
|
||||
QSet<T> toSet() const;
|
||||
|
||||
Q_DECL_DEPRECATED_X("Use QList<T>(list.begin(), list.end()) instead.")
|
||||
QT_DEPRECATED_X("Use QList<T>(list.begin(), list.end()) instead.")
|
||||
static inline QList<T> fromStdList(const std::list<T> &list)
|
||||
{ return QList<T>(list.begin(), list.end()); }
|
||||
Q_DECL_DEPRECATED_X("Use std::list<T>(list.begin(), list.end()) instead.")
|
||||
QT_DEPRECATED_X("Use std::list<T>(list.begin(), list.end()) instead.")
|
||||
inline std::list<T> toStdList() const
|
||||
{ return std::list<T>(begin(), end()); }
|
||||
#endif
|
||||
|
@ -246,10 +246,10 @@ public:
|
||||
{ QSet<T> result = *this; result -= other; return result; }
|
||||
|
||||
QList<T> values() const;
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6,0,0)
|
||||
Q_DECL_DEPRECATED_X("Use values() instead.")
|
||||
#if QT_DEPRECATED_SINCE(5, 14) && QT_VERSION < QT_VERSION_CHECK(6,0,0)
|
||||
QT_DEPRECATED_X("Use values() instead.")
|
||||
QList<T> toList() const { return values(); }
|
||||
Q_DECL_DEPRECATED_X("Use QSet<T>(list.begin(), list.end()) instead.")
|
||||
QT_DEPRECATED_X("Use QSet<T>(list.begin(), list.end()) instead.")
|
||||
static QSet<T> fromList(const QList<T> &list);
|
||||
#endif
|
||||
|
||||
@ -383,7 +383,7 @@ Q_OUTOFLINE_TEMPLATE QList<T> QSet<T>::values() const
|
||||
return result;
|
||||
}
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6,0,0)
|
||||
#if QT_DEPRECATED_SINCE(5, 14) && QT_VERSION < QT_VERSION_CHECK(6,0,0)
|
||||
template <typename T>
|
||||
Q_OUTOFLINE_TEMPLATE QSet<T> QList<T>::toSet() const
|
||||
{
|
||||
|
@ -301,11 +301,11 @@ public:
|
||||
static QVector<T> fromList(const QList<T> &list);
|
||||
QList<T> toList() const;
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6,0,0)
|
||||
Q_DECL_DEPRECATED_X("Use QVector<T>(vector.begin(), vector.end()) instead.")
|
||||
#if QT_DEPRECATED_SINCE(5, 14) && QT_VERSION < QT_VERSION_CHECK(6,0,0)
|
||||
QT_DEPRECATED_X("Use QVector<T>(vector.begin(), vector.end()) instead.")
|
||||
static inline QVector<T> fromStdVector(const std::vector<T> &vector)
|
||||
{ return QVector<T>(vector.begin(), vector.end()); }
|
||||
Q_DECL_DEPRECATED_X("Use std::vector<T>(vector.begin(), vector.end()) instead.")
|
||||
QT_DEPRECATED_X("Use std::vector<T>(vector.begin(), vector.end()) instead.")
|
||||
inline std::vector<T> toStdVector() const
|
||||
{ return std::vector<T>(d->begin(), d->end()); }
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user