forked from osmocom/wireshark
Qt: Clear open files list when clear recent menu
Remove all recent files from the main welcome page when clearing recent files from the menu. Change-Id: Ic410a729e63d82ee58b6bbb31f7e4a658b17d794 Reviewed-on: https://code.wireshark.org/review/17456 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
This commit is contained in:
parent
2cac0473be
commit
fb7a60e611
|
@ -360,6 +360,13 @@ void MainWelcome::updateRecentFiles() {
|
|||
selectedFilename = rfItem->data(Qt::UserRole).toString();
|
||||
}
|
||||
|
||||
if (wsApp->recentItems().count() == 0) {
|
||||
// Recent menu has been cleared, remove all recent files.
|
||||
while (recent_files_->count()) {
|
||||
delete recent_files_->item(0);
|
||||
}
|
||||
}
|
||||
|
||||
int rfRow = 0;
|
||||
foreach (recent_item_status *ri, wsApp->recentItems()) {
|
||||
itemLabel = ri->filename;
|
||||
|
|
Loading…
Reference in New Issue