]> git.lyx.org Git - lyx.git/blobdiff - src/VCBackend.cpp
Check path of Qt tools if qtchooser is detected
[lyx.git] / src / VCBackend.cpp
index 974fa7d9c903d88f4289b816af432c11623d6b58..2235c073f41e35527b7d3617034b61f5fbdae268 100644 (file)
@@ -13,6 +13,7 @@
 
 #include "VCBackend.h"
 #include "Buffer.h"
+#include "DispatchResult.h"
 #include "LyX.h"
 #include "FuncRequest.h"
 
@@ -30,6 +31,7 @@
 #include "support/TempFile.h"
 
 #include <fstream>
+#include <sstream>
 
 using namespace std;
 using namespace lyx::support;
@@ -494,6 +496,7 @@ bool RCS::prepareFileRevision(string const &revis, string & f)
                      + quoteName(onlyFileName(owner_->absFileName()))
                      + " > " + quoteName(tmpf.toFilesystemEncoding()),
                FileName(owner_->filePath()));
+       tmpf.refresh();
        if (tmpf.isFileEmpty())
                return false;
 
@@ -564,6 +567,8 @@ void CVS::scanMaster()
                        // Ok extract the fields.
                        smatch sm;
 
+                       // false positive from coverity
+                       // coverity[CHECKED_RETURN]
                        regex_match(line, sm, reg);
 
                        //sm[0]; // whole matched string
@@ -1118,6 +1123,7 @@ bool CVS::prepareFileRevision(string const & revis, string & f)
        doVCCommandWithOutput("cvs update -p -r" + rev + ' '
                + getTarget(File),
                FileName(owner_->filePath()), tmpf);
+       tmpf.refresh();
        if (tmpf.isFileEmpty())
                return false;
 
@@ -1783,6 +1789,7 @@ bool SVN::prepareFileRevision(string const & revis, string & f)
                      + quoteName(onlyFileName(owner_->absFileName()))
                      + " > " + quoteName(tmpf.toFilesystemEncoding()),
                FileName(owner_->filePath()));
+       tmpf.refresh();
        if (tmpf.isFileEmpty())
                return false;
 
@@ -1842,6 +1849,7 @@ FileName const GIT::findFile(FileName const & file)
                        quoteName(fname) + " > " +
                        quoteName(tmpf.toFilesystemEncoding()),
                        file.onlyPath());
+       tmpf.refresh();
        bool found = !tmpf.isFileEmpty();
        LYXERR(Debug::LYXVC, "GIT control: " << (found ? "enabled" : "disabled"));
        return found ? file : FileName();
@@ -2232,6 +2240,7 @@ bool GIT::prepareFileRevision(string const & revis, string & f)
                      + quoteName(onlyFileName(owner_->absFileName()))
                      + " > " + quoteName(tmpf.toFilesystemEncoding()),
                FileName(owner_->filePath()));
+       tmpf.refresh();
        if (tmpf.isFileEmpty())
                return false;
 
@@ -2248,7 +2257,7 @@ bool GIT::prepareFileRevisionEnabled()
 
 bool GIT::toggleReadOnlyEnabled()
 {
-       return false;
+       return true;
 }