]> git.lyx.org Git - lyx.git/blobdiff - src/bufferlist.C
add GuiView parent to QToc for proper memory management.
[lyx.git] / src / bufferlist.C
index aa532e98b301b3a03764fe9d2922dccba3ad7cf6..11213b72542644847dfa50789ee74d823e8ebf52 100644 (file)
@@ -40,7 +40,6 @@ namespace lyx {
 using support::addName;
 using support::bformat;
 using support::FileName;
-using support::makeAbsPath;
 using support::makeDisplayPath;
 using support::onlyFilename;
 using support::removeAutosaveFile;
@@ -185,7 +184,7 @@ Buffer * BufferList::newBuffer(string const & s, bool const ronly)
 {
        auto_ptr<Buffer> tmpbuf(new Buffer(s, ronly));
        tmpbuf->params().useClassDefaults();
-       lyxerr[Debug::INFO] << "Assigning to buffer "
+       LYXERR(Debug::INFO) << "Assigning to buffer "
                            << bstore.size() << endl;
        bstore.push_back(tmpbuf.get());
        return tmpbuf.release();
@@ -316,10 +315,8 @@ void BufferList::updateIncludedTeXfiles(string const & mastertmpdir,
        BufferStorage::iterator end = bstore.end();
        for (; it != end; ++it) {
                if (!(*it)->isDepClean(mastertmpdir)) {
-                       string writefile = mastertmpdir;
-                       writefile += '/';
-                       writefile += (*it)->getLatexName();
-                       (*it)->makeLaTeXFile(writefile, mastertmpdir,
+                       string writefile = addName(mastertmpdir, (*it)->getLatexName());
+                       (*it)->makeLaTeXFile(FileName(writefile), mastertmpdir,
                                             runparams, false);
                        (*it)->markDepClean(mastertmpdir);
                }
@@ -367,7 +364,7 @@ void BufferList::emergencyWrite(Buffer * buf)
        }
 
        // 2) In HOME directory.
-       string s = addName(package().home_dir(), buf->fileName());
+       string s = addName(package().home_dir().absFilename(), buf->fileName());
        s += ".emergency";
        lyxerr << ' ' << s << endl;
        if (buf->writeFile(FileName(s))) {
@@ -381,7 +378,7 @@ void BufferList::emergencyWrite(Buffer * buf)
        // 3) In "/tmp" directory.
        // MakeAbsPath to prepend the current
        // drive letter on OS/2
-       s = addName(package().temp_dir(), buf->fileName());
+       s = addName(package().temp_dir().absFilename(), buf->fileName());
        s += ".emergency";
        lyxerr << ' ' << s << endl;
        if (buf->writeFile(FileName(s))) {
@@ -435,7 +432,7 @@ Buffer * BufferList::getBufferFromTmp(string const & s)
 }
 
 
-void BufferList::setCurrentAuthor(string const & name, string const & email)
+void BufferList::setCurrentAuthor(docstring const & name, docstring const & email)
 {
        BufferStorage::iterator it = bstore.begin();
        BufferStorage::iterator end = bstore.end();