On 11 June 2015 at 00:59, Alan Alpert <[email protected]> wrote: > On Wed, Jun 10, 2015 at 8:14 AM, Hausmann Simon > <[email protected]> wrote: >> Hi, >> >> I think renaming the getter to lastError is nice! I however do like error as >> signal name and it looks good in qml as onError:... > > I disagree that it looks good in QML as onError, almost all other > signal handlers are past tense so it is visibly odd. But it's nice to > be so short, so maybe a direct past-tense-ify of "onErrored"? If you > don't like using error as a verb, we can use a similar (yet shorter) > verb: "onErred". Not that I really mind the exact name of the new > signal.
I'm with Alan and Thiago on making it past tense. I personally like "errored". It hasn't yet gained widespread acceptance as a verb in general, [1] but it seems widespread enough in the computing industry. On a related note, the "Component" type has a signal called "destruction". A better signal name is "destroyed", which corresponds with QObject::destroyed(). [2] I'm guessing that the QML authors designed these around the signal handler's name (rather than the signal's name). I think "onError" and "onDestruction" look fine _by themselves_, but not when we consider the other signals in Qt, which are verbs in past tense. Ideally, both C++ and QML should use the same conventions. A simple and consistent API is one of Qt's attractive features. Regards, Sze-Howe [1] There's a lively discussion at http://english.stackexchange.com/questions/3059/is-errored-correct-usage with supporters on both sides. [2] Well actually, both the QML and C++ the signals are emitted BEFORE the object is destroyed... but that's a separate topic. _______________________________________________ Development mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/development
