mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-06-23 02:00:20 +07:00
removed the use of QFileDialog
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Dialogs
|
||||
|
||||
import QtCore
|
||||
|
||||
import PageEnum 1.0
|
||||
|
||||
@@ -97,7 +100,20 @@ PageType {
|
||||
|
||||
image: "qrc:/images/controls/save.svg"
|
||||
|
||||
onClicked: SettingsController.exportLogsFile()
|
||||
onClicked: fileDialog.open()
|
||||
|
||||
FileDialog {
|
||||
id: fileDialog
|
||||
acceptLabel: qsTr("Save logs")
|
||||
nameFilters: [ "Logs files (*.log)" ]
|
||||
fileMode: FileDialog.SaveFile
|
||||
|
||||
currentFile: StandardPaths.standardLocations(StandardPaths.DocumentsLocation) + "/AmneziaVPN"
|
||||
defaultSuffix: ".log"
|
||||
onAccepted: {
|
||||
ExportController.saveFile(fileDialog.currentFile.toString())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
CaptionTextType {
|
||||
|
||||
Reference in New Issue
Block a user