Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some tweaks to the recent files list #2524

Merged
merged 1 commit into from
Feb 11, 2016

Conversation

zonkmachine
Copy link
Member

.mpt files was already sorted out from the list but any other file is go. Instead we ban any file that isn't either .mmp or .mmpz from entering the list.
I also increase the number of remembered files to 50 ( Only 20 is shown in the menu and the rest is to fill out the space left from deleted files or removed external drives ).

Edit: Example of stuff let through to the list. The numbers are command line arguments leaked through.

  <recentfiles>
    <file path="../build/openlast.patch"/>
    <file path="3000"/>
    <file path="70"/>
    <file path="/home/zonkmachine/lmms/recover.mmp"/>
    <file path="300"/>
    <file path="30"/>
  </recentfiles>

@zonkmachine zonkmachine changed the title Some tweaks to the recent files list [WIP] Some tweaks to the recent files list Jan 28, 2016
@zonkmachine zonkmachine changed the title [WIP] Some tweaks to the recent files list Some tweaks to the recent files list Jan 28, 2016
@zonkmachine
Copy link
Member Author

I'm cool with this solution. It works fine but I'm going to test it some more.

{
if( !_file.endsWith( ".mpt", Qt::CaseInsensitive ) )
QFileInfo recentFile( file );
if( recentFile.suffix() == "mmp" || recentFile.suffix() == "mmpz" )
Copy link
Member

Choose a reason for hiding this comment

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

Previous logic treated the suffix as case-insensitive. It may be a good idea to change this to

if( recentFile.suffix().toLower() == "mmp" || recentFile.suffix().toLower() == "mmpz" )

In order to match this behavior.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks, fixed!

@zonkmachine zonkmachine force-pushed the recentfilesonlyprojects branch from 5037e5c to 3bbe0e3 Compare February 11, 2016 02:13
@zonkmachine
Copy link
Member Author

Merging this. Thanks for the review!

zonkmachine added a commit that referenced this pull request Feb 11, 2016
@zonkmachine zonkmachine merged commit 1404668 into LMMS:master Feb 11, 2016
@zonkmachine zonkmachine deleted the recentfilesonlyprojects branch February 12, 2016 18:08
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.

2 participants