See 0.03.2 for Details

This commit is contained in:
dorian 2018-06-30 20:59:42 +02:00
parent 40ab72873c
commit 609f78f610
10 changed files with 202 additions and 103 deletions

View File

@ -1,5 +1,5 @@
<?xml version="1.0"?>
<manifest package="com.itsblue.flgvertretungtest" xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="0.03.2" android:versionCode="5" android:installLocation="auto">
<manifest package="com.itsblue.flgvertretung" xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="0.03.2" android:versionCode="5" android:installLocation="auto">
<paths xmlns:android="http://schemas.android.com/apk/res/android">
<external-path name="external_files" path="."/>
</paths>

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 4.6.2, 2018-06-29T23:43:34. -->
<!-- Written by QtCreator 4.6.2, 2018-06-30T20:49:46. -->
<qtcreator>
<data>
<variable>EnvironmentId</variable>
@ -8,7 +8,7 @@
</data>
<data>
<variable>ProjectExplorer.Project.ActiveTarget</variable>
<value type="int">1</value>
<value type="int">0</value>
</data>
<data>
<variable>ProjectExplorer.Project.EditorSettings</variable>
@ -59,14 +59,14 @@
<data>
<variable>ProjectExplorer.Project.Target.0</variable>
<valuemap type="QVariantMap">
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Android for armeabi-v7a (GCC 4.9, Qt 5.11.1 for Android armv7)</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Android for armeabi-v7a (GCC 4.9, Qt 5.11.1 for Android armv7)</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{90080436-d11a-44c6-8604-3a0027d99b29}</value>
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Android for armeabi-v7a (GCC 4.9, Qt 5.10.1 for Android armv72)</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Android for armeabi-v7a (GCC 4.9, Qt 5.10.1 for Android armv72)</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{0560b570-8c4b-4d85-a4a2-e3653c24ac2c}</value>
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">1</value>
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/dorian/Documents/gitlab/build-fannyapp-Android_for_armeabi_v7a_GCC_4_9_Qt_5_11_1_for_Android_armv7-Debug</value>
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/dorian/Documents/gitlab/build-fannyapp-Android_for_armeabi_v7a_GCC_4_9_Qt_5_10_1_for_Android_armv72-Debug</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
@ -100,7 +100,7 @@
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.3">
<value type="QString" key="BuildTargetSdk">android-27</value>
<value type="QString" key="KeystoreLocation"></value>
<value type="QString" key="KeystoreLocation">/home/dorian/Documents/gitlab/fanny-app/android_release.keystore</value>
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build Android APK</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
@ -142,7 +142,7 @@
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/dorian/Documents/gitlab/build-fannyapp-Android_for_armeabi_v7a_GCC_4_9_Qt_5_11_1_for_Android_armv7-Release</value>
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/dorian/Documents/builds/Qt/fanny-app/build-fannyapp-Android_for_armeabi_v7a_GCC_4_9_Qt_5_10_1_for_Android_armv72-Release</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
@ -153,7 +153,7 @@
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">true</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">false</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
@ -218,7 +218,7 @@
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.2">
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/dorian/Documents/gitlab/build-fannyapp-Android_for_armeabi_v7a_GCC_4_9_Qt_5_11_1_for_Android_armv7-Profile</value>
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/dorian/Documents/gitlab/build-fannyapp-Android_for_armeabi_v7a_GCC_4_9_Qt_5_10_1_for_Android_armv72-Profile</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
@ -229,7 +229,7 @@
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">true</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">true</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">false</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
@ -378,14 +378,14 @@
<data>
<variable>ProjectExplorer.Project.Target.1</variable>
<valuemap type="QVariantMap">
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop Qt 5.11.1 GCC 64bit</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop Qt 5.11.1 GCC 64bit</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.qt5.5111.gcc_64_kit</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop Qt 5.10.1 GCC 64bit2</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop Qt 5.10.1 GCC 64bit2</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.qt5.5101.gcc_64_kit</value>
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/dorian/Documents/gitlab/build-fannyapp-Desktop_Qt_5_11_1_GCC_64bit-Debug</value>
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/dorian/Documents/gitlab/build-fannyapp-Desktop_Qt_5_10_1_GCC_64bit2-Debug</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
@ -445,7 +445,7 @@
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/dorian/Documents/gitlab/build-fannyapp-Desktop_Qt_5_11_1_GCC_64bit-Release</value>
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/dorian/Documents/gitlab/build-fannyapp-Desktop_Qt_5_10_1_GCC_64bit2-Release</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
@ -456,7 +456,7 @@
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">true</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">false</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
@ -505,7 +505,7 @@
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.2">
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/dorian/Documents/gitlab/build-fannyapp-Desktop_Qt_5_11_1_GCC_64bit-Profile</value>
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/dorian/Documents/gitlab/build-fannyapp-Desktop_Qt_5_10_1_GCC_64bit2-Profile</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
@ -516,7 +516,7 @@
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">true</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">true</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">false</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
@ -629,7 +629,7 @@
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">fannyapp.pro</value>
<value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value>
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory"></value>
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory.default">/home/dorian/Documents/gitlab/build-fannyapp-Desktop_Qt_5_11_1_GCC_64bit-Debug</value>
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory.default">/home/dorian/Documents/builds/Qt/fanny-app/build-fannyapp-Android_for_armeabi_v7a_GCC_4_9_Qt_5_10_1_for_Android_armv72-Release</value>
<value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>

View File

@ -42,7 +42,7 @@ public:
signals:
public slots:
void updateProgress(qint64 read, qint64 total);
Q_INVOKABLE void updateProgress(qint64 read, qint64 total);
private:

View File

@ -76,7 +76,7 @@ Page {
text: _cppServerConn.getFoodPlanData(index).cookteam
width: parent.width - 10
wrapMode: Label.Wrap
height: text!=""? none:0
height: text!=""? undefined:0
}
Label {
anchors.left: parent.left
@ -109,7 +109,7 @@ Page {
wrapMode: Label.Wrap
id: main_dish
text: _cppServerConn.getFoodPlanData(index).main_dish
height: text!=""? none:0
height: text!=""? undefined:0
}
Rectangle {
@ -132,7 +132,7 @@ Page {
text: _cppServerConn.getFoodPlanData(index).main_dish_veg
width: parent.width - 10
wrapMode: Label.Wrap
height: text!=""? none:0
height: text!=""? undefined:0
}
Rectangle {
@ -154,7 +154,7 @@ Page {
text: _cppServerConn.getFoodPlanData(index).garnish
width: parent.width - 10
wrapMode: Label.Wrap
height: text!=""? none:0
height: text!=""? undefined:0
}
Rectangle {
@ -177,7 +177,7 @@ Page {
text: _cppServerConn.getFoodPlanData(index).dessert
width: parent.width - 10
wrapMode: Label.Wrap
height: text!=""? none:0
height: text!=""? undefined:0
}
Label {

View File

@ -123,11 +123,12 @@ Page {
contentHeight: aboutColumn.height
standardButtons: Dialog.Ok | Dialog.Cancel
onAccepted: {
_cppServerConn.updateProgress(0,100)
busyDialog.open()
text.visible = false
console.log("getting file of ", day)
var ret = _cppServerConn.getDay(day)
console.log(ret)
progressCircle.arcEnd = 36000
progress.text = "100%"
busyDialog.close()
text.visible = true
if(ret === "OK"){
@ -168,35 +169,37 @@ Page {
//width: Math.min(window.width, window.height) / 3 * 2
height: contentHeight * 1.5
width: contentWidth * 1.5
contentHeight: busyIndicator.height
contentWidth: busyIndicator.width
BusyIndicator {
id: busyIndicator
visible: true
contentHeight: progressCircle.height
contentWidth: progressCircle.width
ProgressCircle {
id: progressCircle
size: 50
lineWidth: 5
anchors.centerIn: parent
Label {
id: progress
anchors.centerIn: parent
text: _cppServerConn.getProgress()
}
Timer {
id: refreshTimer
interval: 1;
running: busyDialog.visible
repeat: true
onTriggered: {
var ret = _cppServerConn.getProgress()
progress.text = Math.round( ret * 100 ) + "%"
progressBar.value = ret
}
}
}
ProgressBar {
id: progressBar
anchors.top: parent.top
anchors.left: parent.left
anchors.right: parent.right
anchors.topMargin: busyDialog.height / 1.5
colorCircle: "#FF3333"
colorBackground: "#E6E6E6"
showBackground: true
arcBegin: 0
arcEnd: 0
Label {
id: progress
anchors.centerIn: parent
text: "0%"
}
Timer {
id: refreshTimer
interval: 1;
running: busyDialog.visible
repeat: true
onTriggered: {
var ret = _cppServerConn.getProgress()
progressCircle.arcEnd = 360 * ret * 1.2
progress.text = Math.round( ret * 100 ) + "%"
console.log(ret)
}
}
}
}
}

View File

@ -127,35 +127,38 @@ Page {
//width: Math.min(window.width, window.height) / 3 * 2
height: contentHeight * 1.5
width: contentWidth * 1.5
contentHeight: busyIndicator.height
contentWidth: busyIndicator.width
BusyIndicator {
id: busyIndicator
visible: true
contentHeight: progressCircle.height
contentWidth: progressCircle.width
ProgressCircle {
id: progressCircle
size: 50
lineWidth: 5
anchors.centerIn: parent
Label {
id: progress
anchors.centerIn: parent
text: _cppServerConn.getProgress()
}
Timer {
id: refreshTimer
interval: 1;
running: busyDialog.visible
repeat: true
onTriggered: {
var ret = _cppServerConn.getProgress()
progress.text = Math.round( ret * 100 ) + "%"
progressBar.value = ret
}
}
}
ProgressBar {
id: progressBar
anchors.top: parent.top
anchors.left: parent.left
anchors.right: parent.right
anchors.topMargin: busyDialog.height / 1.5
colorCircle: "#FF3333"
colorBackground: "#E6E6E6"
showBackground: true
arcBegin: 0
arcEnd: 0
Label {
id: progress
anchors.centerIn: parent
text: "0%"
}
Timer {
id: refreshTimer
interval: 1;
running: busyDialog.visible
repeat: true
onTriggered: {
var ret = _cppServerConn.getProgress()
if(ret > 100 || ret < 0){
ret = 0
}
progress.text = Math.round( ret * 100 ) + "%"
progressCircle.arcEnd = 360 * ret
}
}
}
}
}

90
qml/ProgressCircle.qml Normal file
View File

@ -0,0 +1,90 @@
import QtQuick 2.0
import QtQml 2.2
Item {
id: root
width: size
height: size
property int size: 200 // The size of the circle in pixel
property real arcBegin: 0 // start arc angle in degree
property real arcEnd: 270 // end arc angle in degree
property real arcOffset: 0 // rotation
property bool isPie: false // paint a pie instead of an arc
property bool showBackground: false // a full circle as a background of the arc
property real lineWidth: 20 // width of the line
property string colorCircle: "#CC3333"
property string colorBackground: "#779933"
property alias beginAnimation: animationArcBegin.enabled
property alias endAnimation: animationArcEnd.enabled
property int animationDuration: 20
onArcBeginChanged: canvas.requestPaint()
onArcEndChanged: canvas.requestPaint()
Behavior on arcBegin {
id: animationArcBegin
enabled: true
NumberAnimation {
duration: root.animationDuration
easing.type: Easing.InOutCubic
}
}
Behavior on arcEnd {
id: animationArcEnd
enabled: true
NumberAnimation {
duration: root.animationDuration
easing.type: Easing.InOutCubic
}
}
Canvas {
id: canvas
anchors.fill: parent
rotation: -90 + parent.arcOffset
onPaint: {
var ctx = getContext("2d")
var x = width / 2
var y = height / 2
var start = Math.PI * (parent.arcBegin / 180)
var end = Math.PI * (parent.arcEnd / 180)
ctx.reset()
if (root.isPie) {
if (root.showBackground) {
ctx.beginPath()
ctx.fillStyle = root.colorBackground
ctx.moveTo(x, y)
ctx.arc(x, y, width / 2, 0, Math.PI * 2, false)
ctx.lineTo(x, y)
ctx.fill()
}
ctx.beginPath()
ctx.fillStyle = root.colorCircle
ctx.moveTo(x, y)
ctx.arc(x, y, width / 2, start, end, false)
ctx.lineTo(x, y)
ctx.fill()
} else {
if (root.showBackground) {
ctx.beginPath();
ctx.arc(x, y, (width / 2) - parent.lineWidth / 2, 0, Math.PI * 2, false)
ctx.lineWidth = root.lineWidth
ctx.strokeStyle = root.colorBackground
ctx.stroke()
}
ctx.beginPath();
ctx.arc(x, y, (width / 2) - parent.lineWidth / 2, start, end, false)
ctx.lineWidth = root.lineWidth
ctx.strokeStyle = root.colorCircle
ctx.stroke()
}
}
}
}

View File

@ -13,6 +13,7 @@ Page {
objectName: "WebsitePage";
title: qsTr("Fanny Webseite")
ProgressBar {
id: progress
width: parent.width
@ -25,15 +26,9 @@ Page {
value: webView.loadProgress == 100 ? 0 : webView.loadProgress / 100
}
Button {
z: 1
anchors.top: parent.top
text:"\u21BA"
onClicked: webView.reload()
}
WebView {
id: webView
onLoadProgressChanged: console.log(loadProgress)
anchors {
top: webView.loadProgress < 100 ? progress.bottom:parent.top
bottom: parent.bottom
@ -46,7 +41,18 @@ Page {
if (loadRequest.errorString)
console.error(loadRequest.errorString);
}
// RoundButton {
// //z: -1
// anchors {
// bottom: parent.bottom
// bottomMargin: 10
// right: parent.right
// rightMargin: 10
// }
// text:"\u21BA"
// onClicked: webView.reload()
// }
}
}

View File

@ -8,5 +8,6 @@
<file>AppToolBar.qml</file>
<file>WebsitePage.qml</file>
<file>FoodPlanForm.qml</file>
<file>ProgressCircle.qml</file>
</qresource>
</RCC>

View File

@ -82,7 +82,7 @@ int ServerConn::logout()
QString ServerConn::getDay(QString day)
{
qDebug("getting file of day");
this->progress = 0;
// Create request
QNetworkRequest request;
request.setUrl( QUrl( "http://www.fanny-leicht.de/static15/http.intern/" + day + ".pdf" ) );
@ -101,14 +101,13 @@ QString ServerConn::getDay(QString day)
connect(reply, SIGNAL(downloadProgress(qint64, qint64)),
this, SLOT(updateProgress(qint64, qint64)));
this->progress = 0;
QEventLoop loop;
loop.connect(this->networkManager, SIGNAL(finished(QNetworkReply*)), SLOT(quit()));
loop.exec();
this->progress = 1;
int status_code = reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt();
if(status_code == 200){
qDebug("OK");
QString path = QStandardPaths::writableLocation(QStandardPaths::DownloadLocation);
QDir dir;
@ -119,12 +118,9 @@ QString ServerConn::getDay(QString day)
file.open(QIODevice::ReadWrite);
file.write(reply->readAll());
file.close();
this->progress = 1;
qDebug("opening PDF...");
QDesktopServices::openUrl(QUrl::fromLocalFile(path + "/.fannyapp-tmp/" + day + ".pdf"));
qDebug() << QString::fromUtf8(reply->readAll());
qDebug() << reply->attribute(QNetworkRequest::HttpStatusCodeAttribute);
qDebug("open");
return("OK");
}
else if(status_code == 401){