summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2020-10-02 10:47:47 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2020-10-03 11:58:08 +0200
commitc82f73666d87549e5884ddcd253ec3561d840b9b (patch)
tree96eff624e0add180490d014abce92fccf9542f5b /src/corelib/kernel
parent889d40ebe2d9d0e92caea2749608720f7c088173 (diff)
Replace Q_DECL_UNUSED with [[maybe_unused]]
Use C++17 attribute directly Change-Id: Id853e7a5117065e4adb549f81303c1820fe198ce Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/kernel')
-rw-r--r--src/corelib/kernel/qmetaobjectbuilder.cpp2
-rw-r--r--src/corelib/kernel/qsystemerror.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/corelib/kernel/qmetaobjectbuilder.cpp b/src/corelib/kernel/qmetaobjectbuilder.cpp
index 8520151f8c..c4ea31c215 100644
--- a/src/corelib/kernel/qmetaobjectbuilder.cpp
+++ b/src/corelib/kernel/qmetaobjectbuilder.cpp
@@ -89,7 +89,7 @@ Q_CORE_EXPORT bool isBuiltinType(const QByteArray &type)
} // namespace QtPrivate
// copied from qmetaobject.cpp
-Q_DECL_UNUSED static inline const QMetaObjectPrivate *priv(const uint* data)
+[[maybe_unused]] static inline const QMetaObjectPrivate *priv(const uint* data)
{ return reinterpret_cast<const QMetaObjectPrivate*>(data); }
class QMetaMethodBuilderPrivate
diff --git a/src/corelib/kernel/qsystemerror.cpp b/src/corelib/kernel/qsystemerror.cpp
index 619f94c476..a2df9dee93 100644
--- a/src/corelib/kernel/qsystemerror.cpp
+++ b/src/corelib/kernel/qsystemerror.cpp
@@ -61,11 +61,11 @@ namespace {
// version in portable code. However, it's impossible to do that if
// _GNU_SOURCE is defined so we use C++ overloading to decide what to do
// depending on the return type
- Q_DECL_UNUSED static inline QString fromstrerror_helper(int, const QByteArray &buf)
+ [[maybe_unused]] static inline QString fromstrerror_helper(int, const QByteArray &buf)
{
return QString::fromLocal8Bit(buf);
}
- Q_DECL_UNUSED static inline QString fromstrerror_helper(const char *str, const QByteArray &)
+ [[maybe_unused]] static inline QString fromstrerror_helper(const char *str, const QByteArray &)
{
return QString::fromLocal8Bit(str);
}