From fb530ac0a12b90527b9792b31e08043518dd8bd7 Mon Sep 17 00:00:00 2001 From: Justin McPherson Date: Wed, 2 Sep 2009 15:39:39 +1000 Subject: Copy ctor and assignment operator for QAudioFormatPrivate (QSharedData derived class). Reviewed-by: bill king --- src/multimedia/audio/qaudioformat.cpp | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/src/multimedia/audio/qaudioformat.cpp b/src/multimedia/audio/qaudioformat.cpp index 71bbf83..6ae230f 100644 --- a/src/multimedia/audio/qaudioformat.cpp +++ b/src/multimedia/audio/qaudioformat.cpp @@ -57,10 +57,32 @@ public: sampleType = QAudioFormat::Unknown; } + QAudioFormatPrivate(const QAudioFormatPrivate &other): + QSharedData(other), + codec(other.codec), + byteOrder(other.byteOrder), + sampleType(other.sampleType), + frequency(other.frequency), + channels(other.channels), + sampleSize(other.sampleSize) + { + } + + QAudioFormatPrivate& operator=(const QAudioFormatPrivate &other) + { + codec = other.codec; + byteOrder = other.byteOrder; + sampleType = other.sampleType; + frequency = other.frequency; + channels = other.channels; + sampleSize = other.sampleSize; + + return *this; + } + QString codec; QAudioFormat::Endian byteOrder; QAudioFormat::SampleType sampleType; - int frequency; int channels; int sampleSize; -- cgit v0.12