diff --git a/modules/cvv/CMakeLists.txt b/modules/cvv/CMakeLists.txt index 4eba9fdb4..709464ee8 100644 --- a/modules/cvv/CMakeLists.txt +++ b/modules/cvv/CMakeLists.txt @@ -1,4 +1,4 @@ -if(NOT HAVE_QT5) +if(NOT HAVE_QT5 OR NOT HAVE_CXX11) ocv_module_disable(cvv) return() endif() @@ -6,13 +6,6 @@ endif() set(the_description "Debug visualization framework") ocv_add_module(cvv opencv_core opencv_imgproc opencv_features2d WRAP python) -# we need C++11 and want warnings: -if(MSVC) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Qstd=c++11 /W4") - add_definitions(/D__func__=__FUNCTION__) -else() - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wextra -pedantic") -endif() ocv_warnings_disable(CMAKE_CXX_FLAGS -Wshadow -Wmissing-declarations) # Qt5 diff --git a/modules/cvv/src/gui/call_window.hpp b/modules/cvv/src/gui/call_window.hpp index d914f7d75..6f489d6a5 100644 --- a/modules/cvv/src/gui/call_window.hpp +++ b/modules/cvv/src/gui/call_window.hpp @@ -153,7 +153,7 @@ protected: void initFooter(); - void closeEvent(QCloseEvent *event); + void closeEvent(QCloseEvent *event) CV_OVERRIDE; size_t getCallTabIdByTabIndex(int index); diff --git a/modules/cvv/src/gui/main_call_window.hpp b/modules/cvv/src/gui/main_call_window.hpp index 48a8726a4..bebd09a5f 100644 --- a/modules/cvv/src/gui/main_call_window.hpp +++ b/modules/cvv/src/gui/main_call_window.hpp @@ -56,7 +56,7 @@ class MainCallWindow : public CallWindow void hideCloseWindow(); protected: - void closeEvent(QCloseEvent *event); + void closeEvent(QCloseEvent *event) CV_OVERRIDE; private: OverviewPanel *ovPanel; diff --git a/modules/cvv/src/gui/overview_group_subtable.hpp b/modules/cvv/src/gui/overview_group_subtable.hpp index 0b0318da5..89299222e 100644 --- a/modules/cvv/src/gui/overview_group_subtable.hpp +++ b/modules/cvv/src/gui/overview_group_subtable.hpp @@ -78,7 +78,7 @@ class OverviewGroupSubtable : public QWidget void setRowGroup(stfl::ElementGroup &newGroup); protected: - void resizeEvent(QResizeEvent *event); + void resizeEvent(QResizeEvent *event) CV_OVERRIDE; private slots: void rowClicked(int row, int collumn); diff --git a/modules/cvv/src/qtutil/filter/diffFilterWidget.hpp b/modules/cvv/src/qtutil/filter/diffFilterWidget.hpp index 6b4bd0bce..09bcdf7e7 100644 --- a/modules/cvv/src/qtutil/filter/diffFilterWidget.hpp +++ b/modules/cvv/src/qtutil/filter/diffFilterWidget.hpp @@ -54,13 +54,13 @@ class DiffFilterFunction : public FilterFunctionWidget<2, 1> * @param in Array of input matrices * @param out Array of output matrices */ - void applyFilter(InputArray in, OutputArray out) const; + void applyFilter(InputArray in, OutputArray out) const CV_OVERRIDE; /** * @brief Checks whether matrices in 'in' can be processed by this * DiffFilter */ - std::pair checkInput(InputArray in) const; + std::pair checkInput(InputArray in) const CV_OVERRIDE; private: DiffFilterType filterType_; diff --git a/modules/cvv/src/qtutil/filter/overlayfilterwidget.hpp b/modules/cvv/src/qtutil/filter/overlayfilterwidget.hpp index b13f9f0b0..0e321ae11 100644 --- a/modules/cvv/src/qtutil/filter/overlayfilterwidget.hpp +++ b/modules/cvv/src/qtutil/filter/overlayfilterwidget.hpp @@ -44,7 +44,7 @@ class OverlayFilterWidget : public FilterFunctionWidget<2, 1> * @param in Array of input matrices * @param out Array of output matrices */ - void applyFilter(InputArray in, OutputArray out) const; + void applyFilter(InputArray in, OutputArray out) const CV_OVERRIDE; /** * Checks whether the matrices have the same size and same number of @@ -52,7 +52,7 @@ class OverlayFilterWidget : public FilterFunctionWidget<2, 1> * @brief Checks whether matrices in "in" can be processed by Overlayfilter * @param in Array of input matrices */ - std::pair checkInput(InputArray in) const; + std::pair checkInput(InputArray in) const CV_OVERRIDE; private: double opacityOfFilterImg_; diff --git a/modules/cvv/src/qtutil/matchview/cvvkeypoint.hpp b/modules/cvv/src/qtutil/matchview/cvvkeypoint.hpp index 4ab57ba2d..6e57f71f4 100644 --- a/modules/cvv/src/qtutil/matchview/cvvkeypoint.hpp +++ b/modules/cvv/src/qtutil/matchview/cvvkeypoint.hpp @@ -52,7 +52,7 @@ class CVVKeyPoint : public QGraphicsObject,public cv::KeyPoint * @brief boundingRect * @return the boundingRect */ - QRectF boundingRect() const; + QRectF boundingRect() const CV_OVERRIDE; /** * @brief returns the keypoint @@ -65,7 +65,7 @@ class CVVKeyPoint : public QGraphicsObject,public cv::KeyPoint * @brief the paint function. */ void paint(QPainter *painter, const QStyleOptionGraphicsItem *, - QWidget *); + QWidget *) CV_OVERRIDE; /** * @brief returns true if this keypoint is in the visble area of its diff --git a/modules/cvv/src/qtutil/matchview/cvvmatch.hpp b/modules/cvv/src/qtutil/matchview/cvvmatch.hpp index adedc212e..455d5db0c 100644 --- a/modules/cvv/src/qtutil/matchview/cvvmatch.hpp +++ b/modules/cvv/src/qtutil/matchview/cvvmatch.hpp @@ -48,13 +48,13 @@ class CVVMatch : public QGraphicsObject,public cv::DMatch * @brief returns the boundingrect of this Mathc * @return the boundingrect of this Mathc */ - virtual QRectF boundingRect() const; + virtual QRectF boundingRect() const CV_OVERRIDE; /** * @brief the paint function */ virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *, - QWidget *); + QWidget *) CV_OVERRIDE; /** * @brief returns the left keypoint. diff --git a/modules/cvv/src/qtutil/matchview/keypointmanagement.hpp b/modules/cvv/src/qtutil/matchview/keypointmanagement.hpp index 1c85a442b..ea2831082 100644 --- a/modules/cvv/src/qtutil/matchview/keypointmanagement.hpp +++ b/modules/cvv/src/qtutil/matchview/keypointmanagement.hpp @@ -36,7 +36,7 @@ public: /** * @brief set the settings if this KeyPoint is selected */ - virtual void setSettings(CVVKeyPoint &match); + virtual void setSettings(CVVKeyPoint &match) CV_OVERRIDE; /** * @brief add the given KeyPointSettingsSelector to the list diff --git a/modules/cvv/src/qtutil/matchview/keypointselectionselector.hpp b/modules/cvv/src/qtutil/matchview/keypointselectionselector.hpp index d4ccfc7b1..bcdb34382 100644 --- a/modules/cvv/src/qtutil/matchview/keypointselectionselector.hpp +++ b/modules/cvv/src/qtutil/matchview/keypointselectionselector.hpp @@ -28,7 +28,7 @@ public: * @brief select keypoint of the given selection * @return the selected matches */ - std::vector select(const std::vector& selection); + std::vector select(const std::vector& selection) CV_OVERRIDE; public slots: /** diff --git a/modules/cvv/src/qtutil/matchview/matchmanagement.hpp b/modules/cvv/src/qtutil/matchview/matchmanagement.hpp index ab617892d..1cf0bffd6 100644 --- a/modules/cvv/src/qtutil/matchview/matchmanagement.hpp +++ b/modules/cvv/src/qtutil/matchview/matchmanagement.hpp @@ -35,7 +35,7 @@ public: /** * @brief set the settings if this match is selected */ - virtual void setSettings(CVVMatch &match); + virtual void setSettings(CVVMatch &match) CV_OVERRIDE; /** * @brief add the given MatchSettingsSelector to the list diff --git a/modules/cvv/src/qtutil/matchview/matchselectionselector.hpp b/modules/cvv/src/qtutil/matchview/matchselectionselector.hpp index e245b8308..d80a10a2f 100644 --- a/modules/cvv/src/qtutil/matchview/matchselectionselector.hpp +++ b/modules/cvv/src/qtutil/matchview/matchselectionselector.hpp @@ -28,7 +28,7 @@ public: * @brief select matches of the given selection * @return the selected matches */ - std::vector select(const std::vector& selection); + std::vector select(const std::vector& selection) CV_OVERRIDE; public slots: /** diff --git a/modules/cvv/src/qtutil/matchview/showinrawviewwidget.hpp b/modules/cvv/src/qtutil/matchview/showinrawviewwidget.hpp index 2961b7232..9c5854476 100644 --- a/modules/cvv/src/qtutil/matchview/showinrawviewwidget.hpp +++ b/modules/cvv/src/qtutil/matchview/showinrawviewwidget.hpp @@ -41,9 +41,9 @@ public: ~ShowInRawView(); protected: - virtual void hideEvent(QHideEvent * ); + virtual void hideEvent(QHideEvent * ) CV_OVERRIDE; - virtual void showEvent(QShowEvent *); + virtual void showEvent(QShowEvent *) CV_OVERRIDE; private slots: diff --git a/modules/cvv/src/qtutil/matchview/zoomableproxyobject.hpp b/modules/cvv/src/qtutil/matchview/zoomableproxyobject.hpp index 37b4e051f..f61109042 100644 --- a/modules/cvv/src/qtutil/matchview/zoomableproxyobject.hpp +++ b/modules/cvv/src/qtutil/matchview/zoomableproxyobject.hpp @@ -20,17 +20,17 @@ class ZoomableProxyObject : public QGraphicsProxyWidget public: ZoomableProxyObject(ZoomableImage *zoom); - ~ZoomableProxyObject() + ~ZoomableProxyObject() CV_OVERRIDE { } protected: - virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent *event) + virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent *event) CV_OVERRIDE { event->ignore(); } - virtual void wheelEvent(QGraphicsSceneWheelEvent *event); + virtual void wheelEvent(QGraphicsSceneWheelEvent *event) CV_OVERRIDE; private: ZoomableImage *image_; diff --git a/modules/cvv/src/qtutil/stfl_query_widget_lineedit.hpp b/modules/cvv/src/qtutil/stfl_query_widget_lineedit.hpp index bd1e3e587..72ede6a38 100644 --- a/modules/cvv/src/qtutil/stfl_query_widget_lineedit.hpp +++ b/modules/cvv/src/qtutil/stfl_query_widget_lineedit.hpp @@ -6,6 +6,7 @@ #include #include +#include "opencv2/core/cvdef.h" #include "stfl_query_widget_completer.hpp" namespace cvv @@ -41,7 +42,7 @@ class STFLQueryWidgetLineEdit : public QLineEdit void showSuggestions(QStringList suggestions); protected: - void keyPressEvent(QKeyEvent *e); + void keyPressEvent(QKeyEvent *e) CV_OVERRIDE; signals: /** diff --git a/modules/cvv/src/view/rawview.hpp b/modules/cvv/src/view/rawview.hpp index 94678b0df..8d491589a 100644 --- a/modules/cvv/src/view/rawview.hpp +++ b/modules/cvv/src/view/rawview.hpp @@ -88,9 +88,9 @@ public: */ bool doesShowShowInViewMenu(); - virtual std::vector getMatchSelection(); + virtual std::vector getMatchSelection() CV_OVERRIDE; - virtual std::vector getKeyPointSelection(); + virtual std::vector getKeyPointSelection() CV_OVERRIDE; signals: /** @@ -139,9 +139,9 @@ public slots: void selectKeyPoints(const std::vector &keyPoints); - virtual void setMatchSelection(std::vector matches); + virtual void setMatchSelection(std::vector matches) CV_OVERRIDE; - virtual void setKeyPointSelection(std::vector keyPoints); + virtual void setKeyPointSelection(std::vector keyPoints) CV_OVERRIDE; /** * @brief Issues the matchesSelected and the keyPointsSelected signal. diff --git a/modules/ovis/src/ovis.cpp b/modules/ovis/src/ovis.cpp index 1612359e5..6fe372a28 100644 --- a/modules/ovis/src/ovis.cpp +++ b/modules/ovis/src/ovis.cpp @@ -187,13 +187,13 @@ struct Application : public OgreBites::ApplicationContext, public OgreBites::Inp // empty impl to show cursor } - bool keyPressed(const OgreBites::KeyboardEvent& evt) + bool keyPressed(const OgreBites::KeyboardEvent& evt) CV_OVERRIDE { key_pressed = evt.keysym.sym; return true; } - bool oneTimeConfig() + bool oneTimeConfig() CV_OVERRIDE { Ogre::RenderSystem* rs = getRoot()->getRenderSystemByName(RENDERSYSTEM_NAME); CV_Assert(rs); @@ -202,7 +202,7 @@ struct Application : public OgreBites::ApplicationContext, public OgreBites::Inp } OgreBites::NativeWindowPair createWindow(const Ogre::String& name, uint32_t _w, uint32_t _h, - NameValuePairList miscParams = NameValuePairList()) + NameValuePairList miscParams = NameValuePairList()) CV_OVERRIDE { Ogre::String _name = name; if (!sceneMgr) @@ -224,7 +224,7 @@ struct Application : public OgreBites::ApplicationContext, public OgreBites::Inp return ret; } - void locateResources() + void locateResources() CV_OVERRIDE { OgreBites::ApplicationContext::locateResources(); ResourceGroupManager& rgm = ResourceGroupManager::getSingleton(); @@ -244,7 +244,7 @@ struct Application : public OgreBites::ApplicationContext, public OgreBites::Inp } } - void setup() + void setup() CV_OVERRIDE { OgreBites::ApplicationContext::setup(); @@ -338,7 +338,7 @@ public: } } - void setBackground(InputArray image) + void setBackground(InputArray image) CV_OVERRIDE { CV_Assert(bgplane); @@ -357,7 +357,7 @@ public: bgplane->setVisible(true); } - void setCompositors(const std::vector& names) + void setCompositors(const std::vector& names) CV_OVERRIDE { CompositorManager& cm = CompositorManager::getSingleton(); // this should be applied to all owned render targets @@ -382,7 +382,7 @@ public: } } - void setBackground(const Scalar& color) + void setBackground(const Scalar& color) CV_OVERRIDE { // hide background plane bgplane->setVisible(false); @@ -394,7 +394,7 @@ public: frameSrc->getViewport(0)->setBackgroundColour(_color); } - void createEntity(const String& name, const String& meshname, InputArray tvec, InputArray rot) + void createEntity(const String& name, const String& meshname, InputArray tvec, InputArray rot) CV_OVERRIDE { Entity* ent = sceneMgr->createEntity(name, meshname, RESOURCEGROUP_NAME); @@ -405,7 +405,7 @@ public: node->attachObject(ent); } - void removeEntity(const String& name) { + void removeEntity(const String& name) CV_OVERRIDE { SceneNode& node = _getSceneNode(sceneMgr, name); node.getAttachedObject(name)->detachFromParent(); @@ -418,7 +418,7 @@ public: } Rect2d createCameraEntity(const String& name, InputArray K, const Size& imsize, float zFar, - InputArray tvec, InputArray rot) + InputArray tvec, InputArray rot) CV_OVERRIDE { MaterialPtr mat = MaterialManager::getSingleton().create(name, RESOURCEGROUP_NAME); Pass* rpass = mat->getTechniques()[0]->getPasses()[0]; @@ -451,7 +451,7 @@ public: } void createLightEntity(const String& name, InputArray tvec, InputArray rot, const Scalar& diffuseColour, - const Scalar& specularColour) + const Scalar& specularColour) CV_OVERRIDE { Light* light = sceneMgr->createLight(name); light->setDirection(Vector3::NEGATIVE_UNIT_Z); @@ -466,7 +466,7 @@ public: node->attachObject(light); } - void updateEntityPose(const String& name, InputArray tvec, InputArray rot) + void updateEntityPose(const String& name, InputArray tvec, InputArray rot) CV_OVERRIDE { SceneNode& node = _getSceneNode(sceneMgr, name); Quaternion q; @@ -476,7 +476,7 @@ public: node.translate(t, Ogre::Node::TS_LOCAL); } - void setEntityPose(const String& name, InputArray tvec, InputArray rot, bool invert) + void setEntityPose(const String& name, InputArray tvec, InputArray rot, bool invert) CV_OVERRIDE { SceneNode& node = _getSceneNode(sceneMgr, name); Quaternion q; @@ -486,7 +486,7 @@ public: node.setPosition(t); } - void setEntityProperty(const String& name, int prop, const String& value) + void setEntityProperty(const String& name, int prop, const String& value) CV_OVERRIDE { CV_Assert(prop == ENTITY_MATERIAL); SceneNode& node = _getSceneNode(sceneMgr, name); @@ -506,7 +506,7 @@ public: ent->setMaterial(mat); } - void setEntityProperty(const String& name, int prop, const Scalar& value) + void setEntityProperty(const String& name, int prop, const Scalar& value) CV_OVERRIDE { CV_Assert(prop == ENTITY_SCALE); SceneNode& node = _getSceneNode(sceneMgr, name); @@ -541,7 +541,7 @@ public: sceneMgr->getRootSceneNode()->createChildSceneNode()->attachObject(bgplane.get()); } - void getScreenshot(OutputArray frame) + void getScreenshot(OutputArray frame) CV_OVERRIDE { PixelFormat src_type = frameSrc->suggestPixelFormat(); int dst_type = src_type == PF_BYTE_RGB ? CV_8UC3 : CV_32FC4; @@ -556,7 +556,7 @@ public: cvtColor(out, out, dst_type == CV_8UC3 ? COLOR_RGB2BGR : COLOR_RGBA2BGRA); } - void getDepth(OutputArray depth) + void getDepth(OutputArray depth) CV_OVERRIDE { Camera* cam = sceneMgr->getCamera(title); if (!depthRTT) @@ -588,7 +588,7 @@ public: ndc = (2 * f * n) / ndc; } - void fixCameraYawAxis(bool useFixed, InputArray _up) + void fixCameraYawAxis(bool useFixed, InputArray _up) CV_OVERRIDE { Vector3 up = Vector3::NEGATIVE_UNIT_Y; if (!_up.empty()) @@ -599,7 +599,7 @@ public: camNode->setFixedYawAxis(useFixed, up); } - void setCameraPose(InputArray tvec, InputArray rot, bool invert) + void setCameraPose(InputArray tvec, InputArray rot, bool invert) CV_OVERRIDE { Quaternion q; Vector3 t; @@ -612,7 +612,7 @@ public: camNode->setPosition(t); } - void getCameraPose(OutputArray R, OutputArray tvec, bool invert) + void getCameraPose(OutputArray R, OutputArray tvec, bool invert) CV_OVERRIDE { Matrix3 _R; // toOGRE.Inverse() == toOGRE @@ -641,7 +641,7 @@ public: } } - void setCameraIntrinsics(InputArray K, const Size& imsize, float zNear, float zFar) + void setCameraIntrinsics(InputArray K, const Size& imsize, float zNear, float zFar) CV_OVERRIDE { Camera* cam = sceneMgr->getCamera(title); @@ -650,7 +650,7 @@ public: if(!K.empty()) _setCameraIntrinsics(cam, K, imsize); } - void setCameraLookAt(const String& target, InputArray offset) + void setCameraLookAt(const String& target, InputArray offset) CV_OVERRIDE { SceneNode* tgt = sceneMgr->getEntity(target)->getParentSceneNode(); diff --git a/modules/sfm/CMakeLists.txt b/modules/sfm/CMakeLists.txt index c1731d345..4ff0365cb 100644 --- a/modules/sfm/CMakeLists.txt +++ b/modules/sfm/CMakeLists.txt @@ -93,6 +93,7 @@ ocv_warnings_disable(CMAKE_CXX_FLAGS -Wunused-but-set-variable -Wunused-parameter -Wunused-function + -Wsuggest-override ) if(UNIX)