Skip to content

Commit 5bd2e88

Browse files
committedAug 6, 2017
cancelled => canceled etc. //#spellok
1 parent 487a7a0 commit 5bd2e88

File tree

9 files changed

+32
-32
lines changed

9 files changed

+32
-32
lines changed
 

‎scripts/spell_check/spelling.dat

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4366,7 +4366,7 @@ methaphors:metaphors
43664366
metres:meters
43674367
Michagan:Michigan
43684368
micoscopy:microscopy
4369-
microprocesspr:microprocessor
4369+
microprocesspr\>:microprocessor
43704370
midwifes:midwives
43714371
mileau:milieu
43724372
milennia:millennia
@@ -5381,7 +5381,7 @@ proceses:processes
53815381
processer:processor:*
53825382
processess:processes
53835383
processessing:processing
5384-
processpr:processor
5384+
processpr\>:processor
53855385
processs:process:*
53865386
processsed:processed
53875387
processses:processes

‎src/core/pal/pal.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ Pal::Pal()
5555
// do not init and exit GEOS - we do it inside QGIS
5656
//initGEOS( geosNotice, geosError );
5757

58-
fnIsCancelled = nullptr;
59-
fnIsCancelledContext = nullptr;
58+
fnIsCanceled = nullptr;
59+
fnIsCanceledContext = nullptr;
6060

6161
ejChainDeg = 50;
6262
tenure = 10;
@@ -208,7 +208,7 @@ bool filteringCallback( FeaturePart *featurePart, void *ctx )
208208
RTree<LabelPosition *, double, 2, double> *cdtsIndex = ( reinterpret_cast< FilterContext * >( ctx ) )->cdtsIndex;
209209
Pal *pal = ( reinterpret_cast< FilterContext * >( ctx ) )->pal;
210210

211-
if ( pal->isCancelled() )
211+
if ( pal->isCanceled() )
212212
return false; // do not continue searching
213213

214214
double amin[2], amax[2];
@@ -335,7 +335,7 @@ Problem *Pal::extract( double lambda_min, double phi_min, double lambda_max, dou
335335
filterCtx.pal = this;
336336
obstacles->Search( amin, amax, filteringCallback, static_cast< void * >( &filterCtx ) );
337337

338-
if ( isCancelled() )
338+
if ( isCanceled() )
339339
{
340340
Q_FOREACH ( Feats *feat, *fFeats )
341341
{
@@ -400,7 +400,7 @@ Problem *Pal::extract( double lambda_min, double phi_min, double lambda_max, dou
400400

401401
while ( !fFeats->isEmpty() ) // foreach feature
402402
{
403-
if ( isCancelled() )
403+
if ( isCanceled() )
404404
{
405405
Q_FOREACH ( Feats *feat, *fFeats )
406406
{
@@ -503,10 +503,10 @@ QList<LabelPosition *> *Pal::labeller( double bbox[4], PalStat **stats, bool dis
503503
return solution;
504504
}
505505

506-
void Pal::registerCancellationCallback( Pal::FnIsCancelled fnCancelled, void *context )
506+
void Pal::registerCancelationCallback( Pal::FnIsCanceled fnCanceled, void *context )
507507
{
508-
fnIsCancelled = fnCancelled;
509-
fnIsCancelledContext = context;
508+
fnIsCanceled = fnCanceled;
509+
fnIsCanceledContext = context;
510510
}
511511

512512
Problem *Pal::extractProblem( double bbox[4] )

‎src/core/pal/pal.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -141,13 +141,13 @@ namespace pal
141141
*/
142142
QList<LabelPosition *> *labeller( double bbox[4], PalStat **stats, bool displayAll );
143143

144-
typedef bool ( *FnIsCancelled )( void *ctx );
144+
typedef bool ( *FnIsCanceled )( void *ctx );
145145

146-
//! Register a function that returns whether this job has been cancelled - PAL calls it during the computation
147-
void registerCancellationCallback( FnIsCancelled fnCancelled, void *context );
146+
//! Register a function that returns whether this job has been canceled - PAL calls it during the computation
147+
void registerCancelationCallback( FnIsCanceled fnCanceled, void *context );
148148

149-
//! Check whether the job has been cancelled
150-
inline bool isCancelled() { return fnIsCancelled ? fnIsCancelled( fnIsCancelledContext ) : false; }
149+
//! Check whether the job has been canceled
150+
inline bool isCanceled() { return fnIsCanceled ? fnIsCanceled( fnIsCanceledContext ) : false; }
151151

152152
Problem *extractProblem( double bbox[4] );
153153

@@ -263,10 +263,10 @@ namespace pal
263263
*/
264264
bool showPartial;
265265

266-
//! Callback that may be called from PAL to check whether the job has not been cancelled in meanwhile
267-
FnIsCancelled fnIsCancelled;
268-
//! Application-specific context for the cancellation check function
269-
void *fnIsCancelledContext = nullptr;
266+
//! Callback that may be called from PAL to check whether the job has not been canceled in meanwhile
267+
FnIsCanceled fnIsCanceled;
268+
//! Application-specific context for the cancelation check function
269+
void *fnIsCanceledContext = nullptr;
270270

271271
/**
272272
* \brief Problem factory

‎src/core/pal/problem.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ void Problem::init_sol_falp()
312312

313313
while ( list->getSize() > 0 ) // O (log size)
314314
{
315-
if ( pal->isCancelled() )
315+
if ( pal->isCanceled() )
316316
{
317317
delete context;
318318
delete list;

‎src/core/qgslabelingengine.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929

3030
// helper function for checking for job cancelation within PAL
31-
static bool _palIsCancelled( void *ctx ) //#spellok
31+
static bool _palIsCanceled( void *ctx )
3232
{
3333
return ( reinterpret_cast< QgsRenderContext * >( ctx ) )->renderingStopped();
3434
}
@@ -111,7 +111,7 @@ void QgsLabelingEngine::removeProvider( QgsAbstractLabelProvider *provider )
111111
}
112112
}
113113

114-
void QgsLabelingEngine::processProvider( QgsAbstractLabelProvider *provider, QgsRenderContext &context, pal::Pal &p ) //#spellok
114+
void QgsLabelingEngine::processProvider( QgsAbstractLabelProvider *provider, QgsRenderContext &context, pal::Pal &p )
115115
{
116116
QgsAbstractLabelProvider::Flags flags = provider->flags();
117117

@@ -179,7 +179,7 @@ void QgsLabelingEngine::processProvider( QgsAbstractLabelProvider *provider, Qgs
179179
Q_FOREACH ( QgsAbstractLabelProvider *subProvider, provider->subProviders() )
180180
{
181181
mSubProviders << subProvider;
182-
processProvider( subProvider, context, p ); //#spellok
182+
processProvider( subProvider, context, p );
183183
}
184184
}
185185

@@ -230,7 +230,7 @@ void QgsLabelingEngine::run( QgsRenderContext &context )
230230
appendedLayerScope = true;
231231
context.expressionContext().appendScope( QgsExpressionContextUtils::layerScope( ml ) );
232232
}
233-
processProvider( provider, context, p ); //#spellok
233+
processProvider( provider, context, p );
234234
if ( appendedLayerScope )
235235
delete context.expressionContext().popScope();
236236
}
@@ -249,7 +249,7 @@ void QgsLabelingEngine::run( QgsRenderContext &context )
249249

250250
QgsRectangle extent = extentGeom.boundingBox();
251251

252-
p.registerCancellationCallback( &_palIsCancelled, reinterpret_cast< void * >( &context ) ); //#spellok
252+
p.registerCancelationCallback( &_palIsCanceled, reinterpret_cast< void * >( &context ) );
253253

254254
QTime t;
255255
t.start();

‎src/core/qgslabelingengine.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ class CORE_EXPORT QgsLabelingEngine
206206
QgsLabelingResults *results() const { return mResults.get(); }
207207

208208
protected:
209-
void processProvider( QgsAbstractLabelProvider *provider, QgsRenderContext &context, pal::Pal &p ); //#spellok
209+
void processProvider( QgsAbstractLabelProvider *provider, QgsRenderContext &context, pal::Pal &p );
210210

211211
protected:
212212
//! Associated map settings instance

‎src/gui/qgstaskmanagerwidget.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ class GUI_EXPORT QgsTaskStatusWidget : public QWidget
220220
signals:
221221

222222
/**
223-
* Emitted when the user clicks a cancellable task.
223+
* Emitted when the user clicks a cancelable task.
224224
*/
225225
void cancelClicked();
226226

‎tests/code_layout/acceptable_missing_doc.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@
188188
"QgsComposerGroupItem": ["QgsComposerGroupItem(const QString &text)"],
189189
"QgsGraphDirector": ["buildProgress(int, int) const ", "buildMessage(const QString &) const ", "addProperter(QgsArcProperter *prop)"],
190190
"QgsScaleComboBox": ["QgsScaleComboBox(QWidget *parent=nullptr)", "updateScales(const QStringList &scales=QStringList())"],
191-
"QgsLabelingEngine": ["processProvider(QgsAbstractLabelProvider *provider, QgsRenderContext &context, pal::Pal &p)", "Flag"], # spellok
191+
"QgsLabelingEngine": ["processProvider(QgsAbstractLabelProvider *provider, QgsRenderContext &context, pal::Pal &p)", "Flag"],
192192
"QgsSymbolSelectorDialog": ["moveLayerByOffset(int offset)", "QgsSymbolSelectorDialog(QgsSymbol *symbol, QgsStyle *style, const QgsVectorLayer *vl, QWidget *parent=nullptr, bool embedded=false)", "lockLayer()", "moveLayerUp()", "updateUi()", "addLayer()", "moveLayerDown()", "layerChanged()", "loadSymbol()", "loadSymbol(QgsSymbol *symbol, SymbolLayerItem *parent)", "setWidget(QWidget *widget)", "updateLayerPreview()", "symbolModified()", "updateLockButton()", "removeLayer()", "currentLayer()", "updatePreview()"],
193193
"QgsCacheIndexFeatureId": ["QgsCacheIndexFeatureId(QgsVectorLayerCache *)"],
194194
"QgsSymbolLayerWidget": ["setSymbolLayer(QgsSymbolLayer *layer)=0", "updateDataDefinedProperty()", "QgsSymbolLayerWidget(QWidget *parent, const QgsVectorLayer *vl=nullptr)", "symbolLayer()=0"],
@@ -615,7 +615,7 @@
615615
"QgsZipItem": ["QgsZipItem(QgsDataItem *parent, const QString &name, const QString &filePath, const QString &path)", "itemFromPath(QgsDataItem *parent, QString path, QString name)", "getZipFileList()", "QgsZipItem(QgsDataItem *parent, const QString &name, const QString &path)", "iconZip()", "vsiPrefix(const QString &uri)"],
616616
"NormVecDecorator": ["NormVecDecorator(Triangulation *tin)"],
617617
"QgsVectorLayerJoinBuffer": ["vectorJoins() const ", "QgsVectorLayerJoinBuffer(QgsVectorLayer *layer=nullptr)"],
618-
"pal::Pal": ["solveProblem(Problem *prob, bool displayAll)", "extractProblem(double bbox[4])", "FnIsCancelled)(void *ctx)"], # spellok
618+
"pal::Pal": ["solveProblem(Problem *prob, bool displayAll)", "extractProblem(double bbox[4])", "FnIsCanceled)(void *ctx)"],
619619
"QgsSearchWidgetWrapper": ["setExpression(QString value)=0"],
620620
"QgsRasterFillSymbolLayer": ["create(const QgsStringMap &properties=QgsStringMap())", "QgsRasterFillSymbolLayer(const QString &imageFilePath=QString())", "FillCoordinateMode"],
621621
"QgsExpression::NodeInOperator": ["NodeInOperator(Node *node, NodeList *list, bool notin=false)", "node() const ", "isNotIn() const ", "list() const "],

‎tests/src/python/test_qgstaskmanager.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def run_with_kwargs(task, password, result):
3838
return result
3939

4040

41-
def cancellable(task):
41+
def cancelable(task):
4242
while not task.isCanceled():
4343
pass
4444
if task.isCanceled():
@@ -138,9 +138,9 @@ def testTaskFromFunctionWithKwargs(self):
138138
self.assertFalse(task.exception)
139139
self.assertEqual(task.status(), QgsTask.Complete)
140140

141-
def testTaskFromFunctionIsCancellable(self):
141+
def testTaskFromFunctionIsCancelable(self):
142142
""" test that task from function can check canceled status """
143-
bad_task = QgsTask.fromFunction('test task4', cancellable)
143+
bad_task = QgsTask.fromFunction('test task4', cancelable)
144144
QgsApplication.taskManager().addTask(bad_task)
145145
while bad_task.status() != QgsTask.Running:
146146
pass

0 commit comments

Comments
 (0)
Please sign in to comment.