From 510029c1d1974d3e0d417e87da30261357fec510 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Wed, 17 Oct 2018 11:04:01 +0300 Subject: Clean up StudioUtils Made StudioUtils a class of static functions instead of global functions. Also cleaned up the code a bit where changes happened because of this change. Change-Id: Ic583dd25bf228c7e344be6664b6651958d84906e Reviewed-by: Mahmoud Badri Reviewed-by: Janne Kangas Reviewed-by: Miikka Heikkinen --- src/Authoring/Studio/Palettes/Inspector/ChooserModelBase.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/Authoring/Studio/Palettes/Inspector/ChooserModelBase.cpp') diff --git a/src/Authoring/Studio/Palettes/Inspector/ChooserModelBase.cpp b/src/Authoring/Studio/Palettes/Inspector/ChooserModelBase.cpp index 1457a3c1..3f5583ea 100644 --- a/src/Authoring/Studio/Palettes/Inspector/ChooserModelBase.cpp +++ b/src/Authoring/Studio/Palettes/Inspector/ChooserModelBase.cpp @@ -83,10 +83,12 @@ QVariant ChooserModelBase::data(const QModelIndex &index, int role) const switch (role) { case Qt::DecorationRole: - if (!item.iconSource.isEmpty()) - return resourceImageUrl() + item.iconSource; - else - return resourceImageUrl() + CStudioObjectTypes::GetNormalIconName(item.iconType); + if (!item.iconSource.isEmpty()) { + return StudioUtils::resourceImageUrl() + item.iconSource; + } else { + return StudioUtils::resourceImageUrl() + + CStudioObjectTypes::GetNormalIconName(item.iconType); + } case IsExpandableRole: return false; @@ -112,7 +114,7 @@ QVariant ChooserModelBase::data(const QModelIndex &index, int role) const switch (role) { case Qt::DecorationRole: { QString path = item.index.data(QFileSystemModel::FilePathRole).toString(); - return resourceImageUrl() + getIconName(path); + return StudioUtils::resourceImageUrl() + getIconName(path); } case IsExpandableRole: { -- cgit v1.2.3