Skip to content
Permalink
Browse files

Migrate old recent projects list

  • Loading branch information
m-kuhn committed Aug 19, 2015
1 parent 881d836 commit 0b2b3ffc52046549400c5ba479415026f1ad65a2
Showing with 16 additions and 1 deletion.
  1. +16 −1 src/app/qgisapp.cpp
@@ -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 )
{

0 comments on commit 0b2b3ff

Please sign in to comment.
You can’t perform that action at this time.