Evict obsolete provider data on init()


During initialization, this patch makes sure that the cached
tiles belong to the provider currently in use by using the file
lastModified() value and comparing it against the (optional)
Timestamp in the provider records.

If this value is not present in the provider record, or if it
is older than the newest modified file, the data is untouched.

This operation is performed separately for each map id.
This method isn't perfect in all use cases, though.
E.g., if we are forced to shut down one of the provider
and run on the hardcoded fallback, which has an older TS.
These are however rare edge cases that most likely won't
happen in practice (in the case above we could put the
content of the hardcoded provider in the remote json
files too)

Change-Id: Ie29cf05c1fbc835ce4e3363fc0caa38a97800214
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
commit4f192687cc07dbe5de1dbed3187d90045ed38703
parent219e7b84ac048ff585c36f47a1c783af9ae4e4bc
authorPaolo Angelelli <paolo.angelelli@qt.io>
committerPaolo Angelelli <paolo.angelelli@qt.io>
commit timeTue, 8 Nov 2016 15:19:24 +0000