Skip to content

Commit d2b74ca

Browse files
author
timlinux
committed
Fixes from mateusz for the following issues:
1453164 getCurrentLongAttribute incomplete return path 1449301 QgsSingleSymbolRenderer::operator= must return a value 1449277 QgsLegendGroup::insert must return a value 1449268 QgsGeometryVertexIndex::operator= must return a value 1449257 QgsGraduatedSymbolRenderer::operator= must return a value 1449252 QgsContinuousColorRenderer::operator= must return a value 1448031 QgsUniqueValueRenderer::operator= must return a value 1448028 QgsMapLayer::draw must return a value 1448014 'and' is undefined keyword git-svn-id: http://svn.osgeo.org/qgis/trunk@5060 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 3ece7be commit d2b74ca

12 files changed

+42
-27
lines changed

ChangeLog

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/* ChangeLog,v 1.214 2004/11/12 00:42:21 gsherman Exp */
22
------------------------------------------------------------------------------
3+
34
Version 0.8 'Joesephine' .... development version
45
2006-01-23 [timlinux] 0.7.9.10
56
** Dropped use of qpicture and resampling for point markers in favour of

src/core/qgsgeometryvertexindex.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ QgsGeometryVertexIndex::QgsGeometryVertexIndex( QgsGeometryVertexIndex const & r
3131
QgsGeometryVertexIndex & QgsGeometryVertexIndex::operator=( QgsGeometryVertexIndex const & rhs )
3232
{
3333
mIndex = rhs.mIndex;
34+
return *this;
3435
}
3536

3637
QgsGeometryVertexIndex::~QgsGeometryVertexIndex()

src/gui/qgscontinuouscolorrenderer.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ QgsContinuousColorRenderer& QgsContinuousColorRenderer::operator=(const QgsConti
5454
mMinimumSymbol = new QgsSymbol(*other.mMinimumSymbol);
5555
mMaximumSymbol = new QgsSymbol(*other.mMaximumSymbol);
5656
}
57+
return *this;
5758
}
5859

5960
QgsContinuousColorRenderer::~QgsContinuousColorRenderer()

src/gui/qgsgraduatedsymbolrenderer.cpp

+10-8
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,17 @@ QgsGraduatedSymbolRenderer& QgsGraduatedSymbolRenderer::operator=(const QgsGradu
4949
{
5050
if(this != &other)
5151
{
52-
mVectorType = other.mVectorType;
53-
mClassificationField = other.mClassificationField;
54-
removeSymbols();
55-
const std::list<QgsSymbol*> s = other.symbols();
56-
for(std::list<QgsSymbol*>::const_iterator it=s.begin(); it!=s.end(); ++it)
57-
{
58-
addSymbol(new QgsSymbol(**it));
59-
}
52+
mVectorType = other.mVectorType;
53+
mClassificationField = other.mClassificationField;
54+
removeSymbols();
55+
const std::list<QgsSymbol*> s = other.symbols();
56+
for(std::list<QgsSymbol*>::const_iterator it=s.begin(); it!=s.end(); ++it)
57+
{
58+
addSymbol(new QgsSymbol(**it));
59+
}
6060
}
61+
62+
return *this;
6163
}
6264

6365
QgsGraduatedSymbolRenderer::~QgsGraduatedSymbolRenderer()

src/gui/qgslabel.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838

3939
// use M_PI define PI 3.141592654
4040
#ifdef WIN32
41+
#undef M_PI
4142
#define M_PI 4*atan(1.0)
4243
#endif
4344

src/gui/qgsmaplayer.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ void QgsMapLayer::draw(QPainter *, QgsRect * viewExtent, int yTransform)
157157
bool QgsMapLayer::draw(QPainter *, QgsRect *, QgsMapToPixel *)
158158
{
159159
// std::cout << "In QgsMapLayer::draw" << std::endl;
160+
return false;
160161
}
161162

162163
void QgsMapLayer::drawLabels(QPainter *, QgsRect *, QgsMapToPixel *)

src/gui/qgsserversourceselect.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,10 @@ void QgsServerSourceSelect::populateImageEncodingGroup(QgsWmsProvider* wmsProvid
283283

284284
std::set<QString> QgsServerSourceSelect::crsForSelection()
285285
{
286-
std::set<QString> crsCandidates;;
286+
std::set<QString> crsCandidates;
287+
288+
// XXX - mloskot - temporary solution, function must return a value
289+
return crsCandidates;
287290

288291
QStringList::const_iterator i;
289292
for (i = m_selectedLayers.constBegin(); i != m_selectedLayers.constEnd(); ++i)

src/gui/qgssinglesymbolrenderer.cpp

+4-3
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,11 @@ QgsSingleSymbolRenderer& QgsSingleSymbolRenderer::operator=(const QgsSingleSymbo
6767
{
6868
if(this!=&other)
6969
{
70-
mVectorType = other.mVectorType;
71-
delete mSymbol;
72-
mSymbol = new QgsSymbol(*other.mSymbol);
70+
mVectorType = other.mVectorType;
71+
delete mSymbol;
72+
mSymbol = new QgsSymbol(*other.mSymbol);
7373
}
74+
return *this;
7475
}
7576

7677
QgsSingleSymbolRenderer::~QgsSingleSymbolRenderer()

src/gui/qgsuniquevaluerenderer.cpp

+9-8
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,16 @@ QgsUniqueValueRenderer& QgsUniqueValueRenderer::operator=(const QgsUniqueValueRe
5151
{
5252
if(this != &other)
5353
{
54-
mVectorType = other.mVectorType;
55-
mClassificationField = other.mClassificationField;
56-
clearValues();
57-
for(std::map<QString, QgsSymbol*>::iterator it=mSymbols.begin(); it!=mSymbols.end(); ++it)
58-
{
59-
QgsSymbol* s = new QgsSymbol(*(it->second));
60-
insertValue(it->first, s);
61-
}
54+
mVectorType = other.mVectorType;
55+
mClassificationField = other.mClassificationField;
56+
clearValues();
57+
for(std::map<QString, QgsSymbol*>::iterator it=mSymbols.begin(); it!=mSymbols.end(); ++it)
58+
{
59+
QgsSymbol* s = new QgsSymbol(*(it->second));
60+
insertValue(it->first, s);
61+
}
6262
}
63+
return *this;
6364
}
6465

6566
QgsUniqueValueRenderer::~QgsUniqueValueRenderer()

src/legend/qgslegendgroup.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,11 @@ bool QgsLegendGroup::insert(QgsLegendItem* theItem)
9999
{
100100
if(theItem->type() == LEGEND_LAYER)
101101
{
102-
addChild(theItem);
102+
addChild(theItem);
103103
}
104+
// XXX - mloskot - I don't know what to return
105+
// but this function must return a value
106+
return true;
104107
}
105108

106109
std::list<QgsLegendLayerFile*> QgsLegendGroup::legendLayerFiles()

src/ui/qgisappbase.ui

+2-2
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@
8989
<rect>
9090
<x>0</x>
9191
<y>0</y>
92-
<width>341</width>
93-
<height>237</height>
92+
<width>363</width>
93+
<height>243</height>
9494
</rect>
9595
</property>
9696
<attribute name="label" >

src/widgets/projectionselector/qgsprojectionselector.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,8 @@ void QgsProjectionSelector::setSelectedSRSID(long theSRSID)
161161
void QgsProjectionSelector::applySRSNameSelection()
162162
{
163163
if (
164-
(mSRSNameSelectionPending) and
165-
(mProjListDone) and
164+
(mSRSNameSelectionPending) &&
165+
(mProjListDone) &&
166166
(mUserProjListDone)
167167
)
168168
{
@@ -190,8 +190,8 @@ void QgsProjectionSelector::applySRSNameSelection()
190190
void QgsProjectionSelector::applySRSIDSelection()
191191
{
192192
if (
193-
(mSRSIDSelectionPending) and
194-
(mProjListDone) and
193+
(mSRSIDSelectionPending) &&
194+
(mProjListDone) &&
195195
(mUserProjListDone)
196196
)
197197
{

0 commit comments

Comments
 (0)