Enrico Forestieri wrote:
On Mon, Jul 21, 2008 at 12:43:30PM -0400, rgheck wrote:

Bug 5075 concerns a problem with QFileInfo::lastModtime() that causes failures in graphics and bibliography updates that have been confirmed on Linux with Qt 4.3.5 and Qt 4.4.something. A fix was committed at r25773, with conditional compilation for Linux and Qt >= 4.3.0. I'd appreciate it if people would check their platforms and Qt versions and help us make sure that this is the right check. That is: Using r25773 or later, does the Citation dialog update with changes to your bibfile when you make them? If not, please let me know platform and Qt version.

The bug in QFileInfo::lastModtime() seems to affect all unices (only
native Windows is immune) and is also present in Qt 4.2. I did not test
4.1 as it is not supported in trunk.

Enrico: Can you commit the proper fix, then? We just need the right thing here:

struct FileName::Private
{
Private() {}

Private(string const & abs_filename) : fi(toqstr(abs_filename))
{
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;
};

Presumably, 0x040300 should be changed to 0x040200, but I'm not sufficiently familiar with preprocessor stuff to know what we should do about checking for "unix".

rh


Reply via email to