some stuff for IOS

This commit is contained in:
Dorian Zedler 2020-08-13 23:52:31 +02:00
parent 6db4bbe53c
commit d06cfc2127
43 changed files with 35 additions and 8 deletions

View file

@ -18,7 +18,7 @@ DEFINES += QT_DEPRECATED_WARNINGS
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
TARGET = speedclimbing_stw
TARGET = ScStwApp
SOURCES += \
sources/main.cpp \
@ -66,3 +66,15 @@ DISTFILES += \
android {
ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android-sources
}
ios {
QMAKE_ASSET_CATALOGS += resources/shared/graphics/Assets.xcassets
xcode_product_bundle_identifier_setting.value = "de.itsblue.ScStwApp"
OBJECTIVE_SOURCES += \
sources/sleepprevent.mm
OBJECTIVE_HEADERS += \
headers/sleepprevent.h
QTPLUGIN -= qtaudio_coreaudio
}

5
headers/sleepprevent.h Normal file
View file

@ -0,0 +1,5 @@
class SleepPrevent
{
public:
void setTimerDisabled();
};

View file

@ -4,7 +4,6 @@ import QtQuick.Window 2.2
import QtQuick.Controls 2.2
import QtQuick.Layouts 1.3
import QtGraphicalEffects 1.0
import QtQuick.Controls.Styles 1.4
import "../components"
ListView {

View file

@ -4,7 +4,6 @@ import QtQuick.Window 2.2
import QtQuick.Controls 2.12
import QtQuick.Layouts 1.3
import QtGraphicalEffects 1.0
import QtQuick.Controls.Styles 1.4
import QtQuick.Templates 2.12 as T
import "../components"

View file

@ -21,7 +21,6 @@ import QtQuick.Window 2.2
import QtQuick.Controls 2.2
import QtQuick.Layouts 1.3
import QtGraphicalEffects 1.0
import QtQuick.Controls.Styles 1.4
import "../components"
Popup {

View file

@ -4,7 +4,6 @@ import QtQuick.Window 2.2
import QtQuick.Controls 2.2
import QtQuick.Layouts 1.3
import QtGraphicalEffects 1.0
import QtQuick.Controls.Styles 1.4
import "../components"

View file

@ -4,7 +4,6 @@ import QtQuick.Window 2.2
import QtQuick.Controls 2.2
import QtQuick.Layouts 1.3
import QtGraphicalEffects 1.0
import QtQuick.Controls.Styles 1.4
import "../components"
Column {

View file

@ -4,7 +4,6 @@ import QtQuick.Window 2.2
import QtQuick.Controls 2.2
import QtQuick.Layouts 1.3
import QtGraphicalEffects 1.0
import QtQuick.Controls.Styles 1.4
import "../components"
Column {

View file

@ -1,6 +1,5 @@
import QtQuick 2.3
import QtQuick.Controls 2.4
import QtQuick.Controls.Styles 1.2
BusyIndicator {
id: control

Binary file not shown.

After

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 225 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 287 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 397 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 430 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 565 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 627 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 691 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 780 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 842 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 841 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 918 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

File diff suppressed because one or more lines are too long

View file

@ -57,6 +57,10 @@
#include "headers/apptheme.h"
#include <QTranslator>
#if defined(Q_OS_IOS)
#include "headers/sleepprevent.h"
#endif
static void connectToDatabase()
{
QSqlDatabase database = QSqlDatabase::database();
@ -127,6 +131,11 @@ int main(int argc, char *argv[])
// stup app settings
context->setContextProperty("_cppAppSettings", pAppSettings);
#if defined(Q_OS_IOS)
SleepPrevent sp;
sp.setTimerDisabled();
#endif
if (engine.rootObjects().isEmpty())
return -1;

7
sources/sleepprevent.mm Normal file
View file

@ -0,0 +1,7 @@
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#include "headers/sleepprevent.h"
void SleepPrevent::setTimerDisabled() {
[[UIApplication sharedApplication] setIdleTimerDisabled: YES];
}