mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-10 20:04:46 +00:00
Add a FileName::refresh function and replace one call to lastModified which was just meant to refresh the file info.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32354 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
80ac638d42
commit
0acff0aa75
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user