]> git.lyx.org Git - features.git/commitdiff
The QFileInfo::refresh() bug affects all *nix targets since the minimum
authorEnrico Forestieri <forenr@lyx.org>
Tue, 22 Jul 2008 17:35:13 +0000 (17:35 +0000)
committerEnrico Forestieri <forenr@lyx.org>
Tue, 22 Jul 2008 17:35:13 +0000 (17:35 +0000)
version of Qt (4.2) that we support.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25808 a592a061-630c-0410-9148-cb99ea01b6c8

src/support/FileName.cpp

index 453966e156a10cbee0dd15d1299fd41b4d47e598..b11a7865c1e13f9d33d391403cab5dc9a2ddc753 100644 (file)
@@ -96,12 +96,14 @@ struct FileName::Private
        ///
        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
+// There seems to be a bug in Qt >= 4.2.0, at least, that causes problems with
+// QFileInfo::refresh() on *nix. So we recreate the object in that case.
+// FIXME: When Trolltech fixes the bug, we will have to replace 0x999999 below
+// with the actual working minimum version.
+#if defined(_WIN32) || (QT_VERSION >= 0x999999)
                fi.refresh();
+#else
+               fi = QFileInfo(fi.absoluteFilePath());
 #endif
        }
        ///