]> git.lyx.org Git - lyx.git/blobdiff - src/ModuleList.cpp
* GuiView.cpp:
[lyx.git] / src / ModuleList.cpp
index ac0f69de6b9ed8fe5f1e4f8add68ea20e282c818..e53af9b7e9f98d12dc315eefdcc17571cdbb5641 100644 (file)
@@ -22,7 +22,6 @@
 #include "support/lstrings.h"
 
 #include <algorithm>
-#include <ostream>
        
 using namespace std;
 using namespace lyx::support;
@@ -76,34 +75,30 @@ public:
 };
 
 
-//Much of this is borrowed from BaseClassList::read()
+//Much of this is borrowed from LayoutFileList::read()
 bool ModuleList::load()
 {
        FileName const real_file = libFileSearch("", "lyxmodules.lst");
        LYXERR(Debug::TCLASS, "Reading modules from `" << real_file << '\'');
 
        if (real_file.empty()) {
-               lyxerr << "ModuleList::load(): unable to find "
-                               "modules file  `"
-                               << to_utf8(makeDisplayPath(real_file.absFilename(), 1000))
-                               << "'.\nNo modules will be available." << endl;
+               LYXERR0("unable to find modules file  `"
+                       << to_utf8(makeDisplayPath(real_file.absFilename(), 1000))
+                       << "'.\nNo modules will be available.");
                return false;
        }
 
-       Lexer lex(0, 0);
+       Lexer lex;
        if (!lex.setFile(real_file)) {
-               lyxerr << "ModuleList::load():"
-                               "lyxlex was not able to set file: "
-                               << real_file << ".\nNo modules will be available." << endl;
+               LYXERR0("lyxlex was not able to set file: "
+                       << real_file << ".\nNo modules will be available.");
                return false;
        }
 
        if (!lex.isOK()) {
-               lyxerr << "ModuleList::load():" <<
-                               "unable to open modules file  `"
-                               << to_utf8(makeDisplayPath(real_file.absFilename(), 1000))
-                               << "'\nNo modules will be available."
-                               << endl;
+               LYXERR0("unable to open modules file  `"
+                       << to_utf8(makeDisplayPath(real_file.absFilename(), 1000))
+                       << "'\nNo modules will be available.");
                return false;
        }