Accepting request 636041 from KDE:Frameworks5

KDE Frameworks 5.50

OBS-URL: https://build.opensuse.org/request/show/636041
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/sonnet?expand=0&rev=59
This commit is contained in:
Dominique Leuenberger 2018-10-01 06:10:52 +00:00 committed by Git OBS Bridge
commit 4ab1fc11f7
5 changed files with 20 additions and 54 deletions

View File

@ -1,43 +0,0 @@
commit 6b3204cbe16f23b16f856daeddc8d13e94e4290b
Author: Christophe Giboudeaux <christophe@krop.fr>
Date: Sun Aug 19 14:17:25 2018 +0200
Revert "Use the current hunspell API"
The new hunspell api is not available in leap 42.3.
This reverts commit 0a96acf251baa5c9dd042d093ab2bf8fcee10502.
diff --git a/src/plugins/hunspell/hunspelldict.cpp b/src/plugins/hunspell/hunspelldict.cpp
index 397bbbb..cc1dd9b 100644
--- a/src/plugins/hunspell/hunspelldict.cpp
+++ b/src/plugins/hunspell/hunspelldict.cpp
@@ -102,9 +102,9 @@ bool HunspellDict::isCorrect(const QString &word) const
if (!m_speller) {
return false;
}
- bool result = m_speller->spell(toDictEncoding(word).toStdString());
+ int result = m_speller->spell(toDictEncoding(word).constData());
qCDebug(SONNET_HUNSPELL) << " result :" << result;
- return result;
+ return result != 0;
}
QStringList HunspellDict::suggest(const QString &word) const
@@ -112,10 +112,13 @@ QStringList HunspellDict::suggest(const QString &word) const
if (!m_speller) {
return QStringList();
}
+ char **selection;
QStringList lst;
- const auto suggestions = m_speller->suggest(toDictEncoding(word).toStdString());
- for_each (suggestions.begin(), suggestions.end(), [this, &lst](const std::string &suggestion) {
- lst << m_codec->toUnicode(suggestion.c_str()); });
+ int nbWord = m_speller->suggest(&selection, toDictEncoding(word).constData());
+ for (int i = 0; i < nbWord; ++i) {
+ lst << m_codec->toUnicode(selection[i]);
+ }
+ m_speller->free_list(&selection, nbWord);
return lst;
}

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:63053a671a8dc7a2a97cd49fe915e02e4b37fe41a06f3cd8785a7218d4acb754
size 286104

3
sonnet-5.50.0.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0dd49f3d64f97981781c385f4c6c5488ba0e64688435d50b78d8db9d68b9ad8d
size 286156

View File

@ -1,3 +1,17 @@
-------------------------------------------------------------------
Thu Sep 13 21:58:47 UTC 2018 - lbeltrame@kde.org
- Update to 5.50.0
* New feature release
* For more details please see:
* https://www.kde.org/announcements/kde-frameworks-5.50.0.php
- Changes since 5.49.0:
* hunspell: Restore build with hunspell <=v1.5.0
* Include hunspell headers as system includes
* Fix a typo
- Dropped patches, superseded by upstream changes:
* Fix_Leap_42_3_build.patch
-------------------------------------------------------------------
Sun Aug 19 09:19:38 UTC 2018 - christophe@krop.fr

View File

@ -12,19 +12,19 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define sonum 5
%define _tar_path 5.49
%define _tar_path 5.50
# 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.49.0
Version: 5.50.0
Release: 0
Summary: KDE spell checking library
License: LGPL-2.1-or-later
@ -32,8 +32,6 @@ Group: System/GUI/KDE
URL: http://www.kde.org
Source: http://download.kde.org/stable/frameworks/%{_tar_path}/%{name}-%{version}.tar.xz
Source1: baselibs.conf
# PATCH-FIX-OPENSUSE
Patch0: Fix_Leap_42_3_build.patch
#BuildRequires: aspell-devel
BuildRequires: cmake >= 3.0
# Enchant plugin is currently disabled upstream
@ -100,9 +98,6 @@ HSpell, Enchant, ASpell and HUNSPELL. Development files.
%prep
%setup -q
%if 0%{?suse_version} <= 1315
%patch0 -p1
%endif
%build
%cmake_kf5 -d build -- -Dlconvert_executable=%{_kf5_libdir}/qt5/bin/lconvert