Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package sonnet for openSUSE:Factory checked 
in at 2021-02-17 18:12:04
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/sonnet (Old)
 and      /work/SRC/openSUSE:Factory/.sonnet.new.28504 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "sonnet"

Wed Feb 17 18:12:04 2021 rev:90 rq:871739 version:5.79.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/sonnet/sonnet.changes    2021-01-13 
18:30:18.337751051 +0100
+++ /work/SRC/openSUSE:Factory/.sonnet.new.28504/sonnet.changes 2021-02-17 
18:13:07.618018502 +0100
@@ -1,0 +2,10 @@
+Mon Feb  8 08:46:55 UTC 2021 - Christophe Giboudeaux <[email protected]>
+
+- Update to 5.79.0
+  * New feature release
+  * For more details please see:
+  * https://kde.org/announcements/kde-frameworks-5.79.0
+- Changes since 5.78.0:
+  * Dont do multiple lookups when one is enough
+
+-------------------------------------------------------------------

Old:
----
  sonnet-5.78.0.tar.xz
  sonnet-5.78.0.tar.xz.sig

New:
----
  sonnet-5.79.0.tar.xz
  sonnet-5.79.0.tar.xz.sig

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ sonnet.spec ++++++
--- /var/tmp/diff_new_pack.dbKbby/_old  2021-02-17 18:13:08.186018967 +0100
+++ /var/tmp/diff_new_pack.dbKbby/_new  2021-02-17 18:13:08.190018970 +0100
@@ -17,14 +17,14 @@
 
 
 %define sonum   5
-%define _tar_path 5.78
+%define _tar_path 5.79
 # Full KF5 version (e.g. 5.33.0)
 %{!?_kf5_version: %global _kf5_version %{version}}
 # Last major and minor KF5 version (e.g. 5.33)
 %{!?_kf5_bugfix_version: %define _kf5_bugfix_version %(echo %{_kf5_version} | 
awk -F. '{print $1"."$2}')}
 %bcond_without lang
 Name:           sonnet
-Version:        5.78.0
+Version:        5.79.0
 Release:        0
 Summary:        KDE spell checking library
 License:        LGPL-2.1-or-later


++++++ sonnet-5.78.0.tar.xz -> sonnet-5.79.0.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sonnet-5.78.0/.gitignore new/sonnet-5.79.0/.gitignore
--- old/sonnet-5.78.0/.gitignore        2021-01-02 14:30:31.000000000 +0100
+++ new/sonnet-5.79.0/.gitignore        2021-02-06 19:29:42.000000000 +0100
@@ -20,3 +20,4 @@
 CMakeLists.txt.user*
 *.unc-backup*
 .cmake/
+/.clang-format
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sonnet-5.78.0/CMakeLists.txt 
new/sonnet-5.79.0/CMakeLists.txt
--- old/sonnet-5.78.0/CMakeLists.txt    2021-01-02 14:30:31.000000000 +0100
+++ new/sonnet-5.79.0/CMakeLists.txt    2021-02-06 19:29:42.000000000 +0100
@@ -1,10 +1,10 @@
 cmake_minimum_required(VERSION 3.5)
 
-set(KF5_VERSION "5.78.0") # handled by release scripts
-project(Sonnet VERSION ${KF5_VERSION})
+set(KF_VERSION "5.79.0") # handled by release scripts
+project(Sonnet VERSION ${KF_VERSION})
 
 include(FeatureSummary)
-find_package(ECM 5.78.0  NO_MODULE)
+find_package(ECM 5.79.0  NO_MODULE)
 set_package_properties(ECM PROPERTIES TYPE REQUIRED DESCRIPTION "Extra CMake 
Modules." URL "https://commits.kde.org/extra-cmake-modules";)
 feature_summary(WHAT REQUIRED_PACKAGES_NOT_FOUND 
FATAL_ON_MISSING_REQUIRED_PACKAGES)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sonnet-5.78.0/autotests/test_autodetect.cpp 
new/sonnet-5.79.0/autotests/test_autodetect.cpp
--- old/sonnet-5.78.0/autotests/test_autodetect.cpp     2021-01-02 
14:30:31.000000000 +0100
+++ new/sonnet-5.79.0/autotests/test_autodetect.cpp     2021-02-06 
19:29:42.000000000 +0100
@@ -30,6 +30,8 @@
     void initTestCase();
     void autodetect_data();
     void autodetect();
+    void benchDistance_data();
+    void benchDistance();
 };
 
 using namespace Sonnet;
@@ -92,6 +94,30 @@
     QCOMPARE(actualLangCode, correctLangCode);
 }
 
+void SonnetAutoDetectTest::benchDistance_data()
+{
+    QTest::addColumn<QString>("sentence");
+    QTest::addColumn<QString>("correct_lang");
+    QTest::addColumn<QStringList>("suggested_langs");
+
+    QTest::newRow("English") << QStringLiteral("This is an English sentence.") 
<< QStringLiteral("en_US") << QStringList{QLatin1String("en_US"), 
QLatin1String("de_DE")};
+    QTest::newRow("German") << QStringLiteral("Dies ist ein deutscher Satz.") 
<< QStringLiteral("de_DE") << QStringList{QLatin1String("pl_PL"), 
QLatin1String("de_DE_frami")};
+    QTest::newRow("Malayam") << QStringLiteral("?????????????????????????????? 
?????????????????? ????????????????????? ?????????????????? 
??????????????????????????? ????????? ????????????????????????????????? 
???????????????.") << QStringLiteral("ml_IN") << 
QStringList{QLatin1String("ml_IN"), QLatin1String("en_US-large")};
+}
+
+void SonnetAutoDetectTest::benchDistance()
+{
+    QFETCH(QString, sentence);
+    QFETCH(QString, correct_lang);
+    QFETCH(QStringList, suggested_langs);
+
+    Sonnet::GuessLanguage gl;
+
+    QBENCHMARK {
+        QString actual_lang = gl.identify(sentence, suggested_langs);
+    }
+}
+
 QTEST_GUILESS_MAIN(SonnetAutoDetectTest)
 
 #include "test_autodetect.moc"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sonnet-5.78.0/po/zh_CN/sonnet5_qt.po 
new/sonnet-5.79.0/po/zh_CN/sonnet5_qt.po
--- old/sonnet-5.78.0/po/zh_CN/sonnet5_qt.po    2021-01-02 14:30:31.000000000 
+0100
+++ new/sonnet-5.79.0/po/zh_CN/sonnet5_qt.po    2021-02-06 19:29:42.000000000 
+0100
@@ -14,7 +14,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: kdeorg\n"
-"PO-Revision-Date: 2021-01-01 14:22\n"
+"PO-Revision-Date: 2021-02-04 11:59\n"
 "Language-Team: Chinese Simplified\n"
 "Language: zh_CN\n"
 "MIME-Version: 1.0\n"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sonnet-5.78.0/src/core/CMakeLists.txt 
new/sonnet-5.79.0/src/core/CMakeLists.txt
--- old/sonnet-5.78.0/src/core/CMakeLists.txt   2021-01-02 14:30:31.000000000 
+0100
+++ new/sonnet-5.79.0/src/core/CMakeLists.txt   2021-02-06 19:29:42.000000000 
+0100
@@ -39,7 +39,7 @@
 ecm_generate_export_header(KF5SonnetCore
     BASE_NAME SonnetCore
     GROUP_BASE_NAME KF
-    VERSION ${KF5_VERSION}
+    VERSION ${KF_VERSION}
     DEPRECATED_BASE_VERSION 0
     #DEPRECATION_VERSIONS 5.65
     EXCLUDE_DEPRECATED_BEFORE_AND_AT ${EXCLUDE_DEPRECATED_BEFORE_AND_AT}
@@ -83,7 +83,7 @@
         KF5SonnetCore_QCH
         NAME SonnetCore
         BASE_NAME KF5SonnetCore
-        VERSION ${KF5_VERSION}
+        VERSION ${KF_VERSION}
         ORG_DOMAIN org.kde
         SOURCES # using only public headers, to cover only public API
             ${SonnetCore_HEADERS}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sonnet-5.78.0/src/core/backgroundchecker.cpp 
new/sonnet-5.79.0/src/core/backgroundchecker.cpp
--- old/sonnet-5.78.0/src/core/backgroundchecker.cpp    2021-01-02 
14:30:31.000000000 +0100
+++ new/sonnet-5.79.0/src/core/backgroundchecker.cpp    2021-02-06 
19:29:42.000000000 +0100
@@ -37,7 +37,7 @@
             // ok, this is valid word, do something
             if (currentDict.isMisspelled(word.toString())) {
                 lastMisspelled = word;
-                emit misspelling(word.toString(), 
word.position()+sentenceOffset);
+                Q_EMIT misspelling(word.toString(), 
word.position()+sentenceOffset);
                 return;
             }
         }
@@ -61,7 +61,7 @@
             break;
         }
     } while (sentenceOffset != -1);
-    emit done();
+    Q_EMIT done();
 }
 
 BackgroundChecker::BackgroundChecker(QObject *parent)
@@ -176,7 +176,7 @@
     const QString currentText = fetchMoreText();
 
     if (currentText.isNull()) {
-        emit done();
+        Q_EMIT done();
     } else {
         d->mainTokenizer.setBuffer(currentText);
         d->start();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sonnet-5.78.0/src/core/guesslanguage.cpp 
new/sonnet-5.79.0/src/core/guesslanguage.cpp
--- old/sonnet-5.78.0/src/core/guesslanguage.cpp        2021-01-02 
14:30:31.000000000 +0100
+++ new/sonnet-5.79.0/src/core/guesslanguage.cpp        2021-02-06 
19:29:42.000000000 +0100
@@ -685,13 +685,19 @@
         return relevantScripts;
     }
 
-    for (const QChar::Script &script : scriptCounts.keys()) {
+    if (scriptCounts.size() == 1) {
+        return {script};
+    }
+
+    for (auto it = scriptCounts.cbegin(); it != scriptCounts.cend(); ++it) {
         // return run types that used for 40% or more of the string
-        if (scriptCounts[script] * 100 / totalCount >= 40) {
-            relevantScripts << script;
+        const int scriptCount = it.value();
+        const auto currentScript = it.key();
+        if (scriptCount * 100 / totalCount >= 40) {
+            relevantScripts << currentScript;
             // always return basic latin if found more than 15%.
-        } else if (script == QChar::Script_Latin && scriptCounts[script] * 100 
/ totalCount >= 15) {
-            relevantScripts << script;
+        } else if (currentScript == QChar::Script_Latin && scriptCount * 100 / 
totalCount >= 15) {
+            relevantScripts << currentScript;
         }
     }
 
@@ -806,8 +812,9 @@
     int dist = 0;
 
     for (const QString &trigram : model) {
-        if (knownModel.contains(trigram)) {
-            dist += qAbs(++counter - knownModel.value(trigram));
+        const int val = knownModel.value(trigram, -1);
+        if (val != -1) {
+            dist += qAbs(++counter - val);
         } else {
             dist += MAXGRAMS;
         }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sonnet-5.78.0/src/core/loader.cpp 
new/sonnet-5.79.0/src/core/loader.cpp
--- old/sonnet-5.78.0/src/core/loader.cpp       2021-01-02 14:30:31.000000000 
+0100
+++ new/sonnet-5.79.0/src/core/loader.cpp       2021-02-06 19:29:42.000000000 
+0100
@@ -83,7 +83,7 @@
             return createSpeller(QStringLiteral("en_US"), clientName);
         }
         qCWarning(SONNET_LOG_CORE) << "No language dictionaries for the 
language:" << plang;
-        emit loadingDictionaryFailed(plang);
+        Q_EMIT loadingDictionaryFailed(plang);
         return nullptr;
     }
 
@@ -348,6 +348,6 @@
 
 void Loader::changed()
 {
-    emit configurationChanged();
+    Q_EMIT configurationChanged();
 }
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sonnet-5.78.0/src/ui/CMakeLists.txt 
new/sonnet-5.79.0/src/ui/CMakeLists.txt
--- old/sonnet-5.78.0/src/ui/CMakeLists.txt     2021-01-02 14:30:31.000000000 
+0100
+++ new/sonnet-5.79.0/src/ui/CMakeLists.txt     2021-02-06 19:29:42.000000000 
+0100
@@ -46,7 +46,7 @@
 ecm_generate_export_header(KF5SonnetUi
     BASE_NAME SonnetUi
     GROUP_BASE_NAME KF
-    VERSION ${KF5_VERSION}
+    VERSION ${KF_VERSION}
     DEPRECATED_BASE_VERSION 0
     DEPRECATION_VERSIONS 5.65
     EXCLUDE_DEPRECATED_BEFORE_AND_AT ${EXCLUDE_DEPRECATED_BEFORE_AND_AT}
@@ -87,7 +87,7 @@
         KF5SonnetUi_QCH
         NAME SonnetUi
         BASE_NAME KF5SonnetUi
-        VERSION ${KF5_VERSION}
+        VERSION ${KF_VERSION}
         ORG_DOMAIN org.kde
         SOURCES # using only public headers, to cover only public API
             ${SonnetUi_HEADERS}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sonnet-5.78.0/src/ui/configdialog.cpp 
new/sonnet-5.79.0/src/ui/configdialog.cpp
--- old/sonnet-5.78.0/src/ui/configdialog.cpp   2021-01-02 14:30:31.000000000 
+0100
+++ new/sonnet-5.79.0/src/ui/configdialog.cpp   2021-02-06 19:29:42.000000000 
+0100
@@ -28,7 +28,7 @@
 
 void ConfigDialogPrivate::slotConfigChanged()
 {
-    emit q->languageChanged(ui->language());
+    Q_EMIT q->languageChanged(ui->language());
 }
 
 ConfigDialog::ConfigDialog(QWidget *parent)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sonnet-5.78.0/src/ui/configview.cpp 
new/sonnet-5.79.0/src/ui/configview.cpp
--- old/sonnet-5.78.0/src/ui/configview.cpp     2021-01-02 14:30:31.000000000 
+0100
+++ new/sonnet-5.79.0/src/ui/configview.cpp     2021-02-06 19:29:42.000000000 
+0100
@@ -57,7 +57,7 @@
     ui.ignoreListWidget->clear();
     ui.ignoreListWidget->addItems(ignoreList);
 
-    emit q->configChanged();
+    Q_EMIT q->configChanged();
 }
 
 void ConfigViewPrivate::slotIgnoreWordRemoved()
@@ -70,7 +70,7 @@
     ui.ignoreListWidget->clear();
     ui.ignoreListWidget->addItems(ignoreList);
 
-    emit q->configChanged();
+    Q_EMIT q->configChanged();
 }
 
 ConfigView::ConfigView(QWidget *parent)
@@ -167,7 +167,7 @@
             item->setCheckState(Qt::Unchecked);
         }
     }
-    emit configChanged();
+    Q_EMIT configChanged();
 }
 
 
@@ -189,7 +189,7 @@
     d->ignoreList.sort();
     d->ui.ignoreListWidget->clear();
     d->ui.ignoreListWidget->addItems(d->ignoreList);
-    emit configChanged();
+    Q_EMIT configChanged();
 }
 
 QStringList ConfigView::ignoreList() const
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sonnet-5.78.0/src/ui/configwidget.cpp 
new/sonnet-5.79.0/src/ui/configwidget.cpp
--- old/sonnet-5.78.0/src/ui/configwidget.cpp   2021-01-02 14:30:31.000000000 
+0100
+++ new/sonnet-5.79.0/src/ui/configwidget.cpp   2021-02-06 19:29:42.000000000 
+0100
@@ -149,7 +149,7 @@
     d->ui.ignoreListWidget->clear();
     d->ui.ignoreListWidget->addItems(ignoreList);
 
-    emit configChanged();
+    Q_EMIT configChanged();
 }
 
 void ConfigWidget::slotIgnoreWordRemoved()
@@ -164,7 +164,7 @@
     d->ui.ignoreListWidget->clear();
     d->ui.ignoreListWidget->addItems(ignoreList);
 
-    emit configChanged();
+    Q_EMIT configChanged();
 }
 
 void ConfigWidget::setBackgroundCheckingButtonShown(bool b)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sonnet-5.78.0/src/ui/dialog.cpp 
new/sonnet-5.79.0/src/ui/dialog.cpp
--- old/sonnet-5.78.0/src/ui/dialog.cpp 2021-01-02 14:30:31.000000000 +0100
+++ new/sonnet-5.79.0/src/ui/dialog.cpp 2021-02-06 19:29:42.000000000 +0100
@@ -187,7 +187,7 @@
 {
     setGuiEnabled(false);
     setProgressDialogVisible(true);
-    emit autoCorrect(d->currentWord, d->ui.m_replacement->text());
+    Q_EMIT autoCorrect(d->currentWord, d->ui.m_replacement->text());
     slotReplaceWord();
 }
 
@@ -223,13 +223,13 @@
 void Dialog::slotFinished()
 {
     setProgressDialogVisible(false);
-    emit stop();
+    Q_EMIT stop();
     //FIXME: should we emit done here?
 #if SONNETUI_BUILD_DEPRECATED_SINCE(5, 65)
-    emit done(d->checker->text());
+    Q_EMIT done(d->checker->text());
 #endif
-    emit spellCheckDone(d->checker->text());
-    emit spellCheckStatus(tr("Spell check stopped."));
+    Q_EMIT spellCheckDone(d->checker->text());
+    Q_EMIT spellCheckStatus(tr("Spell check stopped."));
     accept();
 }
 
@@ -238,8 +238,8 @@
     d->canceled = true;
     d->deleteProgressDialog(false); // this method can be called in response to
     // pressing 'Cancel' on the dialog
-    emit cancel();
-    emit spellCheckStatus(tr("Spell check canceled."));
+    Q_EMIT cancel();
+    Q_EMIT spellCheckStatus(tr("Spell check canceled."));
     reject();
 }
 
@@ -316,7 +316,7 @@
     setGuiEnabled(false);
     setProgressDialogVisible(true);
     QString replacementText = d->ui.m_replacement->text();
-    emit replace(d->currentWord, d->currentPosition,
+    Q_EMIT replace(d->currentWord, d->currentPosition,
                  replacementText);
 
     if (d->spellCheckContinuedAfterReplacement) {
@@ -368,7 +368,7 @@
     if (!languageCode.isEmpty()) {
         d->checker->changeLanguage(languageCode);
         slotSuggest();
-        emit languageChanged(languageCode);
+        Q_EMIT languageChanged(languageCode);
     }
 }
 
@@ -386,7 +386,7 @@
 {
     setGuiEnabled(true);
     setProgressDialogVisible(false);
-    emit misspelling(word, start);
+    Q_EMIT misspelling(word, start);
     //NOTE this is HACK I had to introduce because BackgroundChecker lacks 
'virtual' marks on methods
     //this dramatically reduces spellchecking time in Lokalize
     //as this doesn't fetch suggestions for words that are present in msgid
@@ -409,16 +409,16 @@
 {
     d->restart = false;
 #if SONNETUI_BUILD_DEPRECATED_SINCE(5, 65)
-    emit done(d->checker->text());
+    Q_EMIT done(d->checker->text());
 #endif
-    emit spellCheckDone(d->checker->text());
+    Q_EMIT spellCheckDone(d->checker->text());
     if (d->restart) {
         updateDictionaryComboBox();
         d->checker->setText(d->originalBuffer);
         d->restart = false;
     } else {
         setProgressDialogVisible(false);
-        emit spellCheckStatus(tr("Spell check complete."));
+        Q_EMIT spellCheckStatus(tr("Spell check complete."));
         accept();
         if (!d->canceled && d->showCompletionMessageBox) {
             QMessageBox::information(this, tr("Spell check complete."),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sonnet-5.78.0/src/ui/dictionarycombobox.cpp 
new/sonnet-5.79.0/src/ui/dictionarycombobox.cpp
--- old/sonnet-5.78.0/src/ui/dictionarycombobox.cpp     2021-01-02 
14:30:31.000000000 +0100
+++ new/sonnet-5.79.0/src/ui/dictionarycombobox.cpp     2021-02-06 
19:29:42.000000000 +0100
@@ -25,8 +25,8 @@
 
 void DictionaryComboBoxPrivate::slotDictionaryChanged(int idx)
 {
-    emit q->dictionaryChanged(q->itemData(idx).toString());
-    emit q->dictionaryNameChanged(q->itemText(idx));
+    Q_EMIT q->dictionaryChanged(q->itemData(idx).toString());
+    Q_EMIT q->dictionaryNameChanged(q->itemText(idx));
 }
 
 //@endcon
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sonnet-5.78.0/src/ui/highlighter.cpp 
new/sonnet-5.79.0/src/ui/highlighter.cpp
--- old/sonnet-5.78.0/src/ui/highlighter.cpp    2021-01-02 14:30:31.000000000 
+0100
+++ new/sonnet-5.79.0/src/ui/highlighter.cpp    2021-02-06 19:29:42.000000000 
+0100
@@ -246,10 +246,10 @@
 
     if (d->active != savedActive) {
         if (d->active) {
-            emit activeChanged(tr("As-you-type spell checking enabled."));
+            Q_EMIT activeChanged(tr("As-you-type spell checking enabled."));
         } else {
             qCDebug(SONNET_LOG_UI) << "Sonnet: Disabling spell checking, too 
many errors";
-            emit activeChanged(tr("Too many misspelled words. "
+            Q_EMIT activeChanged(tr("Too many misspelled words. "
                                   "As-you-type spell checking disabled."));
         }
 
@@ -268,9 +268,9 @@
     rehighlight();
 
     if (d->active) {
-        emit activeChanged(tr("As-you-type spell checking enabled."));
+        Q_EMIT activeChanged(tr("As-you-type spell checking enabled."));
     } else {
-        emit activeChanged(tr("As-you-type spell checking disabled."));
+        Q_EMIT activeChanged(tr("As-you-type spell checking disabled."));
     }
 }
 

Reply via email to