Skip to content

Commit 651a223

Browse files
committedAug 19, 2015
Clean old recent images
1 parent 0b2b3ff commit 651a223

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎src/app/qgisapp.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2777,9 +2777,10 @@ void QgisApp::saveRecentProjectPath( QString projectPath, bool savePreviewImage
27772777
mRecentProjects.prepend( projectData );
27782778

27792779
// Keep the list to 8 items by trimming excess off the bottom
2780+
// And remove the associated image
27802781
while ( mRecentProjects.count() > 8 )
27812782
{
2782-
mRecentProjects.pop_back();
2783+
QFile( mRecentProjects.takeLast().previewImagePath ).remove();
27832784
}
27842785

27852786
settings.remove( "/UI/recentProjects" );

0 commit comments

Comments
 (0)
Please sign in to comment.