From cde2d3b03acd25b49d4d1606877bdec051f9f638 Mon Sep 17 00:00:00 2001 From: zheng_wenlong Date: Wed, 13 Dec 2017 17:32:05 +0900 Subject: Display a blank icon with first letter when icon is not exist Add a new feature, when icon is not exist in homescreen, display a blank icon with first letter. Bug-AGL: SPEC-673 Change-Id: I928537bd61f655107393890166260b7446a16a97 Signed-off-by: zheng_wenlong (cherry picked from commit 242e1fcf1e76dc8ad94c0391649fd3ab84e64803) --- homescreen/src/applicationmodel.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'homescreen/src') diff --git a/homescreen/src/applicationmodel.cpp b/homescreen/src/applicationmodel.cpp index f01df06..8837ba9 100644 --- a/homescreen/src/applicationmodel.cpp +++ b/homescreen/src/applicationmodel.cpp @@ -48,6 +48,12 @@ namespace { } else { icon[0] = icon[0].toUpper(); } + + if ( !QFile::exists(QString(":/images/HMI_AppLauncher_%1_Active-01.png").arg(icon)) || + !QFile::exists(QString(":/images/HMI_AppLauncher_%1_Inactive-01.png").arg(icon)) ) + { + icon = "Blank"; + } return icon; } } -- cgit 1.2.3-korg