[yast-commit] r57842 - /trunk/control-center/src/yqmodulegroupsmodel.cpp
Author: kmachalkova Date: Thu Jul 2 12:55:02 2009 New Revision: 57842 URL: http://svn.opensuse.org/viewcvs/yast?rev=57842&view=rev Log: Use fallback icon for groups Modified: trunk/control-center/src/yqmodulegroupsmodel.cpp Modified: trunk/control-center/src/yqmodulegroupsmodel.cpp URL: http://svn.opensuse.org/viewcvs/yast/trunk/control-center/src/yqmodulegroupsmodel.cpp?rev=57842&r1=57841&r2=57842&view=diff ============================================================================== --- trunk/control-center/src/yqmodulegroupsmodel.cpp (original) +++ trunk/control-center/src/yqmodulegroupsmodel.cpp Thu Jul 2 12:55:02 2009 @@ -139,6 +139,18 @@ else return QVariant(); } + else if ( role == Qt::DecorationRole ) + { + QVariant icon = YQDesktopFilesModel::data( index, role ); + QString fallback_icon = "yast-default-group"; + + if ( icon.isValid() ) + return icon; + else + { + return findIcon( fallback_icon ); + } + } else return YQDesktopFilesModel::data(index, role); } -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
kmachalkova@svn.opensuse.org