Skip to content
Permalink
Browse files
Use qt Q_UNUSED for unused params rather
git-svn-id: http://svn.osgeo.org/qgis/trunk@8461 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
timlinux committed May 19, 2008
1 parent 60c6829 commit 9522dd4
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
@@ -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.
@@ -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;
@@ -106,7 +106,7 @@ int QgsMapToolCapture::addVertex(const QPoint& p)
}
catch(QgsCsException &cse)
{
UNUSED(cse);
Q_UNUSED(cse);
return 2;
}

@@ -123,7 +123,7 @@ int QgsMapToolCapture::addVertex(const QPoint& p)
}
catch(QgsCsException &cse)
{
UNUSED (cse);
Q_UNUSED (cse);
return 2;
}
mRubberBand->addPoint(mapPoint);
@@ -526,7 +526,7 @@ QString QgsVectorLayerProperties::getMetadata()
}
catch(QgsCsException &cse)
{
UNUSED(cse);
Q_UNUSED(cse);
QgsDebugMsg( cse.what() );

myMetedata += "<tr><td>";
@@ -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;
}
@@ -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;
}
@@ -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."));
}

@@ -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;
}
@@ -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;
@@ -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);

0 comments on commit 9522dd4

Please sign in to comment.