From 6568f272dae8d42cd41029271af722d1499e49c8 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Sat, 29 Dec 2012 10:51:41 -0800 Subject: [PATCH] Fix warning about hidden overloaded virtual, found by Clang qlayout_widget.cpp:1577:17: error: 'qdesigner_internal::::QBoxLayoutSupport::findItemAt' hides overloaded virtual function [-Werror,-Woverloaded-virtual] virtual int findItemAt(int /*at_row*/, int /*at_column*/) const { return -1; } ^ /Users/tjmaciei/src/qt/qt5/qttools/src/designer/src/lib/shared/qlayout_widget_p.h:198:17: note: hidden overloaded virtual function 'qdesigner_internal::QLayoutSupport::findItemAt' declared here virtual int findItemAt(const QPoint &pos) const; ^ Solve the problem by using the old functions, hence not hiding them. Change-Id: I3af0c43fc7266ae74e8b05103e4306be740c618a Reviewed-by: hjk Reviewed-by: Friedemann Kleint --- src/designer/src/lib/shared/qlayout_widget.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/designer/src/lib/shared/qlayout_widget.cpp b/src/designer/src/lib/shared/qlayout_widget.cpp index d6d58ad..2959be2 100644 --- a/src/designer/src/lib/shared/qlayout_widget.cpp +++ b/src/designer/src/lib/shared/qlayout_widget.cpp @@ -1575,6 +1575,7 @@ public: virtual void insertColumn(int /*column*/) {} virtual int findItemAt(int /*at_row*/, int /*at_column*/) const { return -1; } + using QLayoutSupport::findItemAt; private: virtual void setCurrentCellFromIndicatorOnEmptyCell(int index); @@ -1702,6 +1703,7 @@ public: void insertWidget(QWidget *widget, const QPair &cell); virtual void removeWidget(QWidget *widget) { helper()->removeWidget(layout(), widget); } virtual int findItemAt(int row, int column) const; + using QLayoutSupport::findItemAt; protected: GridLikeLayout *gridLikeLayout() const { -- 2.7.4