mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-16 10:40:45 +00:00
Don't ditch deprecated QFileInfo::created too early
This commit is contained in:
parent
ed491c3919
commit
28d6827664
@ -99,7 +99,11 @@ void UpdaterWindow::checkForUpdates()
|
|||||||
// Check updates.xml file if it's still recent..
|
// Check updates.xml file if it's still recent..
|
||||||
if (QFile::exists(filename)) {
|
if (QFile::exists(filename)) {
|
||||||
QFileInfo fi(filename);
|
QFileInfo fi(filename);
|
||||||
|
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
|
||||||
QDateTime created = fi.birthTime();
|
QDateTime created = fi.birthTime();
|
||||||
|
#else
|
||||||
|
QDateTime created = fi.created();
|
||||||
|
#endif
|
||||||
int age = created.secsTo(QDateTime::currentDateTime());
|
int age = created.secsTo(QDateTime::currentDateTime());
|
||||||
|
|
||||||
if (age < 900) {
|
if (age < 900) {
|
||||||
|
Loading…
Reference in New Issue
Block a user