]> git.lyx.org Git - features.git/commitdiff
Add a FileName::refresh function and replace one call to lastModified which was just...
authorVincent van Ravesteijn <vfr@lyx.org>
Sat, 5 Dec 2009 02:50:34 +0000 (02:50 +0000)
committerVincent van Ravesteijn <vfr@lyx.org>
Sat, 5 Dec 2009 02:50:34 +0000 (02:50 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32354 a592a061-630c-0410-9148-cb99ea01b6c8

src/graphics/GraphicsCacheItem.cpp
src/support/FileName.cpp
src/support/FileName.h

index b9bc390b5262c2b9a8a6a711381977117ef58332..4c047079759a9919f645a573c4de3bc8e2800c68 100644 (file)
@@ -349,8 +349,7 @@ static string const findTargetFormat(string const & from)
 bool CacheItem::Impl::tryDisplayFormat(FileName & filename, string & from)
 {
        // First, check that the file exists!
-       // force a refresh.
-       filename_.lastModified();
+       filename_.refresh();
        if (!filename_.isReadableFile()) {
                if (status_ != ErrorNoFile) {
                        status_ = ErrorNoFile;
index 09984fdab0ea24d30c3c4c8796d2575b905d8244..ffe14c4f886ec98181a616c860047588ec314e65 100644 (file)
@@ -460,6 +460,12 @@ FileName FileName::tempPath()
 }
 
 
+void FileName::refresh() const
+{
+       d->refresh();
+}
+
+
 time_t FileName::lastModified() const
 {
        // QFileInfo caches information about the file. So, in case this file has
index 51c149ff9e5d708396096b30213fa89682c2730f..3d64ad091f5e40d41b74895936e4aef2c9b61595 100644 (file)
@@ -78,6 +78,8 @@ public:
 
        /// returns true if the file exists
        bool exists() const;
+       /// refreshes the file info
+       void refresh() const;
        /// \return true if this object points to a symbolic link.
        bool isSymLink() const;
        /// \return true if the file is empty.