Skip to content

Commit b691998

Browse files
committedJan 6, 2018
Port some more tests to layouts, drop composer tests which
have been ported to layouts
1 parent 0779b88 commit b691998

38 files changed

+711
-7770
lines changed
 

‎src/core/layout/qgslayoutitemlegend.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ QgsLayoutItemLegend::QgsLayoutItemLegend( QgsLayout *layout )
3838
: QgsLayoutItem( layout )
3939
, mLegendModel( new QgsLegendModel( layout->project()->layerTreeRoot() ) )
4040
{
41-
#if 0 //TODO
41+
#if 0 //no longer required?
4242
connect( &layout->atlasComposition(), &QgsAtlasComposition::renderEnded, this, &QgsLayoutItemLegend::onAtlasEnded );
4343
#endif
4444

‎src/core/layout/qgslayoutitempolyline.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,9 @@ void QgsLayoutItemPolyline::updateMarkerSvgSizes()
199199

200200
void QgsLayoutItemPolyline::drawArrowHead( QPainter *p, const double x, const double y, const double angle, const double arrowHeadWidth )
201201
{
202+
if ( !p )
203+
return;
204+
202205
double angleRad = angle / 180.0 * M_PI;
203206
QPointF middlePoint( x, y );
204207
//rotate both arrow points

‎src/core/layout/qgslayoutitempolyline.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,8 @@ class CORE_EXPORT QgsLayoutItemPolyline: public QgsLayoutNodesItem
259259
void drawSvgMarker( QPainter *p, QPointF point, double angle, const QString &markerPath, double height ) const;
260260

261261
double computeMarkerMargin() const;
262+
263+
friend class TestQgsLayoutPolyline;
262264
};
263265

264266
#endif // QGSLAYOUTITEMPOLYLINE_H

‎tests/src/core/CMakeLists.txt

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ ENDMACRO (ADD_QGIS_TEST)
7373
SET(TESTS
7474
testqgs25drenderer.cpp
7575
testqgsapplication.cpp
76-
testqgsatlascomposition.cpp
7776
testqgsauthcrypto.cpp
7877
testqgsauthcertutils.cpp
7978
testqgsauthconfig.cpp
@@ -83,23 +82,8 @@ SET(TESTS
8382
testqgsclipper.cpp
8483
testqgscolorscheme.cpp
8584
testqgscolorschemeregistry.cpp
86-
testqgscomposerdd.cpp
8785
testqgscomposereffects.cpp
88-
testqgscomposergroup.cpp
89-
testqgscomposerlabel.cpp
90-
testqgscomposermapgrid.cpp
91-
testqgscomposermapoverview.cpp
92-
testqgscomposermap.cpp
93-
testqgscomposermodel.cpp
9486
testqgscomposermultiframe.cpp
95-
testqgscomposerobject.cpp
96-
testqgscomposerpaper.cpp
97-
testqgscomposerpicture.cpp
98-
testqgscomposerrotation.cpp
99-
testqgscomposerscalebar.cpp
100-
testqgscomposershapes.cpp
101-
testqgscomposertablev2.cpp
102-
testqgscomposerutils.cpp
10387
testqgsconnectionpool.cpp
10488
testcontrastenhancements.cpp
10589
testqgscoordinatereferencesystem.cpp
@@ -148,6 +132,7 @@ SET(TESTS
148132
testqgslayoutobject.cpp
149133
testqgslayoutpage.cpp
150134
testqgslayoutpicture.cpp
135+
testqgslayoutpolyline.cpp
151136
testqgslayoutscalebar.cpp
152137
testqgslayoutshapes.cpp
153138
testqgslayouttable.cpp
@@ -208,7 +193,6 @@ SET(TESTS
208193

209194
IF(WITH_QTWEBKIT)
210195
SET(TESTS ${TESTS}
211-
testqgscomposerhtml.cpp
212196
testqgscomposition.cpp
213197
)
214198
ENDIF(WITH_QTWEBKIT)

0 commit comments

Comments
 (0)
Please sign in to comment.