]> git.lyx.org Git - lyx.git/blobdiff - src/Format.cpp
Compile fix for qt versions below 4.6.
[lyx.git] / src / Format.cpp
index 490bbbabc0e99e05e0b970a54f801b51c8c56134..cc85b8500008165cb586f6c2ebccb2fb80fefaf3 100644 (file)
@@ -21,7 +21,6 @@
 #include "support/debug.h"
 #include "support/filetools.h"
 #include "support/gettext.h"
-#include "support/lassert.h"
 #include "support/lstrings.h"
 #include "support/os.h"
 #include "support/Systemcall.h"
@@ -286,7 +285,7 @@ bool Formats::view(Buffer const & buffer, FileName const & filename,
        }
        // viewer is 'auto'
        if (format->viewer() == "auto") {
-               if (os::autoOpenFile(filename.absFileName(), os::VIEW))
+               if (os::autoOpenFile(filename.absFileName(), os::VIEW, buffer.filePath()))
                        return true;
                else {
                        Alert::error(_("Cannot view file"),
@@ -321,7 +320,7 @@ bool Formats::view(Buffer const & buffer, FileName const & filename,
        buffer.message(_("Executing command: ") + from_utf8(command));
 
        Systemcall one;
-       one.startscript(Systemcall::DontWait, command);
+       one.startscript(Systemcall::DontWait, command, buffer.filePath());
 
        // we can't report any sort of error, since we aren't waiting
        return true;
@@ -365,7 +364,7 @@ bool Formats::edit(Buffer const & buffer, FileName const & filename,
 
        // editor is 'auto'
        if (format->editor() == "auto") {
-               if (os::autoOpenFile(filename.absFileName(), os::EDIT))
+               if (os::autoOpenFile(filename.absFileName(), os::EDIT, buffer.filePath()))
                        return true;
                else {
                        Alert::error(_("Cannot edit file"),
@@ -388,7 +387,7 @@ bool Formats::edit(Buffer const & buffer, FileName const & filename,
        buffer.message(_("Executing command: ") + from_utf8(command));
 
        Systemcall one;
-       one.startscript(Systemcall::DontWait, command);
+       one.startscript(Systemcall::DontWait, command, buffer.filePath());
 
        // we can't report any sort of error, since we aren't waiting
        return true;