kcms/rules: Fix import/export FileDialog type

They were just missing the alias qualifier.

Add also explicit parameters to the signal handlers.

BUG: 481082
FIXED-IN: 6.0
wilder/Plasma/6.2
Ismael Asensio 2 years ago
parent 31ebdb73a0
commit 7c8b5be55a
  1. 2
      src/kcms/rules/ui/FileDialogLoader.qml
  2. 4
      src/kcms/rules/ui/main.qml

@ -22,7 +22,7 @@ Loader {
id: fileDialog
title: root.title
fileMode: root.isSaveDialog ? FileDialog.SaveFile : FileDialog.OpenFile
fileMode: root.isSaveDialog ? QtDialogs.FileDialog.SaveFile : QtDialogs.FileDialog.OpenFile
currentFolder: root.lastFolder || StandardPaths.standardLocations(StandardPaths.HomeLocation)[0]
nameFilters: [ i18n("KWin Rules (*.kwinrule)") ]
defaultSuffix: "*.kwinrule"

@ -241,7 +241,7 @@ KCM.ScrollViewKCM {
onLastFolderChanged: {
exportDialog.lastFolder = lastFolder;
}
onFileSelected: {
onFileSelected: path => {
kcm.importFromFile(path);
}
}
@ -253,7 +253,7 @@ KCM.ScrollViewKCM {
onLastFolderChanged: {
importDialog.lastFolder = lastFolder;
}
onFileSelected: {
onFileSelected: path => {
selectedIndexes.sort();
kcm.exportToFile(path, selectedIndexes);
exportInfo.visible = false;

Loading…
Cancel
Save