Skip to content

Commit 5160d46

Browse files
committed
More (probably harmless) uninitialized variables in tests
1 parent a3668f5 commit 5160d46

19 files changed

+204
-19
lines changed

tests/src/analysis/testqgszonalstatistics.cpp

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,15 @@
2626
class TestQgsZonalStatistics : public QObject
2727
{
2828
Q_OBJECT
29+
30+
public:
31+
TestQgsZonalStatistics();
32+
2933
private slots:
3034
void initTestCase();
3135
void cleanupTestCase();
32-
void init() {};
33-
void cleanup() {};
36+
void init() {}
37+
void cleanup() {}
3438

3539
void testStatistics();
3640

@@ -39,6 +43,12 @@ class TestQgsZonalStatistics : public QObject
3943
QString mRasterPath;
4044
};
4145

46+
TestQgsZonalStatistics::TestQgsZonalStatistics()
47+
: mVectorLayer( NULL )
48+
{
49+
50+
}
51+
4252
void TestQgsZonalStatistics::initTestCase()
4353
{
4454
QgsApplication::init();

tests/src/app/testqgisappclipboard.cpp

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,15 @@
3636
class TestQgisAppClipboard : public QObject
3737
{
3838
Q_OBJECT
39+
40+
public:
41+
TestQgisAppClipboard();
42+
3943
private slots:
4044
void initTestCase();// will be called before the first testfunction is executed.
4145
void cleanupTestCase();// will be called after the last testfunction was executed.
42-
void init() {};// will be called before each testfunction is executed.
43-
void cleanup() {};// will be called after every testfunction.
46+
void init() {} // will be called before each testfunction is executed.
47+
void cleanup() {} // will be called after every testfunction.
4448

4549
void copyPaste();
4650

@@ -49,6 +53,12 @@ class TestQgisAppClipboard : public QObject
4953
QString mTestDataDir;
5054
};
5155

56+
TestQgisAppClipboard::TestQgisAppClipboard()
57+
: mQgisApp( NULL )
58+
{
59+
60+
}
61+
5262
//runs before all tests
5363
void TestQgisAppClipboard::initTestCase()
5464
{

tests/src/core/regression1141.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@
5050
class Regression1141: public QObject
5151
{
5252
Q_OBJECT
53+
54+
public:
55+
Regression1141();
56+
5357
private slots:
5458
void initTestCase();// will be called before the first testfunction is executed.
5559
void cleanupTestCase();// will be called after the last testfunction was executed.
@@ -68,6 +72,12 @@ class Regression1141: public QObject
6872
QString mFileName;
6973
};
7074

75+
Regression1141::Regression1141()
76+
: mError( QgsVectorFileWriter::NoError )
77+
{
78+
79+
}
80+
7181
void Regression1141::initTestCase()
7282
{
7383
//

tests/src/core/regression992.cpp

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,15 @@
4343
class Regression992 : public QObject
4444
{
4545
Q_OBJECT
46+
47+
public:
48+
Regression992();
49+
4650
private slots:
4751
void initTestCase();// will be called before the first testfunction is executed.
4852
void cleanupTestCase();// will be called after the last testfunction was executed.
49-
void init() {};// will be called before each testfunction is executed.
50-
void cleanup() {};// will be called after every testfunction.
53+
void init() {}// will be called before each testfunction is executed.
54+
void cleanup() {}// will be called after every testfunction.
5155

5256
void regression992();
5357
private:
@@ -57,6 +61,12 @@ class Regression992 : public QObject
5761
QString mReport;
5862
};
5963

64+
Regression992::Regression992()
65+
: mpRasterLayer( NULL )
66+
{
67+
68+
}
69+
6070
//runs before all tests
6171
void Regression992::initTestCase()
6272
{

tests/src/core/testqgscomposerhtml.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@
2727
class TestQgsComposerHtml : public QObject
2828
{
2929
Q_OBJECT
30+
31+
public:
32+
TestQgsComposerHtml();
33+
3034
private slots:
3135
void initTestCase();// will be called before the first testfunction is executed.
3236
void cleanupTestCase();// will be called after the last testfunction was executed.
@@ -46,6 +50,12 @@ class TestQgsComposerHtml : public QObject
4650
QFont mTestFont;
4751
};
4852

53+
TestQgsComposerHtml::TestQgsComposerHtml()
54+
: mComposition( NULL )
55+
{
56+
57+
}
58+
4959
void TestQgsComposerHtml::initTestCase()
5060
{
5161
QgsApplication::init();

tests/src/core/testqgscomposermapgrid.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@
2929
class TestQgsComposerMapGrid : public QObject
3030
{
3131
Q_OBJECT
32+
33+
public:
34+
TestQgsComposerMapGrid();
35+
3236
private slots:
3337
void initTestCase();// will be called before the first testfunction is executed.
3438
void cleanupTestCase();// will be called after the last testfunction was executed.
@@ -61,6 +65,13 @@ class TestQgsComposerMapGrid : public QObject
6165
QString mReport;
6266
};
6367

68+
TestQgsComposerMapGrid::TestQgsComposerMapGrid()
69+
: mComposition( NULL )
70+
, mComposerMap( NULL )
71+
{
72+
73+
}
74+
6475
void TestQgsComposerMapGrid::initTestCase()
6576
{
6677
QgsApplication::init();

tests/src/core/testqgscomposermultiframe.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@
2626
class TestQgsComposerMultiFrame : public QObject
2727
{
2828
Q_OBJECT
29+
30+
public:
31+
TestQgsComposerMultiFrame();
32+
2933
private slots:
3034
void initTestCase();// will be called before the first testfunction is executed.
3135
void cleanupTestCase();// will be called after the last testfunction was executed.
@@ -43,6 +47,12 @@ class TestQgsComposerMultiFrame : public QObject
4347
QString mReport;
4448
};
4549

50+
TestQgsComposerMultiFrame::TestQgsComposerMultiFrame()
51+
: mComposition( NULL )
52+
{
53+
54+
}
55+
4656
void TestQgsComposerMultiFrame::initTestCase()
4757
{
4858
mComposition = new QgsComposition( mMapSettings );

tests/src/core/testqgscomposerobject.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@
2525
class TestQgsComposerObject : public QObject
2626
{
2727
Q_OBJECT
28+
29+
public:
30+
TestQgsComposerObject();
31+
2832
private slots:
2933
void initTestCase();// will be called before the first testfunction is executed.
3034
void cleanupTestCase();// will be called after the last testfunction was executed.
@@ -45,6 +49,12 @@ class TestQgsComposerObject : public QObject
4549

4650
};
4751

52+
TestQgsComposerObject::TestQgsComposerObject()
53+
: mComposition( NULL )
54+
{
55+
56+
}
57+
4858
void TestQgsComposerObject::initTestCase()
4959
{
5060
mComposition = new QgsComposition( mMapSettings );

tests/src/core/testqgscomposerpicture.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@
2727
class TestQgsComposerPicture : public QObject
2828
{
2929
Q_OBJECT
30+
31+
public:
32+
TestQgsComposerPicture();
33+
3034
private slots:
3135
void initTestCase();// will be called before the first testfunction is executed.
3236
void cleanupTestCase();// will be called after the last testfunction was executed.
@@ -66,6 +70,13 @@ class TestQgsComposerPicture : public QObject
6670
QString mSvgImage;
6771
};
6872

73+
TestQgsComposerPicture::TestQgsComposerPicture()
74+
: mComposition( NULL )
75+
, mComposerPicture( NULL )
76+
{
77+
78+
}
79+
6980
void TestQgsComposerPicture::initTestCase()
7081
{
7182
QgsApplication::init();

tests/src/core/testqgscomposerutils.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@
2828
class TestQgsComposerUtils : public QObject
2929
{
3030
Q_OBJECT
31+
public:
32+
TestQgsComposerUtils();
33+
3134
private slots:
3235
void initTestCase();// will be called before the first testfunction is executed.
3336
void cleanupTestCase();// will be called after the last testfunction was executed.
@@ -66,6 +69,12 @@ class TestQgsComposerUtils : public QObject
6669

6770
};
6871

72+
TestQgsComposerUtils::TestQgsComposerUtils()
73+
: mComposition( NULL )
74+
{
75+
76+
}
77+
6978
void TestQgsComposerUtils::initTestCase()
7079
{
7180
QgsApplication::init();

0 commit comments

Comments
 (0)