From: John Levon Date: Sun, 18 Apr 2004 18:42:43 +0000 (+0000) Subject: Make symbol insertion / delimiters work for Qt again X-Git-Tag: 1.6.10~15304 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=5ad6c77d08a3eda179f902113b45fabfee22ccf9;p=features.git 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 --- diff --git a/src/frontends/qt2/ChangeLog b/src/frontends/qt2/ChangeLog index c0ec88ef79..9cf54c3bd1 100644 --- a/src/frontends/qt2/ChangeLog +++ b/src/frontends/qt2/ChangeLog @@ -1,3 +1,10 @@ +2004-04-18 John Levon + + * QDelimiterDialog.C: + * QMathDialog.C: make button callbacks work again + + * README: add a warning + 2004-04-13 Angus Leeming * ui/QExternalDialogBase.ui: diff --git a/src/frontends/qt2/QDelimiterDialog.C b/src/frontends/qt2/QDelimiterDialog.C index 056f19b3ba..fea71f4818 100644 --- a/src/frontends/qt2/QDelimiterDialog.C +++ b/src/frontends/qt2/QDelimiterDialog.C @@ -86,8 +86,11 @@ QDelimiterDialog::QDelimiterDialog(QMathDelimiter * form) leftIP->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 &))); - connect(rightIP, SIGNAL(button_clicked(const string &)), this, SLOT(rdelim_clicked(const string &))); + // Leave these std:: qualifications alone ! + 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("("); rdelim_clicked(")"); } diff --git a/src/frontends/qt2/QMathDialog.C b/src/frontends/qt2/QMathDialog.C index 897eec9ae9..933b9057a8 100644 --- a/src/frontends/qt2/QMathDialog.C +++ b/src/frontends/qt2/QMathDialog.C @@ -169,7 +169,9 @@ IconPalette * QMathDialog::makePanel(QWidget * parent, char const ** entries) for (int i = 0; *entries[i]; ++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; } diff --git a/src/frontends/qt2/README b/src/frontends/qt2/README index aa7e0e485b..14ddede186 100644 --- a/src/frontends/qt2/README +++ b/src/frontends/qt2/README @@ -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 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 sensible resizing behaviour on a dialog.