summaryrefslogtreecommitdiffstats
path: root/src/corelib/global/qtdeprecationmarkers.h
diff options
context:
space:
mode:
authorSona Kurazyan <sona.kurazyan@qt.io>2022-08-22 17:11:56 +0200
committerSona Kurazyan <sona.kurazyan@qt.io>2022-08-30 20:56:46 +0200
commit9ecc119276e3741b2b71f2513510f583a3f92635 (patch)
tree45a24f4a1069da3f1ead493172ccec69664fbafe /src/corelib/global/qtdeprecationmarkers.h
parentdb64694b4c54449dfbf9d4765b03c0be0b01f63a (diff)
Move QT_ASCII_CAST_WARN macro from qglobal.h to qtdeprecationmarkers.h
Task-number: QTBUG-99313 Change-Id: I6449f519db3f67ed3d390295b8fa93eff28d7cda Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src/corelib/global/qtdeprecationmarkers.h')
-rw-r--r--src/corelib/global/qtdeprecationmarkers.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/corelib/global/qtdeprecationmarkers.h b/src/corelib/global/qtdeprecationmarkers.h
index d3fa1d05bd..e3b17fef28 100644
--- a/src/corelib/global/qtdeprecationmarkers.h
+++ b/src/corelib/global/qtdeprecationmarkers.h
@@ -299,6 +299,13 @@ constexpr inline Deprecated_t Deprecated = {};
}
#endif
+#ifdef QT_ASCII_CAST_WARNINGS
+# define QT_ASCII_CAST_WARN \
+ Q_DECL_DEPRECATED_X("Use fromUtf8, QStringLiteral, or QLatin1StringView")
+#else
+# define QT_ASCII_CAST_WARN
+#endif
+
QT_END_NAMESPACE
#endif // QTDEPRECATIONMARKERS_H