[Marble-devel] Problems with map creation or: The curse of QFileSystemWatcher

Mülner, Helmut helmut.muelner at joanneum.at
Tue Jun 14 09:46:15 CEST 2011


Hi,

I resolved part of the focus problem by prohibiting redundant updates of the theme model:

void MapThemeManager::updateMapThemeModel()
{
    mDebug() << "updateMapThemeModel";
    int currentCount = d->m_mapThemeModel->rowCount();
    QStringList stringlist = findMapThemes();
    if (currentCount == stringlist.size()) {
        // nothing changed
        return;
    }
    d->m_mapThemeModel->clear();
  ...

Of course there still should be code to remember the selected map theme and restore it after the update.

I still have the issue of fuzzy maps after runtime map generation.
You may be able to reproduce it with this steps:
 - remove the local tile cache of schagen1689
 - start marble with the plain map
 - zoom in several times
 - select the schagen1689 theme
 -> the map may be fuzzy

I think I found the reason of this behaviour: It seems to be another data race caused by the QFileSystemWatcher:
When a local map directory changes all dgml files are reloaded, which seems to be in parallel to tile creation.
The end result on my system (Windows7) is that  GeoSceneTexture::m_maximumTileLevel changes to -1
with the result that only level 0 tile are used.

If you select the plan map and then again the schagen1689 map the GeoSceneTexture::m_maximumTileLevel is set correctly.

Best regards

Helmut Mülner


More information about the Marble-devel mailing list