Changeset View
Changeset View
Standalone View
Standalone View
dataengines/potd/cachedprovider.cpp
Show First 20 Lines • Show All 95 Lines • ▼ Show 20 Line(s) | 95 | { | |||
---|---|---|---|---|---|
96 | const QString path = identifierToPath( identifier ); | 96 | const QString path = identifierToPath( identifier ); | ||
97 | if (!QFile::exists( path ) ) { | 97 | if (!QFile::exists( path ) ) { | ||
98 | return false; | 98 | return false; | ||
99 | } | 99 | } | ||
100 | 100 | | |||
101 | if (!ignoreAge && !identifier.contains( ':' ) ) { | 101 | if (!ignoreAge && !identifier.contains( ':' ) ) { | ||
102 | // no date in the identifier, so it's a daily; check to see ifthe modification time is today | 102 | // no date in the identifier, so it's a daily; check to see ifthe modification time is today | ||
103 | QFileInfo info( path ); | 103 | QFileInfo info( path ); | ||
104 | if ( info.lastModified().daysTo( QDateTime::currentDateTime() ) > 1 ) { | 104 | if ( info.lastModified().daysTo( QDateTime::currentDateTime() ) >= 1 ) { | ||
105 | return false; | 105 | return false; | ||
106 | } | 106 | } | ||
107 | } | 107 | } | ||
108 | 108 | | |||
109 | return true; | 109 | return true; | ||
110 | } | 110 | } | ||
111 | 111 | | |||
112 | 112 | |