[yast-commit] r57843 - /trunk/control-center/src/yqmodulesmodel.cpp
Author: kmachalkova Date: Thu Jul 2 13:10:14 2009 New Revision: 57843 URL: http://svn.opensuse.org/viewcvs/yast?rev=57843&view=rev Log: Use module group's icon as a fallback for module Modified: trunk/control-center/src/yqmodulesmodel.cpp Modified: trunk/control-center/src/yqmodulesmodel.cpp URL: http://svn.opensuse.org/viewcvs/yast/trunk/control-center/src/yqmodulesmodel.cpp?rev=57843&r1=57842&r2=57843&view=diff ============================================================================== --- trunk/control-center/src/yqmodulesmodel.cpp (original) +++ trunk/control-center/src/yqmodulesmodel.cpp Thu Jul 2 13:10:14 2009 @@ -161,6 +161,17 @@ QString tooltip = translatedPropertyValue(index, "GenericName").toString(); return tooltip; } + else if ( role == Qt::DecorationRole ) + { + QVariant icon = YQDesktopFilesModel::data( index, role ); + + if ( icon.isValid() ) + return icon; + else + { + return groupsModel()->data( groupForModule( index ), role ); + } + } else // otherwise just use the parent class { 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