mirror of
https://github.com/strawberrymusicplayer/strawberry
synced 2024-12-17 19:18:36 +01:00
Use QT_VERSION to check whether to use QFileInfo::birthTime() or
QFileInfo::created()
This commit is contained in:
parent
8ebcb71e6e
commit
4150e3efde
@ -174,7 +174,11 @@ void TagReader::ReadFile(const QString &filename, pb::tagreader::SongMetadata *s
|
||||
song->set_url(url.constData(), url.size());
|
||||
song->set_filesize(info.size());
|
||||
song->set_mtime(info.lastModified().toTime_t());
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0))
|
||||
song->set_ctime(info.birthTime().toTime_t());
|
||||
#else
|
||||
song->set_ctime(info.created().toTime_t());
|
||||
#endif
|
||||
|
||||
std::unique_ptr<TagLib::FileRef> fileref(factory_->GetFileRef(filename));
|
||||
if (fileref->isNull()) {
|
||||
|
Loading…
Reference in New Issue
Block a user