]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiView.cpp
Don't allow newline characters in preference (#5840).
[lyx.git] / src / frontends / qt4 / GuiView.cpp
index 90ed2fbe36f59f4593fac24bd08eb5724e2cbc43..fee9f9cb8e6bfec712d18f0d7ef2f633fe54f092 100644 (file)
@@ -1451,7 +1451,7 @@ void GuiView::errors(string const & error_type, bool from_master)
 #if EXPORT_in_THREAD && (QT_VERSION >= 0x040400)
        // We are called with from_master == false by default, so we
        // have to figure out whether that is the case or not.
-       ErrorList & el = const_cast<ErrorList &>(bv->buffer().errorList(error_type));
+       ErrorList & el = bv->buffer().errorList(error_type);
        if (el.empty()) {
            el = bv->buffer().masterBuffer()->errorList(error_type);
            from_master = true;
@@ -1895,8 +1895,8 @@ Buffer * GuiView::loadDocument(FileName const & filename, bool tolastfiles)
                return 0;
        }
 
-       newBuffer->errors("Parse");
        setBuffer(newBuffer);
+       newBuffer->errors("Parse");
 
        if (tolastfiles)
                theSession().lastFiles().add(filename);