mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
Fix bug 5075, I hope.
If Trolltech ever fixes this, then we can put an upper bound onto the #if. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25773 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
92efed6e3f
commit
e4c7a9a677
@ -938,10 +938,12 @@ FuncStatus BufferView::getStatus(FuncRequest const & cmd)
|
||||
break;
|
||||
|
||||
case LFUN_LAYOUT:
|
||||
LYXERR0("BufferView::getStatus(LFUN_LAYOUT)");
|
||||
flag.setEnabled(!cur.inset().forcePlainLayout(cur.idx()));
|
||||
break;
|
||||
|
||||
case LFUN_LAYOUT_PARAGRAPH:
|
||||
LYXERR0("BufferView::getStatus(LFUN_LAYOUT_PARAGRAPH)");
|
||||
flag.setEnabled(cur.inset().allowParagraphCustomization(cur.idx()));
|
||||
break;
|
||||
|
||||
|
@ -94,6 +94,17 @@ struct FileName::Private
|
||||
fi.setCaching(fi.exists() ? true : false);
|
||||
}
|
||||
///
|
||||
inline void refresh()
|
||||
{
|
||||
// There seems to be a bug in Qt 4.3.5, at least, that causes problems with
|
||||
// QFileInfo::refresh() on Linux. So we recreate the object in that case.
|
||||
#if defined(__linux__) && (QT_VERSION >= 0x040300)
|
||||
fi = QFileInfo(fi.absoluteFilePath());
|
||||
#else
|
||||
fi.refresh();
|
||||
#endif
|
||||
}
|
||||
///
|
||||
QFileInfo fi;
|
||||
};
|
||||
|
||||
@ -418,7 +429,7 @@ time_t FileName::lastModified() const
|
||||
// QFileInfo caches information about the file. So, in case this file has
|
||||
// been touched between the object creation and now, we refresh the file
|
||||
// information.
|
||||
d->fi.refresh();
|
||||
d->refresh();
|
||||
return d->fi.lastModified().toTime_t();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user