summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTim Blechmann <[email protected]>2025-07-02 11:58:15 +0800
committerTim Blechmann <[email protected]>2025-07-02 21:15:40 +0800
commit9fc458cefa594cb153e5c8b15f0f677085c4a6aa (patch)
tree7851ad284461fc0ebdb6bcaeae19f69c579a5d7f /src
parent1c614407ffa567a1792c8691bcad5fcfe46b7f4d (diff)
QAudioFormat: use Q_DECL_UNUSED_MEMBERHEADdev
we can use Q_DECL_UNUSED_MEMBER instead of Q_UNUSED in the implementation. Pick-to: 6.10 Change-Id: Id71e412ffec71efd130e41c84584bfa0fff953dd Reviewed-by: Timur Pocheptsov <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/multimedia/audio/qaudioformat.cpp4
-rw-r--r--src/multimedia/audio/qaudioformat.h2
2 files changed, 1 insertions, 5 deletions
diff --git a/src/multimedia/audio/qaudioformat.cpp b/src/multimedia/audio/qaudioformat.cpp
index dde220484..2483d490f 100644
--- a/src/multimedia/audio/qaudioformat.cpp
+++ b/src/multimedia/audio/qaudioformat.cpp
@@ -272,10 +272,6 @@ qint32 QAudioFormat::bytesForDuration(qint64 microseconds) const
*/
qint64 QAudioFormat::durationForBytes(qint32 bytes) const
{
- // avoid compiler warnings about unused variables. [[maybe_unused]] in the header
- // gives compiler errors on older gcc versions
- Q_UNUSED(reserved);
-
if (!isValid() || bytes <= 0)
return 0;
diff --git a/src/multimedia/audio/qaudioformat.h b/src/multimedia/audio/qaudioformat.h
index a6761094e..03d5ca881 100644
--- a/src/multimedia/audio/qaudioformat.h
+++ b/src/multimedia/audio/qaudioformat.h
@@ -147,7 +147,7 @@ private:
short m_channelCount = 0;
ChannelConfig m_channelConfig = ChannelConfigUnknown;
int m_sampleRate = 0;
- quint64 reserved = 0;
+ Q_DECL_UNUSED_MEMBER quint64 reserved = 0;
};
#ifndef QT_NO_DEBUG_STREAM