]> 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 b9a1d4315b8a25ac6fbc639fc3ba4d9eb32b9bb0..729e3d024070b130830d7b3f70ef2f60bed53773 100644 (file)
@@ -158,13 +158,6 @@ FileName::FileName(FileName const & rhs) : d(new Private)
 }
 
 
-FileName::FileName(FileName && rhs) noexcept
-       : d(rhs.d)
-{
-       rhs.d = nullptr;
-}
-
-
 FileName::FileName(FileName const & rhs, string const & suffix) : d(new Private)
 {
        set(rhs, suffix);
@@ -181,15 +174,6 @@ FileName & FileName::operator=(FileName const & rhs)
 }
 
 
-FileName & FileName::operator=(FileName && rhs) noexcept
-{
-       auto temp = rhs.d;
-       rhs.d = d;
-       d = temp;
-       return *this;
-}
-
-
 bool FileName::empty() const
 {
        return d->name.empty();
@@ -535,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
+       
 }
 
 
@@ -994,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.