]> git.lyx.org Git - features.git/commitdiff
Compilation fixes.
authorAngus Leeming <leeming@lyx.org>
Mon, 23 Sep 2002 16:16:08 +0000 (16:16 +0000)
committerAngus Leeming <leeming@lyx.org>
Mon, 23 Sep 2002 16:16:08 +0000 (16:16 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5332 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt2/ChangeLog
src/frontends/qt2/QMath.h
src/frontends/qt2/qfont_metrics.C

index 51545125647275b0ef330f9f78c34e59dd2271d7..ac84d963fc9daddcdfc92a58bbd66e88895c3ca9 100644 (file)
@@ -1,3 +1,12 @@
+2002-09-23  Angus Leeming  <leeming@lyx.org>
+
+       * 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  <levon@movementarian.org>
 
        * qlkey.h: make Key_Unknown a modifier, to handle
index 365498f0cfedc8a2dbff3b3de8251967c2c40263..9a0c43f66a233fabbd23e767c8002f8ec4b668bc 100644 (file)
@@ -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_; 
index ae8fc18a1807802bb2415553d1349462bcaed9ab..f115d424b331e9e4b823d6829107b98649e96409 100644 (file)
@@ -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;