Bugfix of issue introduced in commit 9040ec1baf33e55a9ba5abcc4fa2ee18d54a4212
When doing the spatialite cache initialization with OGR, the attribute
names get 'laundered' in lower case, which makes their matching afterwards
fail. Fix this. And also handle the situation where an attribute would
be named 'geometry'
GDAL 2.0 changed (fixed) the bilinear downsampling algorithm, so
switch to the average algorithm so that test results are the same
for GDAL versions >= 2.0 and < 2.0.
and new widget QgsComposerItemComboBox for showing matching composer
items.
Swap existing comboboxes to use the new widget, which removes a lot
of fragile code designed to allow selection of items. Additionally
the combobox now show the correct item id rather than always showing
"Map 0/1/..."
The method initializes the gmFunctions static member, without any mutex protection.
This turned out to cause random crashes in the tests of the WFS provider since the downloader
thread may evaluate an expression, in parallel of the main thread, which does the same.
This was mainly seen on Mac Travis (2 crashes + 1 failures, over 50 iterations), when
parallelizing tests so as to get particular scheduling :
https://travis-ci.org/rouault/Quantum-GIS/builds/121720556.
But I could finally reproduce it systematically on my Linux box when inserting the following sleep.
diff --git a/src/providers/wfs/qgswfsshareddata.cpp b/src/providers/wfs/qgswfsshareddata.cpp
index adc7042..e9e4577 100644
--- a/src/providers/wfs/qgswfsshareddata.cpp
+++ b/src/providers/wfs/qgswfsshareddata.cpp
@@ -426,6 +426,7 @@ int QgsWFSSharedData::registerToCache( QgsWFSFeatureIterator* iterator, QgsRecta
connect( mDownloader, SIGNAL( ready() ), &loop, SLOT( quit() ) );
mDownloader->start();
loop.exec( QEventLoop::ExcludeUserInputEvents );
+ usleep( 100 * 1000 );
}
if ( mDownloadFinished )
return -1;
After applying this commit, the Mac builder is fine:
https://travis-ci.org/rouault/Quantum-GIS/builds/121756158
In some WFS GetFeature request, with Filter or FeatureId, all the fields are not well loaded in the feature.
To fix it, we just verifying that the attribute index is lesser than the feature fields count.
Fixes#14619