[Gallery] ucl::RES_ILLEGAL_STATE replaced with ucl::RES_INVALID_OPERATION 64/145764/1
authorIgor Nazarov <i.nazarov@samsung.com>
Wed, 23 Aug 2017 14:53:11 +0000 (17:53 +0300)
committerIgor Nazarov <i.nazarov@samsung.com>
Wed, 23 Aug 2017 14:53:11 +0000 (17:53 +0300)
Change-Id: I26bcf0abff036e2a7fb9663973dbbc41020c94a0

gallery/common.h
gallery/model/impl/BaseJob.cpp
gallery/presenters/misc/ProcessingPresenter.cpp
gallery/presenters/pages/PreviewPage.cpp
gallery/view/ImageGrid.cpp
gallery/view/helpers.cpp
ucl/include/ucl/util/types/Result.h
ucl/source/mvp/ListItemPresenter.cpp
ucl/source/util/types/Result.cpp

index 659c330d9d74a7c756042ede12bb688146ac410a..211eb7ced2a374178f5e94ee837edf98ced77d1b 100644 (file)
@@ -37,7 +37,7 @@ namespace gallery {
        using ucl::RES_FALSE;
        using ucl::RES_FAIL;
        using ucl::RES_INVALID_ARGUMENTS;
-       using ucl::RES_ILLEGAL_STATE;
+       using ucl::RES_INVALID_OPERATION;
        using ucl::RES_NOT_SUPPORTED;
        using ucl::RES_IO_ERROR;
        using ucl::RES_INVALID_DATA;
index 1a358fbc70a2ed904c3b80acfcaeeb4a87c592b1..c5c5543c64a4800c9f4cd6b1aa324d088db6eee1 100644 (file)
@@ -26,7 +26,7 @@ namespace gallery {
                        const bool isCancelable) :
                m_onComplete(onComplete),
                m_isCancelable(isCancelable),
-               m_result(RES_ILLEGAL_STATE),
+               m_result(RES_INVALID_OPERATION),
                m_selfPtr(new BaseJob *(this)),
                m_isCancelled(0)
        {
@@ -54,7 +54,7 @@ namespace gallery {
        Result BaseJob::getResult() const
        {
                if (!m_thread.wasJoinded()) {
-                       LOG_RETURN(RES_ILLEGAL_STATE, "Job is not complete!");
+                       LOG_RETURN(RES_INVALID_OPERATION, "Job is not complete!");
                }
                return m_result;
        }
index 6307961353f5d0ee43f82cdbe45151e0382cf69e..4a077e09c8514588cd8aee34ab43354d2548d7ec 100644 (file)
@@ -341,7 +341,8 @@ namespace gallery {
                        const IconType iconType)
        {
                if (m_isComplete) {
-                       LOG_RETURN_VOID(RES_ILLEGAL_STATE, "Already in complete state!");
+                       LOG_RETURN_VOID(RES_INVALID_OPERATION,
+                                       "Already in complete state!");
                }
                m_isComplete = true;
 
index 0406e13bba64eac0d93544812cd0551078f3ed66..75b2d83969235bb3115efd47e64876a8deb16ae5 100644 (file)
@@ -615,7 +615,7 @@ namespace gallery {
        void PreviewPage::saveCurrentItem()
        {
                if (m_job) {
-                       LOG_RETURN_VOID(RES_ILLEGAL_STATE, "m_job is not NULL");
+                       LOG_RETURN_VOID(RES_INVALID_OPERATION, "m_job is not NULL");
                }
 
                const int itemIndex = getCurrentItemIndex();
index 942ff973fca8df39ab4c3c5f7c378a9913f31383..f72f8d4fc45dcee352b5a2c15ff617384a40d578 100644 (file)
@@ -563,7 +563,8 @@ namespace gallery {
                        void onHighlighted(Widget &widget, void *eventInfo)
                        {
                                if (!isRealized()) {
-                                       LOG_RETURN_VOID(RES_ILLEGAL_STATE, "Item is not realized!");
+                                       LOG_RETURN_VOID(RES_INVALID_OPERATION,
+                                                       "Item is not realized!");
                                }
                                m_imageGrid.onItemHighlighted(m_realizeIndex);
                        }
@@ -571,7 +572,8 @@ namespace gallery {
                        void onUnhighlighted(Widget &widget, void *eventInfo)
                        {
                                if (!isRealized()) {
-                                       LOG_RETURN_VOID(RES_ILLEGAL_STATE, "Item is not realized!");
+                                       LOG_RETURN_VOID(RES_INVALID_OPERATION,
+                                                       "Item is not realized!");
                                }
                                m_imageGrid.onItemUnhighlighted(m_realizeIndex);
                        }
@@ -580,7 +582,7 @@ namespace gallery {
                                        Evas_Object *obj)
                        {
                                if (!isRealized()) {
-                                       LOG_RETURN_VALUE(RES_ILLEGAL_STATE, EINA_FALSE,
+                                       LOG_RETURN_VALUE(RES_INVALID_OPERATION, EINA_FALSE,
                                                        "Item is not realized!");
                                }
 
@@ -920,7 +922,7 @@ namespace gallery {
        Result ImageGrid::setItemCount(const int count)
        {
                if (m_animator) {
-                       LOG_RETURN(RES_ILLEGAL_STATE, "Transition is in progress.");
+                       LOG_RETURN(RES_INVALID_OPERATION, "Transition is in progress.");
                }
 
                if (m_itemCount == count) {
@@ -951,7 +953,7 @@ namespace gallery {
        Result ImageGrid::setSelectModeEnabled(const bool enabled)
        {
                if (m_animator) {
-                       LOG_RETURN(RES_ILLEGAL_STATE, "Transition is in progress.");
+                       LOG_RETURN(RES_INVALID_OPERATION, "Transition is in progress.");
                }
 
                if (enabled == m_isInSelectMode) {
@@ -1092,7 +1094,7 @@ namespace gallery {
        Result ImageGrid::updateItem(const int itemIndex, const ItemParams &params)
        {
                if (m_animator) {
-                       LOG_RETURN(RES_ILLEGAL_STATE, "Transition is in progress.");
+                       LOG_RETURN(RES_INVALID_OPERATION, "Transition is in progress.");
                }
                return doWithItem(itemIndex,
                        [&params](Slot &slot, const int itemOffset)
@@ -1168,7 +1170,7 @@ namespace gallery {
        Result ImageGrid::scrollToItem(const int itemIndex)
        {
                if (m_animator) {
-                       LOG_RETURN(RES_ILLEGAL_STATE, "Transition is in progress.");
+                       LOG_RETURN(RES_INVALID_OPERATION, "Transition is in progress.");
                }
                forceBoxSizeCalculate();
                return showItem(itemIndex, elm_scroller_region_show);
@@ -1177,7 +1179,7 @@ namespace gallery {
        Result ImageGrid::bringInItem(int itemIndex)
        {
                if (m_animator) {
-                       LOG_RETURN(RES_ILLEGAL_STATE, "Transition is in progress.");
+                       LOG_RETURN(RES_INVALID_OPERATION, "Transition is in progress.");
                }
                return showItem(itemIndex, elm_scroller_region_bring_in);
        }
index 6388200b08c9e50ed716c7745da41f9ed6d4d442..52d5e2341fc9efbd7e1cfa3ac30b120d0c4a8172 100644 (file)
@@ -44,7 +44,8 @@ namespace gallery { namespace util {
                }
 
                if (win->getData(impl::CIRCLE_SURFACE)) {
-                       LOG_RETURN(RES_ILLEGAL_STATE, "Circle Surface data already set!");
+                       LOG_RETURN(RES_INVALID_OPERATION,
+                                       "Circle Surface data already set!");
                }
 
                const auto sfc = eext_circle_surface_naviframe_add(navi);
index 099223f6bb4a3ea86223f3bfe76b0c933b6f2e70..93bbdce8329ec287e430d46b4f182a3611d6f2b0 100644 (file)
@@ -60,7 +60,7 @@ namespace ucl {
 
                RES_FAIL              = -1,
                RES_INVALID_ARGUMENTS = -2,
-               RES_ILLEGAL_STATE     = -3,
+               RES_INVALID_OPERATION = -3,
                RES_OUT_OF_MEMORY     = -4,
                RES_IO_ERROR          = -5,
                RES_NOT_SUPPORTED     = -6,
index d27568b63a72a97b09ecbf3fb107390fe025ca13..2d321599d0ef013ec6d8cfea2763ca3c351fe2bb 100644 (file)
@@ -211,7 +211,7 @@ namespace ucl {
        Result ListItemPresenter::updateItemStyle(const ElmStyle newItemStyle)
        {
                if (!m_item) {
-                       LOG_RETURN(RES_ILLEGAL_STATE, "m_item is NULL!");
+                       LOG_RETURN(RES_INVALID_OPERATION, "m_item is NULL!");
                }
                if (!m_itcCache) {
                        LOG_RETURN(RES_FATAL, "m_itcCache is NULL!");
index b42875ed58ed7e65e93b21a30cf17abe47cf4387..9ba6c17dc6ed2085b32e063f280400ebc9bf8d5d 100644 (file)
@@ -26,7 +26,7 @@ namespace ucl { namespace { namespace impl {
                {"RES_NOT_SUPPORTED",     DLOG_ERROR},
                {"RES_IO_ERROR",          DLOG_ERROR},
                {"RES_OUT_OF_MEMORY",     DLOG_ERROR},
-               {"RES_ILLEGAL_STATE",     DLOG_ERROR},
+               {"RES_INVALID_OPERATION", DLOG_ERROR},
                {"RES_INVALID_ARGUMENTS", DLOG_ERROR},
                {"RES_FAIL",              DLOG_ERROR},
                {"RES_OK",                DLOG_INFO},