Skip to content

[FIX] File, Load Model, Distance File: do not leak recent files into a saved workflow - #7228

Merged
VesnaT merged 5 commits into
biolab:masterfrom
janezd:recent-files-qsettings
Oct 23, 2026
Merged

VesnaT merged 5 commits into
biolab:masterfrom
janezd:recent-files-qsettings

Conversation

@janezd

@janezd janezd commented Dec 30, 2025 •

Copy link
Copy Markdown
Contributor
Issue

Resolves #4919. Requires biolab/orange-widget-base#291 to be merged and released.

Also fixes a bug in Load Model and Distance File: Combo box was not updated after loading a file by calling self.set_file_list() after (successfully) opening a file.

Description of changes

We decided against using schema-only settings because you would lose your own, personal history of recent files. Plus, you could still leave unwanted files in the workflow.

Includes
  • Code changes
  • Tests
  • Documentation

@janezd janezd added the needs discussion Core developers need to discuss the issue label Jan 9, 2026
@janezd janezd removed the needs discussion Core developers need to discuss the issue label Mar 27, 2026
@markotoplak markotoplak changed the title File: Store recent files in QSettings [FIX] File: do not leak recent files into a saved workflow Jul 31, 2026
@janezd
janezd force-pushed the recent-files-qsettings branch 2 times, most recently from fea41a1 to 57e7916 Compare September 17, 2026 19:05
@janezd janezd changed the title [FIX] File: do not leak recent files into a saved workflow [FIX] File, Load Mode, Distance File: do not leak recent files into a saved workflow Sep 17, 2026
@janezd janezd changed the title [FIX] File, Load Mode, Distance File: do not leak recent files into a saved workflow [FIX] File, Load Model, Distance File: do not leak recent files into a saved workflow Sep 17, 2026
@janezd
janezd marked this pull request as ready for review September 18, 2026 12:15
@janezd janezd added this to the 3.41 milestone Sep 25, 2026
@markotoplak

Copy link
Copy Markdown
Member

orange-widget-base with biolab/orange-widget-base/pull/291 is now released

@janezd
janezd force-pushed the recent-files-qsettings branch 2 times, most recently from f291481 to a78d387 Compare October 3, 2026 17:04
@janezd
janezd force-pushed the recent-files-qsettings branch from a78d387 to d9e8810 Compare October 3, 2026 18:59
@codecov

codecov Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 84.44444% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.98%. Comparing base (4d54417) to head (8e60180).
⚠️ Report is 13 commits behind head on master.

❌ Your patch check has failed because the patch coverage (84.44%) is below the target coverage (95.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7228      +/-   ##
==========================================
- Coverage   88.99%   88.98%   -0.01%     
==========================================
  Files         337      337              
  Lines       74598    74633      +35     
==========================================
+ Hits        66387    66412      +25     
- Misses       8211     8221      +10     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread tox.ini
# GUI requirements
oldest: orange-canvas-core==0.2.9
oldest: orange-widget-base==4.25.0
oldest: orange-widget-base==4.28.0

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

requirements-gui.txt and conda-recipe/meta.yaml should also be updated

self.open_file()

@classmethod
def migrate_settings(cls, settings, version):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be implemented on the mixin.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I realized this, too, but it was too late: the mixin is in orange-widget-base, which was just released. I opened a PR there and made sure we'll change this in the future (biolab/orange-widget-base#299).

@VesnaT VesnaT left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Drop handlers still return recent_paths. This only works because the settings pass through migration.

@janezd
janezd force-pushed the recent-files-qsettings branch from 47d9957 to eba6037 Compare October 17, 2026 10:36
@janezd

janezd commented Oct 17, 2026

Copy link
Copy Markdown
Contributor Author

This only works because the settings pass through migration.

... which incidentally did exactly the right thing. :) I implemented a more explicit route, though. :)

@janezd
janezd force-pushed the recent-files-qsettings branch from eba6037 to d3beb46 Compare October 17, 2026 10:40
@janezd
janezd force-pushed the recent-files-qsettings branch from d3beb46 to 8e60180 Compare October 17, 2026 11:25
@VesnaT
VesnaT merged commit cfd6332 into biolab:master Oct 23, 2026
28 of 30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Store recent paths in QSettings, not .ows

3 participants