Commit 1a73f989 authored by Elias Steurer's avatar Elias Steurer 🇩🇪

Fix wrong filename when using a filename with a dot

Remove old labs fileselector
parent d1d933b6
Pipeline #238738601 passed with stages
in 10 minutes and 3 seconds
import QtQuick 2.12
import QtQuick.Controls 2.12
import QtQuick.Controls.Material 2.12
import Qt.labs.platform 1.1
import QtQuick.Dialogs 1.2
import ScreenPlay 1.0
......@@ -130,11 +130,9 @@ Item {
FileDialog {
id: fileDialog
title: qsTr("Please choose a file")
fileMode: FileDialog.OpenFile
onAccepted: {
root.file = fileDialog.file
txtName.text = fileDialog.file.toString().replace(/^.*[\\\/]/,
'')
txtName.text = fileDialog.file.toString()
}
}
}
......
......@@ -140,7 +140,7 @@ void Create::saveWallpaper(QString title, QString description, QString filePath,
obj.insert("title", title);
obj.insert("youtube", youtube);
obj.insert("videoCodec", codec == Create::VideoCodec::VP8 ? "vp8" : "vp9");
obj.insert("file", filePathFile.baseName() + ".webm");
obj.insert("file", filePathFile.fileName());
obj.insert("previewGIF", "preview.gif");
obj.insert("previewWEBM", "preview.webm");
obj.insert("preview", previewImageFile.exists() ? previewImageFile.fileName() : "preview.jpg");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment