X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fqt4%2FValidator.cpp;h=e156dcb099dedbe83a86326438d197cae0c494b3;hb=425d092204118ea6c24c28e85fdf03fcf2bb51a4;hp=d27f6b301f5c4a5459196b71de1ef1a6e02dee31;hpb=c355edfb6da71b5efc9ed1ce548bd206ad9f57cb;p=lyx.git diff --git a/src/frontends/qt4/Validator.cpp b/src/frontends/qt4/Validator.cpp index d27f6b301f..e156dcb099 100644 --- a/src/frontends/qt4/Validator.cpp +++ b/src/frontends/qt4/Validator.cpp @@ -41,7 +41,7 @@ LengthValidator::LengthValidator(QWidget * parent) QValidator::State LengthValidator::validate(QString & qtext, int &) const { bool ok; - double d = qtext.trimmed().toDouble(&ok); + qtext.trimmed().toDouble(&ok); if (qtext.isEmpty() || ok) return QValidator::Acceptable; @@ -89,6 +89,14 @@ LengthValidator * unsignedLengthValidator(QLineEdit * ed) } +LengthValidator * unsignedGlueLengthValidator(QLineEdit * ed) +{ + LengthValidator * v = new LengthValidator(ed); + v->setBottom(GlueLength()); + return v; +} + + LengthAutoValidator::LengthAutoValidator(QWidget * parent, QString const autotext) : LengthValidator(parent), autotext_(autotext)