@@ -91,32 +91,12 @@ QIcon QgsDataCollectionItem::iconDataCollection()
91
91
92
92
QIcon QgsDataCollectionItem::openDirIcon ()
93
93
{
94
- static QIcon sIcon ;
95
-
96
- if ( sIcon .isNull () )
97
- {
98
- // initialize shared icons
99
- QStyle *style = QApplication::style ();
100
- sIcon = QIcon ( style->standardIcon ( QStyle::SP_DirOpenIcon ) );
101
- }
102
-
103
- return sIcon ;
94
+ return QgsApplication::getThemeIcon ( QStringLiteral ( " /mIconFolderOpen.svg" ) );
104
95
}
105
96
106
97
QIcon QgsDataCollectionItem::iconDir ()
107
98
{
108
- static QIcon sIcon ;
109
-
110
- if ( sIcon .isNull () )
111
- {
112
- // initialize shared icons
113
- QStyle *style = QApplication::style ();
114
- sIcon = QIcon ( style->standardIcon ( QStyle::SP_DirClosedIcon ) );
115
- sIcon .addPixmap ( style->standardPixmap ( QStyle::SP_DirOpenIcon ),
116
- QIcon::Normal, QIcon::On );
117
- }
118
-
119
- return sIcon ;
99
+ return QgsApplication::getThemeIcon ( QStringLiteral ( " /mIconFolder.svg" ) );
120
100
}
121
101
122
102
QIcon QgsFavoritesItem::iconFavorites ()
@@ -981,7 +961,7 @@ QgsDirectoryParamWidget::QgsDirectoryParamWidget( const QString &path, QWidget *
981
961
setHeaderLabels ( labels );
982
962
983
963
QStyle *style = QApplication::style ();
984
- QIcon iconDirectory = QIcon ( style-> standardIcon ( QStyle::SP_DirClosedIcon ) );
964
+ QIcon iconDirectory = QgsApplication::getThemeIcon ( QStringLiteral ( " mIconFolderOpen.svg " ) );
985
965
QIcon iconFile = QIcon ( style->standardIcon ( QStyle::SP_FileIcon ) );
986
966
QIcon iconDirLink = QIcon ( style->standardIcon ( QStyle::SP_DirLinkIcon ) );
987
967
QIcon iconFileLink = QIcon ( style->standardIcon ( QStyle::SP_FileLinkIcon ) );
0 commit comments