Skip to content

Commit bdceac2

Browse files
author
g_j_m
committed
Applied patches r5669, r5668, r5667, r5666, as applied to the
lib-refactoring branch, to head. These were signed/unsigned int mods and boolean comparison mismatches. Many of the changes in these commits had already been done in head git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@5681 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent d7fee51 commit bdceac2

File tree

3 files changed

+13
-12
lines changed

3 files changed

+13
-12
lines changed

src/core/qgsdistancearea.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ unsigned char* QgsDistanceArea::measurePolygon(unsigned char* feature, double* a
335335
double QgsDistanceArea::measurePolygon(const std::vector<QgsPoint>& points)
336336
{
337337
std::vector<QgsPoint> pts(points.size());
338-
for (int i = 0; i < points.size(); i++)
338+
for (std::vector<QgsPoint>::size_type i = 0; i < points.size(); i++)
339339
{
340340
pts[i] = mCoordTransform->transform(points[i]);
341341
}

src/core/qgsprojectproperty.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ bool QgsPropertyValue::readXML(QDomNode & keyNode)
112112

113113
case QVariant::StringList:
114114
{
115-
size_t i = 0;
115+
int i = 0;
116116
QDomNodeList values = keyNode.childNodes();
117117

118118
// all the QStringList values will be inside <value> elements
@@ -296,7 +296,7 @@ bool QgsPropertyValue::readXML(QDomNode & keyNode)
296296
break;
297297
*/
298298
default :
299-
qDebug( "%s:%d unsupported value type %s .. not propertly translated to QVariant in qgsproject.cpp:%d",
299+
qDebug( "%s:%d unsupported value type %s .. not propertly translated to QVariant in qgsproject.cpp:",
300300
__FILE__, __LINE__, (const char*)typeString.utf8() );
301301
}
302302

@@ -363,7 +363,7 @@ QVariant QgsPropertyKey::value() const
363363
{
364364
QgsProperty * foundQgsProperty;
365365

366-
if ( foundQgsProperty = properties_.find( name()) )
366+
if ( 0 == ( foundQgsProperty = properties_.find( name()) ) )
367367
{ // recurse down to next key
368368
return foundQgsProperty->value();
369369
} else
@@ -441,7 +441,7 @@ void QgsPropertyKey::dump( size_t tabs ) const
441441

442442
bool QgsPropertyKey::readXML(QDomNode & keyNode)
443443
{
444-
size_t i = 0;
444+
int i = 0;
445445
QDomNodeList subkeys = keyNode.childNodes();
446446

447447
while (i < subkeys.count())

src/gui/qgsproject.cpp

+8-7
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,9 @@ QgsProject * QgsProject::theProject_;
6868
static
6969
QStringList makeKeyTokens_(QString const &scope, QString const &key)
7070
{
71-
const char * scope_str = scope.toLocal8Bit().data(); // debugger probes
72-
const char * key_str = key.toLocal8Bit().data();
71+
// XXX - debugger probes
72+
// const char * scope_str = scope.toLocal8Bit().data();
73+
// const char * key_str = key.toLocal8Bit().data();
7374

7475
QStringList keyTokens = QStringList(scope);
7576
keyTokens += QStringList::split('/', key);
@@ -123,7 +124,7 @@ QgsProject * QgsProject::theProject_;
123124
{
124125
return currentProperty;
125126
}
126-
else if ( nextProperty = currentProperty->find( keySequence.first() ) )
127+
else if (( nextProperty = currentProperty->find( keySequence.first() ) ))
127128
{
128129
if ( nextProperty->isKey() )
129130
{
@@ -201,7 +202,7 @@ QgsProject * QgsProject::theProject_;
201202

202203
return currentProperty;
203204
}
204-
else if ( newProperty = currentProperty->find( keySequence.first() ) )
205+
else if (( newProperty = currentProperty->find( keySequence.first() ) ))
205206
{
206207
currentProperty = dynamic_cast<QgsPropertyKey*>(newProperty);
207208

@@ -271,7 +272,7 @@ QgsProject * QgsProject::theProject_;
271272
{
272273
previousQgsPropertyKey->removeKey( currentProperty->name() );
273274
}
274-
else if ( nextProperty = currentProperty->find( keySequence.first() ) )
275+
else if (( nextProperty = currentProperty->find( keySequence.first() ) ))
275276
{
276277
previousQgsPropertyKey = currentProperty;
277278
currentProperty = dynamic_cast<QgsPropertyKey*>(nextProperty);
@@ -559,7 +560,7 @@ _getProperties(QDomDocument const &doc, QgsPropertyKey & project_properties)
559560

560561
if ( ! project_properties.readXML( propertyNode ) )
561562
{
562-
qDebug("%s:%d project_properties.readXML() failed");
563+
qDebug("Project_properties.readXML() failed");
563564
}
564565

565566
// DEPRECATED as functionality has been shoved down to QgsProperyKey::readXML()
@@ -844,7 +845,7 @@ static pair< bool, list<QDomNode> > _getMapLayers(QDomDocument const &doc)
844845

845846
bool returnStatus = true;
846847

847-
for (size_t i = 0; i < nl.count(); i++)
848+
for (int i = 0; i < nl.count(); i++)
848849
{
849850
QDomNode node = nl.item(i);
850851
QDomElement element = node.toElement();

0 commit comments

Comments
 (0)