Jose' Matos wrote:
OK, trying to compile your branch for qt4 only I get two errors:

....
Application.C: In member function 'virtual bool lyx::frontend::Application::x11EventFilter(XEvent*)': Application.C:77: error: 'class lyx::frontend::GuiWorkArea' has no member named 'view' Application.C:82: error: 'class lyx::frontend::GuiWorkArea' has no member named 'view'
make[7]: *** [Application.lo] Error 1
GuiWorkArea.C: In member function 'virtual void lyx::frontend::GuiWorkArea::inputMethodEvent(QInputMethodEvent*)':
GuiWorkArea.C:606: error: 'class QInputMethodEvent' has no member named 'text'
...


I just committed this patch which should fix it. Could you check Lars?

Log:
Compilation Fix: WorkArea has no view() member anymore. Application needed a BufferView anyway so I replaced
  void setBufferView(BufferView * buffer_view);
with
  void connect(GuiWorkArea * work_area);

Index: Application.C
===================================================================
--- Application.C       (revision 14193)
+++ Application.C       (working copy)
@@ -42,7 +42,7 @@
 namespace frontend {
 
 Application::Application(int & argc, char ** argv)
-       : QApplication(argc, argv), work_area_(NULL)
+       : QApplication(argc, argv), buffer_view_(0)
 {
 #ifdef Q_WS_X11
        // doubleClickInterval() is 400 ms on X11 witch is just too long.
@@ -59,9 +59,9 @@
 #endif
 }
 
-void Application::connect(GuiWorkArea * work_area)
+void Application::setBufferView(BufferView * buffer_view)
 {
-       work_area_ = work_area;
+       buffer_view_ = buffer_view_;
 }
 
 
@@ -73,13 +73,13 @@
        switch (xev->type) {
        case SelectionRequest:
                lyxerr[Debug::GUI] << "X requested selection." << endl;
-               if (work_area_)
-                       work_area_->view().view()->selectionRequested();
+               if (buffer_view_)
+                       buffer_view_->selectionRequested();
                break;
        case SelectionClear:
                lyxerr[Debug::GUI] << "Lost selection." << endl;
-               if (work_area_)
-                       work_area_->view().view()->selectionLost();
+               if (buffer_view_)
+                       buffer_view_->selectionLost();
                break;
        }
        return false;
@@ -143,7 +143,7 @@
                                        FSRefMakePath(&ref, (UInt8*)qstr_buf,
                                                      1024);
                                        s_arg=QString::fromUtf8(qstr_buf);
-                                       
work_area_->view().view()->workAreaDispatch(
+                                       buffer_view_->workAreaDispatch(
                                                FuncRequest(LFUN_FILE_OPEN,
                                                            fromqstr(s_arg)));
                                        break;
Index: Application.h
===================================================================
--- Application.h       (revision 14193)
+++ Application.h       (working copy)
@@ -26,6 +26,8 @@
 #endif
 ///////////////////////////////////////////////////////////////
 
+class BufferView;
+
 namespace lyx {
 namespace frontend {
 
@@ -48,12 +50,12 @@
        Gui & gui() { return gui_; }
        ///
        FontLoader & fontLoader() { return font_loader_; }
+       ///
+       void setBufferView(BufferView * buffer_view);
 
-       void connect(GuiWorkArea * work_area);
-
 private:
        ///
-       GuiWorkArea * work_area_;
+       BufferView * buffer_view_;
 
        ///
        GuiImplementation gui_;

Reply via email to