]> git.lyx.org Git - lyx.git/blobdiff - src/lyx_cb.C
Make string conversion work with non-ucs2-characters if using qt 4.2
[lyx.git] / src / lyx_cb.C
index 7debc6202c563578ceb309e665bb4d9af8d80ec6..ffe3ce6ab6f16211857172a1d1f42a95ed2e77cf 100644 (file)
@@ -103,7 +103,7 @@ bool quitting;      // flag, that we are quitting the program
 bool menuWrite(Buffer * buffer)
 {
        if (buffer->save()) {
-               LyX::ref().session().lastFiles().add(buffer->fileName());
+               LyX::ref().session().lastFiles().add(FileName(buffer->fileName()));
                return true;
        }
 
@@ -234,7 +234,7 @@ int AutoSaveBuffer::generateChild()
 
                FileName const tmp_ret(tempName(string(), "lyxauto"));
                if (!tmp_ret.empty()) {
-                       bv_.buffer()->writeFile(tmp_ret.absFilename());
+                       bv_.buffer()->writeFile(tmp_ret);
                        // assume successful write of tmp_ret
                        if (!rename(tmp_ret, fname_)) {
                                failed = true;
@@ -249,7 +249,7 @@ int AutoSaveBuffer::generateChild()
 
                if (failed) {
                        // failed to write/rename tmp_ret so try writing direct
-                       if (!bv_.buffer()->writeFile(fname_.absFilename())) {
+                       if (!bv_.buffer()->writeFile(fname_)) {
                                // It is dangerous to do this in the child,
                                // but safe in the parent, so...
                                if (pid == -1)