Bug 398329

Summary: Build fails without Qt 5.5, due to QItemSelectionModel.setModel, cmake tests for 5.3
Product: [Applications] marble Reporter: John Drinkwater <john>
Component: generalAssignee: marble-bugs
Status: RESOLVED FIXED    
Severity: normal CC: groot, t.piekarski
Priority: NOR Keywords: junior-jobs
Version: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:

Description John Drinkwater 2018-09-06 14:53:46 UTC
Check’d out the master branch, and it failed to build:

```
[  2%] Building CXX object src/lib/marble/CMakeFiles/marblewidget.dir/MarbleModel.cpp.o
/home/john/code/marble/src/lib/marble/MarbleModel.cpp: In constructor ‘Marble::MarbleModelPrivate::MarbleModelPrivate()’:
/home/john/code/marble/src/lib/marble/MarbleModel.cpp:111:35: error: ‘class QItemSelectionModel’ has no member named ‘setModel’
         m_placemarkSelectionModel.setModel(&m_placemarkProxyModel);
                                   ^
src/lib/marble/CMakeFiles/marblewidget.dir/build.make:10527: recipe for target 'src/lib/marble/CMakeFiles/marblewidget.dir/MarbleModel.cpp.o' failed
make[2]: *** [src/lib/marble/CMakeFiles/marblewidget.dir/MarbleModel.cpp.o] Error 1
CMakeFiles/Makefile2:1200: recipe for target 'src/lib/marble/CMakeFiles/marblewidget.dir/all' failed
```

This is because my installed Qt5 is 5.4.2, and apparently this method was added in 5.5 according to docs.

CMakeLists.txt tests for 5.3.0, which is why cmake didn’t fail:

    set(REQUIRED_QT_VERSION 5.3.0)
Comment 1 Thomas Piekarski 2018-09-09 21:02:05 UTC
Hello,

yes, it should state 5.5.0 and not 5.3.0.

Please also see:
https://github.com/KDE/marble/blob/master/CMakeLists.txt#L106
http://doc.qt.io/qt-5/qitemselectionmodel.html#setModel
Comment 2 groot 2021-09-30 20:08:56 UTC
No longer relevant, Marble requires Qt 5.7 now.