Bennett Helm a écrit :
On Mar 10, 2006, at 10:44 AM, Abdelrazak Younes wrote:

Hmmm.... Doesn't seem to do anything, and I wonder if the #ifdef Q_WS_MACX is working properly: when I comment out the #ifdef and #endif lines (which shouldn't matter for me, right?), I no longer get the "'boost' has not been declared" error.

Weird indeed...

I do get a different error, however -- see below.

> ../QLMenubar.h:26: warning: forward declaration of 'struct QMenuBar'

The attached patch should solve the problem.

Abdel.
Index: D:/msys/home/yns/src/lyx-svn/trunk/src/frontends/qt4/QLMenubar.h
===================================================================
--- D:/msys/home/yns/src/lyx-svn/trunk/src/frontends/qt4/QLMenubar.h    
(revision 13312)
+++ D:/msys/home/yns/src/lyx-svn/trunk/src/frontends/qt4/QLMenubar.h    
(working copy)
@@ -15,11 +15,15 @@
 
 #include "frontends/Menubar.h"
 
-#include <map>
+#include <map>
+
+#ifdef Q_WS_MACX
+#include <boost/scoped_ptr.hpp>
+#endif
 
 #include <QObject>
+#include <QMenuBar>
 
-class QMenuBar;
 class QMenu;
 class LyXView;
 class MenuBackend;
@@ -58,7 +62,7 @@
 //     void updateMenu();
 
 private:
-       /// Initialize specific MACOS X menubar
+       /// Initialize specific MACOS X menubar.
        void QLMenubar::macxMenuBarInit();
 
        /// owning view
@@ -72,9 +76,8 @@
        /// name to menu for openByName
        NameMap name_map_;
 
-#ifdef Q_WS_MACX
+       /// MACOS X special menubar.
        boost::scoped_ptr<QMenuBar> menubar_;
-#endif
 };
 
 } // namespace frontend

Reply via email to