On Tue, 10 Nov 2020, Norbert Preining wrote: > /build/libkf5eventviews-20.08.2/src/prefs.cpp:968:25: error: 'qrand' was not > declared in this scope; did you mean 'srand'? > 968 | QColor col = QColor(qrand() % 256, qrand() % 256, qrand() % 256); > | ^~~~~ > | srand
The failing code comes from Debian patch to keep ABI, but there are two bugs: - first, qglobal.h needs included --- a/src/prefs.cpp +++ b/src/prefs.cpp @@ -33,6 +33,9 @@ #include <QFontDatabase> #include <QRandomGenerator> + +#include <qglobal.h> + using namespace EventViews; QSet<EventViews::EventView::ItemIcon> iconArrayToSet(const QByteArray &array) - second, the deprecation need to be adjusted --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -66,7 +66,7 @@ ecm_setup_version(PROJECT VARIABLE_PREFI ########### Targets ########### -add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x050f00) +add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x050100) add_definitions(-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x054800) add_definitions(-DQT_NO_FOREACH) With that I think it compiles. Best Norbert -- PREINING Norbert https://www.preining.info Accelia Inc. + IFMGA ProGuide + TU Wien + JAIST + TeX Live + Debian Dev GPG: 0x860CDC13 fp: F7D8 A928 26E3 16A1 9FA0 ACF0 6CAC A448 860C DC13