c++: ++secure code. 34/78434/1
authorHermet Park <hermet@hermet.pe.kr>
Tue, 5 Jul 2016 12:03:04 +0000 (21:03 +0900)
committerHermet Park <hermet@hermet.pe.kr>
Tue, 5 Jul 2016 12:03:04 +0000 (21:03 +0900)
use override specifier for secure code.
This override may occur build break when parents base function won't be exist in virtual.

Change-Id: I1737742520586457ad6f6062c59abc7f5fbd3a5b

src/include/efl/UiBaseView.h
src/include/efl/UiBaseViewmgr.h
src/include/efl/mobile/UiKeyListener.h
src/include/efl/mobile/UiMenu.h
src/include/efl/mobile/UiPopup.h
src/include/efl/mobile/UiStandardView.h
src/include/efl/mobile/UiView.h
src/include/interface/UiIfaceView.h

index a268766d95c5c357630aac80555e5b3dbefb6b7d..e12444a19596faf5326388283f5a9e0267bc0dc4 100644 (file)
@@ -48,14 +48,14 @@ public:
         *
         *  @return A previous content. If it wasn't, return @c NULL.
         */
-       virtual bool setContent(Evas_Object *content);
+       virtual bool setContent(Evas_Object *content) override;
 
        /**
         *  @brief This is for unsetting a content of the view.
         *
         *  @return A previous content. If it wasn't, return @c NULL.
         */
-       virtual Evas_Object *unsetContent();
+       virtual Evas_Object *unsetContent() override;
 
        /**
         *  @brief Get a base object of ui_view.
@@ -71,14 +71,14 @@ public:
         *
         *  @param indicator The mode to set, one of #UiViewIndicator.
         */
-       virtual void setIndicator(UiViewIndicator indicator);
+       virtual void setIndicator(UiViewIndicator indicator) override;
 
        /**
         *  @brief Get current view's degree.
         *
         *  @return Current rotation degree, -1 if it fails to get degree information.
         */
-       virtual int getDegree();
+       virtual int getDegree() override;
 
 protected:
        /**
@@ -97,7 +97,7 @@ protected:
         *
         *  @param block @c true, when blocking is enabled, otherwise @c false.
         */
-       virtual void setEventBlock(bool block);
+       virtual void setEventBlock(bool block) override;
 
        /**
         *  @brief View rotate changed.
@@ -109,7 +109,7 @@ protected:
         *  @see onPortrait()
         *  @see onLandscpae()
         */
-       virtual void onRotate(int degree);
+       virtual void onRotate(int degree) override;
 
        /**
         *  @brief View portrait state.
@@ -119,7 +119,7 @@ protected:
         *  @see onLandscpae()
         *  @see onRotate()
         */
-       virtual void onPortrait();
+       virtual void onPortrait() override;
 
        /**
         *  @brief View landscape state.
@@ -129,7 +129,7 @@ protected:
         *  @see onPortrait()
         *  @see onRotate()
         */
-       virtual void onLandscape();
+       virtual void onLandscape() override;
 
 private:
        _UI_DECLARE_PRIVATE_IMPL(UiBaseView);
index 688bf8f864c5f72fa18866607fbac409f91efcbb..f9199439c181b9e95ab89f3395663570230c047e 100644 (file)
@@ -48,7 +48,7 @@ public:
         *
         *  @see deactivate()
         */
-       virtual bool activate();
+       virtual bool activate() override;
 
        /**
         *  @brief Deactivate this view manager.
@@ -60,7 +60,7 @@ public:
         *
         *  @see activate()
         */
-       virtual bool deactivate();
+       virtual bool deactivate() override;
 
        /**
         *  @brief Push a new view into this viewmgr. This function is used for when application switches a current view to a new one.
@@ -94,7 +94,7 @@ public:
         *  @see deactivate()
         *  @see pushView()
         */
-       virtual bool popView();
+       virtual bool popView() override;
 
        /**
         *  @brief Insert a view in this viewmgr view list. Specifically, insert a given @p view right before of the given view, @before.
index bff62893447214220241ee976a0a92c286d05d72..10264c89eccac8a6e93b0ce23171b2fd9b3f6751 100644 (file)
@@ -44,14 +44,14 @@ public:
         *
         *  @note Add menu key to target of key grabber.
         */
-       virtual bool init();
+       virtual bool init() override;
 
        /**
         *  @brief Check the menu key event occurs or not.
         *
         *  @note This is checking H/W key is menu or not.
         */
-       virtual void extendEventProc(UiBaseView *view, Evas_Event_Key_Down *ev);
+       virtual void extendEventProc(UiBaseView *view, Evas_Event_Key_Down *ev) override;
 
        //Don't generate by compiler.
        UiKeyListener() = delete;
index 0fd484a3aa6b8018a2c36bc942f09da7cc5ceb0f..2dc5a9dcf8acc7c29100ae440931e5310c289c8f 100644 (file)
@@ -45,7 +45,7 @@ public:
         *
         *  @see deactivate()
         */
-       virtual bool activate();
+       virtual bool activate() override;
 
        /**
         *  @brief menu deactivate.
@@ -56,7 +56,7 @@ public:
         *
         *  @see activate()
         */
-       virtual bool deactivate();
+       virtual bool deactivate() override;
 
        /**
         *  @brief This is for replacing or setting a content of the menu.
@@ -65,14 +65,14 @@ public:
         *
         *  @return @c true if it succeeds, @c false otherwise.
         */
-       virtual bool setContent(Elm_Ctxpopup* ctxpopup);
+       virtual bool setContent(Elm_Ctxpopup* ctxpopup) override;
 
        /**
         *  @brief This is for unsetting a content of the menu.
         *
         *  @return A previous content. If it wasn't, return value will be @c NULL.
         */
-       virtual Elm_Ctxpopup *unsetContent();
+       virtual Elm_Ctxpopup *unsetContent() override;
 
        /**
         *  @brief Return the active status of menu.
@@ -82,7 +82,7 @@ public:
         *  @see activate()
         *  @see deactivate()
         */
-       virtual bool isActivated();
+       virtual bool isActivated() override;
 
        /**
         *  @brief Get a base object of a UiMenu.
@@ -97,7 +97,7 @@ public:
         *
         *  @return Current rotation degree, -1 if it fails to get degree information.
         */
-       virtual int getDegree();
+       virtual int getDegree() override;
 
 protected:
        /**
index dd83573c642c954e54a34b84874e8c7511c13509..b3e28011cb3f0cb8adefb0ba1098662652ca58ac 100644 (file)
@@ -57,7 +57,7 @@ public:
         *
         *  @see deactivate()
         */
-       virtual bool activate();
+       virtual bool activate() override;
 
        /**
         *  @brief popup deactivate.
@@ -68,7 +68,7 @@ public:
         *
         *  @see activate()
         */
-       virtual bool deactivate();
+       virtual bool deactivate() override;
 
        /**
         *  @brief This is for replacing or setting a content of the popup.
@@ -77,14 +77,14 @@ public:
         *
         *  @return @c true if it succeeds, @c false otherwise.
         */
-       virtual bool setContent(Elm_Popup* popup);
+       virtual bool setContent(Elm_Popup* popup) override;
 
        /**
         *  @brief This is for unsetting a content of the popup.
         *
         *  @return A previous content. If it wasn't, return value will be @c NULL.
         */
-       virtual Elm_Popup *unsetContent();
+       virtual Elm_Popup *unsetContent() override;
 
        /**
         *  @brief Return the active status of popup.
@@ -94,7 +94,7 @@ public:
         *  @see activate()
         *  @see deactivate()
         */
-       virtual bool isActivated();
+       virtual bool isActivated() override;
 
        /**
         *  @brief Get a base object of an UiPopup.
@@ -110,7 +110,7 @@ public:
         *
         *  @return Current rotation degree, -1 if it fails to get degree information.
         */
-       virtual int getDegree();
+       virtual int getDegree() override;
 
 protected:
        /**
index 96381bf28e09993fc7bdb29822a61c70521912e0..59d3e199c20679017bc6f6719da99a1e9ab6c8a2 100644 (file)
@@ -138,7 +138,7 @@ public:
         *
         *  @return A previous content. If it wasn't, return @c NULL.
         */
-       Evas_Object *unsetContent();
+       Evas_Object *unsetContent() override;
 
        /**
         *  @brief Unset a title left button of title area.
@@ -187,7 +187,7 @@ public:
         *
         *  @return viewmgr's base layout object.
         */
-       virtual Evas_Object *getBase();
+       virtual Evas_Object *getBase() override;
 
 protected:
        /**
@@ -196,14 +196,14 @@ protected:
         *  @note this state will be triggered by UiIfaceViewmgr.
         *
         */
-       virtual void onLoad();
+       virtual void onLoad() override;
 
        /** @brief view unload state.
         *
         *  @note this state will be triggered by UiIfaceViewmgr.
         *
         */
-       virtual void onUnload();
+       virtual void onUnload() override;
 
        /** @brief toggle event block.
         *
@@ -212,7 +212,7 @@ protected:
         *
         *  @param block @c true, blocking enable, otherwise @c false.
         */
-       virtual void setEventBlock(bool block);
+       virtual void setEventBlock(bool block) override;
 
 private:
        _UI_DECLARE_PRIVATE_IMPL(UiStandardView);
index ff82bc4421879a468911cc7adc03830e701bc801..3f14e08e84ea2a6ac7e891b3a9cf6a60055b74a0 100644 (file)
@@ -98,7 +98,7 @@ protected:
         *  @see onPortrait()
         *  @see onLandscpae()
         */
-       virtual void onRotate(int degree);
+       virtual void onRotate(int degree) override;
 
        /**
         *  @brief View portrait state.
@@ -108,7 +108,7 @@ protected:
         *  @see onLandscpae()
         *  @see onRotate()
         */
-       virtual void onPortrait();
+       virtual void onPortrait() override;
 
        /**
         *  @brief View landscape state.
@@ -118,14 +118,14 @@ protected:
         *  @see onPortrait()
         *  @see onRotate()
         */
-       virtual void onLandscape();
+       virtual void onLandscape() override;
 
        /** @brief View deactivate state.
         *
         *  @note this state will be triggered by UiIfaceViewmgr.
         *
         */
-       virtual void onDeactivate();
+       virtual void onDeactivate() override;
 
 private:
        /**
index f1c642ed2f200dcebd89e1b2ec405cc100ac6e1d..5e21699cd3f33f646e220cd3d1c13f0dff069b00 100644 (file)
@@ -82,7 +82,7 @@ public:
         *
         *  @param indicator The mode to set, one of #UiViewIndicator.
         */
-       void setIndicator(UiViewIndicator indicator);
+       virtual void setIndicator(UiViewIndicator indicator);
 
        /**
         *  @brief Return a style name of this view.