Changeset View
Changeset View
Standalone View
Standalone View
dataengines/potd/potd.cpp
Show First 20 Lines • Show All 180 Lines • ▼ Show 20 Line(s) | 176 | while ( it.hasNext() ) { | |||
---|---|---|---|---|---|
181 | } | 181 | } | ||
182 | 182 | | |||
183 | if ( !it.key().contains(':') ) { | 183 | if ( !it.key().contains(':') ) { | ||
184 | const QString path = CachedProvider::identifierToPath( it.key() ); | 184 | const QString path = CachedProvider::identifierToPath( it.key() ); | ||
185 | if ( !QFile::exists(path) ) { | 185 | if ( !QFile::exists(path) ) { | ||
186 | updateSourceEvent( it.key() ); | 186 | updateSourceEvent( it.key() ); | ||
187 | } else { | 187 | } else { | ||
188 | QFileInfo info( path ); | 188 | QFileInfo info( path ); | ||
189 | if ( info.lastModified().daysTo( QDateTime::currentDateTime() ) > 1 ) { | 189 | if ( info.lastModified().daysTo( QDateTime::currentDateTime() ) >= 1 ) { | ||
190 | updateSourceEvent( it.key() ); | 190 | updateSourceEvent( it.key() ); | ||
191 | } | 191 | } | ||
192 | } | 192 | } | ||
193 | } | 193 | } | ||
194 | } | 194 | } | ||
195 | } | 195 | } | ||
196 | 196 | | |||
197 | K_EXPORT_PLASMA_DATAENGINE_WITH_JSON(potdengine, PotdEngine, "plasma-dataengine-potd.json") | 197 | K_EXPORT_PLASMA_DATAENGINE_WITH_JSON(potdengine, PotdEngine, "plasma-dataengine-potd.json") | ||
198 | 198 | | |||
199 | #include "potd.moc" | 199 | #include "potd.moc" |