Open nyalldawson opened 8 years ago
I've been doing that outside the API freeze already sometimes. I'm not arguing that we shouldn't do it now, but do you think we shouldn't continue with this hunt if we don't finish before release?
I'm not arguing that we shouldn't do it now, but do you think we shouldn't continue with this hunt if we don't finish before release?
well... it's technically an api break, but I'm not going to complain!
How is that? I thought about a keyword list but I just tried and couldn't call a method like that.
search for (void|bool|int|double|Q\w+) \w*\(( const)+ [^ ]+\s\w\s
in headers
There's a lot of functions in QGIS which take single character parameters, eg
setColor( const QColor& c )
orsetOutputUnit( QgsSymbolV2::OutputUnit u )
.This shorthand isn't ideal, and should be replaced with a more descriptive, full name of the parameter. Doing so helps make the api documentation easier to immediately understand, and helps with using the api in IDEs which show tips/autocomplete describing the expected parameters. It also helps with PyQGIS code which uses named parameters for clarity (eg, avoids confusing code like
someMethod( a=5, u='a', t=.01)
)We should use the API break to try to address this and remove all shortened parameter names from the API.