]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/Validator.cpp
Complete the removal of the embedding stuff. Maybe. It's hard to be sure we got every...
[lyx.git] / src / frontends / qt4 / Validator.cpp
index e5878b1b63d86ef850ca46e09b6f31f7c91eb2ce..f39e503ae5e6c9e9895aebfad6b0c17450b3953d 100644 (file)
@@ -15,7 +15,7 @@
 #include "Validator.h"
 #include "qt_helpers.h"
 
-#include "gettext.h"
+#include "support/gettext.h"
 #include "LyXRC.h"
 
 #include "frontends/alert.h"
 #include <QLineEdit>
 #include <QWidget>
 
-using lyx::support::isStrDbl;
-using std::string;
-
+using namespace std;
 
 namespace lyx {
+namespace frontend {
 
 LengthValidator::LengthValidator(QWidget * parent)
        : QValidator(parent),
@@ -41,7 +40,7 @@ LengthValidator::LengthValidator(QWidget * parent)
 QValidator::State LengthValidator::validate(QString & qtext, int &) const
 {
        string const text = fromqstr(qtext);
-       if (text.empty() || isStrDbl(text))
+       if (text.empty() || support::isStrDbl(text))
                return QValidator::Acceptable;
 
        if (glue_length_) {
@@ -173,7 +172,7 @@ QValidator::State PathValidator::validate(QString & qtext, int &) const
 
                static int counter = 0;
                if (counter == 0) {
-                       frontend::Alert::error(_("Invalid filename"),
+                       Alert::error(_("Invalid filename"),
                                     _("LyX does not provide LaTeX support for file names containing any of these characters:\n") +
                                         printable_list(invalid_chars));
                }
@@ -185,10 +184,9 @@ QValidator::State PathValidator::validate(QString & qtext, int &) const
 }
 
 
-void PathValidator::setChecker(frontend::KernelDocType const & type,
-                              LyXRC const & lyxrc)
+void PathValidator::setChecker(KernelDocType const & type, LyXRC const & lyxrc)
 {
-       latex_doc_ = type == frontend::LATEX;
+       latex_doc_ = type == LATEX;
        tex_allows_spaces_ = lyxrc.tex_allows_spaces;
 }
 
@@ -203,6 +201,7 @@ PathValidator * getPathValidator(QLineEdit * ed)
        return dynamic_cast<PathValidator *>(validator);
 }
 
+} // namespace frontend
 } // namespace lyx
 
 #include "Validator_moc.cpp"