Skip to content
Permalink
Browse files
fix some tests crashes, fix some tests and some mtr updates
  • Loading branch information
jef-n committed Mar 29, 2014
1 parent 480ae45 commit 0693fe93eed786f1b8bb4bbac9c8323b60c81e9c
Show file tree
Hide file tree
Showing 37 changed files with 166 additions and 231 deletions.
@@ -37,7 +37,8 @@ Build-Depends:
graphviz,
txt2tags,
xvfb, xauth,
xfonts-base, xfonts-100dpi, xfonts-75dpi, xfonts-scalable
xfonts-base, xfonts-100dpi, xfonts-75dpi, xfonts-scalable,
spawn-cgi, lighttpd, poppler-utils
Build-Conflicts: libqgis-dev, qgis-dev
Standards-Version: 3.9.5
Homepage: http://qgis.org/
@@ -38,7 +38,8 @@ Build-Depends:
graphviz,
txt2tags,
xvfb, xauth,
xfonts-base, xfonts-100dpi, xfonts-75dpi, xfonts-scalable
xfonts-base, xfonts-100dpi, xfonts-75dpi, xfonts-scalable,
spawn-cgi, lighttpd, poppler-utils
Build-Conflicts: libqgis-dev, qgis-dev
Standards-Version: 3.8.4
XS-Python-Version: current
@@ -37,7 +37,8 @@ Build-Depends:
graphviz,
txt2tags,
xvfb, xauth,
xfonts-base, xfonts-100dpi, xfonts-75dpi, xfonts-scalable
xfonts-base, xfonts-100dpi, xfonts-75dpi, xfonts-scalable,
spawn-cgi, lighttpd, poppler-utils
Build-Conflicts: libqgis-dev, qgis-dev
Standards-Version: 3.9.3
XS-Python-Version: current
@@ -39,7 +39,8 @@ Build-Depends:
graphviz,
txt2tags,
xvfb, xauth,
xfonts-base, xfonts-100dpi, xfonts-75dpi, xfonts-scalable
xfonts-base, xfonts-100dpi, xfonts-75dpi, xfonts-scalable,
spawn-cgi, lighttpd, poppler-utils
Build-Conflicts: libqgis-dev, qgis-dev
Standards-Version: 3.8.4
XS-Python-Version: current
@@ -39,7 +39,8 @@ Build-Depends:
graphviz,
txt2tags,
xvfb, xauth,
xfonts-base, xfonts-100dpi, xfonts-75dpi, xfonts-scalable
xfonts-base, xfonts-100dpi, xfonts-75dpi, xfonts-scalable,
spawn-cgi, lighttpd, poppler-utils
Build-Conflicts: libqgis-dev, qgis-dev
Standards-Version: 3.8.4
XS-Python-Version: current
@@ -37,7 +37,8 @@ Build-Depends:
graphviz,
txt2tags,
xvfb, xauth,
xfonts-base, xfonts-100dpi, xfonts-75dpi, xfonts-scalable
xfonts-base, xfonts-100dpi, xfonts-75dpi, xfonts-scalable,
spawn-cgi, lighttpd, poppler-utils
Build-Conflicts: libqgis-dev, qgis-dev
Standards-Version: 3.9.5
Homepage: http://qgis.org/
@@ -38,7 +38,8 @@ Build-Depends:
txt2tags,
xvfb, xauth,
xfonts-base, xfonts-100dpi, xfonts-75dpi, xfonts-scalable,
oracle-instantclient11.2-devel
oracle-instantclient11.2-devel,
spawn-cgi, lighttpd, poppler-utils
Build-Conflicts: libqgis-dev, qgis-dev
Standards-Version: 3.9.5
Homepage: http://qgis.org/
@@ -37,7 +37,8 @@ Build-Depends:
graphviz,
txt2tags,
xvfb, xauth,
xfonts-base, xfonts-100dpi, xfonts-75dpi, xfonts-scalable
xfonts-base, xfonts-100dpi, xfonts-75dpi, xfonts-scalable,
spawn-cgi, lighttpd, poppler-utils
Build-Conflicts: libqgis-dev, qgis-dev
Standards-Version: 3.8.4
XS-Python-Version: current
@@ -37,7 +37,8 @@ Build-Depends:
graphviz,
txt2tags,
xvfb, xauth,
xfonts-base, xfonts-100dpi, xfonts-75dpi, xfonts-scalable
xfonts-base, xfonts-100dpi, xfonts-75dpi, xfonts-scalable,
spawn-cgi, lighttpd, poppler-utils
Build-Conflicts: libqgis-dev, qgis-dev
Standards-Version: 3.9.3
XS-Python-Version: current
@@ -143,7 +143,7 @@ build-stamp: debian/build/CMakeCache.txt

ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
# Code to run the package test suite - and ignore the outcome for now
-LD_LIBRARY_PATH=$(PWD)/debian/build/output/lib:$(LD_LIBRARY_PATH) $(TESTMAKE) -C debian/build $(DEB_TEST_TARGET)
-LD_LIBRARY_PATH=$(PWD)/debian/build/output/lib:$(LD_LIBRARY_PATH) PATH=/usr/sbin:$(PATH) LC_CTYPE=C.UTF-8 $(TESTMAKE) -C debian/build $(DEB_TEST_TARGET)
else
@echo Skipping tests.
endif
@@ -6,7 +6,7 @@
* the cache listens to repaintRequested() signals from layer. If triggered, the cache
* removes the rendered image (and disconnects from the layer).
*
* The class is thread-safe (multiple classes can access the same instance safely).
* The class is thread-safe (multiple classes can access the same instance safely).
*
* @note added in 2.4
*/
@@ -448,11 +448,11 @@ QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, QWidget * parent,
, mMousePrecisionDecimalPlaces( 0 )
, mInternalClipboard( 0 )
, mShowProjectionTab( false )
, mPythonUtils( NULL )
, mPythonUtils( 0 )
#ifdef Q_OS_WIN
, mSkipNextContextMenuEvent( 0 )
#endif
, mpGpsWidget( NULL )
, mpGpsWidget( 0 )
{
if ( smInstance )
{
@@ -785,6 +785,7 @@ QgisApp::QgisApp( )
mMapCanvas->freeze();
mMapLegend = new QgsLegend( mMapCanvas );
mUndoWidget = new QgsUndoWidget( NULL, mMapCanvas );
mInfoBar = new QgsMessageBar( centralWidget() );
// More tests may need more members to be initialized
}

@@ -3785,12 +3786,7 @@ void QgisApp::dxfExport()
dxfExport.setSymbologyExport( d.symbologyMode() );
if ( mapCanvas() )
{
QgsMapRenderer* r = mapCanvas()->mapRenderer();
if ( r )
{
dxfExport.setMapUnits( r->mapUnits() );
}

dxfExport.setMapUnits( mapCanvas()->mapUnits() );
//extent
if ( d.exportMapExtent() )
{
@@ -42,17 +42,17 @@
#include <cmath>

QgsComposerMap::QgsComposerMap( QgsComposition *composition, int x, int y, int width, int height )
: QgsComposerItem( x, y, width, height, composition ), mMapRotation( 0 ), mKeepLayerSet( false ),
mOverviewFrameMapId( -1 ), mOverviewBlendMode( QPainter::CompositionMode_SourceOver ), mOverviewInverted( false ), mOverviewCentered( false ),
mGridEnabled( false ), mGridStyle( Solid ),
mGridIntervalX( 0.0 ), mGridIntervalY( 0.0 ), mGridOffsetX( 0.0 ), mGridOffsetY( 0.0 ), mGridAnnotationFontColor( QColor( 0, 0, 0 ) ),
mGridAnnotationPrecision( 3 ), mShowGridAnnotation( false ), mGridBlendMode( QPainter::CompositionMode_SourceOver ),
mLeftGridAnnotationPosition( OutsideMapFrame ), mRightGridAnnotationPosition( OutsideMapFrame ),
mTopGridAnnotationPosition( OutsideMapFrame ), mBottomGridAnnotationPosition( OutsideMapFrame ), mAnnotationFrameDistance( 1.0 ),
mLeftGridAnnotationDirection( Horizontal ), mRightGridAnnotationDirection( Horizontal ), mTopGridAnnotationDirection( Horizontal ),
mBottomGridAnnotationDirection( Horizontal ), mGridFrameStyle( NoGridFrame ), mGridFrameWidth( 2.0 ),
mGridFramePenThickness( 0.5 ), mGridFramePenColor( QColor( 0, 0, 0 ) ), mGridFrameFillColor1( Qt::white ), mGridFrameFillColor2( Qt::black ),
mCrossLength( 3 ), mMapCanvas( 0 ), mDrawCanvasItems( true ), mAtlasDriven( false ), mAtlasFixedScale( false ), mAtlasMargin( 0.10 )
: QgsComposerItem( x, y, width, height, composition ), mMapRotation( 0 ), mKeepLayerSet( false )
, mOverviewFrameMapId( -1 ), mOverviewBlendMode( QPainter::CompositionMode_SourceOver ), mOverviewInverted( false ), mOverviewCentered( false )
, mGridEnabled( false ), mGridStyle( Solid )
, mGridIntervalX( 0.0 ), mGridIntervalY( 0.0 ), mGridOffsetX( 0.0 ), mGridOffsetY( 0.0 ), mGridAnnotationFontColor( QColor( 0, 0, 0 ) )
, mGridAnnotationPrecision( 3 ), mShowGridAnnotation( false ), mGridBlendMode( QPainter::CompositionMode_SourceOver )
, mLeftGridAnnotationPosition( OutsideMapFrame ), mRightGridAnnotationPosition( OutsideMapFrame )
, mTopGridAnnotationPosition( OutsideMapFrame ), mBottomGridAnnotationPosition( OutsideMapFrame ), mAnnotationFrameDistance( 1.0 )
, mLeftGridAnnotationDirection( Horizontal ), mRightGridAnnotationDirection( Horizontal ), mTopGridAnnotationDirection( Horizontal )
, mBottomGridAnnotationDirection( Horizontal ), mGridFrameStyle( NoGridFrame ), mGridFrameWidth( 2.0 )
, mGridFramePenThickness( 0.5 ), mGridFramePenColor( QColor( 0, 0, 0 ) ), mGridFrameFillColor1( Qt::white ), mGridFrameFillColor2( Qt::black )
, mCrossLength( 3 ), mMapCanvas( 0 ), mDrawCanvasItems( true ), mAtlasDriven( false ), mAtlasFixedScale( false ), mAtlasMargin( 0.10 )
{
mComposition = composition;
mOverviewFrameMapSymbol = 0;
@@ -100,17 +100,17 @@ QgsComposerMap::QgsComposerMap( QgsComposition *composition, int x, int y, int w
}

QgsComposerMap::QgsComposerMap( QgsComposition *composition )
: QgsComposerItem( 0, 0, 10, 10, composition ), mMapRotation( 0 ), mKeepLayerSet( false ), mOverviewFrameMapId( -1 ),
mOverviewBlendMode( QPainter::CompositionMode_SourceOver ), mOverviewInverted( false ), mOverviewCentered( false ),
mGridEnabled( false ), mGridStyle( Solid ),
mGridIntervalX( 0.0 ), mGridIntervalY( 0.0 ), mGridOffsetX( 0.0 ), mGridOffsetY( 0.0 ), mGridAnnotationFontColor( QColor( 0, 0, 0 ) ),
mGridAnnotationPrecision( 3 ), mShowGridAnnotation( false ), mGridBlendMode( QPainter::CompositionMode_SourceOver ),
mLeftGridAnnotationPosition( OutsideMapFrame ), mRightGridAnnotationPosition( OutsideMapFrame ),
mTopGridAnnotationPosition( OutsideMapFrame ), mBottomGridAnnotationPosition( OutsideMapFrame ), mAnnotationFrameDistance( 1.0 ),
mLeftGridAnnotationDirection( Horizontal ), mRightGridAnnotationDirection( Horizontal ), mTopGridAnnotationDirection( Horizontal ),
mBottomGridAnnotationDirection( Horizontal ), mGridFrameStyle( NoGridFrame ), mGridFrameWidth( 2.0 ), mGridFramePenThickness( 0.5 ),
mGridFramePenColor( QColor( 0, 0, 0 ) ), mGridFrameFillColor1( Qt::white ), mGridFrameFillColor2( Qt::black ),
mCrossLength( 3 ), mMapCanvas( 0 ), mDrawCanvasItems( true ), mAtlasDriven( false ), mAtlasFixedScale( false ), mAtlasMargin( 0.10 )
: QgsComposerItem( 0, 0, 10, 10, composition ), mMapRotation( 0 ), mKeepLayerSet( false ), mOverviewFrameMapId( -1 )
, mOverviewBlendMode( QPainter::CompositionMode_SourceOver ), mOverviewInverted( false ), mOverviewCentered( false )
, mGridEnabled( false ), mGridStyle( Solid )
, mGridIntervalX( 0.0 ), mGridIntervalY( 0.0 ), mGridOffsetX( 0.0 ), mGridOffsetY( 0.0 ), mGridAnnotationFontColor( QColor( 0, 0, 0 ) )
, mGridAnnotationPrecision( 3 ), mShowGridAnnotation( false ), mGridBlendMode( QPainter::CompositionMode_SourceOver )
, mLeftGridAnnotationPosition( OutsideMapFrame ), mRightGridAnnotationPosition( OutsideMapFrame )
, mTopGridAnnotationPosition( OutsideMapFrame ), mBottomGridAnnotationPosition( OutsideMapFrame ), mAnnotationFrameDistance( 1.0 )
, mLeftGridAnnotationDirection( Horizontal ), mRightGridAnnotationDirection( Horizontal ), mTopGridAnnotationDirection( Horizontal )
, mBottomGridAnnotationDirection( Horizontal ), mGridFrameStyle( NoGridFrame ), mGridFrameWidth( 2.0 ), mGridFramePenThickness( 0.5 )
, mGridFramePenColor( QColor( 0, 0, 0 ) ), mGridFrameFillColor1( Qt::white ), mGridFrameFillColor2( Qt::black )
, mCrossLength( 3 ), mMapCanvas( 0 ), mDrawCanvasItems( true ), mAtlasDriven( false ), mAtlasFixedScale( false ), mAtlasMargin( 0.10 )
{
mOverviewFrameMapSymbol = 0;
mGridLineSymbol = 0;
@@ -19,21 +19,25 @@
#include "qgsdxfexport.h"
#include "qgsmaplayerregistry.h"
#include "qgspalgeometry.h"
#include "qgsmapsettings.h"

#include "pal/pointset.h"
#include "pal/labelposition.h"

using namespace pal;

QgsDxfPalLabeling::QgsDxfPalLabeling( QgsDxfExport* dxf, const QgsRectangle& bbox, double scale, QGis::UnitType mapUnits ): QgsPalLabeling(), mDxfExport( dxf )
QgsDxfPalLabeling::QgsDxfPalLabeling( QgsDxfExport* dxf, const QgsRectangle& bbox, double scale, QGis::UnitType mapUnits )
: QgsPalLabeling()
, mDxfExport( dxf )
{
mMapRenderer.setExtent( bbox );
QgsMapSettings settings;
settings.setExtent( bbox );

int dpi = 96;
double factor = 1000 * dpi / scale / 25.4 * QGis::fromUnitToUnitFactor( mapUnits, QGis::Meters );
mMapRenderer.setOutputSize( QSizeF( bbox.width() * factor, bbox.height() * factor ), dpi );
mMapRenderer.setScale( scale );
mMapRenderer.setOutputUnits( QgsMapRenderer::Pixels );
init( &mMapRenderer );
settings.setOutputSize( QSize( bbox.width() * factor, bbox.height() * factor ) );
settings.setOutputDpi( dpi );
init( settings );

mImage = new QImage( 10, 10, QImage::Format_ARGB32_Premultiplied );
mImage->setDotsPerMeterX( 96 / 25.4 * 1000 );
@@ -35,7 +35,6 @@ class CORE_EXPORT QgsDxfPalLabeling: public QgsPalLabeling

private:
QgsDxfExport* mDxfExport;
QgsMapRenderer mMapRenderer;
QgsRenderContext mRenderContext;

//only used for render context
@@ -18,9 +18,24 @@
#include "diagram/qgspiediagram.h"
#include "diagram/qgshistogramdiagram.h"
#include "qgsrendercontext.h"

#include <QDomElement>
#include <QPainter>

QgsDiagramLayerSettings::QgsDiagramLayerSettings()
: placement( AroundPoint )
, placementFlags( OnLine )
, priority( 5 )
, obstacle( false )
, dist( 0.0 )
, renderer( 0 )
, palLayer( 0 )
, ct( 0 )
, xform( 0 )
, xPosColumn( -1 )
, yPosColumn( -1 )
{
}

QgsDiagramLayerSettings::~QgsDiagramLayerSettings()
{
@@ -254,7 +269,8 @@ void QgsDiagramSettings::writeXML( QDomElement& rendererElem, QDomDocument& doc,
rendererElem.appendChild( categoryElem );
}

QgsDiagramRendererV2::QgsDiagramRendererV2(): mDiagram( 0 )
QgsDiagramRendererV2::QgsDiagramRendererV2()
: mDiagram( 0 )
{
}

@@ -58,20 +58,7 @@ class CORE_EXPORT QgsDiagramLayerSettings
MapOrientation = 8
};

QgsDiagramLayerSettings()
: placement( AroundPoint )
, placementFlags( OnLine )
, priority( 5 )
, obstacle( false )
, dist( 0.0 )
, renderer( 0 )
, palLayer( 0 )
, ct( 0 )
, xform( 0 )
, xPosColumn( -1 )
, yPosColumn( -1 )
{
}
QgsDiagramLayerSettings();

~QgsDiagramLayerSettings();

@@ -2220,6 +2220,8 @@ int QgsExpression::NodeBinaryOperator::precedence() const
case boConcat:
return 7;
}
Q_ASSERT( 0 && "unexpected binary operator" );
return -1;
}

QString QgsExpression::NodeBinaryOperator::dump() const
@@ -241,8 +241,8 @@ bool QgsFontUtils::loadStandardTestFonts( QStringList loadstyles )
int fontID = QFontDatabase::addApplicationFont( fontPath );
loaded = ( fontID != -1 );
fontsLoaded = ( fontsLoaded || loaded );
QgsDebugMsg( QString( "Test font '%1' %2 from filesystem" )
.arg( familyStyle ).arg( loaded ? "loaded" : "FAILED to load" ) );
QgsDebugMsg( QString( "Test font '%1' %2 from filesystem [%3]" )
.arg( familyStyle ).arg( loaded ? "loaded" : "FAILED to load" ).arg( fontPath ) );
}
else
{
@@ -649,14 +649,14 @@ LayerRenderJobs QgsMapRendererJob::prepareJobs( QPainter* painter, QgsPalLabelin
}
}

/*
#if 0
// TODO: split extent
if ( split )
{
mRenderContext.setExtent( r2 );
ml->draw( mRenderContext );
}*/

}
#endif
} // while (li.hasPrevious())

return layerJobs;
@@ -61,7 +61,7 @@ class CORE_EXPORT QgsMapSettings
ForceVectorOutput = 0x04,
UseAdvancedEffects = 0x08,
DrawLabeling = 0x10
// TODO: ignore scale-based visibiity (overview)
// TODO: ignore scale-based visibility (overview)
};
Q_DECLARE_FLAGS( Flags, Flag )

@@ -30,7 +30,6 @@
QgsRenderChecker::QgsRenderChecker( ) :
mReport( "" ),
mMatchTarget( 0 ),
mpMapRenderer( NULL ),
mElapsedTime( 0 ),
mRenderedImageFile( "" ),
mExpectedImageFile( "" ),
@@ -39,7 +38,6 @@ QgsRenderChecker::QgsRenderChecker( ) :
mElapsedTimeTarget( 0 ),
mControlPathPrefix( "" )
{

}

QString QgsRenderChecker::controlImagePath() const
@@ -121,7 +121,6 @@ class CORE_EXPORT QgsRenderChecker

QString mReport;
unsigned int mMatchTarget;
QgsMapRenderer * mpMapRenderer;
int mElapsedTime;
QString mRenderedImageFile;
QString mExpectedImageFile;

0 comments on commit 0693fe9

Please sign in to comment.