Bug 398329 - Build fails without Qt 5.5, due to QItemSelectionModel.setModel, cmake tests for 5.3
Summary: Build fails without Qt 5.5, due to QItemSelectionModel.setModel, cmake tests ...
Status: RESOLVED FIXED
Alias: None
Product: marble
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: marble-bugs
URL:
Keywords: junior-jobs
Depends on:
Blocks:
 
Reported: 2018-09-06 14:53 UTC by John Drinkwater
Modified: 2021-09-30 20:08 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.