Skip to content

Commit 9522dd4

Browse files
author
timlinux
committed
Use qt Q_UNUSED for unused params rather
git-svn-id: http://svn.osgeo.org/qgis/trunk@8461 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 60c6829 commit 9522dd4

File tree

7 files changed

+11
-11
lines changed

7 files changed

+11
-11
lines changed

src/app/composer/qgscomposition.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -623,7 +623,7 @@ void QgsComposition::paperSizeChanged ( void )
623623
}
624624
catch (std::bad_alloc& ba)
625625
{
626-
UNUSED(ba);
626+
Q_UNUSED(ba);
627627
// A better solution here would be to set the canvas back to the
628628
// original size and carry on, but for the moment this will
629629
// prevent a crash due to an uncaught exception.

src/app/qgsmaptooladdfeature.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ void QgsMapToolAddFeature::canvasReleaseEvent(QMouseEvent * e)
108108
}
109109
catch(QgsCsException &cse)
110110
{
111-
UNUSED(cse);
111+
Q_UNUSED(cse);
112112
QMessageBox::information(0, QObject::tr("Coordinate transform error"), \
113113
QObject::tr("Cannot transform the point to the layers coordinate system"));
114114
return;

src/app/qgsmaptoolcapture.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ int QgsMapToolCapture::addVertex(const QPoint& p)
106106
}
107107
catch(QgsCsException &cse)
108108
{
109-
UNUSED(cse);
109+
Q_UNUSED(cse);
110110
return 2;
111111
}
112112

@@ -123,7 +123,7 @@ int QgsMapToolCapture::addVertex(const QPoint& p)
123123
}
124124
catch(QgsCsException &cse)
125125
{
126-
UNUSED (cse);
126+
Q_UNUSED (cse);
127127
return 2;
128128
}
129129
mRubberBand->addPoint(mapPoint);

src/app/qgsvectorlayerproperties.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,7 @@ QString QgsVectorLayerProperties::getMetadata()
526526
}
527527
catch(QgsCsException &cse)
528528
{
529-
UNUSED(cse);
529+
Q_UNUSED(cse);
530530
QgsDebugMsg( cse.what() );
531531

532532
myMetedata += "<tr><td>";

src/core/qgsdistancearea.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ double QgsDistanceArea::measureLine(const QList<QgsPoint>& points)
282282
}
283283
catch (QgsCsException &cse)
284284
{
285-
UNUSED(cse);
285+
Q_UNUSED(cse);
286286
QgsLogger::warning(QObject::tr("Caught a coordinate system exception while trying to transform a point. Unable to calculate line length."));
287287
return 0.0;
288288
}
@@ -307,7 +307,7 @@ double QgsDistanceArea::measureLine(const QgsPoint& p1, const QgsPoint& p2)
307307
}
308308
catch (QgsCsException &cse)
309309
{
310-
UNUSED(cse);
310+
Q_UNUSED(cse);
311311
QgsLogger::warning(QObject::tr("Caught a coordinate system exception while trying to transform a point. Unable to calculate line length."));
312312
return 0.0;
313313
}
@@ -369,7 +369,7 @@ unsigned char* QgsDistanceArea::measurePolygon(unsigned char* feature, double* a
369369
}
370370
catch (QgsCsException &cse)
371371
{
372-
UNUSED(cse);
372+
Q_UNUSED(cse);
373373
QgsLogger::warning(QObject::tr("Caught a coordinate system exception while trying to transform a point. Unable to calculate polygon area."));
374374
}
375375

@@ -398,7 +398,7 @@ double QgsDistanceArea::measurePolygon(const QList<QgsPoint>& points)
398398
}
399399
catch (QgsCsException &cse)
400400
{
401-
UNUSED(cse);
401+
Q_UNUSED(cse);
402402
QgsLogger::warning(QObject::tr("Caught a coordinate system exception while trying to transform a point. Unable to calculate polygon area."));
403403
return 0.0;
404404
}

src/core/qgslabel.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ void QgsLabel::renderLabel(QPainter* painter, QgsPoint point,
351351
}
352352
catch(QgsCsException &cse)
353353
{
354-
UNUSED(cse); // unused otherwise
354+
Q_UNUSED(cse); // unused otherwise
355355
QgsDebugMsg("Caught transform error in QgsLabel::renderLabel(). "
356356
"Skipping rendering this label");
357357
return;

src/core/qgsmaprender.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ bool QgsMapRender::splitLayersExtent(QgsMapLayer* layer, QgsRect& extent, QgsRec
541541
}
542542
catch (QgsCsException &cse)
543543
{
544-
UNUSED(cse);
544+
Q_UNUSED(cse);
545545
QgsLogger::warning("Transform error caught in " + QString(__FILE__) + ", line " + QString::number(__LINE__));
546546
extent = QgsRect(-DBL_MAX, -DBL_MAX, DBL_MAX, DBL_MAX);
547547
r2 = QgsRect(-DBL_MAX, -DBL_MAX, DBL_MAX, DBL_MAX);

0 commit comments

Comments
 (0)