]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/Validator.cpp
* fix spelling in comments to please John.
[lyx.git] / src / frontends / qt4 / Validator.cpp
index d27f6b301f5c4a5459196b71de1ef1a6e02dee31..e156dcb099dedbe83a86326438d197cae0c494b3 100644 (file)
@@ -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)