TizenRefApp-9780 [Gallery] Crash when deleting second image in Gallery 16/159916/1 tizen_dev
authorIgor Nazarov <i.nazarov@samsung.com>
Mon, 13 Nov 2017 16:44:42 +0000 (18:44 +0200)
committerIgor Nazarov <i.nazarov@samsung.com>
Mon, 13 Nov 2017 16:44:42 +0000 (18:44 +0200)
Change-Id: I9879dbf9ce8c3c92d6d3b71bd87d432dbbff2948

gallery/presenters/Instance.cpp
gallery/view/helpers.cpp
gallery/view/helpers.h

index c21de0273ed24b01c9ca5e23fef6bedec6727a50..78d7295f4cf386230f4adc2c6deec1f9777309de 100644 (file)
@@ -81,7 +81,7 @@ namespace gallery {
 
                m_win->getConformant().setContent(*m_navi);
 
-               FAIL_RETURN(util::createCircleSurface(*m_navi),
+               FAIL_RETURN(util::createCircleSurface(*m_win),
                                "util::createCircleSurface() failed!");
 
                m_sysEventProvider.addEventHandler(WEAK_DELEGATE_THIS(onSysEvent));
index 29f336df68e786e3ce08ae1aaae68d5ae864b79b..75daa827a7d6fa628c91ed01e34cc58131e0b1c1 100644 (file)
@@ -21,9 +21,6 @@
 #include <system_settings.h>
 #include <utils_i18n_ulocale.h>
 
-#include "ucl/gui/Window.h"
-#include "ucl/gui/Layout.h"
-
 #include "common.h"
 
 namespace gallery { namespace { namespace impl {
@@ -33,28 +30,23 @@ namespace gallery { namespace { namespace impl {
 
 namespace gallery { namespace util {
 
-       using ucl::Layout;
-       using ucl::Naviframe;
+       using ucl::Window;
 
-       Result createCircleSurface(Naviframe &navi)
+       Result createCircleSurface(Window &win)
        {
-               const auto win = navi.getWindow();
-               if (!win) {
-                       LOG_RETURN(RES_FAIL, "Failed to get Window from Naviframe!");
-               }
-
-               if (win->getData(impl::CIRCLE_SURFACE)) {
+               if (win.getData(impl::CIRCLE_SURFACE)) {
                        LOG_RETURN(RES_INVALID_OPERATION,
                                        "Circle Surface data already set!");
                }
 
-               const auto sfc = eext_circle_surface_naviframe_add(as_eo(navi));
+               const auto sfc = eext_circle_surface_conformant_add(
+                               as_eo(win.getConformant()));
                if (!sfc) {
                        LOG_RETURN(RES_FAIL,
                                        "eext_circle_surface_conformant_add() failed!");
                }
 
-               win->setData(impl::CIRCLE_SURFACE, sfc);
+               win.setData(impl::CIRCLE_SURFACE, sfc);
 
                return RES_OK;
        }
index 3c3eb7d3ad2c15a47630739b75d1ede5c7c4eee4..a709f2fcd5315bc6aaf85f2af8cbd8c405d747c6 100644 (file)
 #ifndef __GALLERY_VIEW_HELPERS_H__
 #define __GALLERY_VIEW_HELPERS_H__
 
-#include "ucl/gui/Naviframe.h"
+#include "ucl/gui/Window.h"
 
 #include "types.h"
 
 namespace gallery { namespace util {
 
        /**
-        * @brief Creates circle surface
-        * @param[in] navi Naviframe object. @see ucl::Naviframe
+        * @brief Creates conformant circle surface
+        * @param[in] win Window object. @see ucl::Window
         * @return RES_OK on success, otherwise an error code on failure
         */
-       ucl::Result createCircleSurface(ucl::Naviframe &navi);
+       ucl::Result createCircleSurface(ucl::Window &win);
 
        /**
-        * @brief Gets circle surface
+        * @brief Gets conformant circle surface
         * @param[in] widget ElmWidget object. @see ucl::ElmWidget
         * @return Pointer to circle surface
         */
        Eext_Circle_Surface *getCircleSurface(const ucl::ElmWidget &widget);
 
+       /**
+        * @brief Updates Elementary widgets language
+        */
        void updateElmLanguage();
 }}