@@ -81,7 +81,8 @@ class TestQgsVectorLayer: public QObject
81
81
mpNonSpatialLayer = new QgsVectorLayer ( myDbfFileInfo.filePath (),
82
82
myDbfFileInfo.completeBaseName (), " ogr" );
83
83
// Register the layer with the registry
84
- QgsMapLayerRegistry::instance ()->addMapLayer ( mpNonSpatialLayer );
84
+ QgsMapLayerRegistry::instance ()->addMapLayers (
85
+ QList<QgsMapLayer *>() << mpNonSpatialLayer );
85
86
//
86
87
// create a point layer that will be used in all tests...
87
88
//
@@ -90,7 +91,8 @@ class TestQgsVectorLayer: public QObject
90
91
mpPointsLayer = new QgsVectorLayer ( myPointFileInfo.filePath (),
91
92
myPointFileInfo.completeBaseName (), " ogr" );
92
93
// Register the layer with the registry
93
- QgsMapLayerRegistry::instance ()->addMapLayer ( mpPointsLayer );
94
+ QgsMapLayerRegistry::instance ()->addMapLayers (
95
+ QList<QgsMapLayer *>() << mpPointsLayer );
94
96
95
97
//
96
98
// create a poly layer that will be used in all tests...
@@ -100,7 +102,8 @@ class TestQgsVectorLayer: public QObject
100
102
mpPolysLayer = new QgsVectorLayer ( myPolyFileInfo.filePath (),
101
103
myPolyFileInfo.completeBaseName (), " ogr" );
102
104
// Register the layer with the registry
103
- QgsMapLayerRegistry::instance ()->addMapLayer ( mpPolysLayer );
105
+ QgsMapLayerRegistry::instance ()->addMapLayers (
106
+ QList<QgsMapLayer *>() << mpPolysLayer );
104
107
105
108
106
109
//
@@ -111,7 +114,8 @@ class TestQgsVectorLayer: public QObject
111
114
mpLinesLayer = new QgsVectorLayer ( myLineFileInfo.filePath (),
112
115
myLineFileInfo.completeBaseName (), " ogr" );
113
116
// Register the layer with the registry
114
- QgsMapLayerRegistry::instance ()->addMapLayer ( mpLinesLayer );
117
+ QgsMapLayerRegistry::instance ()->addMapLayers (
118
+ QList<QgsMapLayer *>() << mpLinesLayer );
115
119
//
116
120
// We only need maprender instead of mapcanvas
117
121
// since maprender does not require a qui
0 commit comments