mirror of
https://gitlab.com/eql/lqml.git
synced 2025-12-06 02:30:38 -08:00
revisions
This commit is contained in:
parent
f02422ddfe
commit
ce8b07845c
31 changed files with 2 additions and 92 deletions
|
|
@ -2,8 +2,6 @@
|
|||
#include <QtAndroid>
|
||||
#include <QAndroidJniEnvironment>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
QVariant QT::keepScreenOn(const QVariant& on) {
|
||||
QtAndroid::runOnAndroidThread([&] {
|
||||
QAndroidJniObject activity = QtAndroid::androidActivity();
|
||||
|
|
@ -23,4 +21,3 @@ QVariant QT::keepScreenOn(const QVariant& on) {
|
|||
return on;
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
|
|
|||
|
|
@ -3,8 +3,6 @@
|
|||
#include <QObject>
|
||||
#include <QVariant>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
extern "C" { QObject* ini(); }
|
||||
|
||||
class QT : public QObject {
|
||||
|
|
@ -14,4 +12,3 @@ public:
|
|||
Q_INVOKABLE QVariant keepScreenOn(const QVariant& = true);
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
|
|
|||
|
|
@ -2,11 +2,8 @@
|
|||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
QVariant QT::keepScreenOn(const QVariant& on) {
|
||||
[UIApplication sharedApplication].idleTimerDisabled = on.toBool() ? YES : NO;
|
||||
return on;
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue