]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiPrefs.cpp
Move the NoNewLineValidator to Validator.cpp where it fits better.
[lyx.git] / src / frontends / qt4 / GuiPrefs.cpp
index 4fe68d45c7010cc8aed023d0b9a705a97f0ffae7..d56d3b068104371d5f95c21578f10f3ee3fbf795 100644 (file)
@@ -20,6 +20,7 @@
 #include "GuiFontLoader.h"
 #include "GuiKeySymbol.h"
 #include "qt_helpers.h"
+#include "Validator.h"
 
 #include "Author.h"
 #include "BufferList.h"
@@ -349,33 +350,6 @@ static void setComboxFont(QComboBox * cb, string const & family,
 }
 
 
-/////////////////////////////////////////////////////////////////////
-//
-// NoNewLineValidator
-//
-/////////////////////////////////////////////////////////////////////
-
-class NoNewLineValidator : public QValidator
-{
-public:
-       NoNewLineValidator(QWidget *);
-       QValidator::State validate(QString & input, int & pos) const;
-};
-
-
-NoNewLineValidator::NoNewLineValidator(QWidget * parent)
-       : QValidator(parent)
-{
-}
-
-
-QValidator::State NoNewLineValidator::validate(QString & input, int & /*pos*/) const
-{
-       input.remove(QRegExp("[\\n\\r]"));
-       return QValidator::Acceptable;
-}
-
-
 /////////////////////////////////////////////////////////////////////
 //
 // StrftimeValidator