Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Migrate old recent projects list
  • Loading branch information
m-kuhn committed Aug 19, 2015
1 parent 881d836 commit 0b2b3ff
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion src/app/qgisapp.cpp
Expand Up @@ -1138,10 +1138,25 @@ void QgisApp::readSettings()
// 'gis' theme is new /themes/default directory (2013-04-15)
setTheme( settings.value( "/Themes", "default" ).toString() );

// Read legacy settings
mRecentProjects.clear();

QStringList oldRecentProjects = settings.value( "/UI/recentProjectsList" ).toStringList();
settings.remove( "/UI/recentProjectsList" );

This comment has been minimized.

Copy link
@slarosa

slarosa Aug 31, 2015

Member

@m-kuhn this seems annoying as it deletes all the recent projects for QGIS versions <= 2.8.x when running on the same machine both development and stable version.


Q_FOREACH ( const QString& project, oldRecentProjects )
{
QgsWelcomePageItemsModel::RecentProjectData data;
data.path = project;
data.title = project;

mRecentProjects.prepend( data );
}

settings.beginGroup( "/UI/recentProjects" );
QStringList projectKeys = settings.childGroups();

mRecentProjects.clear();


Q_FOREACH( const QString& key, projectKeys )
{
Expand Down

0 comments on commit 0b2b3ff

Please sign in to comment.