Skip to content
Snippets Groups Projects
Verified Commit f18a5dac authored by Joe Donofry's avatar Joe Donofry
Browse files

Ignore badge label macos deprecations

parent 9fc079a4
No related branches found
No related tags found
No related merge requests found
......@@ -134,12 +134,16 @@ TrayIcon::setUnreadCount(int count)
{
// Use the native badge counter in MacOS.
#if defined(Q_OS_MAC)
// currently, to avoid writing obj-c code, ignore deprecated warnings on the badge functions
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
auto labelText = count == 0 ? "" : QString::number(count);
if (labelText == QtMac::badgeLabelText())
return;
QtMac::setBadgeLabelText(labelText);
#pragma clang diagnostic pop
#elif defined(Q_OS_WIN)
// FIXME: Find a way to use Windows apis for the badge counter (if any).
#else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment