summaryrefslogtreecommitdiff
path: root/ui/qt/module_preferences_scroll_area.cpp
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2016-02-23 21:09:04 -0800
committerGuy Harris <guy@alum.mit.edu>2016-02-24 05:09:42 +0000
commitec691a9e20effe7998c02b21d592059b8da00488 (patch)
tree94f7ffb63859af5a9f9b61e7d5a3dc85a4c0aa30 /ui/qt/module_preferences_scroll_area.cpp
parent8d256d26d3fda27d521e4edffd6713c0dfcc1c66 (diff)
downloadwireshark-ec691a9e20effe7998c02b21d592059b8da00488.tar.gz
De-canonicalize paths for file and directory path preferences.
Undo Qt's "helpful" canonicalization of paths returned by the file dialogs to use / as the pathname component separator rather than using the native pathname component separator. Bug: 12117 Change-Id: I6077191a2204574ca50f53b5424f7f421db33db3 Reviewed-on: https://code.wireshark.org/review/14109 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'ui/qt/module_preferences_scroll_area.cpp')
-rw-r--r--ui/qt/module_preferences_scroll_area.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/qt/module_preferences_scroll_area.cpp b/ui/qt/module_preferences_scroll_area.cpp
index c9ac847f07..4aaa3b21f2 100644
--- a/ui/qt/module_preferences_scroll_area.cpp
+++ b/ui/qt/module_preferences_scroll_area.cpp
@@ -502,7 +502,7 @@ void ModulePreferencesScrollArea::filenamePushButtonPressed()
if (!filename.isEmpty()) {
g_free((void *)pref->stashed_val.string);
- pref->stashed_val.string = qstring_strdup(filename);
+ pref->stashed_val.string = qstring_strdup(QDir::toNativeSeparators(filename));
updateWidgets();
}
}
@@ -520,7 +520,7 @@ void ModulePreferencesScrollArea::dirnamePushButtonPressed()
if (!dirname.isEmpty()) {
g_free((void *)pref->stashed_val.string);
- pref->stashed_val.string = qstring_strdup(dirname);
+ pref->stashed_val.string = qstring_strdup(QDir::toNativeSeparators(dirname));
updateWidgets();
}
}