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"
|
#include "systrayicon.h"
|
||||||
|
|
||||||
|
#ifndef Q_OS_ANDROID
|
||||||
#include <QCoreApplication>
|
#include <QCoreApplication>
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
#include <QMenu>
|
#include <QMenu>
|
||||||
@ -117,6 +118,12 @@ SystrayIcon::SystrayIcon(QObject *parent)
|
|||||||
show();
|
show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
SystrayIcon::SystrayIcon(QObject *parent)
|
||||||
|
: QObject(parent)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
SystrayIcon::~SystrayIcon()
|
SystrayIcon::~SystrayIcon()
|
||||||
{
|
{
|
||||||
@ -124,5 +131,9 @@ SystrayIcon::~SystrayIcon()
|
|||||||
|
|
||||||
bool SystrayIcon::available() const
|
bool SystrayIcon::available() const
|
||||||
{
|
{
|
||||||
|
#ifndef Q_OS_ANDROID
|
||||||
return QSystemTrayIcon::isSystemTrayAvailable();
|
return QSystemTrayIcon::isSystemTrayAvailable();
|
||||||
|
#else
|
||||||
|
return false;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -7,9 +7,16 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
|
#ifndef Q_OS_ANDROID
|
||||||
#include <QSystemTrayIcon>
|
#include <QSystemTrayIcon>
|
||||||
|
#endif
|
||||||
|
|
||||||
class SystrayIcon : public QSystemTrayIcon
|
class SystrayIcon
|
||||||
|
#ifndef Q_OS_ANDROID
|
||||||
|
: public QSystemTrayIcon
|
||||||
|
#else
|
||||||
|
: public QObject
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user