diff options
| author | Jeremy Rimpo <jrim@rimpo.org> | 2019-08-02 00:33:02 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-08-02 00:33:02 -0500 |
| commit | bdf45aea69ab7df0b01eb87cc80a2641ea4261d0 (patch) | |
| tree | 88a91f59956e8be80c159f8d765e90859eb15d13 /src/downloadmanager.cpp | |
| parent | 1f1b838c2b3fd3148d2c2a1a8fe6fcf9fb07383f (diff) | |
| parent | 2b213fe7ce4b75afd6f7d6418d3ccd2cf6f55070 (diff) | |
Merge pull request #806 from ModOrganizer2/qt-5.13
Qt 5.13
Diffstat (limited to 'src/downloadmanager.cpp')
| -rw-r--r-- | src/downloadmanager.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/downloadmanager.cpp b/src/downloadmanager.cpp index 648b102a..ec1faed4 100644 --- a/src/downloadmanager.cpp +++ b/src/downloadmanager.cpp @@ -717,7 +717,7 @@ void DownloadManager::refreshAlphabeticalTranslation() m_AlphabeticalTranslation.push_back(pos); } - qSort(m_AlphabeticalTranslation.begin(), m_AlphabeticalTranslation.end(), LessThanWrapper(this)); + std::sort(m_AlphabeticalTranslation.begin(), m_AlphabeticalTranslation.end(), LessThanWrapper(this)); } @@ -1155,7 +1155,12 @@ QDateTime DownloadManager::getFileTime(int index) const DownloadInfo *info = m_ActiveDownloads.at(index); if (!info->m_Created.isValid()) { - info->m_Created = QFileInfo(info->m_Output).created(); + QFileInfo fileInfo(info->m_Output); + info->m_Created = fileInfo.birthTime(); + if (!info->m_Created.isValid()) + info->m_Created = fileInfo.metadataChangeTime(); + if (!info->m_Created.isValid()) + info->m_Created = fileInfo.lastModified(); } return info->m_Created; |
