]> git.lyx.org Git - lyx.git/blobdiff - src/support/FileName.cpp
Reformat mangled filenames for (xhtml) export to have them sorted.
[lyx.git] / src / support / FileName.cpp
index 3d31c7d37c607d971a4639d0c0ca2510ac9cd7c4..729e3d024070b130830d7b3f70ef2f60bed53773 100644 (file)
@@ -519,7 +519,12 @@ time_t FileName::lastModified() const
        // been touched between the object creation and now, we refresh the file
        // information.
        d->refresh();
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 8, 0))
+       return d->fi.lastModified().toSecsSinceEpoch();
+#else
        return d->fi.lastModified().toTime_t();
+#endif
+       
 }
 
 
@@ -608,8 +613,8 @@ unsigned long FileName::checksum() const
                return 0;
        }
 
-       char * beg = static_cast<char*>(mm);
-       char * end = beg + info.st_size;
+       unsigned char * beg = static_cast<unsigned char*>(mm);
+       unsigned char * end = beg + info.st_size;
 
        result = support::checksum(beg, end);
 
@@ -978,7 +983,7 @@ string DocFileName::mangledFileName(string const & dir, bool use_counter, bool e
 #endif
                hash = hash.toHex();
                mname = fromqstr(QString(hash));
-               mname = mname + "_" + onlyFileName();
+               mname = "export_" + onlyFileName() + "_" + mname;
                }
 
        // The mangled name must be a valid LaTeX name.