Fehlerbehebungen
This commit is contained in:
parent
c25195e13b
commit
638b5df2c5
7 changed files with 26 additions and 23 deletions
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE QtCreatorProject>
|
||||
<!-- Written by QtCreator 4.6.2, 2018-07-05T15:13:53. -->
|
||||
<!-- Written by QtCreator 4.6.2, 2018-07-06T09:04:54. -->
|
||||
<qtcreator>
|
||||
<data>
|
||||
<variable>EnvironmentId</variable>
|
||||
|
|
|
@ -4,7 +4,7 @@ import QtGraphicalEffects 1.0
|
|||
|
||||
Page {
|
||||
id:root
|
||||
anchors.fill: parent
|
||||
//anchors.fill: parent
|
||||
property bool cookplanChanged
|
||||
title: qsTr("Speiseplanplan")
|
||||
|
||||
|
@ -62,7 +62,7 @@ Page {
|
|||
width: listView.width
|
||||
id: delegate
|
||||
height: visible ? cookteam.height + date.height + main_dish.height + main_dish_veg.height + garnish.height + dessert.height + spacer.height + cust_spacing*9 + 5:0
|
||||
visible: index>6//listView.isDayVisible(index)
|
||||
visible: listView.isDayVisible(index)
|
||||
|
||||
property int cust_spacing: 5
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ import QtQuick.Controls 2.2
|
|||
import QtGraphicalEffects 1.0
|
||||
|
||||
Page {
|
||||
anchors.fill: parent
|
||||
//anchors.fill: parent
|
||||
|
||||
title: qsTr("Vertretungsplan")
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ import QtQuick.Controls 2.2
|
|||
|
||||
Page {
|
||||
id: root
|
||||
anchors.fill: parent
|
||||
//anchors.fill: parent
|
||||
objectName: "LoginPage";
|
||||
|
||||
header: AppToolBar {
|
||||
|
|
|
@ -4,7 +4,7 @@ import QtQuick.Controls 2.2
|
|||
Page {
|
||||
id: root
|
||||
objectName: "MainPage"
|
||||
anchors.fill: parent
|
||||
//anchors.fill: parent
|
||||
|
||||
Shortcut {
|
||||
sequences: ["Esc", "Back"]
|
||||
|
|
|
@ -8,7 +8,7 @@ import QtQuick.Controls.Styles 1.2
|
|||
|
||||
Page {
|
||||
id:root
|
||||
anchors.fill: parent
|
||||
//anchors.fill: parent
|
||||
|
||||
objectName: "WebsitePage";
|
||||
|
||||
|
@ -22,13 +22,11 @@ Page {
|
|||
}
|
||||
//z: Qt.platform.os === "android" ? -1 : 1
|
||||
visible: webView.loadProgress < 100
|
||||
|
||||
value: webView.loadProgress == 100 ? 0 : webView.loadProgress / 100
|
||||
value: webView.loadProgress === 100 ? 0 : webView.loadProgress / 100
|
||||
}
|
||||
|
||||
WebView {
|
||||
id: webView
|
||||
onLoadProgressChanged: console.log(loadProgress)
|
||||
anchors {
|
||||
top: webView.loadProgress < 100 ? progress.bottom:parent.top
|
||||
bottom: parent.bottom
|
||||
|
|
29
qml/main.qml
29
qml/main.qml
|
@ -16,23 +16,23 @@ ApplicationWindow {
|
|||
property string background_color: "white"
|
||||
property string toolbar_color: "#312f38"
|
||||
|
||||
onBeforeRendering: {
|
||||
if(!firstinitdone){
|
||||
var isinit = _cppAppSettings.loadSetting("init")
|
||||
console.log("getinit");
|
||||
console.log(isinit);
|
||||
if(isinit === "0"){
|
||||
stackView.push("qrc:/LoginPage.qml", {});
|
||||
}
|
||||
}
|
||||
firstinitdone = true
|
||||
}
|
||||
// onBeforeRendering: {
|
||||
// if(!firstinitdone){
|
||||
// var isinit = _cppAppSettings.loadSetting("init")
|
||||
// console.log("getinit");
|
||||
// console.log(isinit);
|
||||
// if(isinit === "0"){
|
||||
// stackView.push("qrc:/LoginPage.qml", {});
|
||||
// }
|
||||
// }
|
||||
// firstinitdone = true
|
||||
// }
|
||||
|
||||
Timer {
|
||||
//runs only one time at applictaion lauch
|
||||
property bool finished: true
|
||||
id: initTimer
|
||||
interval: 10;
|
||||
interval: 1;
|
||||
running: initdone === false
|
||||
repeat: finished
|
||||
onTriggered: {
|
||||
|
@ -45,6 +45,7 @@ ApplicationWindow {
|
|||
console.log("Perm")
|
||||
var ret = _cppServerConn.login(_cppAppSettings.loadSetting("username"), _cppAppSettings.loadSetting("password"), true);
|
||||
if(ret === "OK"){
|
||||
initdone = true
|
||||
_cppAppSettings.writeSetting("init", 1);
|
||||
if(stackView.currentItem.objectName !== "MainPage"){
|
||||
stackView.push("qrc:/MainPage.qml", {});
|
||||
|
@ -64,8 +65,11 @@ ApplicationWindow {
|
|||
}
|
||||
}
|
||||
else {
|
||||
initdone = false
|
||||
if(stackView.currentItem.objectName !== "LoginPage"){
|
||||
stackView.push("qrc:/LoginPage.qml")
|
||||
}
|
||||
}
|
||||
finished = true
|
||||
initdone = true
|
||||
}
|
||||
|
@ -77,6 +81,7 @@ ApplicationWindow {
|
|||
running: initdone
|
||||
repeat: true
|
||||
onTriggered: {
|
||||
console.log("refresh")
|
||||
var ret = _cppServerConn.checkConn()
|
||||
handleError(ret)
|
||||
}
|
||||
|
|
Reference in a new issue