Skip to content
Permalink
Browse files

Use fabs/abs/labs instead of qAbs

Better to stick to standard methods where available instead
of less supported Qt methods
  • Loading branch information
nyalldawson committed Aug 24, 2017
1 parent 4b009f9 commit f2b2c6d2fde485cabc014d300e21404e15729b4a
Showing with 671 additions and 670 deletions.
  1. +2 −2 src/analysis/interpolation/MathUtils.cc
  2. +4 −4 src/analysis/raster/qgsalignraster.cpp
  3. +1 −1 src/analysis/raster/qgsrelief.cpp
  4. +2 −2 src/analysis/vector/qgsgeometrysnapper.cpp
  5. +1 −1 src/app/qgsdecorationscalebar.cpp
  6. +1 −1 src/app/qgslabelinggui.cpp
  7. +2 −2 src/app/qgsmaptoolmeasureangle.cpp
  8. +1 −1 src/app/qgsundowidget.cpp
  9. +1 −1 src/core/composer/qgscomposerarrow.cpp
  10. +2 −2 src/core/composer/qgscomposermapgrid.cpp
  11. +2 −2 src/core/composer/qgscomposermousehandles.cpp
  12. +3 −3 src/core/composer/qgscomposernodesitem.cpp
  13. +2 −2 src/core/composer/qgscomposerpicture.cpp
  14. +1 −1 src/core/dxf/qgsdxfpaintengine.cpp
  15. +2 −2 src/core/effects/qgsimageoperation.cpp
  16. +2 −2 src/core/expression/qgsexpressionfunction.cpp
  17. +9 −9 src/core/geometry/qgscircle.cpp
  18. +3 −3 src/core/geometry/qgscircle.h
  19. +2 −2 src/core/geometry/qgscurvepolygon.cpp
  20. +6 −6 src/core/geometry/qgsellipse.cpp
  21. +1 −1 src/core/geometry/qgsgeometry.cpp
  22. +2 −2 src/core/geometry/qgsinternalgeometryengine.cpp
  23. +4 −4 src/core/geometry/qgsregularpolygon.cpp
  24. +1 −1 src/core/layout/qgslayoutsnapper.cpp
  25. +5 −5 src/core/pal/feature.cpp
  26. +2 −2 src/core/pal/pointset.cpp
  27. +2 −2 src/core/qgsclipper.h
  28. +1 −1 src/core/qgscoordinatereferencesystem.cpp
  29. +4 −4 src/core/qgsdistancearea.cpp
  30. +2 −2 src/core/qgsmapsettings.cpp
  31. +5 −5 src/core/qgspallabeling.cpp
  32. +8 −8 src/core/qgspointxy.cpp
  33. +6 −6 src/core/qgsrenderchecker.cpp
  34. +2 −2 src/core/qgstestutils.h
  35. +13 −13 src/core/qgsunittypes.cpp
  36. +1 −1 src/core/qgsvectorfilewriter.cpp
  37. +1 −1 src/core/qgsvectorlayerlabeling.cpp
  38. +1 −1 src/core/raster/qgscolorrampshader.cpp
  39. +2 −2 src/core/raster/qgsrasterchecker.cpp
  40. +3 −3 src/core/raster/qgsrasterminmaxorigin.cpp
  41. +2 −2 src/core/simplify/effectivearea.cpp
  42. +7 −7 src/core/symbology/qgsfillsymbollayer.cpp
  43. +3 −3 src/core/symbology/qgslinesymbollayer.cpp
  44. +1 −1 src/core/symbology/qgssymbollayerutils.cpp
  45. +2 −2 src/gui/layout/qgslayoutruler.cpp
  46. +1 −1 src/gui/layout/qgslayoutview.cpp
  47. +1 −1 src/gui/layout/qgslayoutviewtool.cpp
  48. +5 −5 src/gui/qgsadvanceddigitizingdockwidget.cpp
  49. +2 −2 src/gui/qgscomposerview.cpp
  50. +3 −3 src/gui/qgsgradientstopeditor.cpp
  51. +3 −3 src/gui/qgsmapcanvas.cpp
  52. +5 −5 src/gui/qgsmapcanvasannotationitem.cpp
  53. +2 −2 src/gui/qgsmaptoolextent.cpp
  54. +1 −1 src/gui/qgsscalecombobox.cpp
  55. +1 −1 src/gui/raster/qgsrasterhistogramwidget.cpp
  56. +3 −3 src/gui/symbology/qgsgraduatedhistogramwidget.cpp
  57. +1 −1 src/plugins/geometry_checker/checks/qgsgeometryoverlapcheck.cpp
  58. +1 −1 src/plugins/geometry_checker/checks/qgsgeometryoverlapcheck.h
  59. +1 −1 src/plugins/geometry_checker/utils/qgsgeometrycheckerutils.cpp
  60. +2 −1 src/plugins/georeferencer/qgsgeorefdelegates.cpp
  61. +5 −5 src/plugins/georeferencer/qgsgeoreftransform.cpp
  62. +2 −2 src/plugins/georeferencer/qgsleastsquares.cpp
  63. +1 −1 src/plugins/georeferencer/qgsmapcoordsdialog.cpp
  64. +1 −1 src/plugins/grass/qgsgrassnewmapset.cpp
  65. +488 −488 src/plugins/grass/qtermwidget/ColorScheme.cpp
  66. +3 −3 src/providers/gdal/qgsgdalprovider.cpp
  67. +1 −1 src/providers/grass/qgsgrassrasterprovider.cpp
  68. +4 −4 src/providers/wcs/qgswcsprovider.cpp
  69. +2 −2 src/providers/wms/qgswmsprovider.cpp
  70. +1 −1 tests/src/core/testqgsdistancearea.cpp
  71. +1 −1 tests/src/providers/grass/testqgsgrassprovider.cpp
@@ -210,7 +210,7 @@ double MathUtils::distPointFromLine( QgsPoint *thepoint, QgsPoint *p1, QgsPoint
double a = normal.getX();
double b = normal.getY();
double c = -( normal.getX() * p2->x() + normal.getY() * p2->y() );
double distance = qAbs( ( a * thepoint->x() + b * thepoint->y() + c ) / ( sqrt( a * a + b * b ) ) );
double distance = fabs( ( a * thepoint->x() + b * thepoint->y() + c ) / ( sqrt( a * a + b * b ) ) );
return distance;
}
else
@@ -471,7 +471,7 @@ double MathUtils::power( double a, int b )
return 1;
}
double tmp = a;
for ( int i = 2; i <= qAbs( ( double )b ); i++ )
for ( int i = 2; i <= abs( b ); i++ )
{

a *= tmp;
@@ -30,15 +30,15 @@

static double ceil_with_tolerance( double value )
{
if ( qAbs( value - std::round( value ) ) < 1e-6 )
if ( fabs( value - std::round( value ) ) < 1e-6 )
return std::round( value );
else
return qCeil( value );
}

static double floor_with_tolerance( double value )
{
if ( qAbs( value - std::round( value ) ) < 1e-6 )
if ( fabs( value - std::round( value ) ) < 1e-6 )
return std::round( value );
else
return qFloor( value );
@@ -538,7 +538,7 @@ bool QgsAlignRaster::suggestedWarpOutput( const QgsAlignRaster::RasterInfo &info
if ( eErr != CE_None )
return false;

QSizeF cs( qAbs( adfDstGeoTransform[1] ), qAbs( adfDstGeoTransform[5] ) );
QSizeF cs( fabs( adfDstGeoTransform[1] ), fabs( adfDstGeoTransform[5] ) );

if ( rect )
*rect = QgsRectangle( extents[0], extents[1], extents[2], extents[3] );
@@ -582,7 +582,7 @@ QgsAlignRaster::RasterInfo::~RasterInfo()

QSizeF QgsAlignRaster::RasterInfo::cellSize() const
{
return QSizeF( qAbs( mGeoTransform[1] ), qAbs( mGeoTransform[5] ) );
return QSizeF( fabs( mGeoTransform[1] ), fabs( mGeoTransform[5] ) );
}

QPointF QgsAlignRaster::RasterInfo::gridOffset() const
@@ -353,7 +353,7 @@ bool QgsRelief::processNineCellWindow( float *x1, float *x2, float *x3, float *x
float aspect = mAspectFilter->processNineCellWindow( x1, x2, x3, x4, x5, x6, x7, x8, x9 );
if ( hillShadeValue285 != mOutputNodataValue && aspect != mOutputNodataValue )
{
double angle_diff = qAbs( 285 - aspect );
double angle_diff = fabs( 285 - aspect );
if ( angle_diff > 180 )
{
angle_diff -= 180;
@@ -110,8 +110,8 @@ class Raytracer
// See http://playtechs.blogspot.ch/2007/03/raytracing-on-grid.html
public:
Raytracer( float x0, float y0, float x1, float y1 )
: m_dx( qAbs( x1 - x0 ) )
, m_dy( qAbs( y1 - y0 ) )
: m_dx( fabs( x1 - x0 ) )
, m_dy( fabs( y1 - y0 ) )
, m_x( qFloor( x0 ) )
, m_y( qFloor( y0 ) )
, m_n( 1 )
@@ -113,7 +113,7 @@ void QgsDecorationScaleBar::render( const QgsMapSettings &mapSettings, QgsRender
//Get map units per pixel. This can be negative at times (to do with
//projections) and that just confuses the rest of the code in this
//function, so force to a positive number.
double myMapUnitsPerPixelDouble = qAbs( context.mapToPixel().mapUnitsPerPixel() );
double myMapUnitsPerPixelDouble = fabs( context.mapToPixel().mapUnitsPerPixel() );
double myActualSize = mPreferredSize;

// Exit if the canvas width is 0 or layercount is 0 or QGIS will freeze
@@ -237,7 +237,7 @@ void QgsLabelingGui::setLayer( QgsMapLayer *mapLayer )
// curved label max character angles
mMaxCharAngleInDSpinBox->setValue( lyr.maxCurvedCharAngleIn );
// lyr.maxCurvedCharAngleOut must be negative, but it is shown as positive spinbox in GUI
mMaxCharAngleOutDSpinBox->setValue( qAbs( lyr.maxCurvedCharAngleOut ) );
mMaxCharAngleOutDSpinBox->setValue( fabs( lyr.maxCurvedCharAngleOut ) );

wrapCharacterEdit->setText( lyr.wrapChar );
mFontMultiLineAlignComboBox->setCurrentIndex( ( unsigned int ) lyr.multilineAlign );
@@ -64,9 +64,9 @@ void QgsMapToolMeasureAngle::canvasMoveEvent( QgsMapMouseEvent *e )
double azimuthOne = mDa.bearing( mAnglePoints.at( 1 ), mAnglePoints.at( 0 ) );
double azimuthTwo = mDa.bearing( mAnglePoints.at( 1 ), point );
double resultAngle = azimuthTwo - azimuthOne;
QgsDebugMsg( QString::number( qAbs( resultAngle ) ) );
QgsDebugMsg( QString::number( fabs( resultAngle ) ) );
QgsDebugMsg( QString::number( M_PI ) );
if ( qAbs( resultAngle ) > M_PI )
if ( fabs( resultAngle ) > M_PI )
{
if ( resultAngle < 0 )
{
@@ -78,7 +78,7 @@ void QgsUndoWidget::indexChanged( int curIndx )
canRedo = mUndoStack->canRedo();
curCount = mUndoStack->count();
}
int offset = qAbs( mPreviousIndex - curIndx );
int offset = abs( mPreviousIndex - curIndx );

// when individually redoing, differentiate between last redo and a new command added to stack
bool lastRedo = ( mPreviousIndex == ( mPreviousCount - 1 ) && mPreviousCount == curCount && !canRedo );
@@ -409,7 +409,7 @@ void QgsComposerArrow::adaptItemSceneRect()
{
//rectangle containing start and end point
QRectF rect = QRectF( qMin( mStartPoint.x(), mStopPoint.x() ), qMin( mStartPoint.y(), mStopPoint.y() ),
qAbs( mStopPoint.x() - mStartPoint.x() ), qAbs( mStopPoint.y() - mStartPoint.y() ) );
fabs( mStopPoint.x() - mStartPoint.x() ), fabs( mStopPoint.y() - mStartPoint.y() ) );
double enlarge = computeMarkerMargin();
rect.adjust( -enlarge, -enlarge, enlarge, enlarge );
QgsComposerItem::setSceneRect( rect );
@@ -1465,11 +1465,11 @@ QString QgsComposerMapGrid::gridAnnotationString( double value, QgsComposerMapGr
if ( geographic )
{
//insert degree symbol for geographic coordinates
return QString::number( qAbs( value ), 'f', mGridAnnotationPrecision ) + QChar( 176 ) + hemisphere;
return QString::number( fabs( value ), 'f', mGridAnnotationPrecision ) + QChar( 176 ) + hemisphere;
}
else
{
return QString::number( qAbs( value ), 'f', mGridAnnotationPrecision ) + hemisphere;
return QString::number( fabs( value ), 'f', mGridAnnotationPrecision ) + hemisphere;
}
}
else if ( mGridAnnotationFormat == CustomFormat )
@@ -593,7 +593,7 @@ void QgsComposerMouseHandles::mouseReleaseEvent( QGraphicsSceneMouseEvent *event
double diffY = mouseMoveStopPoint.y() - mMouseMoveStartPos.y();

//it was only a click
if ( qAbs( diffX ) < std::numeric_limits<double>::min() && qAbs( diffY ) < std::numeric_limits<double>::min() )
if ( fabs( diffX ) < std::numeric_limits<double>::min() && fabs( diffY ) < std::numeric_limits<double>::min() )
{
mIsDragging = false;
mIsResizing = false;
@@ -824,7 +824,7 @@ void QgsComposerMouseHandles::dragMouseMove( QPointF currentPosition, bool lockM
{
//constrained (shift) moving should lock to horizontal/vertical movement
//reset the smaller of the x/y movements
if ( qAbs( moveRectX ) <= qAbs( moveRectY ) )
if ( fabs( moveRectX ) <= fabs( moveRectY ) )
{
moveRectX = 0;
}
@@ -77,7 +77,7 @@ bool QgsComposerNodesItem::addNode( QPointF pt,

double distance = std::numeric_limits<double>::max();
if ( qIsInf( coef ) )
distance = qAbs( pt1.x() - start.x() );
distance = fabs( pt1.x() - start.x() );
else
{
const double coef2 = ( -1 / coef );
@@ -86,7 +86,7 @@ bool QgsComposerNodesItem::addNode( QPointF pt,
QPointF inter;
if ( qIsInf( coef2 ) )
{
distance = qAbs( pt1.y() - start.y() );
distance = fabs( pt1.y() - start.y() );
inter.setX( start.x() );
inter.setY( pt1.y() );
}
@@ -104,7 +104,7 @@ bool QgsComposerNodesItem::addNode( QPointF pt,
const double length3 = computeDistance( pt1, pt2 );
const double length4 = length1 + length2;

if ( qAbs( length3 - length4 ) < std::numeric_limits<float>::epsilon() )
if ( fabs( length3 - length4 ) < std::numeric_limits<float>::epsilon() )
distance = computeDistance( inter, start );
}

@@ -578,8 +578,8 @@ void QgsComposerPicture::setSceneRect( const QRectF &rectangle )

//if height has changed more than width, then fix width and set height correspondingly
//else, do the opposite
if ( qAbs( rect().width() - rectangle.width() ) <
qAbs( rect().height() - rectangle.height() ) )
if ( fabs( rect().width() - rectangle.width() ) <
fabs( rect().height() - rectangle.height() ) )
{
newRect.setHeight( targetImageSize.height() * newRect.width() / targetImageSize.width() );
}
@@ -262,7 +262,7 @@ double QgsDxfPaintEngine::power( double a, int b )
return 1;

double tmp = a;
for ( int i = 2; i <= qAbs( static_cast< double >( b ) ); i++ )
for ( int i = 2; i <= abs( b ); i++ )
a *= tmp;

if ( b > 0 )
@@ -889,8 +889,8 @@ QRect QgsImageOperation::nonTransparentImageRect( const QImage &image, QSize min
if ( center )
{
// recompute min and max to center image
const int dx = qMax( qAbs( xmax - width / 2 ), qAbs( xmin - width / 2 ) );
const int dy = qMax( qAbs( ymax - height / 2 ), qAbs( ymin - height / 2 ) );
const int dx = qMax( abs( xmax - width / 2 ), abs( xmin - width / 2 ) );
const int dy = qMax( abs( ymax - height / 2 ), abs( ymin - height / 2 ) );
xmin = qMax( 0, width / 2 - dx );
xmax = qMin( width, width / 2 + dx );
ymin = qMax( 0, height / 2 - dy );
@@ -1007,13 +1007,13 @@ static QVariant fcnWordwrap( const QVariantList &values, const QgsExpressionCont
if ( strhit == lasthit || strhit == -1 )
{
//if no new backward delimiter found, try to locate forward
strhit = lines[i].indexOf( rx, strcurrent + qAbs( wrap ) );
strhit = lines[i].indexOf( rx, strcurrent + labs( wrap ) );
}
lasthit = strhit;
}
else
{
strhit = lines[i].indexOf( rx, strcurrent + qAbs( wrap ) );
strhit = lines[i].indexOf( rx, strcurrent + labs( wrap ) );
}
if ( strhit > -1 )
{
@@ -52,24 +52,24 @@ static bool isPerpendicular( const QgsPoint &pt1, const QgsPoint &pt2, const Qgs
double yDelta_b = pt3.y() - pt2.y();
double xDelta_b = pt3.x() - pt2.x();

if ( ( qAbs( xDelta_a ) <= epsilon ) && ( qAbs( yDelta_b ) <= epsilon ) )
if ( ( fabs( xDelta_a ) <= epsilon ) && ( fabs( yDelta_b ) <= epsilon ) )
{
return false;
}

if ( qAbs( yDelta_a ) <= epsilon )
if ( fabs( yDelta_a ) <= epsilon )
{
return true;
}
else if ( qAbs( yDelta_b ) <= epsilon )
else if ( fabs( yDelta_b ) <= epsilon )
{
return true;
}
else if ( qAbs( xDelta_a ) <= epsilon )
else if ( fabs( xDelta_a ) <= epsilon )
{
return true;
}
else if ( qAbs( xDelta_b ) <= epsilon )
else if ( fabs( xDelta_b ) <= epsilon )
{
return true;
}
@@ -138,7 +138,7 @@ QgsCircle QgsCircle::from3Points( const QgsPoint &pt1, const QgsPoint &pt2, cons
double aSlope = yDelta_a / xDelta_a;
double bSlope = yDelta_b / xDelta_b;

if ( ( qAbs( xDelta_a ) <= epsilon ) && ( qAbs( yDelta_b ) <= epsilon ) )
if ( ( fabs( xDelta_a ) <= epsilon ) && ( fabs( yDelta_b ) <= epsilon ) )
{
center.setX( 0.5 * ( p2.x() + p3.x() ) );
center.setY( 0.5 * ( p1.y() + p2.y() ) );
@@ -147,7 +147,7 @@ QgsCircle QgsCircle::from3Points( const QgsPoint &pt1, const QgsPoint &pt2, cons
return QgsCircle( center, radius );
}

if ( qAbs( aSlope - bSlope ) <= epsilon )
if ( fabs( aSlope - bSlope ) <= epsilon )
{
return QgsCircle();
}
@@ -191,8 +191,8 @@ QgsCircle QgsCircle::from3Tangents( const QgsPoint &pt1_tg1, const QgsPoint &pt2

QgsCircle QgsCircle::fromExtent( const QgsPoint &pt1, const QgsPoint &pt2 )
{
double delta_x = qAbs( pt1.x() - pt2.x() );
double delta_y = qAbs( pt1.x() - pt2.y() );
double delta_x = fabs( pt1.x() - pt2.x() );
double delta_y = fabs( pt1.x() - pt2.y() );
if ( !qgsDoubleNear( delta_x, delta_y ) )
{
return QgsCircle();
@@ -133,7 +133,7 @@ class CORE_EXPORT QgsCircle : public QgsEllipse
*/
void setSemiMajorAxis( const double semiMajorAxis ) override
{
mSemiMajorAxis = qAbs( semiMajorAxis );
mSemiMajorAxis = fabs( semiMajorAxis );
mSemiMinorAxis = mSemiMajorAxis;
}

@@ -143,7 +143,7 @@ class CORE_EXPORT QgsCircle : public QgsEllipse
*/
void setSemiMinorAxis( const double semiMinorAxis ) override
{
mSemiMajorAxis = qAbs( semiMinorAxis );
mSemiMajorAxis = fabs( semiMinorAxis );
mSemiMinorAxis = mSemiMajorAxis;
}

@@ -152,7 +152,7 @@ class CORE_EXPORT QgsCircle : public QgsEllipse
//! Set the radius of the circle
void setRadius( double radius )
{
mSemiMajorAxis = qAbs( radius );
mSemiMajorAxis = fabs( radius );
mSemiMinorAxis = mSemiMajorAxis;
}

@@ -370,7 +370,7 @@ double QgsCurvePolygon::area() const
{
double area = 0.0;
mExteriorRing->sumUpArea( area );
totalArea += qAbs( area );
totalArea += fabs( area );
}

QList<QgsCurve *>::const_iterator ringIt = mInteriorRings.constBegin();
@@ -380,7 +380,7 @@ double QgsCurvePolygon::area() const
if ( ( *ringIt )->isRing() )
{
( *ringIt )->sumUpArea( area );
totalArea -= qAbs( area );
totalArea -= fabs( area );
}
}
return totalArea;
@@ -25,8 +25,8 @@

void QgsEllipse::normalizeAxis()
{
mSemiMajorAxis = qAbs( mSemiMajorAxis );
mSemiMinorAxis = qAbs( mSemiMinorAxis );
mSemiMajorAxis = fabs( mSemiMajorAxis );
mSemiMinorAxis = fabs( mSemiMinorAxis );
if ( mSemiMajorAxis < mSemiMinorAxis )
{
std::swap( mSemiMajorAxis, mSemiMinorAxis );
@@ -72,17 +72,17 @@ QgsEllipse QgsEllipse::fromFoci( const QgsPoint &pt1, const QgsPoint &pt2, const
QgsEllipse QgsEllipse::fromExtent( const QgsPoint &pt1, const QgsPoint &pt2 )
{
QgsPoint center = QgsGeometryUtils::midpoint( pt1, pt2 );
double axis_a = qAbs( pt2.x() - pt1.x() ) / 2.0;
double axis_b = qAbs( pt2.y() - pt1.y() ) / 2.0;
double axis_a = fabs( pt2.x() - pt1.x() ) / 2.0;
double axis_b = fabs( pt2.y() - pt1.y() ) / 2.0;
double azimuth = 90.0;

return QgsEllipse( center, axis_a, axis_b, azimuth );
}

QgsEllipse QgsEllipse::fromCenterPoint( const QgsPoint &center, const QgsPoint &pt1 )
{
double axis_a = qAbs( pt1.x() - center.x() );
double axis_b = qAbs( pt1.y() - center.y() );
double axis_a = fabs( pt1.x() - center.x() );
double axis_b = fabs( pt1.y() - center.y() );
double azimuth = 90.0;

return QgsEllipse( center, axis_a, axis_b, azimuth );
@@ -2558,7 +2558,7 @@ QgsLineString *smoothCurve( const QgsLineString &line, const unsigned int iterat
QgsPoint p3 = result->pointN( 1 );
double angle = QgsGeometryUtils::angleBetweenThreePoints( p1.x(), p1.y(), p2.x(), p2.y(),
p3.x(), p3.y() );
angle = qAbs( M_PI - angle );
angle = fabs( M_PI - angle );
skipFirst = angle > maxAngleRads;
}
for ( int i = 0; i < result->numPoints() - 1; i++ )
@@ -290,7 +290,7 @@ QgsGeometry QgsInternalGeometryEngine::poleOfInaccessibility( double precision,

bool dotProductWithinAngleTolerance( double dotProduct, double lowerThreshold, double upperThreshold )
{
return lowerThreshold > qAbs( dotProduct ) || qAbs( dotProduct ) > upperThreshold;
return lowerThreshold > fabs( dotProduct ) || fabs( dotProduct ) > upperThreshold;
}

double normalizedDotProduct( const QgsPoint &a, const QgsPoint &b, const QgsPoint &c )
@@ -341,7 +341,7 @@ double squareness( QgsLineString *ring, double lowerThreshold, double upperThres
if ( !dotProductWithinAngleTolerance( dotProduct, lowerThreshold, upperThreshold ) )
continue;

sum += 2.0 * qMin( qAbs( dotProduct - 1.0 ), qMin( qAbs( dotProduct ), qAbs( dotProduct + 1 ) ) );
sum += 2.0 * qMin( fabs( dotProduct - 1.0 ), qMin( fabs( dotProduct ), fabs( dotProduct + 1 ) ) );
}
a = b;
b = c;

0 comments on commit f2b2c6d

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