Fix start dir for file dialog

This commit is contained in:
Nicolas Fella 2023-12-23 21:22:04 +01:00
parent 69a1d5ec6b
commit e6383a47ca
2 changed files with 4 additions and 2 deletions

View file

@ -5,6 +5,7 @@
*/
import QtQuick
import QtCore
import QtQuick.Controls as QQC2
import QtQuick.Layouts
import QtQuick.Dialogs
@ -172,7 +173,7 @@ Kirigami.ScrollablePage {
id: fileDialog
readonly property var shareIface: root.currentDevice ? ShareDbusInterfaceFactory.create(root.currentDevice.id()) : null
title: i18nd("kdeconnect-app", "Please choose a file")
currentFolder: shortcuts.home
currentFolder: StandardPaths.standardLocations(StandardPaths.HomeLocation)[0]
onAccepted: shareIface.shareUrl(fileDialog.fileUrl)
}
}

View file

@ -5,6 +5,7 @@
*/
import QtQuick
import QtCore
import QtQuick.Controls as Controls
import QtQuick.Layouts
import org.kde.kirigami as Kirigami
@ -31,7 +32,7 @@ ColumnLayout {
FileDialog {
id: fileDialog
currentFolder: shortcuts.home
currentFolder: StandardPaths.standardLocations(StandardPaths.HomeLocation)[0]
fileMode: FileDialog.OpenFiles
onAccepted: {