diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2024-04-30 11:30:01 +0200 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2024-04-30 17:48:36 +0200 |
commit | 7fe232be41018a6831de54e9d611b43af5298967 (patch) | |
tree | d821857b70c4155db7a46823fdabdd8712219561 /src | |
parent | 6bfba663b5566b362cbb9cd5591cf55a2cbbe52e (diff) |
SpeechD: replace unguarded qDebug statement with categorized logging
Amends ea5c48e518789c3387ed9c9d21978eda122e9782, which implemented
progress reporting for most plugins, but the speechd engine doesn't
support it as the protocol doesn't provide the information.
Pick-to: 6.7
Fixes: QTBUG-124868
Change-Id: I1879cda88dda2107ea62a6639f4d828e3557cccb
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/tts/speechdispatcher/qtexttospeech_speechd.cpp | 5 | ||||
-rw-r--r-- | src/plugins/tts/speechdispatcher/qtexttospeech_speechd_plugin.h | 3 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/tts/speechdispatcher/qtexttospeech_speechd.cpp b/src/plugins/tts/speechdispatcher/qtexttospeech_speechd.cpp index f93ea1c..768a67f 100644 --- a/src/plugins/tts/speechdispatcher/qtexttospeech_speechd.cpp +++ b/src/plugins/tts/speechdispatcher/qtexttospeech_speechd.cpp @@ -6,6 +6,7 @@ #include <QtCore/QDebug> #include <QtCore/QCoreApplication> +#include <QtCore/QLoggingCategory> #include <libspeechd.h> @@ -15,6 +16,8 @@ QT_BEGIN_NAMESPACE +Q_LOGGING_CATEGORY(lcSpeechTtsSpeechd, "qt.speech.tts.speechd") + typedef QList<QTextToSpeechEngineSpeechd*> QTextToSpeechSpeechDispatcherBackendList; Q_GLOBAL_STATIC(QTextToSpeechSpeechDispatcherBackendList, backends) @@ -385,7 +388,7 @@ QList<QVoice> QTextToSpeechEngineSpeechd::availableVoices() const // (history functions are just stubs) void speech_finished_callback(size_t msg_id, size_t client_id, SPDNotificationType state) { - qDebug() << "Message from speech dispatcher" << msg_id << client_id; + qCDebug(lcSpeechTtsSpeechd) << "Message from speech dispatcher" << msg_id << client_id; for (QTextToSpeechEngineSpeechd *backend : std::as_const(*backends)) backend->spdStateChanged(state); } diff --git a/src/plugins/tts/speechdispatcher/qtexttospeech_speechd_plugin.h b/src/plugins/tts/speechdispatcher/qtexttospeech_speechd_plugin.h index a83c94c..f934277 100644 --- a/src/plugins/tts/speechdispatcher/qtexttospeech_speechd_plugin.h +++ b/src/plugins/tts/speechdispatcher/qtexttospeech_speechd_plugin.h @@ -8,12 +8,9 @@ #include "qtexttospeechengine.h" #include <QtCore/QObject> -#include <QtCore/QLoggingCategory> QT_BEGIN_NAMESPACE -//Q_DECLARE_LOGGING_CATEGORY(lcSpeechTtsSpeechd) - class QTextToSpeechSpeechdPlugin : public QObject, public QTextToSpeechPlugin { Q_OBJECT |