aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2020-10-30 16:00:24 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2020-10-31 11:55:27 +0100
commit963cbbaa420b12e810d23820b78f73c3eaaa15a8 (patch)
treeb9f9fd1284560b5dfaf9b3cf650c775fa1c8083a
parent3019b82b1b9813b7d23ebc74a40e437cecd60a60 (diff)
Replace old Q_DECL statements with modern C++
Since we depend on C++17 now, all of these can go. Change-Id: I0484fd4bb99e4367ec211c29146c316453729959 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
-rw-r--r--src/3rdparty/masm/assembler/ARM64Assembler.h16
-rw-r--r--src/particles/qquickparticlesystem_p.h2
-rw-r--r--src/plugins/qmltooling/qmldbg_debugger/qv4debugger.cpp2
-rw-r--r--src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservice.cpp2
-rw-r--r--src/plugins/qmltooling/qmldbg_preview/qqmlpreviewblacklist.cpp4
-rw-r--r--src/plugins/qmltooling/qmldbg_preview/qqmlpreviewblacklist.h4
-rw-r--r--src/qml/common/qv4calldata_p.h2
-rw-r--r--src/qml/common/qv4staticvalue_p.h14
-rw-r--r--src/qml/jsapi/qjsvalue.h2
-rw-r--r--src/qml/jsruntime/qv4managed_p.h4
-rw-r--r--src/qml/jsruntime/qv4regexp_p.h2
-rw-r--r--src/qml/jsruntime/qv4value_p.h4
-rw-r--r--src/qml/jsruntime/qv4vtable_p.h2
-rw-r--r--src/qml/memory/qv4heap_p.h4
-rw-r--r--src/qml/memory/qv4mm_p.h2
-rw-r--r--src/qml/memory/qv4mmdefs_p.h2
-rw-r--r--src/qml/memory/qv4writebarrier_p.h2
-rw-r--r--src/qml/qml/qqmlfileselector.cpp2
-rw-r--r--src/qml/qml/qqmlfileselector.h2
-rw-r--r--src/qml/types/qqmlmodelindexvaluetype_p.h8
-rw-r--r--src/quick/items/qquickpathview.cpp2
-rw-r--r--src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp12
-rw-r--r--src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h12
-rw-r--r--src/quick/scenegraph/coreapi/qsgtexture.cpp6
-rw-r--r--src/quick/scenegraph/coreapi/qsgtexture_p.h6
25 files changed, 60 insertions, 60 deletions
diff --git a/src/3rdparty/masm/assembler/ARM64Assembler.h b/src/3rdparty/masm/assembler/ARM64Assembler.h
index ca6b33d39a..a856196fe6 100644
--- a/src/3rdparty/masm/assembler/ARM64Assembler.h
+++ b/src/3rdparty/masm/assembler/ARM64Assembler.h
@@ -525,8 +525,8 @@ typedef enum {
#undef DECLARE_REGISTER
} FPRegisterID;
-static Q_DECL_CONSTEXPR bool isSp(RegisterID reg) { return reg == sp; }
-static Q_DECL_CONSTEXPR bool isZr(RegisterID reg) { return reg == zr; }
+static constexpr bool isSp(RegisterID reg) { return reg == sp; }
+static constexpr bool isZr(RegisterID reg) { return reg == zr; }
} // namespace ARM64Registers
@@ -535,15 +535,15 @@ public:
typedef ARM64Registers::RegisterID RegisterID;
typedef ARM64Registers::FPRegisterID FPRegisterID;
- static Q_DECL_CONSTEXPR RegisterID firstRegister() { return ARM64Registers::x0; }
- static Q_DECL_CONSTEXPR RegisterID lastRegister() { return ARM64Registers::sp; }
+ static constexpr RegisterID firstRegister() { return ARM64Registers::x0; }
+ static constexpr RegisterID lastRegister() { return ARM64Registers::sp; }
- static Q_DECL_CONSTEXPR FPRegisterID firstFPRegister() { return ARM64Registers::q0; }
- static Q_DECL_CONSTEXPR FPRegisterID lastFPRegister() { return ARM64Registers::q31; }
+ static constexpr FPRegisterID firstFPRegister() { return ARM64Registers::q0; }
+ static constexpr FPRegisterID lastFPRegister() { return ARM64Registers::q31; }
private:
- static Q_DECL_CONSTEXPR bool isSp(RegisterID reg) { return ARM64Registers::isSp(reg); }
- static Q_DECL_CONSTEXPR bool isZr(RegisterID reg) { return ARM64Registers::isZr(reg); }
+ static constexpr bool isSp(RegisterID reg) { return ARM64Registers::isSp(reg); }
+ static constexpr bool isZr(RegisterID reg) { return ARM64Registers::isZr(reg); }
public:
ARM64Assembler()
diff --git a/src/particles/qquickparticlesystem_p.h b/src/particles/qquickparticlesystem_p.h
index d38cd9007a..0269b8a583 100644
--- a/src/particles/qquickparticlesystem_p.h
+++ b/src/particles/qquickparticlesystem_p.h
@@ -335,7 +335,7 @@ public:
QV4::ReturnedValue v4Value(QQuickParticleSystem *particleSystem);
void extendLife(float time, QQuickParticleSystem *particleSystem);
- static inline Q_DECL_CONSTEXPR float EPSILON() Q_DECL_NOTHROW { return 0.001f; }
+ static inline constexpr float EPSILON() noexcept { return 0.001f; }
private:
QQuickV4ParticleData* v8Datum;
diff --git a/src/plugins/qmltooling/qmldbg_debugger/qv4debugger.cpp b/src/plugins/qmltooling/qmldbg_debugger/qv4debugger.cpp
index 7a5940cdd3..f47b9e09ac 100644
--- a/src/plugins/qmltooling/qmldbg_debugger/qv4debugger.cpp
+++ b/src/plugins/qmltooling/qmldbg_debugger/qv4debugger.cpp
@@ -52,7 +52,7 @@ QV4Debugger::BreakPoint::BreakPoint(const QString &fileName, int line)
: fileName(fileName), lineNumber(line)
{}
-inline size_t qHash(const QV4Debugger::BreakPoint &b, size_t seed = 0) Q_DECL_NOTHROW
+inline size_t qHash(const QV4Debugger::BreakPoint &b, size_t seed = 0) noexcept
{
return qHash(b.fileName, seed) ^ b.lineNumber;
}
diff --git a/src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservice.cpp b/src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservice.cpp
index 8791a6119f..473546aba5 100644
--- a/src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservice.cpp
+++ b/src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservice.cpp
@@ -83,7 +83,7 @@ public:
int hitCount;
};
-inline size_t qHash(const BreakPoint &b, size_t seed = 0) Q_DECL_NOTHROW
+inline size_t qHash(const BreakPoint &b, size_t seed = 0) noexcept
{
return qHash(b.fileName, seed) ^ b.lineNumber;
}
diff --git a/src/plugins/qmltooling/qmldbg_preview/qqmlpreviewblacklist.cpp b/src/plugins/qmltooling/qmldbg_preview/qqmlpreviewblacklist.cpp
index 77fe69821c..f9be18a39e 100644
--- a/src/plugins/qmltooling/qmldbg_preview/qqmlpreviewblacklist.cpp
+++ b/src/plugins/qmltooling/qmldbg_preview/qqmlpreviewblacklist.cpp
@@ -74,7 +74,7 @@ QQmlPreviewBlacklist::Node::Node(const QQmlPreviewBlacklist::Node &other) :
m_next.insert(it.key(), new Node(**it));
}
-QQmlPreviewBlacklist::Node::Node(QQmlPreviewBlacklist::Node &&other) Q_DECL_NOEXCEPT
+QQmlPreviewBlacklist::Node::Node(QQmlPreviewBlacklist::Node &&other) noexcept
{
m_mine.swap(other.m_mine);
m_next.swap(other.m_next);
@@ -99,7 +99,7 @@ QQmlPreviewBlacklist::Node &QQmlPreviewBlacklist::Node::operator=(
}
QQmlPreviewBlacklist::Node &QQmlPreviewBlacklist::Node::operator=(
- QQmlPreviewBlacklist::Node &&other) Q_DECL_NOEXCEPT
+ QQmlPreviewBlacklist::Node &&other) noexcept
{
if (&other != this) {
m_mine.swap(other.m_mine);
diff --git a/src/plugins/qmltooling/qmldbg_preview/qqmlpreviewblacklist.h b/src/plugins/qmltooling/qmldbg_preview/qqmlpreviewblacklist.h
index 2f743ca7a6..9d99517261 100644
--- a/src/plugins/qmltooling/qmldbg_preview/qqmlpreviewblacklist.h
+++ b/src/plugins/qmltooling/qmldbg_preview/qqmlpreviewblacklist.h
@@ -71,12 +71,12 @@ private:
public:
Node();
Node(const Node &other);
- Node(Node &&other) Q_DECL_NOEXCEPT;
+ Node(Node &&other) noexcept;
~Node();
Node &operator=(const Node &other);
- Node &operator=(Node &&other) Q_DECL_NOEXCEPT;
+ Node &operator=(Node &&other) noexcept;
void split(QString::iterator it, QString::iterator end);
void insert(const QString &path, int offset);
diff --git a/src/qml/common/qv4calldata_p.h b/src/qml/common/qv4calldata_p.h
index 5a5280cb86..a02cea766e 100644
--- a/src/qml/common/qv4calldata_p.h
+++ b/src/qml/common/qv4calldata_p.h
@@ -95,7 +95,7 @@ struct CallData
StaticValue args[1];
- static Q_DECL_CONSTEXPR int HeaderSize()
+ static constexpr int HeaderSize()
{
return offsetof(CallData, args) / sizeof(QV4::StaticValue);
}
diff --git a/src/qml/common/qv4staticvalue_p.h b/src/qml/common/qv4staticvalue_p.h
index 0716f7ea20..2a44dcf607 100644
--- a/src/qml/common/qv4staticvalue_p.h
+++ b/src/qml/common/qv4staticvalue_p.h
@@ -191,9 +191,9 @@ struct StaticValue
quint64 _val;
- QV4_NEARLY_ALWAYS_INLINE Q_DECL_RELAXED_CONSTEXPR quint64 &rawValueRef() { return _val; }
- QV4_NEARLY_ALWAYS_INLINE Q_DECL_RELAXED_CONSTEXPR quint64 rawValue() const { return _val; }
- QV4_NEARLY_ALWAYS_INLINE Q_DECL_RELAXED_CONSTEXPR void setRawValue(quint64 raw) { _val = raw; }
+ QV4_NEARLY_ALWAYS_INLINE constexpr quint64 &rawValueRef() { return _val; }
+ QV4_NEARLY_ALWAYS_INLINE constexpr quint64 rawValue() const { return _val; }
+ QV4_NEARLY_ALWAYS_INLINE constexpr void setRawValue(quint64 raw) { _val = raw; }
#if Q_BYTE_ORDER == Q_LITTLE_ENDIAN
static inline int valueOffset() { return 0; }
@@ -203,22 +203,22 @@ struct StaticValue
static inline int tagOffset() { return 0; }
#endif
static inline constexpr quint64 tagValue(quint32 tag, quint32 value) { return quint64(tag) << 32 | value; }
- QV4_NEARLY_ALWAYS_INLINE Q_DECL_RELAXED_CONSTEXPR void setTagValue(quint32 tag, quint32 value) { _val = quint64(tag) << 32 | value; }
+ QV4_NEARLY_ALWAYS_INLINE constexpr void setTagValue(quint32 tag, quint32 value) { _val = quint64(tag) << 32 | value; }
QV4_NEARLY_ALWAYS_INLINE constexpr quint32 value() const { return _val & quint64(~quint32(0)); }
QV4_NEARLY_ALWAYS_INLINE constexpr quint32 tag() const { return _val >> 32; }
- QV4_NEARLY_ALWAYS_INLINE Q_DECL_RELAXED_CONSTEXPR void setTag(quint32 tag) { setTagValue(tag, value()); }
+ QV4_NEARLY_ALWAYS_INLINE constexpr void setTag(quint32 tag) { setTagValue(tag, value()); }
QV4_NEARLY_ALWAYS_INLINE constexpr int int_32() const
{
return int(value());
}
- QV4_NEARLY_ALWAYS_INLINE Q_DECL_RELAXED_CONSTEXPR void setInt_32(int i)
+ QV4_NEARLY_ALWAYS_INLINE constexpr void setInt_32(int i)
{
setTagValue(quint32(ValueTypeInternal::Integer), quint32(i));
}
QV4_NEARLY_ALWAYS_INLINE uint uint_32() const { return value(); }
- QV4_NEARLY_ALWAYS_INLINE Q_DECL_RELAXED_CONSTEXPR void setEmpty()
+ QV4_NEARLY_ALWAYS_INLINE constexpr void setEmpty()
{
setTagValue(quint32(ValueTypeInternal::Empty), 0);
}
diff --git a/src/qml/jsapi/qjsvalue.h b/src/qml/jsapi/qjsvalue.h
index c814ce14f8..8a62b974c8 100644
--- a/src/qml/jsapi/qjsvalue.h
+++ b/src/qml/jsapi/qjsvalue.h
@@ -153,7 +153,7 @@ public:
private:
friend class QJSValuePrivate;
// force compile error, prevent QJSValue(bool) to be called
- QJSValue(void *) Q_DECL_EQ_DELETE;
+ QJSValue(void *) = delete;
quint64 d;
};
diff --git a/src/qml/jsruntime/qv4managed_p.h b/src/qml/jsruntime/qv4managed_p.h
index 6db03181f9..016b3e2eea 100644
--- a/src/qml/jsruntime/qv4managed_p.h
+++ b/src/qml/jsruntime/qv4managed_p.h
@@ -92,7 +92,7 @@ inline void qYouForgotTheQ_MANAGED_Macro(T1, T2) {}
#define V4_MANAGED(DataClass, superClass) \
private: \
- DataClass() Q_DECL_EQ_DELETE; \
+ DataClass() = delete; \
Q_DISABLE_COPY(DataClass) \
V4_MANAGED_ITSELF(DataClass, superClass) \
Q_STATIC_ASSERT(std::is_trivial< QV4::Heap::DataClass >::value);
@@ -119,7 +119,7 @@ struct Q_QML_PRIVATE_EXPORT Managed : Value, VTableBase
};
private:
void *operator new(size_t);
- Managed() Q_DECL_EQ_DELETE;
+ Managed() = delete;
Q_DISABLE_COPY(Managed)
public:
diff --git a/src/qml/jsruntime/qv4regexp_p.h b/src/qml/jsruntime/qv4regexp_p.h
index ff6cc061ee..122db47008 100644
--- a/src/qml/jsruntime/qv4regexp_p.h
+++ b/src/qml/jsruntime/qv4regexp_p.h
@@ -164,7 +164,7 @@ inline RegExpCacheKey::RegExpCacheKey(const RegExp::Data *re)
, flags(re->flags)
{}
-inline size_t qHash(const RegExpCacheKey& key, size_t seed = 0) Q_DECL_NOTHROW
+inline size_t qHash(const RegExpCacheKey& key, size_t seed = 0) noexcept
{ return qHash(key.pattern, seed); }
class RegExpCache : public QHash<RegExpCacheKey, WeakValue>
diff --git a/src/qml/jsruntime/qv4value_p.h b/src/qml/jsruntime/qv4value_p.h
index 42e97b1d36..530c8eaf27 100644
--- a/src/qml/jsruntime/qv4value_p.h
+++ b/src/qml/jsruntime/qv4value_p.h
@@ -480,7 +480,7 @@ inline double Value::toInteger() const
template <size_t o>
struct HeapValue : Value {
- static Q_CONSTEXPR size_t offset = o;
+ static constexpr size_t offset = o;
HeapBasePtr base() {
HeapBasePtr base = reinterpret_cast<HeapBasePtr>(this) - (offset/sizeof(Heap::Base));
Q_ASSERT(base->inUse());
@@ -497,7 +497,7 @@ struct HeapValue : Value {
template <size_t o>
struct ValueArray {
- static Q_CONSTEXPR size_t offset = o;
+ static constexpr size_t offset = o;
uint size;
uint alloc;
Value values[1];
diff --git a/src/qml/jsruntime/qv4vtable_p.h b/src/qml/jsruntime/qv4vtable_p.h
index 9dda104cd1..588205f046 100644
--- a/src/qml/jsruntime/qv4vtable_p.h
+++ b/src/qml/jsruntime/qv4vtable_p.h
@@ -202,7 +202,7 @@ const QV4::VTable classname::static_vtbl = DEFINE_MANAGED_VTABLE_INT(classname,
#define V4_OBJECT2(DataClass, superClass) \
private: \
- DataClass() Q_DECL_EQ_DELETE; \
+ DataClass() = delete; \
Q_DISABLE_COPY(DataClass) \
public: \
Q_MANAGED_CHECK \
diff --git a/src/qml/memory/qv4heap_p.h b/src/qml/memory/qv4heap_p.h
index d9c607aea4..6e11d93f58 100644
--- a/src/qml/memory/qv4heap_p.h
+++ b/src/qml/memory/qv4heap_p.h
@@ -69,7 +69,7 @@ namespace Heap {
template <typename T, size_t o>
struct Pointer {
- static Q_CONSTEXPR size_t offset = o;
+ static constexpr size_t offset = o;
T operator->() const { return get(); }
operator T () const { return get(); }
@@ -245,7 +245,7 @@ struct QV4QPointer {
init(o);
return *this;
}
- bool isNull() const Q_DECL_NOTHROW
+ bool isNull() const noexcept
{
return d == nullptr || qObject == nullptr || d->strongref.loadRelaxed() == 0;
}
diff --git a/src/qml/memory/qv4mm_p.h b/src/qml/memory/qv4mm_p.h
index 74a760d093..881f4fd19d 100644
--- a/src/qml/memory/qv4mm_p.h
+++ b/src/qml/memory/qv4mm_p.h
@@ -156,7 +156,7 @@ public:
// TODO: this is only for 64bit (and x86 with SSE/AVX), so exend it for other architectures to be slightly more efficient (meaning, align on 8-byte boundaries).
// Note: all occurrences of "16" in alloc/dealloc are also due to the alignment.
- Q_DECL_CONSTEXPR static inline std::size_t align(std::size_t size)
+ constexpr static inline std::size_t align(std::size_t size)
{ return (size + Chunk::SlotSize - 1) & ~(Chunk::SlotSize - 1); }
template<typename ManagedType>
diff --git a/src/qml/memory/qv4mmdefs_p.h b/src/qml/memory/qv4mmdefs_p.h
index 117e8f4360..43e81e0434 100644
--- a/src/qml/memory/qv4mmdefs_p.h
+++ b/src/qml/memory/qv4mmdefs_p.h
@@ -349,7 +349,7 @@ private:
struct name##SizeStruct : base, name##OffsetStruct {}; \
struct name##Data { \
typedef base SuperClass; \
- static Q_CONSTEXPR size_t baseOffset = sizeof(name##SizeStruct) - sizeof(name##OffsetStruct); \
+ static constexpr size_t baseOffset = sizeof(name##SizeStruct) - sizeof(name##OffsetStruct); \
name##Members(name, HEAP_OBJECT_MEMBER_EXPANSION) \
}; \
Q_STATIC_ASSERT(sizeof(name##SizeStruct) == sizeof(name##Data) + name##Data::baseOffset); \
diff --git a/src/qml/memory/qv4writebarrier_p.h b/src/qml/memory/qv4writebarrier_p.h
index c65cfc0269..d2dc4521f2 100644
--- a/src/qml/memory/qv4writebarrier_p.h
+++ b/src/qml/memory/qv4writebarrier_p.h
@@ -80,7 +80,7 @@ Q_ALWAYS_INLINE void fence() {}
#if WRITEBARRIER(none)
template <NewValueType type>
-static Q_CONSTEXPR inline bool isRequired() {
+static constexpr inline bool isRequired() {
return false;
}
diff --git a/src/qml/qml/qqmlfileselector.cpp b/src/qml/qml/qqmlfileselector.cpp
index aaddfa628c..4b773adc3e 100644
--- a/src/qml/qml/qqmlfileselector.cpp
+++ b/src/qml/qml/qqmlfileselector.cpp
@@ -124,7 +124,7 @@ QQmlFileSelector::~QQmlFileSelector()
\since 5.7
Returns the QFileSelector instance used by the QQmlFileSelector.
*/
-QFileSelector *QQmlFileSelector::selector() const Q_DECL_NOTHROW
+QFileSelector *QQmlFileSelector::selector() const noexcept
{
Q_D(const QQmlFileSelector);
return d->selector;
diff --git a/src/qml/qml/qqmlfileselector.h b/src/qml/qml/qqmlfileselector.h
index 0aeea6775f..8ad565e49d 100644
--- a/src/qml/qml/qqmlfileselector.h
+++ b/src/qml/qml/qqmlfileselector.h
@@ -56,7 +56,7 @@ class Q_QML_EXPORT QQmlFileSelector : public QObject
public:
explicit QQmlFileSelector(QQmlEngine *engine, QObject *parent = nullptr);
~QQmlFileSelector() override;
- QFileSelector *selector() const Q_DECL_NOTHROW;
+ QFileSelector *selector() const noexcept;
void setSelector(QFileSelector *selector);
void setExtraSelectors(const QStringList &strings);
diff --git a/src/qml/types/qqmlmodelindexvaluetype_p.h b/src/qml/types/qqmlmodelindexvaluetype_p.h
index 59c33bf5af..dae04f6581 100644
--- a/src/qml/types/qqmlmodelindexvaluetype_p.h
+++ b/src/qml/types/qqmlmodelindexvaluetype_p.h
@@ -76,11 +76,11 @@ public:
Q_INVOKABLE QString toString() const
{ return QLatin1String("QModelIndex") + propertiesString(v); }
- inline int row() const Q_DECL_NOTHROW { return v.row(); }
- inline int column() const Q_DECL_NOTHROW { return v.column(); }
+ inline int row() const noexcept { return v.row(); }
+ inline int column() const noexcept { return v.column(); }
inline QModelIndex parent() const { return v.parent(); }
- inline bool isValid() const Q_DECL_NOTHROW { return v.isValid(); }
- inline QAbstractItemModel *model() const Q_DECL_NOTHROW
+ inline bool isValid() const noexcept { return v.isValid(); }
+ inline QAbstractItemModel *model() const noexcept
{ return const_cast<QAbstractItemModel *>(v.model()); }
quint64 internalId() const { return v.internalId(); }
diff --git a/src/quick/items/qquickpathview.cpp b/src/quick/items/qquickpathview.cpp
index 14ae811bc6..d7f85c288d 100644
--- a/src/quick/items/qquickpathview.cpp
+++ b/src/quick/items/qquickpathview.cpp
@@ -1921,7 +1921,7 @@ void QQuickPathView::updatePolish()
refill();
}
-static inline int currentIndexRemainder(int currentIndex, int modelCount) Q_DECL_NOTHROW
+static inline int currentIndexRemainder(int currentIndex, int modelCount) noexcept
{
if (currentIndex < 0)
return modelCount + currentIndex % modelCount;
diff --git a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp
index 636b06dfa0..903a98c8ed 100644
--- a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp
+++ b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp
@@ -3889,7 +3889,7 @@ void Renderer::invalidatePipelineCacheDependency(QRhiRenderPassDescriptor *rpDes
}
}
-bool operator==(const GraphicsState &a, const GraphicsState &b) Q_DECL_NOTHROW
+bool operator==(const GraphicsState &a, const GraphicsState &b) noexcept
{
return a.depthTest == b.depthTest
&& a.depthWrite == b.depthWrite
@@ -3906,12 +3906,12 @@ bool operator==(const GraphicsState &a, const GraphicsState &b) Q_DECL_NOTHROW
&& a.lineWidth == b.lineWidth;
}
-bool operator!=(const GraphicsState &a, const GraphicsState &b) Q_DECL_NOTHROW
+bool operator!=(const GraphicsState &a, const GraphicsState &b) noexcept
{
return !(a == b);
}
-size_t qHash(const GraphicsState &s, size_t seed) Q_DECL_NOTHROW
+size_t qHash(const GraphicsState &s, size_t seed) noexcept
{
// do not bother with all fields
return seed
@@ -3926,7 +3926,7 @@ size_t qHash(const GraphicsState &s, size_t seed) Q_DECL_NOTHROW
+ s.sampleCount;
}
-bool operator==(const GraphicsPipelineStateKey &a, const GraphicsPipelineStateKey &b) Q_DECL_NOTHROW
+bool operator==(const GraphicsPipelineStateKey &a, const GraphicsPipelineStateKey &b) noexcept
{
return a.state == b.state
&& a.sms->programRhi.program == b.sms->programRhi.program
@@ -3934,12 +3934,12 @@ bool operator==(const GraphicsPipelineStateKey &a, const GraphicsPipelineStateKe
&& a.layoutCompatibleSrb->isLayoutCompatible(b.layoutCompatibleSrb);
}
-bool operator!=(const GraphicsPipelineStateKey &a, const GraphicsPipelineStateKey &b) Q_DECL_NOTHROW
+bool operator!=(const GraphicsPipelineStateKey &a, const GraphicsPipelineStateKey &b) noexcept
{
return !(a == b);
}
-size_t qHash(const GraphicsPipelineStateKey &k, size_t seed) Q_DECL_NOTHROW
+size_t qHash(const GraphicsPipelineStateKey &k, size_t seed) noexcept
{
// no srb and rp included due to their special comparison semantics and lack of hash keys
return qHash(k.state, seed) + qHash(k.sms->programRhi.program, seed);
diff --git a/src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h b/src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h
index 4a46246ecd..bff9547207 100644
--- a/src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h
+++ b/src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h
@@ -642,9 +642,9 @@ struct GraphicsState
float lineWidth = 1.0f;
};
-bool operator==(const GraphicsState &a, const GraphicsState &b) Q_DECL_NOTHROW;
-bool operator!=(const GraphicsState &a, const GraphicsState &b) Q_DECL_NOTHROW;
-size_t qHash(const GraphicsState &s, size_t seed = 0) Q_DECL_NOTHROW;
+bool operator==(const GraphicsState &a, const GraphicsState &b) noexcept;
+bool operator!=(const GraphicsState &a, const GraphicsState &b) noexcept;
+size_t qHash(const GraphicsState &s, size_t seed = 0) noexcept;
struct ShaderManagerShader;
@@ -656,9 +656,9 @@ struct GraphicsPipelineStateKey
const QRhiShaderResourceBindings *layoutCompatibleSrb;
};
-bool operator==(const GraphicsPipelineStateKey &a, const GraphicsPipelineStateKey &b) Q_DECL_NOTHROW;
-bool operator!=(const GraphicsPipelineStateKey &a, const GraphicsPipelineStateKey &b) Q_DECL_NOTHROW;
-size_t qHash(const GraphicsPipelineStateKey &k, size_t seed = 0) Q_DECL_NOTHROW;
+bool operator==(const GraphicsPipelineStateKey &a, const GraphicsPipelineStateKey &b) noexcept;
+bool operator!=(const GraphicsPipelineStateKey &a, const GraphicsPipelineStateKey &b) noexcept;
+size_t qHash(const GraphicsPipelineStateKey &k, size_t seed = 0) noexcept;
struct ShaderManagerShader
{
diff --git a/src/quick/scenegraph/coreapi/qsgtexture.cpp b/src/quick/scenegraph/coreapi/qsgtexture.cpp
index fc44de7eeb..4bf1e020fd 100644
--- a/src/quick/scenegraph/coreapi/qsgtexture.cpp
+++ b/src/quick/scenegraph/coreapi/qsgtexture.cpp
@@ -70,7 +70,7 @@ static const bool qsg_leak_check = !qEnvironmentVariableIsEmpty("QML_LEAK_CHECK"
QT_BEGIN_NAMESPACE
-bool operator==(const QSGSamplerDescription &a, const QSGSamplerDescription &b) Q_DECL_NOTHROW
+bool operator==(const QSGSamplerDescription &a, const QSGSamplerDescription &b) noexcept
{
return a.filtering == b.filtering
&& a.mipmapFiltering == b.mipmapFiltering
@@ -79,12 +79,12 @@ bool operator==(const QSGSamplerDescription &a, const QSGSamplerDescription &b)
&& a.anisotropylevel == b.anisotropylevel;
}
-bool operator!=(const QSGSamplerDescription &a, const QSGSamplerDescription &b) Q_DECL_NOTHROW
+bool operator!=(const QSGSamplerDescription &a, const QSGSamplerDescription &b) noexcept
{
return !(a == b);
}
-size_t qHash(const QSGSamplerDescription &s, size_t seed) Q_DECL_NOTHROW
+size_t qHash(const QSGSamplerDescription &s, size_t seed) noexcept
{
const int f = s.filtering;
const int m = s.mipmapFiltering;
diff --git a/src/quick/scenegraph/coreapi/qsgtexture_p.h b/src/quick/scenegraph/coreapi/qsgtexture_p.h
index 852ed1f501..723c612fb8 100644
--- a/src/quick/scenegraph/coreapi/qsgtexture_p.h
+++ b/src/quick/scenegraph/coreapi/qsgtexture_p.h
@@ -70,9 +70,9 @@ struct QSGSamplerDescription
Q_DECLARE_TYPEINFO(QSGSamplerDescription, Q_MOVABLE_TYPE);
-bool operator==(const QSGSamplerDescription &a, const QSGSamplerDescription &b) Q_DECL_NOTHROW;
-bool operator!=(const QSGSamplerDescription &a, const QSGSamplerDescription &b) Q_DECL_NOTHROW;
-size_t qHash(const QSGSamplerDescription &s, size_t seed = 0) Q_DECL_NOTHROW;
+bool operator==(const QSGSamplerDescription &a, const QSGSamplerDescription &b) noexcept;
+bool operator!=(const QSGSamplerDescription &a, const QSGSamplerDescription &b) noexcept;
+size_t qHash(const QSGSamplerDescription &s, size_t seed = 0) noexcept;
#if QT_CONFIG(opengl)
class Q_QUICK_PRIVATE_EXPORT QSGTexturePlatformOpenGL : public QNativeInterface::QSGOpenGLTexture