mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2024-12-24 11:54:01 +00:00
GUI: mux: convert QString to std::filesystem::path properly
This is in the code path used for querying the user for a file name to save to, e.g. when browsing for the destination file in the multiplexer or when saving an attachment in the header editor. Fixes #3049.
This commit is contained in:
parent
cdc955dafb
commit
0182e86569
4
NEWS.md
4
NEWS.md
@ -32,6 +32,10 @@
|
||||
copy action, no matter which keys were pressed by the users. This prevents
|
||||
Windows Explorer from deleting the dragged file when the user presses shift
|
||||
while dropping the file onto MKVToolNix GUI.
|
||||
* MKVToolNix GUI, only on Windows: when using the file dialog for selecting a
|
||||
file name to save to (e.g. when browsing for the destination file name in
|
||||
the multiplexer or saving an attachment in the header editor) non-ASCII
|
||||
characters in the default file name were mangled. Fixes #3049.
|
||||
|
||||
## Other changes
|
||||
|
||||
|
@ -88,7 +88,7 @@ getSaveFileName(QWidget *parent,
|
||||
QFileDialog::Options options) {
|
||||
auto defaultName = sanitizeDirectory(dir, true);
|
||||
if (!defaultFileName.isEmpty())
|
||||
defaultName = QDir::toNativeSeparators(Q((mtx::fs::to_path(to_utf8(dir)) / to_utf8(defaultFileName)).u8string()));
|
||||
defaultName = QDir::toNativeSeparators(Q((mtx::fs::to_path(to_utf8(dir)) / mtx::fs::to_path(to_utf8(defaultFileName))).u8string()));
|
||||
|
||||
auto result = QDir::toNativeSeparators(QFileDialog::getSaveFileName(parent, caption, defaultName, filter, selectedFilter, options & QFileDialog::DontUseCustomDirectoryIcons));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user