]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt2/README
Get rid of the static_casts.
[lyx.git] / src / frontends / qt2 / README
index 84ddf40a9b7b657638fb321329062bf0e3666262..516cd5f996c078a05a4d19001663ef5ae328c9e1 100644 (file)
@@ -1,11 +1,5 @@
 This file contains some do's and dont's for the Qt2 frontend.
 
-Random crashes
---------------
-
-Both xforms and Qt use X error handlers which collide - if you get
-crashes, try lyx -sync, which seems to help.
 General rules
 -------------
 
@@ -18,8 +12,18 @@ then remember to call form_->changed() at the end (if it has changed !)
 Every non-trivial widget should have a tooltip. If you don't know
 what to write, write "FIXME", and it can fixed later. Don't be afraid
 to use QWhatsThis too, but this must be done in the derived class's
-constructor, and use _("...").
+constructor, and use _("..."). Non-trivial means that things like "OK"
+/must not/ have a tooltip.
+
+*DO NOT USE DESIGNER FROM Qt 3*. You must use a designer from Qt 2 to
+maintain compatibility.
+
+Remember to check tab order on a dialog (third icon, with blue bars in designer).
  
+Remember to check sensible resizing behaviour on a dialog.
+
+Remember to use Edit->Check Accelerators
+
 If necessary, you should override Qt2Base::isValid() for determining the validity
 of the current dialog's contents.
  
@@ -59,21 +63,32 @@ PB - push button
 (FIXME: complete this)
 
  
-Dialog         Maintainer      MVC conversion
-----------------------------------------------
-About          John            Done
-Bibtex         John            Done
-Character      Edwin           Done
-Citation       Kalle           Done
-Document       Kalle           Waiting for MVC
-Error          John            Done 
-Index          Kalle           Done
-Paragraph      Edwin           Waiting for MVC
-Print          Edwin
-Ref            Kalle           Done
-Search         Edwin
-Splash         Edwin
-Tabular                                Waiting for MVC
-TabularCreate  Edwin
-Toc            Kalle
-Url            Kalle           Done
+Stuff to be aware of
+--------------------
+
+The connect statement in Qt is a macro and its arguments does not follow
+the C++ standard as it should. Using the construct "Type const &" as
+argument will lead to runtime-errors, use "const Type &" instead.
+
+ex.
+
+--right--
+
+       connect(list, SIGNAL(selected(const QString &)),
+               this, SLOT(complete_selected(const QString &)));
+
+--wrong--
+
+       connect(list, SIGNAL(selected(QString const &)),
+               this, SLOT(complete_selected(QString const &)));
+
+Qt, Unicode, and LyX
+--------------------
+
+LyX isn't unicoded yet. But you should follow these simple rules :
+
+o Use qt_() not _() in code
+o Use fromqstr and toqstr NOT .latin1() / .c_str()
+
+Using these functions (in qt_helpers.h) will make sure we use
+the right locale for converting to Qt's QString, which is unicode.