Hello community, here is the log from the commit of package libqt5-qtspeech for openSUSE:Factory checked in at 2020-09-14 12:09:17 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libqt5-qtspeech (Old) and /work/SRC/openSUSE:Factory/.libqt5-qtspeech.new.4249 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libqt5-qtspeech" Mon Sep 14 12:09:17 2020 rev:18 rq:833658 version:5.15.1 Changes: -------- --- /work/SRC/openSUSE:Factory/libqt5-qtspeech/libqt5-qtspeech.changes 2020-05-29 21:17:00.102989521 +0200 +++ /work/SRC/openSUSE:Factory/.libqt5-qtspeech.new.4249/libqt5-qtspeech.changes 2020-09-14 12:10:18.060055245 +0200 @@ -1,0 +2,8 @@ +Thu Sep 10 07:57:27 UTC 2020 - Fabian Vogt <fab...@ritter-vogt.de> + +- Update to 5.15.1: + * New bugfix release + * For more details please see: + http://code.qt.io/cgit/qt/qtspeech.git/plain/dist/changes-5.15.1/?h=5.15.1 + +------------------------------------------------------------------- Old: ---- qtspeech-everywhere-src-5.15.0.tar.xz New: ---- qtspeech-everywhere-src-5.15.1.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libqt5-qtspeech.spec ++++++ --- /var/tmp/diff_new_pack.ZJ7iGu/_old 2020-09-14 12:10:19.860057084 +0200 +++ /var/tmp/diff_new_pack.ZJ7iGu/_new 2020-09-14 12:10:19.860057084 +0200 @@ -19,11 +19,11 @@ %define qt5_snapshot 0 %define libname libQt5TextToSpeech5 %define base_name libqt5 -%define real_version 5.15.0 -%define so_version 5.15.0 -%define tar_version qtspeech-everywhere-src-5.15.0 +%define real_version 5.15.1 +%define so_version 5.15.1 +%define tar_version qtspeech-everywhere-src-5.15.1 Name: libqt5-qtspeech -Version: 5.15.0 +Version: 5.15.1 Release: 0 Summary: Qt 5 Speech Addon License: LGPL-3.0-only OR (GPL-2.0-only OR GPL-3.0-or-later) ++++++ qtspeech-everywhere-src-5.15.0.tar.xz -> qtspeech-everywhere-src-5.15.1.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtspeech-everywhere-src-5.15.0/.qmake.conf new/qtspeech-everywhere-src-5.15.1/.qmake.conf --- old/qtspeech-everywhere-src-5.15.0/.qmake.conf 2020-04-22 10:13:06.000000000 +0200 +++ new/qtspeech-everywhere-src-5.15.1/.qmake.conf 2020-08-24 11:20:53.000000000 +0200 @@ -5,4 +5,4 @@ DEFINES += QT_NO_FOREACH DEFINES += QT_NO_JAVA_STYLE_ITERATORS -MODULE_VERSION = 5.15.0 +MODULE_VERSION = 5.15.1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtspeech-everywhere-src-5.15.0/.tag new/qtspeech-everywhere-src-5.15.1/.tag --- old/qtspeech-everywhere-src-5.15.0/.tag 2020-04-22 10:13:06.000000000 +0200 +++ new/qtspeech-everywhere-src-5.15.1/.tag 2020-08-24 11:20:53.000000000 +0200 @@ -1 +1 @@ -d9dbe04ce445b93c36ccfab4b5145d41cd4a58ff +f4601353aa9a14eacfc83e1ca650ae5b6c21283a diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtspeech-everywhere-src-5.15.0/dist/changes-5.15.1 new/qtspeech-everywhere-src-5.15.1/dist/changes-5.15.1 --- old/qtspeech-everywhere-src-5.15.0/dist/changes-5.15.1 1970-01-01 01:00:00.000000000 +0100 +++ new/qtspeech-everywhere-src-5.15.1/dist/changes-5.15.1 2020-08-24 11:20:53.000000000 +0200 @@ -0,0 +1,20 @@ +Qt 5.15.1 is a bug-fix release. It maintains both forward and backward +compatibility (source and binary) with Qt 5.15.0. + +For more details, refer to the online documentation included in this +distribution. The documentation is also available online: + +https://doc.qt.io/qt-5/index.html + +The Qt version 5.15 series is binary compatible with the 5.14.x series. +Applications compiled for 5.14 will continue to run with 5.15. + +Some of the changes listed in this file include issue tracking numbers +corresponding to tasks in the Qt Bug Tracker: + +https://bugreports.qt.io/ + +Each of these identifiers can be entered in the bug tracker to obtain more +information about a particular change. + + - This release contains only minor code improvements. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtspeech-everywhere-src-5.15.0/examples/speech/hello_speak/mainwindow.cpp new/qtspeech-everywhere-src-5.15.1/examples/speech/hello_speak/mainwindow.cpp --- old/qtspeech-everywhere-src-5.15.0/examples/speech/hello_speak/mainwindow.cpp 2020-04-22 10:13:06.000000000 +0200 +++ new/qtspeech-everywhere-src-5.15.1/examples/speech/hello_speak/mainwindow.cpp 2020-08-24 11:20:53.000000000 +0200 @@ -55,7 +55,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), - m_speech(0) + m_speech(nullptr) { ui.setupUi(this); QLoggingCategory::setFilterRules(QStringLiteral("qt.speech.tts=true \n qt.speech.tts.*=true")); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtspeech-everywhere-src-5.15.0/include/QtTextToSpeech/5.15.0/QtTextToSpeech/private/qtexttospeech_p.h new/qtspeech-everywhere-src-5.15.1/include/QtTextToSpeech/5.15.0/QtTextToSpeech/private/qtexttospeech_p.h --- old/qtspeech-everywhere-src-5.15.0/include/QtTextToSpeech/5.15.0/QtTextToSpeech/private/qtexttospeech_p.h 2020-04-22 10:13:06.000000000 +0200 +++ new/qtspeech-everywhere-src-5.15.1/include/QtTextToSpeech/5.15.0/QtTextToSpeech/private/qtexttospeech_p.h 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -#include "../../../../../src/tts/qtexttospeech_p.h" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtspeech-everywhere-src-5.15.0/include/QtTextToSpeech/5.15.0/QtTextToSpeech/private/qvoice_p.h new/qtspeech-everywhere-src-5.15.1/include/QtTextToSpeech/5.15.0/QtTextToSpeech/private/qvoice_p.h --- old/qtspeech-everywhere-src-5.15.0/include/QtTextToSpeech/5.15.0/QtTextToSpeech/private/qvoice_p.h 2020-04-22 10:13:06.000000000 +0200 +++ new/qtspeech-everywhere-src-5.15.1/include/QtTextToSpeech/5.15.0/QtTextToSpeech/private/qvoice_p.h 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -#include "../../../../../src/tts/qvoice_p.h" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtspeech-everywhere-src-5.15.0/include/QtTextToSpeech/5.15.1/QtTextToSpeech/private/qtexttospeech_p.h new/qtspeech-everywhere-src-5.15.1/include/QtTextToSpeech/5.15.1/QtTextToSpeech/private/qtexttospeech_p.h --- old/qtspeech-everywhere-src-5.15.0/include/QtTextToSpeech/5.15.1/QtTextToSpeech/private/qtexttospeech_p.h 1970-01-01 01:00:00.000000000 +0100 +++ new/qtspeech-everywhere-src-5.15.1/include/QtTextToSpeech/5.15.1/QtTextToSpeech/private/qtexttospeech_p.h 2020-08-24 11:20:53.000000000 +0200 @@ -0,0 +1 @@ +#include "../../../../../src/tts/qtexttospeech_p.h" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtspeech-everywhere-src-5.15.0/include/QtTextToSpeech/5.15.1/QtTextToSpeech/private/qvoice_p.h new/qtspeech-everywhere-src-5.15.1/include/QtTextToSpeech/5.15.1/QtTextToSpeech/private/qvoice_p.h --- old/qtspeech-everywhere-src-5.15.0/include/QtTextToSpeech/5.15.1/QtTextToSpeech/private/qvoice_p.h 1970-01-01 01:00:00.000000000 +0100 +++ new/qtspeech-everywhere-src-5.15.1/include/QtTextToSpeech/5.15.1/QtTextToSpeech/private/qvoice_p.h 2020-08-24 11:20:53.000000000 +0200 @@ -0,0 +1 @@ +#include "../../../../../src/tts/qvoice_p.h" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtspeech-everywhere-src-5.15.0/include/QtTextToSpeech/qttexttospeechversion.h new/qtspeech-everywhere-src-5.15.1/include/QtTextToSpeech/qttexttospeechversion.h --- old/qtspeech-everywhere-src-5.15.0/include/QtTextToSpeech/qttexttospeechversion.h 2020-05-14 06:50:01.394150300 +0200 +++ new/qtspeech-everywhere-src-5.15.1/include/QtTextToSpeech/qttexttospeechversion.h 2020-09-04 05:31:40.000000000 +0200 @@ -2,8 +2,8 @@ #ifndef QT_QTTEXTTOSPEECH_VERSION_H #define QT_QTTEXTTOSPEECH_VERSION_H -#define QTTEXTTOSPEECH_VERSION_STR "5.15.0" +#define QTTEXTTOSPEECH_VERSION_STR "5.15.1" -#define QTTEXTTOSPEECH_VERSION 0x050F00 +#define QTTEXTTOSPEECH_VERSION 0x050F01 #endif // QT_QTTEXTTOSPEECH_VERSION_H diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtspeech-everywhere-src-5.15.0/src/plugins/tts/android/jar/src/org/qtproject/qt5/android/speech/QtTextToSpeech.java new/qtspeech-everywhere-src-5.15.1/src/plugins/tts/android/jar/src/org/qtproject/qt5/android/speech/QtTextToSpeech.java --- old/qtspeech-everywhere-src-5.15.0/src/plugins/tts/android/jar/src/org/qtproject/qt5/android/speech/QtTextToSpeech.java 2020-04-22 10:13:06.000000000 +0200 +++ new/qtspeech-everywhere-src-5.15.1/src/plugins/tts/android/jar/src/org/qtproject/qt5/android/speech/QtTextToSpeech.java 2020-08-24 11:20:53.000000000 +0200 @@ -52,6 +52,7 @@ import java.util.Locale; import java.util.List; import java.util.ArrayList; +import java.util.Set; public class QtTextToSpeech { @@ -174,6 +175,11 @@ return success; } + public float rate() + { + return mRate; + } + public int setRate(float rate) { if (Float.compare(rate, mRate) == 0) @@ -224,7 +230,22 @@ { if (mInitialized && android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP) { //Log.d("QtTextToSpeech", "Locales: " + mTts.getAvailableLanguages()); - return new ArrayList<Locale>(mTts.getAvailableLanguages()); + final Set<Locale> languages = mTts.getAvailableLanguages(); + ArrayList<Locale> locales = new ArrayList<Locale>(); + + for (Locale language : languages) { + String languageCode = language.getLanguage(); + String countryCode = language.getCountry(); + + if (languageCode.equals(language.getISO3Language())) + languageCode = convertLanguageCodeThreeDigitToTwoDigit(languageCode); + if (countryCode.equals(language.getISO3Country())) + countryCode = convertCountryCodeThreeDigitToTwoDigit(countryCode); + + locales.add(new Locale(languageCode, countryCode)); + } + + return locales; } return new ArrayList<Locale>(); } @@ -261,4 +282,30 @@ } return false; } + + private String convertLanguageCodeThreeDigitToTwoDigit(String iso3Language) + { + final String[] isoLanguages = Locale.getISOLanguages(); + + for (String isoLanguage : isoLanguages) { + if (iso3Language.equals(new Locale(isoLanguage).getISO3Language())) { + return isoLanguage; + } + } + + return iso3Language; + } + + private String convertCountryCodeThreeDigitToTwoDigit(String iso3Country) + { + final String[] isoCountries = Locale.getISOCountries(); + + for (String isoCountry : isoCountries) { + if (iso3Country.equals(new Locale("en", isoCountry).getISO3Country())) { + return isoCountry; + } + } + + return iso3Country; + } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtspeech-everywhere-src-5.15.0/src/plugins/tts/android/src/qtexttospeech_android.cpp new/qtspeech-everywhere-src-5.15.1/src/plugins/tts/android/src/qtexttospeech_android.cpp --- old/qtspeech-everywhere-src-5.15.0/src/plugins/tts/android/src/qtexttospeech_android.cpp 2020-04-22 10:13:06.000000000 +0200 +++ new/qtspeech-everywhere-src-5.15.1/src/plugins/tts/android/src/qtexttospeech_android.cpp 2020-08-24 11:20:53.000000000 +0200 @@ -256,8 +256,11 @@ result.reserve(count); for (int i = 0; i < count; ++i) { auto locale = locales.callObjectMethod("get", "(I)Ljava/lang/Object;", i); - auto localeName = locale.callObjectMethod<jstring>("toString").toString(); - result << QLocale(localeName); + auto localeLanguage = locale.callObjectMethod<jstring>("getLanguage").toString(); + auto localeCountry = locale.callObjectMethod<jstring>("getCountry").toString(); + if (!localeCountry.isEmpty()) + localeLanguage += QString("_%1").arg(localeCountry).toUpper(); + result << QLocale(localeLanguage); } return result; }