Skip to content
Permalink
Browse files

Fix some warnings, incorrect use of abs for double values

  • Loading branch information
nyalldawson committed Feb 10, 2015
1 parent 76927bb commit db17513287d97af4ec8cabc9b0447fbf832b386e
@@ -824,7 +824,7 @@ void QgsComposerMouseHandles::dragMouseMove( const QPointF& currentPosition, boo
{
//constrained (shift) moving should lock to horizontal/vertical movement
//reset the smaller of the x/y movements
if ( abs( moveRectX ) <= abs( moveRectY ) )
if ( qAbs( moveRectX ) <= qAbs( moveRectY ) )
{
moveRectX = 0;
}
@@ -967,8 +967,7 @@ QMap< QString, QStringList > QgsCptCityDirectoryItem::rampsMap()
QString curName, prevName, prevPath, curVariant, curSep, schemeName;
QStringList listVariant;
QStringList schemeNamesAll, schemeNames;
int num;
bool ok, prevAdd, curAdd;
bool prevAdd, curAdd;

QDir dir( QgsCptCityArchive::defaultBaseDir() + "/" + mPath );
schemeNamesAll = dir.entryList( QStringList( "*.svg" ), QDir::Files, QDir::Name );
@@ -1068,7 +1068,7 @@ QString findClosestTickVal( double target, const QwtScaleDiv * scale, int div =
current += diff;
if ( current > target )
{
closest = ( abs( target - current + diff ) < abs( target - current ) ) ? current - diff : current;
closest = ( qAbs( target - current + diff ) < qAbs( target - current ) ) ? current - diff : current;
break;
}
}
@@ -497,7 +497,7 @@ void ModelTest::data()
*/
void ModelTest::rowsAboutToBeInserted( const QModelIndex &parent, int start, int end )
{
// Q_UNUSED(end);
Q_UNUSED( end );
// qDebug() << "rowsAboutToBeInserted" << "start=" << start << "end=" << end << "parent=" << model->data ( parent ).toString()
// << "current count of parent=" << model->rowCount ( parent ); // << "display of last=" << model->data( model->index(start-1, 0, parent) );
// qDebug() << model->index(start-1, 0, parent) << model->data( model->index(start-1, 0, parent) );

0 comments on commit db17513

Please sign in to comment.
You can’t perform that action at this time.