Skip to content

Commit 211fd89

Browse files
author
jef
committed
fix warnings
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@10873 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 731c1b8 commit 211fd89

File tree

8 files changed

+32
-31
lines changed

8 files changed

+32
-31
lines changed

src/core/composer/qgscomposeritem.cpp

+5-3
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ void QgsComposerItem::changeItemRectangle( const QPointF& currentPosition, const
493493
break;
494494

495495
case QgsComposerItem::MoveItem:
496-
496+
{
497497
//calculate total move difference
498498
double moveX = currentPosition.x() - mouseMoveStartPos.x();
499499
double moveY = currentPosition.y() - mouseMoveStartPos.y();
@@ -516,7 +516,10 @@ void QgsComposerItem::changeItemRectangle( const QPointF& currentPosition, const
516516
originalItem->transform().dy() + moveRectY, \
517517
originalItem->rect().width(), originalItem->rect().height() ) );
518518
}
519-
return;
519+
}
520+
return;
521+
case QgsComposerItem::NoAction:
522+
break;
520523
}
521524

522525
if ( !changeComposerItem )
@@ -544,7 +547,6 @@ void QgsComposerItem::drawSelectionBoxes( QPainter* p )
544547
if ( mComposition->plotStyle() == QgsComposition::Preview )
545548
{
546549
//size of symbol boxes depends on zoom level in composer view
547-
double viewScaleFactor = horizontalViewScaleFactor();
548550
double rectHandlerSize = rectHandlerBorderTolerance();
549551
double sizeLockSymbol = lockSymbolSize();
550552

src/core/pal/util.cpp

+16-14
Original file line numberDiff line numberDiff line change
@@ -553,20 +553,22 @@ namespace pal
553553
std::cout << f->x[i] << ";" << f->y[i] << std::endl;
554554
#endif
555555

556-
// Butterfly detector
557-
//
558-
// 3____0
559-
// \ /
560-
// \/ <--- not allowed
561-
// /\
562-
// 1/__\2
563-
//
564-
// 1____0
565-
// \ /
566-
// 2\/5 <--- allowed
567-
// /\
568-
// 3/__\4
569-
//
556+
/*
557+
Butterfly detector
558+
559+
3____0
560+
\ /
561+
\/ <--- not allowed
562+
/\
563+
1/__\2
564+
565+
1____0
566+
\ /
567+
2\/5 <--- allowed
568+
/\
569+
3/__\4
570+
*/
571+
570572
pt_a = -1;
571573
pt_b = -1;
572574
for ( i = 0;i < f->nbPoints - 2;i++ )

src/core/qgsoverlayobject.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class CORE_EXPORT QgsOverlayObject
4545
@note: this function is deprecated. Please use geometry() and QgsGeometry::asGeos instead*/
4646
GEOSGeometry* getGeosGeometry();
4747
/**Feature geometry is released when object is destructed so this function is empty. This function is deprecated and does nothing*/
48-
void releaseGeosGeometry( GEOSGeometry *the_geom ) {}
48+
void releaseGeosGeometry( GEOSGeometry *the_geom ) { Q_UNUSED( the_geom ); }
4949

5050
//getters
5151
int width() const {return mWidth;}

src/gui/qgscomposerview.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,6 @@ void QgsComposerView::mouseMoveEvent( QMouseEvent* e )
226226
else
227227
{
228228
QPointF scenePoint = mapToScene( e->pos() );
229-
double newWidth, newHeight; //for rubber band
230229

231230
switch ( mCurrentTool )
232231
{

src/plugins/diagram_overlay/qgsdiagramoverlay.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,6 @@ void QgsDiagramOverlay::drawOverlayObjects( QgsRenderContext& context ) const
149149
if ( it.value() )
150150
{
151151
QList<QgsPoint> positionList = it.value()->positions();
152-
const QgsCoordinateTransform* ct = context.coordinateTransform();
153152

154153
QList<QgsPoint>::const_iterator positionIt = positionList.constBegin();
155154
for ( ; positionIt != positionList.constEnd(); ++positionIt )

src/plugins/grass/qtermwidget/Session.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -977,8 +977,7 @@ void SessionGroup::setMasterStatus(Session* session , bool master)
977977
bool wasMaster = _sessions[session];
978978
_sessions[session] = master;
979979

980-
if ( !wasMaster && !master
981-
|| wasMaster && master )
980+
if ( wasMaster==master )
982981
return;
983982

984983
QListIterator<Session*> iter(_sessions.keys());

src/plugins/grass/qtermwidget/TerminalDisplay.cpp

+8-8
Original file line numberDiff line numberDiff line change
@@ -1771,10 +1771,10 @@ void TerminalDisplay::extendSelection( const QPoint& position )
17711771
int i;
17721772
int selClass;
17731773

1774-
bool left_not_right = ( here.y() < _iPntSelCorr.y() ||
1775-
here.y() == _iPntSelCorr.y() && here.x() < _iPntSelCorr.x() );
1776-
bool old_left_not_right = ( _pntSelCorr.y() < _iPntSelCorr.y() ||
1777-
_pntSelCorr.y() == _iPntSelCorr.y() && _pntSelCorr.x() < _iPntSelCorr.x() );
1774+
bool left_not_right = here.y() < _iPntSelCorr.y() ||
1775+
( here.y() == _iPntSelCorr.y() && here.x() < _iPntSelCorr.x() );
1776+
bool old_left_not_right = _pntSelCorr.y() < _iPntSelCorr.y() ||
1777+
( _pntSelCorr.y() == _iPntSelCorr.y() && _pntSelCorr.x() < _iPntSelCorr.x() );
17781778
swapping = left_not_right != old_left_not_right;
17791779

17801780
// Find left (left_not_right ? from here : from start)
@@ -1848,10 +1848,10 @@ void TerminalDisplay::extendSelection( const QPoint& position )
18481848
int i;
18491849
int selClass;
18501850

1851-
bool left_not_right = ( here.y() < _iPntSelCorr.y() ||
1852-
here.y() == _iPntSelCorr.y() && here.x() < _iPntSelCorr.x() );
1853-
bool old_left_not_right = ( _pntSelCorr.y() < _iPntSelCorr.y() ||
1854-
_pntSelCorr.y() == _iPntSelCorr.y() && _pntSelCorr.x() < _iPntSelCorr.x() );
1851+
bool left_not_right = here.y() < _iPntSelCorr.y() ||
1852+
( here.y() == _iPntSelCorr.y() && here.x() < _iPntSelCorr.x() );
1853+
bool old_left_not_right = _pntSelCorr.y() < _iPntSelCorr.y() ||
1854+
( _pntSelCorr.y() == _iPntSelCorr.y() && _pntSelCorr.x() < _iPntSelCorr.x() );
18551855
swapping = left_not_right != old_left_not_right;
18561856

18571857
// Find left (left_not_right ? from here : from start)

src/plugins/grass/qtermwidget/Vt102Emulation.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1248,7 +1248,7 @@ static void hexdump(int* s, int len)
12481248

12491249
void Vt102Emulation::scan_buffer_report()
12501250
{
1251-
if (ppos == 0 || ppos == 1 && (pbuf[0] & 0xff) >= 32) return;
1251+
if (ppos == 0 || (ppos == 1 && (pbuf[0] & 0xff) >= 32) ) return;
12521252
printf("token: "); hexdump(pbuf,ppos); printf("\n");
12531253
}
12541254

0 commit comments

Comments
 (0)