]> git.lyx.org Git - features.git/commit
Fix the last clang warnings about overloaded virtual methods
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 19 Dec 2014 10:35:37 +0000 (11:35 +0100)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Mon, 22 Dec 2014 10:02:45 +0000 (11:02 +0100)
commit8bab23384aa97d5483f3420e024f2484acd8a8e2
tree8cf83d2979ab0ba263ea8c9912442ea83ebecb67
parent625cea15286f639e7861a22c5354dae258bee3e0
Fix the last clang warnings about overloaded virtual methods

This patch fixes a series of warnings like:
{{{
In file included from ../../master/src/mathed/InsetMathBoldSymbol.cpp:13:
In file included from ../../master/src/mathed/InsetMathBoldSymbol.h:15:
../../master/src/mathed/InsetMathNest.h:37:7: warning: 'lyx::InsetMathNest::metrics' hides overloaded virtual function [-Woverloaded-virtual]
        void metrics(MetricsInfo const & mi) const;
             ^
../../master/src/insets/Inset.h:186:15: note: hidden overloaded virtual function 'lyx::Inset::metrics' declared here: different number of parameters
      (2 vs 1)
        virtual void metrics(MetricsInfo & mi, Dimension & dim) const = 0;
                     ^
}}}
For a description of the problem, see for example:
http://stackoverflow.com/questions/18515183/c-overloaded-virtual-function-warning-by-clang

3 different strategies have been used:
 * in frontend, some functions have been renamed.
 * in InsetMath.h, Inset::write has been explicitly imported too
 * in InsetMathNest.h, since a comment said that hiding Inset::metrics is intended, a special trick has bee used to silence the warning.
src/frontends/qt4/GuiCitation.cpp
src/frontends/qt4/GuiCitation.h
src/frontends/qt4/GuiPrefs.cpp
src/frontends/qt4/GuiPrefs.h
src/mathed/InsetMath.h
src/mathed/InsetMathNest.h