Bug 415081

Summary: Increase minimum required Qt version to 5.11
Product: [Applications] Rocs Reporter: Juan Carlos Torres <carlosdgtorres>
Component: generalAssignee: Rocs Developers <rocs-bugs-null>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Juan Carlos Torres 2019-12-12 06:20:30 UTC
SUMMARY

Commit c44c4ae2 (https://cgit.kde.org/rocs.git/commit/?id=c44c4ae2baf149a0517b59844a6a9d44160e9056) introduced the QFontMetrics::horizontalAdvance method that was added only in Qt 5.11 (https://doc.qt.io/qt-5/qfontmetrics.html#horizontalAdvance). The ROCS CMakeLists.txt still lists 5.4 as the required minimum version so it fails to build with anything lower than 5.11.

STEPS TO REPRODUCE
1. Have a system with Qt 5.10 or older
2. Run cmake (works correctly)
3. Run make

OBSERVED RESULT

Error in compiling: ‘class QFontMetrics’ has no member named ‘horizontalAdvance’     const int charWidth = fm.horizontalAdvance(QLatin1Char('x'));   

EXPECTED RESULT

CMake should fail when using any Qt version older than 5.11.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Andreas Cord-Landwehr 2019-12-13 17:45:12 UTC
Git commit 765c85bac6abbf659c2201f870f1ae5f6ac624d0 by Andreas Cord-Landwehr.
Committed on 13/12/2019 at 17:43.
Pushed by cordlandwehr into branch 'master'.

Set minimal Qt version according to used Qt API to 5.11

M  +1    -1    CMakeLists.txt

https://invent.kde.org/kde/rocs/commit/765c85bac6abbf659c2201f870f1ae5f6ac624d0