Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-12313

Documentation for QBasicTimer is misleading

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 4.7.0
    • 4.6.3
    • Documentation
    • None
    • ab3ce23e3b5e28389b9f6f9bd5bc69cd42fcae5d

    Description

      There are two types of timers, one-shot timers and repeating timers.

      QBasicTimer is a repeating timer, i.e. once you have called start(), it will go on delivering timer events at regular intervals until you call stop().

      The documentation for the class is not very clear on which sort of timer QBasicTimer is, but if you look at the description of the method isActive, you will see that it implies that this is a one-shot timer - it says "returns true if the timer ... has not yet timed out". This is a description of a one-shot timer - a repeating timer should continue to return true from isActive even after the timer had timed out for the first time, as it would then continue to deliver second and subsequent timeouts.

      I recommend:
      1) The description of isActive should be corrected by removing the words "has not yet timed out".
      2) The general introduction for the class should make it clear that this is a repeating timer.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            jerome.pasion Jerome Pasion
            johnandy John Barber
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes