mirror of
https://github.com/qgis/QGIS.git
synced 2025-12-07 00:03:52 -05:00
Fix failing pal labeling canvas test
Make sure image dpi respects mapsettings dpi in QgsMapRendererSequentialJob. Also apply a workaround to avoid segfault on end of test. This workaround probably should be moved to QgsApplication::exitQgis() but I'll do that after release in case of regressions.
This commit is contained in:
parent
5273889d45
commit
e96b204b09
@ -25,5 +25,5 @@ install:
|
||||
- cmake -DWITH_SERVER=ON -DWITH_STAGED_PLUGINS=OFF -DWITH_GRASS=OFF \
|
||||
-DSUPPRESS_QT_WARNINGS=ON -DENABLE_MODELTEST=ON -DWITH_QWTPOLAR=OFF -DWITH_APIDOC=ON ..
|
||||
|
||||
script: xvfb-run ctest -V -E 'PyQgsPalLabelingCanvas|PyQgsPalLabelingServer|qgis_wcsprovidertest' -S ../qgis-test-travis.ctest --output-on-failure
|
||||
script: xvfb-run ctest -V -E 'PyQgsPalLabelingServer|qgis_wcsprovidertest' -S ../qgis-test-travis.ctest --output-on-failure
|
||||
|
||||
|
||||
@ -29,6 +29,8 @@ QgsMapRendererSequentialJob::QgsMapRendererSequentialJob( const QgsMapSettings&
|
||||
QgsDebugMsg( "SEQUENTIAL construct" );
|
||||
|
||||
mImage = QImage( mSettings.outputSize(), mSettings.outputImageFormat() );
|
||||
mImage.setDotsPerMeterX( 1000 * settings.outputDpi() / 25.4 );
|
||||
mImage.setDotsPerMeterY( 1000 * settings.outputDpi() / 25.4 );
|
||||
}
|
||||
|
||||
QgsMapRendererSequentialJob::~QgsMapRendererSequentialJob()
|
||||
|
||||
@ -17,9 +17,10 @@ __copyright__ = 'Copyright 2013, The QGIS Project'
|
||||
# This will get replaced with a git SHA1 when you do a git archive
|
||||
__revision__ = '$Format:%H$'
|
||||
|
||||
import qgis
|
||||
import sys
|
||||
import os
|
||||
from PyQt4.QtCore import qDebug
|
||||
from PyQt4.QtCore import qDebug, QThreadPool
|
||||
|
||||
from utilities import (
|
||||
getTempfilePath,
|
||||
@ -49,6 +50,8 @@ class TestCanvasBase(TestQgsPalLabeling):
|
||||
TestQgsPalLabeling.tearDownClass()
|
||||
cls.removeMapLayer(cls.layer)
|
||||
cls.layer = None
|
||||
#avoid crash on finish, probably related to https://bugreports.qt.io/browse/QTBUG-35760
|
||||
QThreadPool.globalInstance().waitForDone()
|
||||
|
||||
def setUp(self):
|
||||
"""Run before each test."""
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user