Some code organisation and recovery procedure fix
This commit is contained in:
15
Gui/main.qml
15
Gui/main.qml
@@ -47,6 +47,7 @@ ApplicationWindow
|
||||
|
||||
property alias window: appWindow
|
||||
}
|
||||
|
||||
Component.onCompleted:
|
||||
{
|
||||
if(bad_config)
|
||||
@@ -54,8 +55,8 @@ ApplicationWindow
|
||||
importDialog.open()
|
||||
}
|
||||
else appLoader.source= "LoginScreen.qml"
|
||||
|
||||
}
|
||||
|
||||
Dialog
|
||||
{
|
||||
id: importDialog
|
||||
@@ -65,11 +66,10 @@ ApplicationWindow
|
||||
onAccepted: settingsFiledialog.open()
|
||||
onRejected: appLoader.source= "firststart.qml"
|
||||
title: qsTr("Einstellungen importieren")
|
||||
|
||||
}
|
||||
|
||||
FileDialog
|
||||
{
|
||||
|
||||
id: settingsFiledialog
|
||||
title: qsTr("PYQCRM Einstellungen")
|
||||
currentFolder: StandardPaths.standardLocations(StandardPaths.DocumentsLocation)[0]
|
||||
@@ -77,18 +77,19 @@ ApplicationWindow
|
||||
nameFilters: [qsTr("PYQCRM Einstellungen (*.pyqcrm)")]
|
||||
onAccepted:
|
||||
{
|
||||
encryptPwDialog.open()
|
||||
exportFilePassword.open()
|
||||
confile = selectedFile
|
||||
}
|
||||
}
|
||||
|
||||
Dialog
|
||||
{
|
||||
id: encryptPwDialog
|
||||
id: exportFilePassword
|
||||
modal: true
|
||||
title: qsTr("PYQCRM Einstellungen")
|
||||
anchors.centerIn: parent
|
||||
standardButtons: Dialog.Ok | Dialog.Cancel
|
||||
onAccepted: config.importConfig(confile, encryptPassword.text)
|
||||
onAccepted: config.importConfig(confile, exportPasswordInput.text)
|
||||
ColumnLayout
|
||||
{
|
||||
RowLayout
|
||||
@@ -100,7 +101,7 @@ ApplicationWindow
|
||||
|
||||
TextField
|
||||
{
|
||||
id: encryptPassword
|
||||
id: exportPasswordInput
|
||||
echoMode: TextInput.Password
|
||||
implicitWidth: 300
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user