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

Add Q_VERIFY

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Out of scope
    • Icon: P4: Low P4: Low
    • Some future release
    • 4.3.2
    • Other
    • None

      There is already the Q_ASSERT macro but it would be handy if something similar to the MFC VERIFY() macro was added. The difference between ASSERT and VERIFY is that with ASSERT(functionCall()) the functionCall() does not run in Release mode, but does with VERIFY. So the expression in VERIFY is run in any mode and asserts actually in debug mode.

      Naive implementation would be

      Q_VERIFY(X)

      { const bool result = (X); Q_ASSERT(result); }

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

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes