Skip to content

Commit

Permalink
Use qt Q_UNUSED for unused params rather
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@8461 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
timlinux committed May 19, 2008
1 parent febfabe commit 674c22a
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/app/composer/qgscomposition.cpp
Expand Up @@ -623,7 +623,7 @@ void QgsComposition::paperSizeChanged ( void )
}
catch (std::bad_alloc& ba)
{
UNUSED(ba);
Q_UNUSED(ba);
// A better solution here would be to set the canvas back to the
// original size and carry on, but for the moment this will
// prevent a crash due to an uncaught exception.
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsmaptooladdfeature.cpp
Expand Up @@ -108,7 +108,7 @@ void QgsMapToolAddFeature::canvasReleaseEvent(QMouseEvent * e)
}
catch(QgsCsException &cse)
{
UNUSED(cse);
Q_UNUSED(cse);
QMessageBox::information(0, QObject::tr("Coordinate transform error"), \
QObject::tr("Cannot transform the point to the layers coordinate system"));
return;
Expand Down
4 changes: 2 additions & 2 deletions src/app/qgsmaptoolcapture.cpp
Expand Up @@ -106,7 +106,7 @@ int QgsMapToolCapture::addVertex(const QPoint& p)
}
catch(QgsCsException &cse)
{
UNUSED(cse);
Q_UNUSED(cse);
return 2;
}

Expand All @@ -123,7 +123,7 @@ int QgsMapToolCapture::addVertex(const QPoint& p)
}
catch(QgsCsException &cse)
{
UNUSED (cse);
Q_UNUSED (cse);
return 2;
}
mRubberBand->addPoint(mapPoint);
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsvectorlayerproperties.cpp
Expand Up @@ -526,7 +526,7 @@ QString QgsVectorLayerProperties::getMetadata()
}
catch(QgsCsException &cse)
{
UNUSED(cse);
Q_UNUSED(cse);
QgsDebugMsg( cse.what() );

myMetedata += "<tr><td>";
Expand Down
8 changes: 4 additions & 4 deletions src/core/qgsdistancearea.cpp
Expand Up @@ -282,7 +282,7 @@ double QgsDistanceArea::measureLine(const QList<QgsPoint>& points)
}
catch (QgsCsException &cse)
{
UNUSED(cse);
Q_UNUSED(cse);
QgsLogger::warning(QObject::tr("Caught a coordinate system exception while trying to transform a point. Unable to calculate line length."));
return 0.0;
}
Expand All @@ -307,7 +307,7 @@ double QgsDistanceArea::measureLine(const QgsPoint& p1, const QgsPoint& p2)
}
catch (QgsCsException &cse)
{
UNUSED(cse);
Q_UNUSED(cse);
QgsLogger::warning(QObject::tr("Caught a coordinate system exception while trying to transform a point. Unable to calculate line length."));
return 0.0;
}
Expand Down Expand Up @@ -369,7 +369,7 @@ unsigned char* QgsDistanceArea::measurePolygon(unsigned char* feature, double* a
}
catch (QgsCsException &cse)
{
UNUSED(cse);
Q_UNUSED(cse);
QgsLogger::warning(QObject::tr("Caught a coordinate system exception while trying to transform a point. Unable to calculate polygon area."));
}

Expand Down Expand Up @@ -398,7 +398,7 @@ double QgsDistanceArea::measurePolygon(const QList<QgsPoint>& points)
}
catch (QgsCsException &cse)
{
UNUSED(cse);
Q_UNUSED(cse);
QgsLogger::warning(QObject::tr("Caught a coordinate system exception while trying to transform a point. Unable to calculate polygon area."));
return 0.0;
}
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgslabel.cpp
Expand Up @@ -351,7 +351,7 @@ void QgsLabel::renderLabel(QPainter* painter, QgsPoint point,
}
catch(QgsCsException &cse)
{
UNUSED(cse); // unused otherwise
Q_UNUSED(cse); // unused otherwise
QgsDebugMsg("Caught transform error in QgsLabel::renderLabel(). "
"Skipping rendering this label");
return;
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsmaprender.cpp
Expand Up @@ -541,7 +541,7 @@ bool QgsMapRender::splitLayersExtent(QgsMapLayer* layer, QgsRect& extent, QgsRec
}
catch (QgsCsException &cse)
{
UNUSED(cse);
Q_UNUSED(cse);
QgsLogger::warning("Transform error caught in " + QString(__FILE__) + ", line " + QString::number(__LINE__));
extent = QgsRect(-DBL_MAX, -DBL_MAX, DBL_MAX, DBL_MAX);
r2 = QgsRect(-DBL_MAX, -DBL_MAX, DBL_MAX, DBL_MAX);
Expand Down

0 comments on commit 674c22a

Please sign in to comment.