use a new activity handler

This commit is contained in:
Andrei Yankovich 2021-05-07 17:53:34 +03:00
parent 8e14b711cd
commit e85959099c

View File

@ -12,6 +12,7 @@
#include <QQmlApplicationEngine>
#include <QQmlComponent>
#include <QQmlContext>
#include "activityhandler.h"
#include "hanoitowers.h"
#include <QTranslator>
#include <qmlnotifyservice.h>
@ -51,6 +52,12 @@ int main(int argc, char *argv[])
return 2;
}
#ifdef Q_OS_ANDROID
ActivityHandler *activityHandler = new ActivityHandler(&app);
engine.rootContext()->setContextProperty(QLatin1String("activityHandler"), activityHandler);
#endif
root->setContextProperty("backEnd", &back);
root->setContextProperty("OnlineStatusQml", QVariant::fromValue(OnlineStatusQml{}));