compile without deprecated method
Details
- Reviewers
dfaure - Commits
- R289:6a9ba38e3ea9: [knotification] compile without deprecated methods
autotest ok
Diff Detail
- Repository
- R289 KNotifications
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
This change has broken builds on macOS.
Please see https://binary-factory.kde.org/view/MacOS/job/Kig_Nightly_macos/407/console
Whilst not documented in the Qt Documentation, the qmacfunctions.h header (which is what is included by #include <QtMac>) has the following:
#ifdef Q_OS_OSX #if QT_DEPRECATED_SINCE(5, 12) QT_DEPRECATED_X("Use NSApp.dockTile.badgeLabel") Q_MACEXTRAS_EXPORT void setBadgeLabelText(const QString &text); QT_DEPRECATED_X("Use NSApp.dockTile.badgeLabel") Q_MACEXTRAS_EXPORT QString badgeLabelText(); QT_DEPRECATED_X("Use QPixmap::toImage, QImage::toCGImage, and -[NSImage initWithCGImage:size:]") Q_MACEXTRAS_EXPORT NSImage *toNSImage(const QPixmap &pixmap); #endif
Thoughts on the best way forward for macOS builds?
This change due to being in a Framework has KOed all Binary Factory builds for macOS.
i guess add an
#undef QT_DISABLE_DEPRECATED_BEFORE
inside the
#ifdef Q_OS_MACOS
of src/kstatusnotifieritem.cpp would get us going?
+1 with albert idea.
Or in CMakeLists.txt
if (NOT APPLE)
add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x050d00)
endif()
As I can't compile against MacOsX we can exclude it. It will fix when we will switch to qt6 by os dev.
"I'm fine with either fix, any objection to that being committed directly?"
no problem for me
OK, it looks like everyone is waiting on everyone else in this discussion.
Done now: https://commits.kde.org/knotifications/adc20218571941d19281ad81520aec62e195b355