diff options
author | Artem Dyomin <artem.dyomin@qt.io> | 2024-04-29 13:33:54 +0200 |
---|---|---|
committer | Artem Dyomin <artem.dyomin@qt.io> | 2024-05-03 16:21:27 +0200 |
commit | 4b2cd17206453faba136152fb2bce47c17cef448 (patch) | |
tree | a8f7db7109a18b15ddf063e06d93e8dc400875b1 /src/multimedia/platform | |
parent | a767097bd0dded512ecf3661bdea33b797383621 (diff) |
Rename QPlatformMediaRecorder::error(code, desc) => updateError
The name 'updateError' works better as QPlatformMediaRecorder::error()
is also a getter returning the current error code.
Pick-to: 6.7 6.5
Change-Id: I9c6cdf4caa997a9465fc8fa89e50548432aee01c
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
Diffstat (limited to 'src/multimedia/platform')
-rw-r--r-- | src/multimedia/platform/qplatformmediarecorder.cpp | 6 | ||||
-rw-r--r-- | src/multimedia/platform/qplatformmediarecorder_p.h | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/multimedia/platform/qplatformmediarecorder.cpp b/src/multimedia/platform/qplatformmediarecorder.cpp index ba9ea0165..30dba0a45 100644 --- a/src/multimedia/platform/qplatformmediarecorder.cpp +++ b/src/multimedia/platform/qplatformmediarecorder.cpp @@ -15,12 +15,12 @@ QPlatformMediaRecorder::QPlatformMediaRecorder(QMediaRecorder *parent) void QPlatformMediaRecorder::pause() { - error(QMediaRecorder::FormatError, QMediaRecorder::tr("Pause not supported")); + updateError(QMediaRecorder::FormatError, QMediaRecorder::tr("Pause not supported")); } void QPlatformMediaRecorder::resume() { - error(QMediaRecorder::FormatError, QMediaRecorder::tr("Resume not supported")); + updateError(QMediaRecorder::FormatError, QMediaRecorder::tr("Resume not supported")); } void QPlatformMediaRecorder::stateChanged(QMediaRecorder::RecorderState state) @@ -47,7 +47,7 @@ void QPlatformMediaRecorder::actualLocationChanged(const QUrl &location) emit q->actualLocationChanged(location); } -void QPlatformMediaRecorder::error(QMediaRecorder::Error error, const QString &errorString) +void QPlatformMediaRecorder::updateError(QMediaRecorder::Error error, const QString &errorString) { m_error.setAndNotify(error, errorString, *q); } diff --git a/src/multimedia/platform/qplatformmediarecorder_p.h b/src/multimedia/platform/qplatformmediarecorder_p.h index 6e88dc187..dea45ac70 100644 --- a/src/multimedia/platform/qplatformmediarecorder_p.h +++ b/src/multimedia/platform/qplatformmediarecorder_p.h @@ -125,7 +125,7 @@ public: virtual void setOutputLocation(const QUrl &location) { m_outputLocation = location; } QUrl actualLocation() const { return m_actualLocation; } void clearActualLocation() { m_actualLocation.clear(); } - void clearError() { error(QMediaRecorder::NoError, QString()); } + void clearError() { updateError(QMediaRecorder::NoError, QString()); } QIODevice *outputDevice() const { return m_outputDevice; } void setOutputDevice(QIODevice *device) { m_outputDevice = device; } @@ -136,7 +136,7 @@ protected: void stateChanged(QMediaRecorder::RecorderState state); void durationChanged(qint64 position); void actualLocationChanged(const QUrl &location); - void error(QMediaRecorder::Error error, const QString &errorString); + void updateError(QMediaRecorder::Error error, const QString &errorString); void metaDataChanged(); QMediaRecorder *mediaRecorder() { return q; } |