Opened 7 years ago

Last modified 3 years ago

#17201 new task

fix common typo in progressMonitor beginTask() — at Version 6

Reported by: GerdP Owned by: team
Priority: normal Milestone:
Component: Core Version:
Keywords: progressmonitor Cc: gaben

Description (last modified by Don-vip)

Due to copy+paste we have quite a lot of sources with this error pattern:
Instead of

  progressMonitor.beginTask(tr("Contacting Server...", 10));

it should be

  progressMonitor.beginTask(tr("Contacting Server..."), 10);

The effect is that many progress monitors show no progress because the default tick number is 10000.
I found this in the o5m plugin and in some core sources.

Other plugins matching the search pattern "beginTask\(tr.*[0..9]+\)\)" are:

plugins\cadastre-fr\src\org\openstreetmap\josm\plugins\fr\cadastre\download\CadastreServerReader.java
plugins\poly\src\poly\DownloadPolyTask.java
plugins\imagery-xml-bounds\src\org\openstreetmap\josm\plugins\imageryxmlbounds\io\JosmServerLocationReader.java
plugins\pbf\src\org\openstreetmap\josm\plugins\pbf\io\PbfServerReader.java

There may be more where the tick count is not given as a numerical constant.

Change History (6)

comment:1 by GerdP, 7 years ago

In 14688/josm:

see #17201 improve progressMonitor for internal osm (xml) importer

comment:2 by GerdP, 7 years ago

o5m plugin see [o34820]
pbf plugin see [o34848:34849]

comment:3 by GerdP, 7 years ago

In 14716/josm:

see #17201: Improve progress monitor: Let OsmImporter decide what task is following the parser

comment:4 by GerdP, 7 years ago

Oops, that did not yet work with some plugins. Reverted with r14717.

comment:5 by GerdP, 7 years ago

poly plugin see [o34965]

comment:6 by Don-vip, 7 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.