mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
Assert that Widget isn't used on Android
That would cause horrible conflicts and apreciable slowdowns
This commit is contained in:
parent
2e7c73dcb0
commit
3b9d4eba2e
|
@ -37,6 +37,7 @@
|
|||
#include "src/platform/timer.h"
|
||||
#include "systemtrayicon.h"
|
||||
#include "src/nexus.h"
|
||||
#include <cassert>
|
||||
#include <QMessageBox>
|
||||
#include <QDebug>
|
||||
#include <QFile>
|
||||
|
@ -54,6 +55,12 @@
|
|||
#include <QTranslator>
|
||||
#include <tox/tox.h>
|
||||
|
||||
#ifdef Q_OS_ANDROID
|
||||
#define IS_ON_DESKTOP_GUI 0
|
||||
#else
|
||||
#define IS_ON_DESKTOP_GUI 1
|
||||
#endif
|
||||
|
||||
void toxActivateEventHandler(const QByteArray& data)
|
||||
{
|
||||
if (data != "$activate")
|
||||
|
@ -285,6 +292,8 @@ Widget::~Widget()
|
|||
|
||||
Widget* Widget::getInstance()
|
||||
{
|
||||
assert(IS_ON_DESKTOP_GUI); // Widget must only be used on Desktop platforms
|
||||
|
||||
if (!instance)
|
||||
{
|
||||
instance = new Widget();
|
||||
|
|
Loading…
Reference in New Issue
Block a user