1 files changed, 6 insertions, 0 deletions
diff --git a/src/TrayIcon.cpp b/src/TrayIcon.cpp
index e7348b89..6ab011d1 100644
--- a/src/TrayIcon.cpp
+++ b/src/TrayIcon.cpp
@@ -15,9 +15,11 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include <QAction>
#include <QApplication>
#include <QList>
#include <QMenu>
+#include <QPainter>
#include <QTimer>
#include "TrayIcon.h"
@@ -134,12 +136,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
|