Abdelrazak Younes a écrit :
Jean-Marc Lasgouttes a écrit :
"Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes:

Abdelrazak> A good news never come alone so I have also fixed my
Abdelrazak> "random crashes" problem. This is because I kept a const
Abdelrazak> reference of menu item FuncRequest given by
Abdelrazak> MenuItem::func() instead of a full copy of it like it is
Abdelrazak> done in the qt2 frontend. For some menu item, the const
Abdelrazak> ref remains valid but not for others. Is it by design? I
Abdelrazak> mean like the submenuname() thing?

The const ref should remain valid until the expanded menu is
de-allocated.

Ah... I see this might be because I used a local Menu with the expand call. Then I'll try to put as a private member of QLPopupMenu instead and switch back to the const ref.

Hum, I need this simple attached patch for this to work correctly. OK to apply? It makes no harm to current code.

The menus open quicker by using this Menu member and const ref of the FuncRequest(s) instead of copies.

Abdel.



Abdelrazak> Anyway, thanks to your help I have now a port to Qt4.1
Abdelrazak> that is very close to being functional, Yahoo !!! :-). The
Abdelrazak> only big remaining problem is that there is no keyboard
Abdelrazak> blinking cursor and that this cursor does follow the
Abdelrazak> keyboard.

That is great! Did you solve the image loading issues?

If you mean the supported format problem at the very beginning of my port, then yes.

Abdel.


JMarc




Index: MenuBackend.h
===================================================================
RCS file: /var/cvs/lyx/lyx-devel/src/MenuBackend.h,v
retrieving revision 1.36
diff -u -r1.36 MenuBackend.h
--- MenuBackend.h       1 Jan 2006 20:28:03 -0000       1.36
+++ MenuBackend.h       19 Jan 2006 10:42:50 -0000
@@ -155,6 +155,8 @@
        bool empty() const { return items_.empty(); }
        ///
        ItemList::size_type size() const { return items_.size(); }
+       /// Clear the Menu Content
+       void clear() { items_.clear(); }
        ///
        MenuItem const & operator[](size_type) const;
        ///

Reply via email to