mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-15 00:04:00 -04:00
Fix some warnings, incorrect use of abs for double values
This commit is contained in:
parent
76927bb833
commit
db17513287
@ -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) );
|
||||
|
Loading…
x
Reference in New Issue
Block a user