]> git.lyx.org Git - features.git/commitdiff
Yet more (minor) compilation fixes.
authorAngus Leeming <leeming@lyx.org>
Fri, 21 Jun 2002 16:40:54 +0000 (16:40 +0000)
committerAngus Leeming <leeming@lyx.org>
Fri, 21 Jun 2002 16:40:54 +0000 (16:40 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4459 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt2/ChangeLog
src/frontends/qt2/Menubar_pimpl.C
src/frontends/qt2/QContentPane.C
src/frontends/qt2/QLPainter.C
src/frontends/qt2/Toolbar_pimpl.h
src/frontends/qt2/qfont_loader.h
src/frontends/qt2/qfont_metrics.C
src/frontends/qt2/qscreen.C

index 3e786935fc63cc0118a55163802f26219d0e1187..506046a1e3fe7ac3d80d522313b8faaf38e01fe8 100644 (file)
@@ -1,3 +1,21 @@
+2002-06-21  Angus Leeming  <leeming@lyx.org>
+
+       * Menubar_pimpl.C (c-tor): rename MenuBackend const & mb argument to
+       avoid name clash with MenuBackend::const_iterator mb.
+
+       * QContentPane.C:
+       * QLPainter.C:
+       * qscreen.C: add using std::endl directive.
+
+       * QLPainter.C (lines, fillPolygon) : wrap QCOORD points inside a
+       scoped_array as np is not known at compile time and my compiler barfs.
+
+       * Toolbar_pimpl.h: forward declare class ToolbarProxy.
+
+       * qfont_loader.h: don't #include "font_loader.h".
+
+       * qfont_metrics.C: remove trailing ';' from namespace anon scope.
+
 2002-06-21  John Levon  <moz@compsoc.man.ac.uk>
 
        * qfont_metrics.C: fix variable names
index 666a776e911b7e99392641afdc76c2d7fd723b31..fb12ea65518a4984ee7d1b109b67c6ac40adb5c0 100644 (file)
@@ -44,8 +44,8 @@ extern boost::scoped_ptr<kb_keymap> toplevel_keymap;
 extern LyXAction lyxaction;
 
 
-Menubar::Pimpl::Pimpl(LyXView * view, MenuBackend const & mb) 
-       : owner_(static_cast<QtView*>(view)), menubackend_(mb)
+Menubar::Pimpl::Pimpl(LyXView * view, MenuBackend const & mbe
+       : owner_(static_cast<QtView*>(view)), menubackend_(mbe)
 {
        MenuBackend::const_iterator mb = menubackend_.begin(); 
        MenuBackend::const_iterator mbend = menubackend_.end();
index 63642c8054ce9e1658f8a60e6559e25d1d0f4e52..c75df313805ed286c745aa320dc6d8bee2f70842 100644 (file)
@@ -20,7 +20,8 @@
 #include <qevent.h>
 #include <qpainter.h>
  
+using std::endl;
+
 namespace {
  
 /// return the LyX key state from Qt's
index e17ae0f130b481527f6cc204491ad7ddad357566..7baf657f8ee0108c006ee5f5e00d459029c489a4 100644 (file)
 #include <qpainter.h>
 #include <qbrush.h> 
 #include <qcolor.h>
+
+#include <boost/scoped_array.hpp>
+
+using std::endl;
+
 QLPainter::QLPainter(QWorkArea & qwa)
        : Painter(), owner_(qwa), paint_check_(0)
 {
@@ -112,8 +116,9 @@ Painter & QLPainter::lines(int const * xp, int const * yp,
        line_width lw)
 {
        // FIXME ?
-       QCOORD points[np * 2];
+
+       // Must use new as np is not known at compile time.
+       boost::scoped_array<QCOORD> points(new QCOORD [np * 2]);
 
        int j = 0;
  
@@ -122,7 +127,8 @@ Painter & QLPainter::lines(int const * xp, int const * yp,
                points[j++] = yp[i];
        }
 
-       setPen(col, ls, lw).drawPolyline(QPointArray(np, points));
+       setPen(col, ls, lw).drawPolyline(QPointArray(np, points.get()));
+
        return *this;
 }
 
@@ -152,7 +158,8 @@ Painter & QLPainter::fillPolygon(int const * xp, int const * yp,
 {
        // FIXME ?
  
-       QCOORD points[np * 2];
+       // Must use new as np is not known at compile time.
+       boost::scoped_array<QCOORD> points(new QCOORD [np * 2]);
 
        int j = 0;
  
@@ -161,7 +168,8 @@ Painter & QLPainter::fillPolygon(int const * xp, int const * yp,
                points[j++] = yp[i];
        }
 
-       setPen(col).drawPolygon(QPointArray(np, points));
+       setPen(col).drawPolygon(QPointArray(np, points.get()));
+
        return *this;
 }
 
index 1d920b9cb62e2b0b61b975e8ba50f116ef9cad21..1e760da3b891624e7d84f86ed4702f180dde63d1 100644 (file)
@@ -29,7 +29,7 @@
 class QtView;
 class QToolBar;
 class QComboBox;
+class ToolbarProxy;
 
 struct Toolbar::Pimpl {
  
index 42c508e1811f84f7a81d1999c7dd1df33707da87..aea8ff88c541988c0c76fa5d6adc3cc36e1880f0 100644 (file)
@@ -19,7 +19,6 @@
  
 #include "lyxfont.h"
  
-#include "font_loader.h"
 #include "LString.h"
 
 #include <qfont.h>
index 721f14a1bc6cd78feb32adf4062bf2d5d867eab9..60c5b95914feed59d12765e3e36defa2871e4597 100644 (file)
@@ -26,7 +26,7 @@ namespace {
        QFontMetrics const & metrics(LyXFont const & f) {
                return fontloader.metrics(f);
        }
-};
+}
 
  
 namespace font_metrics {
index 116d66c4de9be041400a9c9d6c03852130b4cda4..3e9dbc32be7741505aa88ba403674b2942a747d5 100644 (file)
@@ -24,6 +24,7 @@
 #include "insets/insettext.h"
 #include "debug.h"
 
+using std::endl;
 using std::max;
 using std::min;