diff options
author | Liang Qi <liang.qi@qt.io> | 2017-10-30 08:45:51 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2017-10-30 09:31:50 +0100 |
commit | 345d43ec7f349a2b71de784216d0a6fd6c42a0d0 (patch) | |
tree | 3b7a453b90cd1a54c93748a9524f4980aae00d96 | |
parent | cb10801ee7ea27d2296767ee24cbb048a7db5441 (diff) | |
parent | 8278f9f5d2c9f47233f59ff8af757e0591045895 (diff) |
Merge remote-tracking branch 'origin/5.9' into 5.10v5.10.0-rc3v5.10.0-rc2v5.10.0-rc1v5.10.0-beta4v5.10.0
Conflicts:
.qmake.conf
Change-Id: I685cdce7fa2d43f5c3d9f1956c2068e730ee6a47
-rw-r--r-- | config.tests/speechd/speechd.cpp (renamed from config.tests/vocalizer/vocalizer.cpp) | 13 | ||||
-rw-r--r-- | config.tests/speechd/speechd.pro | 3 | ||||
-rw-r--r-- | config.tests/vocalizer/vocalizer.pro | 3 | ||||
-rw-r--r-- | examples/speech/hello_speak/doc/src/hellospeakex.qdoc | 10 | ||||
-rw-r--r-- | examples/speech/hello_speak/main.cpp | 16 | ||||
-rw-r--r-- | examples/speech/hello_speak/mainwindow.cpp | 16 | ||||
-rw-r--r-- | examples/speech/hello_speak/mainwindow.h | 16 | ||||
-rw-r--r-- | qtspeech.pro | 4 | ||||
-rw-r--r-- | src/doc/src/qtspeech-index.qdoc | 10 | ||||
-rw-r--r-- | src/doc/src/qtspeech.qdoc | 10 | ||||
-rw-r--r-- | src/plugins/tts/android/src/qtexttospeech_android.cpp | 17 | ||||
-rw-r--r-- | src/plugins/tts/speechdispatcher/qtexttospeech_speechd.cpp | 2 | ||||
-rw-r--r-- | src/plugins/tts/speechdispatcher/qtexttospeech_speechd.h | 2 | ||||
-rw-r--r-- | src/plugins/tts/speechdispatcher/speechdispatcher.pro | 3 | ||||
-rw-r--r-- | src/plugins/tts/tts.pro | 6 | ||||
-rw-r--r-- | tests/auto/texttospeech/texttospeech.pro | 5 | ||||
-rw-r--r-- | tests/auto/texttospeech/tst_qtexttospeech.cpp | 2 |
17 files changed, 79 insertions, 59 deletions
diff --git a/config.tests/vocalizer/vocalizer.cpp b/config.tests/speechd/speechd.cpp index 5ef65cd..9910b31 100644 --- a/config.tests/vocalizer/vocalizer.cpp +++ b/config.tests/speechd/speechd.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2016 The Qt Company Ltd. +** Copyright (C) 2017 The Qt Company Ltd. ** Contact: http://www.qt.io/licensing/ ** ** This file is part of the Qt Speech module of the Qt Toolkit. @@ -34,15 +34,12 @@ ** ****************************************************************************/ -#include <ve_ttsapi.h> -#include <string.h> +#include <libspeechd.h> int main() { - VE_HSPEECH vocalizerClass; - VE_INSTALL vocalizerInstall; - memset(&vocalizerInstall, 0, sizeof(VE_INSTALL)); - ve_ttsInitialize(&vocalizerInstall, &vocalizerClass); - ve_ttsUnInitialize(vocalizerClass); + SPDConnection *speechDispatcher = spd_open("QtConfigTest", "main", 0, SPD_MODE_THREADED); + if (speechDispatcher) + spd_close(speechDispatcher); return 0; } diff --git a/config.tests/speechd/speechd.pro b/config.tests/speechd/speechd.pro new file mode 100644 index 0000000..48e2ffa --- /dev/null +++ b/config.tests/speechd/speechd.pro @@ -0,0 +1,3 @@ +SOURCES = speechd.cpp + +LIBS += -lspeechd diff --git a/config.tests/vocalizer/vocalizer.pro b/config.tests/vocalizer/vocalizer.pro deleted file mode 100644 index b15ad7a..0000000 --- a/config.tests/vocalizer/vocalizer.pro +++ /dev/null @@ -1,3 +0,0 @@ -SOURCES = vocalizer.cpp - -LIBS += -lve diff --git a/examples/speech/hello_speak/doc/src/hellospeakex.qdoc b/examples/speech/hello_speak/doc/src/hellospeakex.qdoc index a5e8082..ea3bc8b 100644 --- a/examples/speech/hello_speak/doc/src/hellospeakex.qdoc +++ b/examples/speech/hello_speak/doc/src/hellospeakex.qdoc @@ -1,7 +1,7 @@ /**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the documentation of the Qt Toolkit. ** @@ -11,8 +11,8 @@ ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** ** GNU Free Documentation License Usage ** Alternatively, this file may be used under the terms of the GNU Free @@ -20,7 +20,7 @@ ** Foundation and appearing in the file included in the packaging of ** this file. Please review the following information to ensure ** the GNU Free Documentation License version 1.3 requirements -** will be met: http://www.gnu.org/copyleft/fdl.html. +** will be met: https://www.gnu.org/licenses/fdl-1.3.html. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/examples/speech/hello_speak/main.cpp b/examples/speech/hello_speak/main.cpp index 4071fc0..0c7d18d 100644 --- a/examples/speech/hello_speak/main.cpp +++ b/examples/speech/hello_speak/main.cpp @@ -1,12 +1,22 @@ /**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: ** ** "Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions are diff --git a/examples/speech/hello_speak/mainwindow.cpp b/examples/speech/hello_speak/mainwindow.cpp index 56b274f..17619d2 100644 --- a/examples/speech/hello_speak/mainwindow.cpp +++ b/examples/speech/hello_speak/mainwindow.cpp @@ -1,12 +1,22 @@ /**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: ** ** "Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions are diff --git a/examples/speech/hello_speak/mainwindow.h b/examples/speech/hello_speak/mainwindow.h index 1758197..eef4057 100644 --- a/examples/speech/hello_speak/mainwindow.h +++ b/examples/speech/hello_speak/mainwindow.h @@ -1,12 +1,22 @@ /**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: ** ** "Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions are diff --git a/qtspeech.pro b/qtspeech.pro index 58728f2..57563dc 100644 --- a/qtspeech.pro +++ b/qtspeech.pro @@ -2,5 +2,7 @@ lessThan(QT_MAJOR_VERSION, 5): error("The QtSpeech library only supports Qt 5.") load(configure) qtCompileTest(flite) qtCompileTest(flite_alsa) -qtCompileTest(vocalizer) +!packagesExist(speech-dispatcher) { + qtCompileTest(speechd) +} load(qt_parts) diff --git a/src/doc/src/qtspeech-index.qdoc b/src/doc/src/qtspeech-index.qdoc index bad34f7..c4eb563 100644 --- a/src/doc/src/qtspeech-index.qdoc +++ b/src/doc/src/qtspeech-index.qdoc @@ -1,7 +1,7 @@ /**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the documentation of the Qt Toolkit. ** @@ -11,8 +11,8 @@ ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** ** GNU Free Documentation License Usage ** Alternatively, this file may be used under the terms of the GNU Free @@ -20,7 +20,7 @@ ** Foundation and appearing in the file included in the packaging of ** this file. Please review the following information to ensure ** the GNU Free Documentation License version 1.3 requirements -** will be met: http://www.gnu.org/copyleft/fdl.html. +** will be met: https://www.gnu.org/licenses/fdl-1.3.html. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/doc/src/qtspeech.qdoc b/src/doc/src/qtspeech.qdoc index 8fa91de..b36b05b 100644 --- a/src/doc/src/qtspeech.qdoc +++ b/src/doc/src/qtspeech.qdoc @@ -1,7 +1,7 @@ /**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the documentation of the Qt Toolkit. ** @@ -11,8 +11,8 @@ ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** ** GNU Free Documentation License Usage ** Alternatively, this file may be used under the terms of the GNU Free @@ -20,7 +20,7 @@ ** Foundation and appearing in the file included in the packaging of ** this file. Please review the following information to ensure ** the GNU Free Documentation License version 1.3 requirements -** will be met: http://www.gnu.org/copyleft/fdl.html. +** will be met: https://www.gnu.org/licenses/fdl-1.3.html. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/plugins/tts/android/src/qtexttospeech_android.cpp b/src/plugins/tts/android/src/qtexttospeech_android.cpp index 527bbec..a3cac58 100644 --- a/src/plugins/tts/android/src/qtexttospeech_android.cpp +++ b/src/plugins/tts/android/src/qtexttospeech_android.cpp @@ -123,7 +123,7 @@ Q_DECL_EXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void */*reserved*/) QTextToSpeechEngineAndroid::QTextToSpeechEngineAndroid(const QVariantMap ¶meters, QObject *parent) : QTextToSpeechEngine(parent) , m_speech() - , m_state(QTextToSpeech::Ready) + , m_state(QTextToSpeech::BackendError) , m_text() { Q_UNUSED(parameters) @@ -153,10 +153,7 @@ void QTextToSpeechEngineAndroid::say(const QString &text) stop(); m_text = text; - QJNIEnvironmentPrivate env; - jstring jstr = env->NewString(reinterpret_cast<const jchar*>(text.constData()), - text.length()); - m_speech.callMethod<void>("say", "(Ljava/lang/String;)V", jstr); + m_speech.callMethod<void>("say", "(Ljava/lang/String;)V", QJNIObjectPrivate::fromString(m_text).object()); } QTextToSpeech::State QTextToSpeechEngineAndroid::state() const @@ -266,13 +263,9 @@ bool QTextToSpeechEngineAndroid::setLocale(const QLocale &locale) QString languageCode = parts.at(0); QString countryCode = parts.at(1); - QJNIEnvironmentPrivate env; - jstring jLanguageCode = env->NewString(reinterpret_cast<const jchar*>(languageCode.constData()), - languageCode.length()); - jstring jCountryCode = env->NewString(reinterpret_cast<const jchar*>(countryCode.constData()), - countryCode.length()); - - QJNIObjectPrivate jLocale("java/util/Locale", "(Ljava/lang/String;Ljava/lang/String;)V", jLanguageCode, jCountryCode); + QJNIObjectPrivate jLocale("java/util/Locale", "(Ljava/lang/String;Ljava/lang/String;)V", + QJNIObjectPrivate::fromString(languageCode).object(), + QJNIObjectPrivate::fromString(countryCode).object()); return m_speech.callMethod<jboolean>("setLocale", "(Ljava/util/Locale;)Z", jLocale.object()); } diff --git a/src/plugins/tts/speechdispatcher/qtexttospeech_speechd.cpp b/src/plugins/tts/speechdispatcher/qtexttospeech_speechd.cpp index 118a71c..4210e43 100644 --- a/src/plugins/tts/speechdispatcher/qtexttospeech_speechd.cpp +++ b/src/plugins/tts/speechdispatcher/qtexttospeech_speechd.cpp @@ -38,7 +38,7 @@ #include "qtexttospeech_speechd.h" #include <qdebug.h> -#include <speech-dispatcher/libspeechd.h> +#include <libspeechd.h> #if LIBSPEECHD_MAJOR_VERSION > 0 || LIBSPEECHD_MINOR_VERSION >= 9 #define HAVE_SPD_090 diff --git a/src/plugins/tts/speechdispatcher/qtexttospeech_speechd.h b/src/plugins/tts/speechdispatcher/qtexttospeech_speechd.h index cfe91b0..18df3e4 100644 --- a/src/plugins/tts/speechdispatcher/qtexttospeech_speechd.h +++ b/src/plugins/tts/speechdispatcher/qtexttospeech_speechd.h @@ -44,7 +44,7 @@ #include <QtCore/qvector.h> #include <QtCore/qstring.h> #include <QtCore/qlocale.h> -#include <speech-dispatcher/libspeechd.h> +#include <libspeechd.h> QT_BEGIN_NAMESPACE diff --git a/src/plugins/tts/speechdispatcher/speechdispatcher.pro b/src/plugins/tts/speechdispatcher/speechdispatcher.pro index 5a5c0ab..b8a984e 100644 --- a/src/plugins/tts/speechdispatcher/speechdispatcher.pro +++ b/src/plugins/tts/speechdispatcher/speechdispatcher.pro @@ -7,7 +7,8 @@ load(qt_plugin) QT += core texttospeech CONFIG += link_pkgconfig -PKGCONFIG = speech-dispatcher +packagesExist(speech-dispatcher): PKGCONFIG = speech-dispatcher +config_speechd: LIBS += -lspeechd HEADERS += \ qtexttospeech_speechd.h \ diff --git a/src/plugins/tts/tts.pro b/src/plugins/tts/tts.pro index a24af97..e97c3cd 100644 --- a/src/plugins/tts/tts.pro +++ b/src/plugins/tts/tts.pro @@ -2,7 +2,7 @@ TEMPLATE = subdirs unix { CONFIG += link_pkgconfig - packagesExist(speech-dispatcher) { + config_speechd | packagesExist(speech-dispatcher) { SUBDIRS += speechdispatcher } } @@ -18,7 +18,3 @@ android: SUBDIRS += android config_flite | config_flite_alsa { SUBDIRS += flite } - -config_vocalizer: exists(vocalizer) { - SUBDIRS += vocalizer -} diff --git a/tests/auto/texttospeech/texttospeech.pro b/tests/auto/texttospeech/texttospeech.pro index 8789213..fdbe826 100644 --- a/tests/auto/texttospeech/texttospeech.pro +++ b/tests/auto/texttospeech/texttospeech.pro @@ -5,8 +5,9 @@ SOURCES += tst_qtexttospeech.cpp unix { CONFIG += link_pkgconfig - packagesExist(speech-dispatcher) { - PKGCONFIG = speech-dispatcher + packagesExist(speech-dispatcher): PKGCONFIG = speech-dispatcher + config_speechd | packagesExist(speech-dispatcher) { DEFINES += HAVE_SPEECHD } + config_speechd: LIBS += -lspeechd } diff --git a/tests/auto/texttospeech/tst_qtexttospeech.cpp b/tests/auto/texttospeech/tst_qtexttospeech.cpp index 2e54d78..9e828e0 100644 --- a/tests/auto/texttospeech/tst_qtexttospeech.cpp +++ b/tests/auto/texttospeech/tst_qtexttospeech.cpp @@ -40,7 +40,7 @@ #include <QSignalSpy> #if defined(HAVE_SPEECHD) - #include <speech-dispatcher/libspeechd.h> + #include <libspeechd.h> #if LIBSPEECHD_MAJOR_VERSION == 0 && LIBSPEECHD_MINOR_VERSION < 9 #define HAVE_SPEECHD_BEFORE_090 #endif |