aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/firewall_rules_dialog.cpp
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2021-06-07 14:22:20 +0200
committerWireshark GitLab Utility <gerald+gitlab-utility@wireshark.org>2021-06-07 13:52:59 +0000
commit44a615e854e1e8281cf7d88dcb435fbbaba9e2ab (patch)
treea23a37b5dd71359a1bdf71619f493bc2986379bb /ui/qt/firewall_rules_dialog.cpp
parent8c79fa5e1b9890668444e374b6df9e63b80a133c (diff)
Qt: Give a directory to wsApp->setLastOpenDir()
Use wsApp->setLastOpenDirFromFilename() to convert a filename to a directory name before calling wsApp->setLastOpenDir(). This will ensure to always store a directory instead of a filename in the recent gui.fileopen_remembered_dir.
Diffstat (limited to 'ui/qt/firewall_rules_dialog.cpp')
-rw-r--r--ui/qt/firewall_rules_dialog.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/ui/qt/firewall_rules_dialog.cpp b/ui/qt/firewall_rules_dialog.cpp
index befbb98d32..615a14a65a 100644
--- a/ui/qt/firewall_rules_dialog.cpp
+++ b/ui/qt/firewall_rules_dialog.cpp
@@ -189,7 +189,7 @@ void FirewallRulesDialog::on_buttonBox_clicked(QAbstractButton *button)
}
/* Save the directory name for future file dialogs. */
- wsApp->setLastOpenDir(file_name.constData());
+ wsApp->setLastOpenDirFromFilename(file_name);
}
} else if (button == ui->buttonBox->button(QDialogButtonBox::Apply)) {
if (ui->textBrowser->textCursor().hasSelection()) {