Make symbol insertion / delimiters work for Qt again

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8664 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
John Levon 2004-04-18 18:42:43 +00:00
parent 29338a43cf
commit 5ad6c77d08
4 changed files with 18 additions and 3 deletions

View File

@ -1,3 +1,10 @@
2004-04-18 John Levon <levon@movementarian.org>
* QDelimiterDialog.C:
* QMathDialog.C: make button callbacks work again
* README: add a warning
2004-04-13 Angus Leeming <leeming@lyx.org> 2004-04-13 Angus Leeming <leeming@lyx.org>
* ui/QExternalDialogBase.ui: * ui/QExternalDialogBase.ui:

View File

@ -86,8 +86,11 @@ QDelimiterDialog::QDelimiterDialog(QMathDelimiter * form)
leftIP->add(QPixmap(toqstr(empty_xpm)), "empty", "empty"); leftIP->add(QPixmap(toqstr(empty_xpm)), "empty", "empty");
rightIP->add(QPixmap(toqstr(empty_xpm)), "empty", "empty"); rightIP->add(QPixmap(toqstr(empty_xpm)), "empty", "empty");
connect(leftIP, SIGNAL(button_clicked(const string &)), this, SLOT(ldelim_clicked(const string &))); // Leave these std:: qualifications alone !
connect(rightIP, SIGNAL(button_clicked(const string &)), this, SLOT(rdelim_clicked(const string &))); connect(leftIP, SIGNAL(button_clicked(const std::string &)),
this, SLOT(ldelim_clicked(const std::string &)));
connect(rightIP, SIGNAL(button_clicked(const std::string &)),
this, SLOT(rdelim_clicked(const std::string &)));
ldelim_clicked("("); ldelim_clicked("(");
rdelim_clicked(")"); rdelim_clicked(")");
} }

View File

@ -169,7 +169,9 @@ IconPalette * QMathDialog::makePanel(QWidget * parent, char const ** entries)
for (int i = 0; *entries[i]; ++i) { for (int i = 0; *entries[i]; ++i) {
p->add(QPixmap(toqstr(find_xpm(entries[i]))), entries[i], string("\\") + entries[i]); p->add(QPixmap(toqstr(find_xpm(entries[i]))), entries[i], string("\\") + entries[i]);
} }
connect(p, SIGNAL(button_clicked(const string &)), this, SLOT(symbol_clicked(const string &))); // Leave these std:: qualifications alone !
connect(p, SIGNAL(button_clicked(const std::string &)),
this, SLOT(symbol_clicked(const std::string &)));
return p; return p;
} }

View File

@ -18,6 +18,9 @@ constructor, and use _("..."). Non-trivial means that things like "OK"
*DO NOT USE DESIGNER FROM Qt 3*. You must use a designer from Qt 2 to *DO NOT USE DESIGNER FROM Qt 3*. You must use a designer from Qt 2 to
maintain compatibility. maintain compatibility.
moc is incredibly stupid and sometimes you need a fully qualified
"std::string" for .connect() statements to work. Be very, very careful.
Remember to check tab order on a dialog (third icon, with blue bars in designer). 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 check sensible resizing behaviour on a dialog.