Ignore badge label macos deprecations
This commit is contained in:
parent
9fc079a4a9
commit
f18a5dacda
@ -134,12 +134,16 @@ TrayIcon::setUnreadCount(int count)
|
|||||||
{
|
{
|
||||||
// Use the native badge counter in MacOS.
|
// Use the native badge counter in MacOS.
|
||||||
#if defined(Q_OS_MAC)
|
#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);
|
auto labelText = count == 0 ? "" : QString::number(count);
|
||||||
|
|
||||||
if (labelText == QtMac::badgeLabelText())
|
if (labelText == QtMac::badgeLabelText())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
QtMac::setBadgeLabelText(labelText);
|
QtMac::setBadgeLabelText(labelText);
|
||||||
|
#pragma clang diagnostic pop
|
||||||
#elif defined(Q_OS_WIN)
|
#elif defined(Q_OS_WIN)
|
||||||
// FIXME: Find a way to use Windows apis for the badge counter (if any).
|
// FIXME: Find a way to use Windows apis for the badge counter (if any).
|
||||||
#else
|
#else
|
||||||
|
Loading…
Reference in New Issue
Block a user