mirror of
https://gitlab.com/eql/lqml.git
synced 2025-12-25 11:30:38 -08:00
revisions
This commit is contained in:
parent
aa73d2b659
commit
21bde7c8e7
6 changed files with 36 additions and 13 deletions
|
|
@ -32,7 +32,9 @@ QVariant QT::keepScreenOn(const QVariant& on) {
|
|||
if (window.isValid()) {
|
||||
const int FLAG_KEEP_SCREEN_ON = 128;
|
||||
const char* method = on.toBool() ? "addFlags" : "clearFlags";
|
||||
window.callMethod<void>(method, "(I)V", FLAG_KEEP_SCREEN_ON);
|
||||
window.callMethod<void>(
|
||||
method,
|
||||
"(I)V", FLAG_KEEP_SCREEN_ON);
|
||||
}
|
||||
}
|
||||
clearEventualExceptions();
|
||||
|
|
@ -45,7 +47,9 @@ QVariant QT::keepScreenOn(const QVariant& on) {
|
|||
if (window.isValid()) {
|
||||
const int FLAG_KEEP_SCREEN_ON = 128;
|
||||
const char* method = on.toBool() ? "addFlags" : "clearFlags";
|
||||
window.callMethod<void>(method, "(I)V", FLAG_KEEP_SCREEN_ON);
|
||||
window.callMethod<void>(
|
||||
method,
|
||||
"(I)V", FLAG_KEEP_SCREEN_ON);
|
||||
}
|
||||
}
|
||||
clearEventualExceptions();
|
||||
|
|
@ -78,13 +82,17 @@ QVariant QT::iniPositioning() {
|
|||
#if (QT_VERSION < 0x060000)
|
||||
QtAndroid::runOnAndroidThread([] {
|
||||
QAndroidJniObject activity = QtAndroid::androidActivity();
|
||||
activity.callMethod<void>("iniLocation", "()V");
|
||||
activity.callMethod<void>(
|
||||
"iniLocation",
|
||||
"()V");
|
||||
clearEventualExceptions();
|
||||
});
|
||||
#else
|
||||
QNativeInterface::QAndroidApplication::runOnAndroidMainThread([&] {
|
||||
QJniObject activity = QtAndroidPrivate::activity();
|
||||
activity.callMethod<void>("iniLocation", "()V");
|
||||
activity.callMethod<void>(
|
||||
"iniLocation",
|
||||
"()V");
|
||||
clearEventualExceptions();
|
||||
});
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue