Skip to content
Permalink
Browse files

replace cancelling, cancelled and cancellation by canceling, canceled…

… 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 b119744773572df195ed6e0acb2f74fc793fe23d
Showing with 278 additions and 263 deletions.
  1. +13 −0 doc/api_break.dox
  2. +1 −1 ms-windows/QGIS-Installer.nsi
  3. +1 −1 python/analysis/raster/qgsalignraster.sip
  4. +1 −1 python/analysis/raster/qgsrastercalculator.sip
  5. +1 −1 python/core/__init__.py
  6. +1 −1 python/core/auth/qgsauthmanager.sip
  7. +10 −10 python/core/qgsfeedback.sip
  8. +14 −14 python/core/qgstaskmanager.sip
  9. +1 −1 python/core/qgsvectordataprovider.sip
  10. +1 −1 python/core/qgsvectorlayer.sip
  11. +1 −1 python/core/qgsvectorlayerimport.sip
  12. +1 −1 python/core/raster/qgsrasterdrawer.sip
  13. +1 −1 python/core/raster/qgsrasterinterface.sip
  14. +1 −1 python/core/raster/qgsrasteriterator.sip
  15. +1 −1 python/gui/qgscolorbutton.sip
  16. +1 −1 python/plugins/processing/tools/postgis.py
  17. +1 −1 python/pyplugin_installer/installer.py
  18. +1 −1 python/pyplugin_installer/installer_data.py
  19. +1 −1 python/pyplugin_installer/qgsplugininstallerinstallingdialog.py
  20. +3 −1 scripts/spell_check/spelling.dat
  21. +2 −2 src/analysis/raster/qgsalignraster.h
  22. +1 −1 src/analysis/raster/qgsrastercalculator.cpp
  23. +1 −1 src/analysis/raster/qgsrastercalculator.h
  24. +5 −5 src/app/composer/qgscomposer.cpp
  25. +1 −1 src/app/composer/qgscomposerattributetablewidget.cpp
  26. +1 −1 src/app/gps/qgsgpsinformationwidget.cpp
  27. +3 −3 src/app/qgisapp.cpp
  28. +1 −1 src/app/qgsrasterlayerproperties.h
  29. +2 −2 src/app/qgsvectorlayerproperties.h
  30. +1 −1 src/core/auth/qgsauthmanager.cpp
  31. +1 −1 src/core/auth/qgsauthmanager.h
  32. +1 −1 src/core/layertree/qgslayertreemodel.cpp
  33. +16 −16 src/core/qgsfeedback.h
  34. +4 −4 src/core/qgslabelingengine.cpp
  35. +2 −2 src/core/qgsmaprenderercustompainterjob.cpp
  36. +1 −1 src/core/qgsmaprenderersequentialjob.cpp
  37. +4 −4 src/core/qgstaskmanager.cpp
  38. +15 −15 src/core/qgstaskmanager.h
  39. +1 −1 src/core/qgsvectordataprovider.cpp
  40. +1 −1 src/core/qgsvectordataprovider.h
  41. +3 −3 src/core/qgsvectorlayer.cpp
  42. +1 −1 src/core/qgsvectorlayer.h
  43. +4 −4 src/core/qgsvectorlayerimport.cpp
  44. +1 −1 src/core/qgsvectorlayerimport.h
  45. +1 −1 src/core/qgsvectorlayerrenderer.cpp
  46. +1 −1 src/core/raster/qgsrasterdrawer.cpp
  47. +1 −1 src/core/raster/qgsrasterdrawer.h
  48. +1 −1 src/core/raster/qgsrasterinterface.h
  49. +1 −1 src/core/raster/qgsrasteriterator.h
  50. +1 −1 src/core/raster/qgsrasterlayerrenderer.h
  51. +1 −1 src/gui/qgscolorbutton.h
  52. +2 −2 src/gui/qgscompoundcolorwidget.cpp
  53. +2 −2 src/gui/qgsfieldvalueslineedit.cpp
  54. +8 −8 src/gui/qgsfieldvalueslineedit.h
  55. +5 −5 src/gui/qgsmapcanvas.cpp
  56. +3 −3 src/gui/qgsmapcanvas.h
  57. +1 −1 src/gui/qgsmapoverviewcanvas.cpp
  58. +1 −1 src/gui/qgstaskmanagerwidget.h
  59. +12 −12 src/gui/symbology-ng/qgssvgselectorwidget.cpp
  60. +2 −2 src/gui/symbology-ng/qgssvgselectorwidget.h
  61. +1 −1 src/plugins/plugin_builder.py
  62. +2 −2 src/plugins/topology/checkDock.cpp
  63. +22 −22 src/plugins/topology/topolTest.cpp
  64. +4 −4 src/plugins/topology/topolTest.h
  65. +6 −6 src/providers/db2/qgsdb2dataitems.cpp
  66. +3 −3 src/providers/gdal/qgsgdalproviderbase.cpp
  67. +1 −1 src/providers/grass/qgsgrassprovidermodule.cpp
  68. +5 −5 src/providers/mssql/qgsmssqldataitems.cpp
  69. +1 −1 src/providers/ogr/qgsogrprovider.cpp
  70. +5 −5 src/providers/oracle/qgsoracledataitems.cpp
  71. +5 −5 src/providers/postgres/qgspostgresdataitems.cpp
  72. +1 −1 src/providers/postgres/qgspostgresprovider.cpp
  73. +5 −5 src/providers/spatialite/qgsspatialitedataitems.cpp
  74. +1 −1 src/providers/spatialite/qgsspatialiteprovider.cpp
  75. +7 −7 src/providers/wcs/qgswcsprovider.cpp
  76. +1 −1 src/providers/wcs/qgswcsprovider.h
  77. +1 −1 src/providers/wfs/qgswfsfeatureiterator.h
  78. +1 −1 src/providers/wfs/qgswfsshareddata.h
  79. +14 −14 src/providers/wms/qgswmsprovider.cpp
  80. +2 −2 src/providers/wms/qgswmsprovider.h
  81. +8 −8 tests/src/core/testqgstaskmanager.cpp
  82. +1 −1 tests/src/python/acceptable_missing_doc.py
  83. +9 −9 tests/src/python/test_qgstaskmanager.py
@@ -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}
----------------

@@ -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}
---------------------

@@ -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}
@@ -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:
@@ -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();
@@ -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 */
};
@@ -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:
@@ -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.
@@ -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
*/
@@ -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();

};
@@ -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
@@ -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;
@@ -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;

@@ -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();

@@ -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;
@@ -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
@@ -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:

@@ -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;
@@ -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()
@@ -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,
@@ -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,
@@ -28,7 +28,7 @@ class QProgressDialog;
ErrInvalidProvider,
ErrProviderUnsupportedFeature,
ErrConnectionFailed,
ErrUserCancelled, /*!< User cancelled the import*/
ErrUserCanceled, /*!< User canceled the import*/
};

/**
@@ -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 );

@@ -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/;

@@ -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 );

@@ -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 );

@@ -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:
@@ -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)
@@ -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()
@@ -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
@@ -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
@@ -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;
@@ -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()
@@ -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 );

@@ -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
};

0 comments on commit b119744

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