Bo Peng wrote:

Index: src/frontends/qt4/QListings.h
===================================================================
--- src/frontends/qt4/QListings.h       (revision 18385)
+++ src/frontends/qt4/QListings.h       (working copy)
@@ -34,6 +34,10 @@
/// AFAIK, QValidator only works for QLineEdit so /// I have to validate listingsED (QTextEdit) manually.
        void validate_listings_params();

+       /// set float on/off when float changes
+       void float_chosen();
+       /// set inline on/off with changes in float
+       void inline_chosen();

You could use the automatic slots and avoid the connect() below and also avoid the test for isChecked() as the state is given:

void on_inlineCB_stateChanged(int state);
{
        if (state ==  Qt::Checked) {
                floatCB->setChecked(false);
                placementLE->setEnabled(false);
        }
}

I am wondering if you should not do the opposite also:

void on_inlineCB_stateChanged(int state);
{
        bool checked = state == Qt::Checked;
        floatCB->setChecked(checked);
        placementLE->setEnabled(checked);
}

The same comment applies to floatCB.

Abdel.

Reply via email to