]> git.lyx.org Git - features.git/commitdiff
FileName::Private::checksum(): disable Qt4.4 based version because of bug http:/...
authorAbdelrazak Younes <younes@lyx.org>
Mon, 29 Sep 2008 09:04:14 +0000 (09:04 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Mon, 29 Sep 2008 09:04:14 +0000 (09:04 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26612 a592a061-630c-0410-9148-cb99ea01b6c8

src/support/FileName.cpp

index 21e66b0fb2082637b82ee862142368e3fd650c52..6883b7bda1f9f14ecd5d9360a71e882a008980be 100644 (file)
@@ -129,8 +129,10 @@ struct FileName::Private
 
 unsigned long FileName::Private::checksum()
 {
-#if QT_VERSION >= 0x040400
+#if QT_VERSION >= 0x999999
        // First version of checksum uses Qt4.4 mmap support.
+       // FIXME: This code is not ready with Qt4.4.2,
+       // see http://bugzilla.lyx.org/show_bug.cgi?id=5293
        // FIXME: should we check if the MapExtension extension is supported?
        // see QAbstractFileEngine::supportsExtension() and 
        // QAbstractFileEngine::MapExtension)
@@ -142,6 +144,8 @@ unsigned long FileName::Private::checksum()
        uchar * uend = ubeg + size;
        boost::crc_32_type ucrc;
        ucrc.process_block(ubeg, uend);
+       qf.unmap(ubeg);
+       qf.close();
        return ucrc.checksum();
 #endif
 
@@ -526,7 +530,7 @@ unsigned long FileName::checksum() const
                LYXERR0('"' << absFilename() << "\" is a directory!");
                return 0;
        }
-       if (!lyxerr.debugging(Debug::FILES))
+       if (0)//!lyxerr.debugging(Debug::FILES))
                return d->checksum();
 
        QTime t;