Skip to content

Commit

Permalink
replace cancelling, cancelled and cancellation by canceling, canceled…
Browse files Browse the repository at this point in the history
… and cancelation, respectively (#4000)

* replace cancelling and cancelled by canceling and canceled, respectively

see qgis/qgis3_UIX_discussion#19

* replace cancellation by cancelation
  • Loading branch information
3nids committed Jan 16, 2017
1 parent 0a63d1f commit b119744
Show file tree
Hide file tree
Showing 83 changed files with 278 additions and 263 deletions.
13 changes: 13 additions & 0 deletions doc/api_break.dox
Expand Up @@ -1067,6 +1067,12 @@ QgsEditorWidgetFactory {#qgis_api_break_3_0_QgsEditorWidgetFactory}
- `createCache` has been removed. Use QgsFieldFormatter::representValue() instead


QgsFeedback {#qgis_api_break_3_0_QgsFeedback}
-----------

- cancelled() and isCancelled() has been renamed to canceled() and isCanceled(), respectively <!--#spellok-->


QgsGeometryUtils {#qgis_api_break_3_0_QgsGeometryUtils}
----------------

Expand Down Expand Up @@ -1469,6 +1475,12 @@ QgsRasterCalcNode {#qgis_api_break_3_0_QgsRasterCalcNode}
- QgsRasterCalcNode::calculate has been removed, use method with QgsRasterBlocks instead.


QgsRasterCalculator {#qgis_api_break_3_0_QgsRasterCalcNode}
-------------------

- Cancelled (Result enum value) has been renamed to Canceled <!--#spellok-->


QgsRasterDataProvider {#qgis_api_break_3_0_QgsRasterDataProvider}
---------------------

Expand Down Expand Up @@ -1836,6 +1848,7 @@ QgsVectorLayerImport {#qgis_api_break_3_0_QgsVectorLayerImport}
QgsCoordinateReferenceSystem is now implicitly shared, using references to QgsCoordinateReferenceSystem rather than
pointers makes for more robust, safer code. Use an invalid (default constructed) QgsCoordinateReferenceSystem
in code which previously passed a null pointer to QgsVectorLayerImport.
- ErrUserCancelled (ImportError enum value) has been renamed to ErrUserCanceled <!--#spellok-->


QgsVectorLayerUndoCommand {#qgis_api_break_3_0_QgsVectorLayerUndoCommand}
Expand Down
2 changes: 1 addition & 1 deletion ms-windows/QGIS-Installer.nsi
Expand Up @@ -413,7 +413,7 @@ Function DownloadDataSet
Goto end

cancel_download:
MessageBox MB_OK "Download Cancelled.$\r$\n${QGIS_BASE} will be installed without the $EXTENDED_ARCHIVE_NAME sample data set."
MessageBox MB_OK "Download Canceled.$\r$\n${QGIS_BASE} will be installed without the $EXTENDED_ARCHIVE_NAME sample data set."
Goto end

untar_failed:
Expand Down
2 changes: 1 addition & 1 deletion python/analysis/raster/qgsalignraster.sip
Expand Up @@ -91,7 +91,7 @@ class QgsAlignRaster
{
//! Method to be overridden for progress reporting.
//! @param complete Overall progress of the alignment operation
//! @return false if the execution should be cancelled, true otherwise
//! @return false if the execution should be canceled, true otherwise
virtual bool progress( double complete ) = 0;

virtual ~ProgressHandler();
Expand Down
2 changes: 1 addition & 1 deletion python/analysis/raster/qgsrastercalculator.sip
Expand Up @@ -24,7 +24,7 @@ class QgsRasterCalculator
Success, /*!< Calculation successful */
CreateOutputError, /*!< Error creating output data file */
InputLayerError, /*!< Error reading input layer */
Cancelled, /*!< User cancelled calculation */
Canceled, /*!< User canceled calculation */
ParserError, /*!< Error parsing formula */
MemoryError, /*!< Error allocating memory for result */
};
Expand Down
2 changes: 1 addition & 1 deletion python/core/__init__.py
Expand Up @@ -213,7 +213,7 @@ def finished(self, result):
return

if not result and self.exception is None:
self.exception = Exception('Task cancelled')
self.exception = Exception('Task canceled')

try:
if self.returned_values:
Expand Down
2 changes: 1 addition & 1 deletion python/core/auth/qgsauthmanager.sip
Expand Up @@ -99,7 +99,7 @@ class QgsAuthManager : QObject

/** Schedule an optional erase of authentication database, starting when mutex is lockable.
* @note When an erase is scheduled, any attempt to set the master password,
* e.g. password input dialog, is effectively cancelled.
* e.g. password input dialog, is effectively canceled.
* For example: In a GUI app, this keeps excess password input dialogs from popping
* up when a user has initiated an erase, from a password input dialog, because
* they forgot their password.
Expand Down
20 changes: 10 additions & 10 deletions python/core/qgsfeedback.sip
@@ -1,20 +1,20 @@

/** \ingroup core
* Base class for feedback objects to be used for cancellation of something running in a worker thread.
* Base class for feedback objects to be used for cancelation of something running in a worker thread.
* The class may be used as is or it may be subclassed for extended functionality
* for a particular operation (e.g. report progress or pass some data for preview).
*
* When cancel() is called, the internal code has two options to check for cancellation state:
* When cancel() is called, the internal code has two options to check for cancelation state:
* - if the worker thread uses an event loop (e.g. for network communication), the code can
* make a queued connection to cancelled() signal and handle the cancellation in its slot.
* - if the worker thread does not use an event loop, it can poll isCancelled() method regularly
* to see if the operation should be cancelled.
* make a queued connection to canceled() signal and handle the cancelation in its slot.
* - if the worker thread does not use an event loop, it can poll isCanceled() method regularly
* to see if the operation should be canceled.
*
* The class is meant to be created and destroyed in the main thread.
*
* For map rendering, the object may be created in constructor of a QgsMapLayerRenderer
* subclass and available with QgsMapLayerRenderer::feedback() method. When a map rendering job
* gets cancelled, the cancel() method is called on the feedback object of all layers.
* gets canceled, the cancel() method is called on the feedback object of all layers.
*
* @note added in QGIS 3.0
*/
Expand All @@ -30,14 +30,14 @@ class QgsFeedback : QObject

virtual ~QgsFeedback();

//! Tells the internal routines that the current operation should be cancelled. This should be run by the main thread
//! Tells the internal routines that the current operation should be canceled. This should be run by the main thread
void cancel();

//! Tells whether the operation has been cancelled already
bool isCancelled() const;
//! Tells whether the operation has been canceled already
bool isCanceled() const;

signals:
//! Internal routines can connect to this signal if they use event loop
void cancelled();
void canceled();

};
28 changes: 14 additions & 14 deletions python/core/qgstaskmanager.sip
Expand Up @@ -8,8 +8,8 @@
* within the run() method. This method will be called when the
* task commences (ie via calling start() ).
*
* Long running tasks should periodically check the isCancelled() flag to detect if the task
* has been cancelled via some external event. If this flag is true then the task should
* Long running tasks should periodically check the isCanceled() flag to detect if the task
* has been canceled via some external event. If this flag is true then the task should
* clean up and terminate at the earliest possible convenience.
*
* \note Added in version 3.0
Expand All @@ -35,7 +35,7 @@ class QgsTask : QObject
//! Task flags
enum Flag
{
CanCancel, //!< Task can be cancelled
CanCancel, //!< Task can be canceled
AllFlags, //!< Task supports all flags
};
typedef QFlags<QgsTask::Flag> Flags;
Expand All @@ -53,13 +53,13 @@ class QgsTask : QObject
Flags flags() const;

/**
* Returns true if the task can be cancelled.
* Returns true if the task can be canceled.
*/
bool canCancel() const;

/**
* Returns true if the task is active, ie it is not complete and has
* not been cancelled.
* not been canceled.
*/
bool isActive() const;

Expand All @@ -80,10 +80,10 @@ class QgsTask : QObject

/**
* Notifies the task that it should terminate. Calling this is not guaranteed
* to immediately end the task, rather it sets the isCancelled() flag which
* to immediately end the task, rather it sets the isCanceled() flag which
* task subclasses can check and terminate their operations at an appropriate
* time. Any subtasks owned by this task will also be cancelled.
* @see isCancelled()
* time. Any subtasks owned by this task will also be canceled.
* @see isCanceled()
*/
void cancel();

Expand Down Expand Up @@ -135,14 +135,14 @@ class QgsTask : QObject

/**
* Sets a list of layer IDs on which the task depends. The task will automatically
* be cancelled if any of these layers are about to be removed.
* be canceled if any of these layers are about to be removed.
* @see dependentLayerIds()
*/
void setDependentLayers( const QStringList& dependentLayerIds );

/**
* Returns the list of layer IDs on which the task depends. The task will automatically
* be cancelled if any of these layers are about to be removed.
* be canceled if any of these layers are about to be removed.
* @see setDependentLayers()
*/
QStringList dependentLayerIds() const;
Expand Down Expand Up @@ -181,7 +181,7 @@ class QgsTask : QObject

/**
* Will be emitted by task if it has terminated for any reason
* other then completion (e.g., when a task has been cancelled or encountered
* other then completion (e.g., when a task has been canceled or encountered
* an internal error).
* @note derived classes should not emit this signal directly, it will automatically
* be emitted
Expand Down Expand Up @@ -217,7 +217,7 @@ class QgsTask : QObject
* flag, then derived classes' run() methods should periodically check this and
* terminate in a safe manner.
*/
bool isCancelled() const;
bool isCanceled() const;

protected slots:

Expand Down Expand Up @@ -271,7 +271,7 @@ class QgsTaskManager : QObject

/**
* List of dependencies which must be completed before task can run. If any dependent tasks are
* cancelled this task will also be cancelled. Dependent tasks must also be added
* canceled this task will also be canceled. Dependent tasks must also be added
* to the task manager for proper handling of dependencies.
*/
QgsTaskList dependentTasks;
Expand Down Expand Up @@ -325,7 +325,7 @@ class QgsTaskManager : QObject
//QSet< long > dependencies( long taskId ) const;

/** Returns a list of layers on which as task is dependent. The task will automatically
* be cancelled if any of these layers are above to be removed.
* be canceled if any of these layers are above to be removed.
* @param taskId task ID
* @returns list of layer IDs
* @see tasksDependentOnLayer()
Expand Down
2 changes: 1 addition & 1 deletion python/core/qgsvectordataprovider.sip
Expand Up @@ -156,7 +156,7 @@ class QgsVectorDataProvider : QgsDataProvider
* @param index the index of the attribute
* @param substring substring to match (case insensitive)
* @param limit maxmum number of the values to return, or -1 to return all unique values
* @param feedback optional feedback object for cancelling request
* @param feedback optional feedback object for canceling request
* @returns list of unique strings containing substring
*/
virtual QStringList uniqueStringsMatching( int index, const QString& substring, int limit = -1,
Expand Down
2 changes: 1 addition & 1 deletion python/core/qgsvectorlayer.sip
Expand Up @@ -1337,7 +1337,7 @@ class QgsVectorLayer : QgsMapLayer, QgsExpressionContextGenerator
* @param index column index for attribute
* @param substring substring to match (case insensitive)
* @param limit maxmum number of the values to return, or -1 to return all unique values
* @param feedback optional feedback object for cancelling request
* @param feedback optional feedback object for canceling request
* @returns list of unique strings containing substring
*/
QStringList uniqueStringsMatching( int index, const QString& substring, int limit = -1,
Expand Down
2 changes: 1 addition & 1 deletion python/core/qgsvectorlayerimport.sip
Expand Up @@ -28,7 +28,7 @@ class QProgressDialog;
ErrInvalidProvider,
ErrProviderUnsupportedFeature,
ErrConnectionFailed,
ErrUserCancelled, /*!< User cancelled the import*/
ErrUserCanceled, /*!< User canceled the import*/
};

/**
Expand Down
2 changes: 1 addition & 1 deletion python/core/raster/qgsrasterdrawer.sip
Expand Up @@ -13,7 +13,7 @@ class QgsRasterDrawer
* @param p destination QPainter
* @param viewPort viewport to render
* @param theQgsMapToPixel map to pixel converter
* @param feedback optional raster feedback object for cancellation/preview. Added in QGIS 3.0.
* @param feedback optional raster feedback object for cancelation/preview. Added in QGIS 3.0.
*/
void draw( QPainter* p, QgsRasterViewPort* viewPort, const QgsMapToPixel* theQgsMapToPixel, QgsRasterBlockFeedback* feedback = nullptr );

Expand Down
2 changes: 1 addition & 1 deletion python/core/raster/qgsrasterinterface.sip
Expand Up @@ -166,7 +166,7 @@ class QgsRasterInterface
* @param extent extent of block
* @param width pixel width of block
* @param height pixel height of block
* @param feedback optional raster feedback object for cancellation/preview. Added in QGIS 3.0.
* @param feedback optional raster feedback object for cancelation/preview. Added in QGIS 3.0.
*/
virtual QgsRasterBlock *block( int bandNo, const QgsRectangle &extent, int width, int height, QgsRasterBlockFeedback* feedback = nullptr ) = 0 /Factory/;

Expand Down
2 changes: 1 addition & 1 deletion python/core/raster/qgsrasteriterator.sip
Expand Up @@ -12,7 +12,7 @@ class QgsRasterIterator
@param nCols number of columns
@param nRows number of rows
@param extent area to read
@param feedback optional raster feedback object for cancellation/preview. Added in QGIS 3.0.
@param feedback optional raster feedback object for cancelation/preview. Added in QGIS 3.0.
*/
void startRasterRead( int bandNumber, int nCols, int nRows, const QgsRectangle& extent, QgsRasterBlockFeedback* feedback = nullptr );

Expand Down
2 changes: 1 addition & 1 deletion python/gui/qgscolorbutton.sip
Expand Up @@ -307,7 +307,7 @@ class QgsColorButton : QToolButton
void mouseReleaseEvent( QMouseEvent *e );

/**
* Reimplemented to allow cancelling color pick via keypress, and sample via space bar press
* Reimplemented to allow canceling color pick via keypress, and sample via space bar press
*/
void keyPressEvent( QKeyEvent *e );

Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/tools/postgis.py
Expand Up @@ -223,7 +223,7 @@ def __init__(self, host=None, port=None, dbname=None, user=None,
password,
err)
if not ok:
raise DbError(u'Action cancelled by user')
raise DbError(u'Action canceled by user')
if user:
self.uri.setUsername(user)
if password:
Expand Down
2 changes: 1 addition & 1 deletion python/pyplugin_installer/installer.py
Expand Up @@ -459,7 +459,7 @@ def editRepository(self, reposName):
dlg.labelInfo.setText(self.tr("This repository is blocked due to incompatibility with your QGIS version"))
dlg.labelInfo.setFrameShape(QFrame.Box)
if not dlg.exec_():
return # nothing to do if cancelled
return # nothing to do if canceled
for i in list(repositories.all().values()):
if dlg.editURL.text().strip() == i["url"] and dlg.editURL.text().strip() != repositories.all()[reposName]["url"]:
iface.pluginManagerInterface().pushMessage(self.tr("Unable to add another repository with the same URL!"), QgsMessageBar.WARNING)
Expand Down
2 changes: 1 addition & 1 deletion python/pyplugin_installer/installer_data.py
Expand Up @@ -398,7 +398,7 @@ def xmlDownloaded(self):
self.mRepositories[reposName]["state"] = 3
self.mRepositories[reposName]["error"] = reply.errorString()
if reply.error() == QNetworkReply.OperationCanceledError:
self.mRepositories[reposName]["error"] += "\n\n" + QCoreApplication.translate("QgsPluginInstaller", "If you haven't cancelled the download manually, it was most likely caused by a timeout. In this case consider increasing the connection timeout value in QGIS options window.")
self.mRepositories[reposName]["error"] += "\n\n" + QCoreApplication.translate("QgsPluginInstaller", "If you haven't canceled the download manually, it was most likely caused by a timeout. In this case consider increasing the connection timeout value in QGIS options window.")
else:
reposXML = QDomDocument()
content = reply.readAll()
Expand Down
Expand Up @@ -102,7 +102,7 @@ def requestFinished(self):
if reply.error() != QNetworkReply.NoError:
self.mResult = reply.errorString()
if reply.error() == QNetworkReply.OperationCanceledError:
self.mResult += "<br/><br/>" + QCoreApplication.translate("QgsPluginInstaller", "If you haven't cancelled the download manually, it might be caused by a timeout. In this case consider increasing the connection timeout value in QGIS options.")
self.mResult += "<br/><br/>" + QCoreApplication.translate("QgsPluginInstaller", "If you haven't canceled the download manually, it might be caused by a timeout. In this case consider increasing the connection timeout value in QGIS options.")
self.reject()
reply.deleteLater()
return
Expand Down
4 changes: 3 additions & 1 deletion scripts/spell_check/spelling.dat
Expand Up @@ -1076,7 +1076,9 @@ campagin:campaign
campain:campaign
campaing:campaign
campains:campaigns
cancelation:cancellation
cancellation:cancelation
cancelled:canceled
cancelling:canceling
candadate:candidate
candiate:candidate
candidiate:candidate
Expand Down
4 changes: 2 additions & 2 deletions src/analysis/raster/qgsalignraster.h
Expand Up @@ -145,7 +145,7 @@ class ANALYSIS_EXPORT QgsAlignRaster
{
//! Method to be overridden for progress reporting.
//! @param complete Overall progress of the alignment operation
//! @return false if the execution should be cancelled, true otherwise
//! @return false if the execution should be canceled, true otherwise
virtual bool progress( double complete ) = 0;

virtual ~ProgressHandler() = default;
Expand Down Expand Up @@ -237,7 +237,7 @@ class ANALYSIS_EXPORT QgsAlignRaster

// set by the client

//! Object that facilitates reporting of progress / cancellation
//! Object that facilitates reporting of progress / cancelation
ProgressHandler* mProgressHandler;

//! Last error message from run()
Expand Down
2 changes: 1 addition & 1 deletion src/analysis/raster/qgsrastercalculator.cpp
Expand Up @@ -173,7 +173,7 @@ int QgsRasterCalculator::processCalculation( QProgressDialog* p )
{
//delete the dataset without closing (because it is faster)
GDALDeleteDataset( outputDriver, mOutputFile.toUtf8().constData() );
return static_cast< int >( Cancelled );
return static_cast< int >( Canceled );
}
GDALClose( outputDataset );

Expand Down
2 changes: 1 addition & 1 deletion src/analysis/raster/qgsrastercalculator.h
Expand Up @@ -48,7 +48,7 @@ class ANALYSIS_EXPORT QgsRasterCalculator
Success = 0, //!< Calculation successful
CreateOutputError = 1, //!< Error creating output data file
InputLayerError = 2, //!< Error reading input layer
Cancelled = 3, //!< User cancelled calculation
Canceled = 3, //!< User canceled calculation
ParserError = 4, //!< Error parsing formula
MemoryError = 5, //!< Error allocating memory for result
};
Expand Down

0 comments on commit b119744

Please sign in to comment.