Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Port some more tests to layouts, drop composer tests which
have been ported to layouts
  • Loading branch information
nyalldawson committed Jan 6, 2018
1 parent 0779b88 commit b691998
Show file tree
Hide file tree
Showing 38 changed files with 711 additions and 7,770 deletions.
2 changes: 1 addition & 1 deletion src/core/layout/qgslayoutitemlegend.cpp
Expand Up @@ -38,7 +38,7 @@ QgsLayoutItemLegend::QgsLayoutItemLegend( QgsLayout *layout )
: QgsLayoutItem( layout )
, mLegendModel( new QgsLegendModel( layout->project()->layerTreeRoot() ) )
{
#if 0 //TODO
#if 0 //no longer required?
connect( &layout->atlasComposition(), &QgsAtlasComposition::renderEnded, this, &QgsLayoutItemLegend::onAtlasEnded );
#endif

Expand Down
3 changes: 3 additions & 0 deletions src/core/layout/qgslayoutitempolyline.cpp
Expand Up @@ -199,6 +199,9 @@ void QgsLayoutItemPolyline::updateMarkerSvgSizes()

void QgsLayoutItemPolyline::drawArrowHead( QPainter *p, const double x, const double y, const double angle, const double arrowHeadWidth )
{
if ( !p )
return;

double angleRad = angle / 180.0 * M_PI;
QPointF middlePoint( x, y );
//rotate both arrow points
Expand Down
2 changes: 2 additions & 0 deletions src/core/layout/qgslayoutitempolyline.h
Expand Up @@ -259,6 +259,8 @@ class CORE_EXPORT QgsLayoutItemPolyline: public QgsLayoutNodesItem
void drawSvgMarker( QPainter *p, QPointF point, double angle, const QString &markerPath, double height ) const;

double computeMarkerMargin() const;

friend class TestQgsLayoutPolyline;
};

#endif // QGSLAYOUTITEMPOLYLINE_H
Expand Down
18 changes: 1 addition & 17 deletions tests/src/core/CMakeLists.txt
Expand Up @@ -73,7 +73,6 @@ ENDMACRO (ADD_QGIS_TEST)
SET(TESTS
testqgs25drenderer.cpp
testqgsapplication.cpp
testqgsatlascomposition.cpp
testqgsauthcrypto.cpp
testqgsauthcertutils.cpp
testqgsauthconfig.cpp
Expand All @@ -83,23 +82,8 @@ SET(TESTS
testqgsclipper.cpp
testqgscolorscheme.cpp
testqgscolorschemeregistry.cpp
testqgscomposerdd.cpp
testqgscomposereffects.cpp
testqgscomposergroup.cpp
testqgscomposerlabel.cpp
testqgscomposermapgrid.cpp
testqgscomposermapoverview.cpp
testqgscomposermap.cpp
testqgscomposermodel.cpp
testqgscomposermultiframe.cpp
testqgscomposerobject.cpp
testqgscomposerpaper.cpp
testqgscomposerpicture.cpp
testqgscomposerrotation.cpp
testqgscomposerscalebar.cpp
testqgscomposershapes.cpp
testqgscomposertablev2.cpp
testqgscomposerutils.cpp
testqgsconnectionpool.cpp
testcontrastenhancements.cpp
testqgscoordinatereferencesystem.cpp
Expand Down Expand Up @@ -148,6 +132,7 @@ SET(TESTS
testqgslayoutobject.cpp
testqgslayoutpage.cpp
testqgslayoutpicture.cpp
testqgslayoutpolyline.cpp
testqgslayoutscalebar.cpp
testqgslayoutshapes.cpp
testqgslayouttable.cpp
Expand Down Expand Up @@ -208,7 +193,6 @@ SET(TESTS

IF(WITH_QTWEBKIT)
SET(TESTS ${TESTS}
testqgscomposerhtml.cpp
testqgscomposition.cpp
)
ENDIF(WITH_QTWEBKIT)
Expand Down

0 comments on commit b691998

Please sign in to comment.