@@ -232,29 +232,25 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WindowFlags fl ) :
232232 }
233233
234234 // local directories to search when looking for an SVG with a given basename
235- myPaths = mSettings -> value ( " svg/searchPathsForSVG " , QDir::homePath () ). toString ();
236- if ( !myPaths .isEmpty () )
235+ QStringList svgPaths = QgsApplication::svgPaths ();
236+ if ( !svgPaths .isEmpty () )
237237 {
238- QStringList myPathList = myPaths.split ( ' |' );
239- QStringList::const_iterator pathIt = myPathList.constBegin ();
240- for ( ; pathIt != myPathList.constEnd (); ++pathIt )
238+ Q_FOREACH ( const QString& path, svgPaths )
241239 {
242240 QListWidgetItem* newItem = new QListWidgetItem ( mListSVGPaths );
243- newItem->setText ( *pathIt );
241+ newItem->setText ( path );
244242 newItem->setFlags ( Qt::ItemIsEditable | Qt::ItemIsEnabled | Qt::ItemIsSelectable );
245243 mListSVGPaths ->addItem ( newItem );
246244 }
247245 }
248246
249- myPaths = mSettings -> value ( " composer/searchPathsForTemplates " , " " ). toString ();
250- if ( !myPaths .isEmpty () )
247+ QStringList templatePaths = QgsApplication::composerTemplatePaths ();
248+ if ( !templatePaths .isEmpty () )
251249 {
252- QStringList myPathList = myPaths.split ( ' |' );
253- QStringList::const_iterator pathIt = myPathList.constBegin ();
254- for ( ; pathIt != myPathList.constEnd (); ++pathIt )
250+ Q_FOREACH ( const QString& path, templatePaths )
255251 {
256252 QListWidgetItem* newItem = new QListWidgetItem ( mListComposerTemplatePaths );
257- newItem->setText ( *pathIt );
253+ newItem->setText ( path );
258254 newItem->setFlags ( Qt::ItemIsEditable | Qt::ItemIsEnabled | Qt::ItemIsSelectable );
259255 mListComposerTemplatePaths ->addItem ( newItem );
260256 }
0 commit comments