forked from osmocom/wireshark
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>
This commit is contained in:
parent
8d256d26d3
commit
ec691a9e20
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -627,7 +627,7 @@ void PreferencesDialog::on_advancedTree_itemActivated(QTreeWidgetItem *item, int
|
|||
}
|
||||
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));
|
||||
updateItem(*item);
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue