mirror of https://github.com/KDE/kasts.git
Replace QSystemTrayIcon with a empty stub on Android
Should hopefully fix the Android builds on binary factory.
This commit is contained in:
parent
3f1859e14b
commit
c0410506d1
|
@ -6,6 +6,7 @@
|
|||
|
||||
#include "systrayicon.h"
|
||||
|
||||
#ifndef Q_OS_ANDROID
|
||||
#include <QCoreApplication>
|
||||
#include <QFile>
|
||||
#include <QMenu>
|
||||
|
@ -117,6 +118,12 @@ SystrayIcon::SystrayIcon(QObject *parent)
|
|||
show();
|
||||
}
|
||||
}
|
||||
#else
|
||||
SystrayIcon::SystrayIcon(QObject *parent)
|
||||
: QObject(parent)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
SystrayIcon::~SystrayIcon()
|
||||
{
|
||||
|
@ -124,5 +131,9 @@ SystrayIcon::~SystrayIcon()
|
|||
|
||||
bool SystrayIcon::available() const
|
||||
{
|
||||
#ifndef Q_OS_ANDROID
|
||||
return QSystemTrayIcon::isSystemTrayAvailable();
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -7,9 +7,16 @@
|
|||
#pragma once
|
||||
|
||||
#include <QObject>
|
||||
#ifndef Q_OS_ANDROID
|
||||
#include <QSystemTrayIcon>
|
||||
#endif
|
||||
|
||||
class SystrayIcon : public QSystemTrayIcon
|
||||
class SystrayIcon
|
||||
#ifndef Q_OS_ANDROID
|
||||
: public QSystemTrayIcon
|
||||
#else
|
||||
: public QObject
|
||||
#endif
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
|
Loading…
Reference in New Issue