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

[autotests] Tests using QSignalSpy should call QVERIFY(spy.isValid());

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.0.0
    • 5.0.0
    • Testing: qtestlib
    • None
    • ea415e20607016651f3cef02dff109235d84eb4d

    Description

      To make debugging test failures easier, each test that uses QSignalSpy should take advantage of the sanity checks performed by the QSignalSpy constructor, e.g.

      QSignalSpy spy(object, SIGNAL(someSignal()));
      QVERIFY(spy.isValid());
      

      The practice of using QSignalSpy::isValid() should also be documented in the QTestLib Manual.

      Attachments

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

        Activity

          People

            jasmcdon Jason McDonald (Closed Nokia Identity. Please assign to "macadder" instead) (Inactive)
            jasmcdon Jason McDonald (Closed Nokia Identity. Please assign to "macadder" instead) (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes