From: Angus Leeming Date: Mon, 23 Sep 2002 16:16:08 +0000 (+0000) Subject: Compilation fixes. X-Git-Tag: 1.6.10~18244 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=180e0d9e288c48806fe053b0d2254924524eaff8;p=lyx.git Compilation fixes. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5332 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/frontends/qt2/ChangeLog b/src/frontends/qt2/ChangeLog index 5154512564..ac84d963fc 100644 --- a/src/frontends/qt2/ChangeLog +++ b/src/frontends/qt2/ChangeLog @@ -1,3 +1,12 @@ +2002-09-23 Angus Leeming + + * QMath.h: forward declare QMathDialog. + Remove trailing semi-colons after definition of apply and + update_contents methods. + + * qfont_metrics.C: endl is in namespace std. + Some whitespece stuff. + 2002-09-22 John Levon * qlkey.h: make Key_Unknown a modifier, to handle diff --git a/src/frontends/qt2/QMath.h b/src/frontends/qt2/QMath.h index 365498f0cf..9a0c43f66a 100644 --- a/src/frontends/qt2/QMath.h +++ b/src/frontends/qt2/QMath.h @@ -18,6 +18,8 @@ #pragma interface #endif +class QMathDialog; + class QMath { public: @@ -54,9 +56,9 @@ public: private: /// Apply changes - virtual void apply() {}; + virtual void apply() {} /// update - virtual void update_contents() {}; + virtual void update_contents() {} // FIXME: temp QMathDialog * dialog_; diff --git a/src/frontends/qt2/qfont_metrics.C b/src/frontends/qt2/qfont_metrics.C index ae8fc18a18..f115d424b3 100644 --- a/src/frontends/qt2/qfont_metrics.C +++ b/src/frontends/qt2/qfont_metrics.C @@ -28,9 +28,9 @@ namespace { } } - + namespace font_metrics { - + int maxAscent(LyXFont const & f) { return metrics(f).ascent(); @@ -59,7 +59,8 @@ int descent(char c, LyXFont const & f) int lbearing(char c, LyXFont const & f) { - lyxerr << "lb of " << c << " is " << metrics(f).leftBearing(c) << endl; + lyxerr << "lb of " << c << " is " << metrics(f).leftBearing(c) + << std::endl; return metrics(f).leftBearing(c); } @@ -67,8 +68,8 @@ int lbearing(char c, LyXFont const & f) int rbearing(char c, LyXFont const & f) { QFontMetrics const & m(metrics(f)); - - // Qt rbearing is from the right edge of the char's width(). + + // Qt rbearing is from the right edge of the char's width(). return (m.width(c) - m.rightBearing(c)); } @@ -80,7 +81,7 @@ int width(char const * s, size_t ls, LyXFont const & f) } // handle small caps ourselves ... - + LyXFont smallfont(f); smallfont.decSize().decSize().setShape(LyXFont::UP_SHAPE); @@ -111,13 +112,13 @@ int signedWidth(string const & s, LyXFont const & f) void rectText(string const & str, LyXFont const & f, int & w, - int & ascent, + int & ascent, int & descent) { QFontMetrics const & m(metrics(f)); - + static int const d = 2; - + w = width(str, f) + d * 2 + 2; ascent = m.ascent() + d; descent = m.descent() + d; @@ -126,14 +127,14 @@ void rectText(string const & str, LyXFont const & f, void buttonText(string const & str, LyXFont const & f, - int & w, - int & ascent, + int & w, + int & ascent, int & descent) { QFontMetrics const & m(metrics(f)); - + static int const d = 3; - + w = width(str, f) + d * 2 + 2; ascent = m.ascent() + d; descent = m.descent() + d;