Bug 366789 - requires qt 5.7 to build due to new QLocale::Script enums
Summary: requires qt 5.7 to build due to new QLocale::Script enums
Status: RESOLVED FIXED
Alias: None
Product: frameworks-sonnet
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: VHI normal
Target Milestone: ---
Assignee: Martin Sandsmark
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-15 12:32 UTC by Oliver Henshaw
Modified: 2016-08-23 11:28 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Henshaw 2016-08-15 12:32:06 UTC
Sonnet now seems to require qt 5.7 to build. I don't know whether the right thing would be to revert the dependency or to update CMakeList.txt to reflect the dependency.

Building from master fails with:

[ 24%] Building CXX object src/core/CMakeFiles/KF5SonnetCore.dir/guesslanguage.cpp.o
[ 29%] Built target parsetrigrams
[ 29%] Built target trigrams_sonnet
/opt/kde/sources/frameworks/sonnet/src/core/guesslanguage.cpp: In constructor 'Sonnet::GuessLanguagePrivate::GuessLanguagePrivate()':
/opt/kde/sources/frameworks/sonnet/src/core/guesslanguage.cpp:484:30: error: 'AhomScript' is not a member of 'QLocale'
             names = getNames(QLocale::AhomScript);
                              ^
/opt/kde/sources/frameworks/sonnet/src/core/guesslanguage.cpp:487:30: error: 'AnatolianHieroglyphsScript' is not a member of 'QLocale'
             names = getNames(QLocale::AnatolianHieroglyphsScript);
                              ^
/opt/kde/sources/frameworks/sonnet/src/core/guesslanguage.cpp:490:30: error: 'HatranScript' is not a member of 'QLocale'
             names = getNames(QLocale::HatranScript);
                              ^
/opt/kde/sources/frameworks/sonnet/src/core/guesslanguage.cpp:493:30: error: 'MultaniScript' is not a member of 'QLocale'
             names = getNames(QLocale::MultaniScript);
                              ^
/opt/kde/sources/frameworks/sonnet/src/core/guesslanguage.cpp:496:30: error: 'OldHungarianScript' is not a member of 'QLocale'
             names = getNames(QLocale::OldHungarianScript);
                              ^
src/core/CMakeFiles/KF5SonnetCore.dir/build.make:206: recipe for target 'src/core/CMakeFiles/KF5SonnetCore.dir/guesslanguage.cpp.o' failed
gmake[2]: *** [src/core/CMakeFiles/KF5SonnetCore.dir/guesslanguage.cpp.o] Error 1
CMakeFiles/Makefile2:142: recipe for target 'src/core/CMakeFiles/KF5SonnetCore.dir/all' failed
gmake[1]: *** [src/core/CMakeFiles/KF5SonnetCore.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
gmake: *** [all] Error 2


These lines were introduced by git commit 8ed9a423a2237ac1b21bdd0cc8a7ba3d6ae71a92 but it looks like these QLocal::Script enum values were only introduced in qt 5.7 - http://doc.qt.io/qt-5/qlocale.html#Script-enum

Reproducible: Always
Comment 1 Christoph Feck 2016-08-17 12:06:57 UTC
Frameworks require Qt 5.5 currently, so the additional cases need to be #if'd out.
Comment 2 Luigi Toscano 2016-08-18 17:53:25 UTC
I would say this is a blocker for the next release of Frameworks.
Comment 3 Christoph Feck 2016-08-18 23:47:50 UTC
Fixed by Daniel Vrátil, see http://commits.kde.org/sonnet/4ee3351fdd75f4f2d7d57b4f20aeb85b1de78a97
Comment 4 Christoph Feck 2016-08-19 00:00:48 UTC
... but needs to be checked if it really compiles with Qt 5.5 and Qt 5.6, e.g. QChar::Script_SignWriting is a new addition, too.

Unfortunately the Qt version is not stated at https://doc-snapshots.qt.io/qt5-dev/qchar.html#Script-enum
Comment 5 Heiko Becker 2016-08-23 11:28:44 UTC
Git commit b241c854c42931280ee5366439af40144f1268af by Heiko Becker.
Committed on 23/08/2016 at 10:11.
Pushed by heikobecker into branch 'master'.

Fix build with Qt < 5.6

Also correct the other #ifdef because like QChar::Script_SignWriting
0e1f3aab11a4310595d8651c02ce5f9d60c93252 in qtbase.git introduced the
other enums as well. That commit was first released with Qt 5.6
CCMAIL: martin.sandsmark@kde.org
REVIEW: 128739

M  +3    -1    src/core/guesslanguage.cpp

http://commits.kde.org/sonnet/b241c854c42931280ee5366439af40144f1268af