From 47adf72f4e61f2b5b7d35ab1cc5fc5cd81edbfd0 Mon Sep 17 00:00:00 2001 From: Tomasz Iwanek Date: Wed, 16 Jan 2013 15:38:05 +0100 Subject: [PATCH] Fixing saving locale for each icon [Issue#] TDIS-1870 / LINUXWRT-24 [Bug] Icons are not proceeded correctly [Cause] N/A [Solution] N/A [Verification] Build repository and run tests for icons: wrt-tests-w3c --output=text --regexp='ta_iipTwNshRg' wrt-tests-w3c --output=text --regexp='ta_roCaKRxZhS' wrt-tests-w3c --output=text --regexp='ta_iuJHnskSHq' wrt-tests-w3c --output=text --regexp='ta_FAFYMEGELU' See no regression is precentage of tests that passed Change-Id: Iad468faeaefe315bedf25824b3f98e0d7c704a13 --- modules/widget_dao/dao/widget_dao.cpp | 20 +------------------ .../widget_dao/dao/widget_dao_read_only.cpp | 1 + 2 files changed, 2 insertions(+), 19 deletions(-) diff --git a/modules/widget_dao/dao/widget_dao.cpp b/modules/widget_dao/dao/widget_dao.cpp index 1c73f94..bd421dd 100644 --- a/modules/widget_dao/dao/widget_dao.cpp +++ b/modules/widget_dao/dao/widget_dao.cpp @@ -530,25 +530,7 @@ void WidgetDAO::registerWidgetIcons(DbWidgetHandle widgetHandle, row.Set_app_id(widgetHandle); row.Set_icon_id(icon_id); row.Set_widget_locale(*j); - WRT_DB_SELECT(select, WidgetLocalizedIcon, &WrtDatabase::interface()) - select->Where(And(Equals(widgetHandle), - Equals(*j))); - WidgetLocalizedIcon::Select::RowList rows = select->GetRowList(); - - bool flag = !rows.empty(); - - if(flag == true) - { - // already default icon value of same locale exists - WRT_DB_UPDATE(update, WidgetLocalizedIcon, &WrtDatabase::interface()) - update->Where(And(Equals(widgetHandle), - Equals(*j))); - update->Values(row); - update->Execute(); - }else{ - // any icon value of same locale doesn't exist - DO_INSERT(row, WidgetLocalizedIcon) - } + DO_INSERT(row, WidgetLocalizedIcon) } } } diff --git a/modules/widget_dao/dao/widget_dao_read_only.cpp b/modules/widget_dao/dao/widget_dao_read_only.cpp index 7adaf41..e5a528a 100644 --- a/modules/widget_dao/dao/widget_dao_read_only.cpp +++ b/modules/widget_dao/dao/widget_dao_read_only.cpp @@ -719,6 +719,7 @@ WidgetDAOReadOnly::WidgetIconList WidgetDAOReadOnly::getIconList() const { WRT_DB_SELECT(select, wrt::WidgetIcon, &WrtDatabase::interface()) select->Where(Equals(m_widgetHandle)); + select->OrderBy(DPL::TypeListDecl >()); std::list list = select->GetRowList(); -- 2.34.1