From 1ad567e8ed964a39b2b90e5b740536c8861589ca Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Thu, 18 Oct 2018 16:57:29 +0000 Subject: replaced deprecated code git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@8393 90c681e8-e032-0410-971d-27865f9a5e38 --- src/qmmpui/playlisttask.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/qmmpui/playlisttask.cpp') diff --git a/src/qmmpui/playlisttask.cpp b/src/qmmpui/playlisttask.cpp index be7feb3b2..adc37f896 100644 --- a/src/qmmpui/playlisttask.cpp +++ b/src/qmmpui/playlisttask.cpp @@ -69,12 +69,20 @@ static bool _numberGreaterComparator(TrackField* s1, TrackField* s2) //by file creation date static bool _fileCreationDateLessComparator(TrackField* s1, TrackField* s2) { +#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0) + return QFileInfo(s1->value).birthTime() < QFileInfo(s2->value).birthTime(); +#else return QFileInfo(s1->value).created() < QFileInfo(s2->value).created(); +#endif } static bool _fileCreationDateGreaterComparator(TrackField* s1, TrackField* s2) { +#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0) + return QFileInfo(s1->value).birthTime() > QFileInfo(s2->value).birthTime(); +#else return QFileInfo(s1->value).created() > QFileInfo(s2->value).created(); +#endif } //by file modification date static bool _fileModificationDateLessComparator(TrackField* s1, TrackField* s2) -- cgit v1.2.3-13-gbd6f