Compare commits

..

1 commit

Author SHA1 Message Date
Dorian Zedler d66ad106d6
- Fix #33
- Fix #32
2021-03-19 18:02:10 +01:00
8 changed files with 24 additions and 54 deletions

View file

@ -1,26 +0,0 @@
kind: pipeline
name: build and publish Qt Android-App
steps:
- name: submodules
image: alpine/git
commands:
- git submodule update --init --recursive
- name: build apk
image: itsblue.dev/plugins/qt-android:5.15.5-1
settings:
qmake_arguments: "CONFIG+=release"
androiddeployqt_arguments: "--android-platform android-31"
- name: publish package
image: alpine/curl
commands:
- ls -l outputs
- ls -l outputs/apk
- ls -l outputs/apk/debug
- "curl --fail --user $GITEA_USER:$GITEA_TOKEN --upload-file outputs/apk/debug/android-build-debug.apk https://itsblue.dev/api/packages/ScStw/generic/app/0.0.0-preview-${DRONE_COMMIT_SHA}/ScStwApp.apk"
environment:
GITEA_USER:
from_secret: gitea-user
GITEA_TOKEN:
from_secret: gitea-token

2
.gitmodules vendored
View file

@ -1,3 +1,3 @@
[submodule "shared-libraries"]
path = shared-libraries
url = https://itsblue.dev/ScStw/shared-libraries.git
url = https://git.itsblue.de/ScStw/shared-libraries.git

View file

@ -4,7 +4,7 @@ android {
QT += androidextras
}
VERSION = 1.0.1
VERSION = 1.0.0
QMAKE_TARGET_PRODUCT = "ScStwApp"
QMAKE_TARGET_COMPANY = "Itsblue Development"
QMAKE_TARGET_COPYRIGHT = "Copyright (c) by Itsblue Development"
@ -73,21 +73,8 @@ DISTFILES += \
android {
ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android
defineReplace(droidVersionCode) {
segments = $$split(1, ".")
for (segment, segments): vCode = "$$first(vCode)$$format_number($$segment, width=3 zeropad)"
contains(ANDROID_TARGET_ARCH, arm64-v8a): \
suffix = 1
else:contains(ANDROID_TARGET_ARCH, armeabi-v7a): \
suffix = 0
# add more cases as needed
return($$first(vCode)$$first(suffix))
}
ANDROID_VERSION_NAME = $$VERSION
ANDROID_VERSION_CODE = $$droidVersionCode($$ANDROID_VERSION_NAME)
ANDROID_VERSION_CODE = 15
ANDROID_VERSION_NAME = $${VERSION}
}
# This has to be the last line in the file

View file

@ -10,7 +10,7 @@
<supports-screens android:largeScreens="true" android:normalScreens="true" android:anyDensity="true" android:smallScreens="true"/>
<application android:hardwareAccelerated="true" android:name="org.qtproject.qt5.android.bindings.QtApplication" android:label="-- %%INSERT_APP_NAME%% --" android:extractNativeLibs="true" android:icon="@drawable/icon">
<activity android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|layoutDirection|locale|fontScale|keyboard|keyboardHidden|navigation|mcc|mnc|density" android:name="org.qtproject.qt5.android.bindings.QtActivity" android:label="-- %%INSERT_APP_NAME%% --" android:screenOrientation="unspecified" android:launchMode="singleTop">
<activity android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|layoutDirection|locale|fontScale|keyboard|keyboardHidden|navigation|mcc|mnc|density" android:name="de.itsblue.scstw.MainActivity" android:label="-- %%INSERT_APP_NAME%% --" android:screenOrientation="unspecified" android:launchMode="singleTop">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>

View file

@ -118,7 +118,7 @@ Item {
Label {
Layout.preferredWidth: parent.width
Layout.preferredHeight: parent.height * 0.1
Layout.preferredHeight: parent.height * 0.15
font.pixelSize: height * 0.8
fontSizeMode: Text.Fit
@ -134,7 +134,9 @@ Item {
StateIndicator {
Layout.fillWidth: true
Layout.maximumWidth: height * 0.7
Layout.fillHeight: true
Layout.alignment: Layout.Center
backgroundColor: appTheme.theme.colors.background
successColor: appTheme.theme.colors.success
@ -150,9 +152,14 @@ Item {
anchors.fill: parent
onClicked: {
var disabled = timerStatusColumn.thisTimer["state"] !== ScStwTimer.DISABLED
console.log("setting timer to disabled: " + disabled)
scStwRemoteRace.setTimerDisabled(timerStatusColumn.thisTimer["id"], disabled)
if(scStwRemoteRace.timers.length > 1) {
var disabled = timerStatusColumn.thisTimer["state"] !== ScStwTimer.DISABLED
console.log("setting timer to disabled: " + disabled)
scStwRemoteRace.setTimerDisabled(timerStatusColumn.thisTimer["id"], disabled)
}
else {
console.log("skipping timer disabling, only one timer!")
}
}
}
}
@ -164,6 +171,8 @@ Item {
width: parent.width
height: parent.height * 0.1
visible: scStwRemoteRace.timers.length > 1
font.pixelSize: height * 0.6
fontSizeMode: Text.Fit
minimumPointSize: 1
@ -172,7 +181,7 @@ Item {
color: appTheme.theme.colors.text
text: "Tap on a lane to disable it"
text: "Tap a lane to disable it"
}
}

View file

@ -54,7 +54,7 @@ Column {
Label {
width: parent.width * 1
height: parentObj.delegateHeight * 0.6
height: parentObj.delegateHeight * 0.8
verticalAlignment: Text.AlignTop
@ -67,7 +67,7 @@ Column {
color: appTheme.theme.colors.line
text: "V" + APP_VERSION + "<br><a href='https://itsblue.de/apps/scstw'><b>privacy policy</b></a>"
text: "V" + APP_VERSION + "<br>By <a href=\"https://itsblue.de\">Itsblue Development</a>"
onLinkActivated: {
Qt.openUrlExternally(link)

@ -1 +1 @@
Subproject commit 0f269a76370d84c8d1f43a7298a59b6fac1c6980
Subproject commit 43d9f80f60451f111a6535e46ef51b3fa08e33e4

View file

@ -17,7 +17,7 @@
#include <QGuiApplication>
#include <QQmlApplicationEngine>
#include <QQmlEngine>
#include <QQmlEngine>
#include <QSqlDatabase>
#include <QSqlError>
#include <QDebug>
@ -77,7 +77,7 @@ int main(int argc, char *argv[])
const QUrl url(QStringLiteral("qrc:/main.qml"));
QObject::connect(&engine, &QQmlApplicationEngine::objectCreated,
&app, [url](QObject *obj, const QUrl &objUrl) {
&app, [url](QObject *obj, const QUrl &objUrl) {
if (!obj && url == objUrl)
QCoreApplication::exit(-1);
}, Qt::QueuedConnection);