QWinRTFileEngine: Property ItemDate is not the file's last access

The MSDN documentation says that it's a date that reflects the item
type, giving an example the date a photo was taken (probably as stored
in the EXIF metadata).

Change-Id: I8d96dea9955d4c749b99fffd14cd7616cc0da545
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
This commit is contained in:
Thiago Macieira 2017-07-02 01:28:11 -07:00 committed by Maurice Kalinowski
parent 313c3cabe4
commit d78fd6a1e5

View File

@ -426,8 +426,7 @@ QDateTime QWinRTFileEngine::fileTime(FileTime type) const
ComPtr<FileProperties::IBasicProperties> properties;
hr = QWinRTFunctions::await(op, properties.GetAddressOf());
RETURN_IF_FAILED("Failed to get file properties", return QDateTime());
hr = type == ModificationTime ? properties->get_DateModified(&dateTime)
: properties->get_ItemDate(&dateTime);
hr = properties->get_DateModified(&dateTime);
RETURN_IF_FAILED("Failed to get file date", return QDateTime());
}
break;