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

Add Q_VERIFY

    XMLWordPrintable

Details

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

    Description

      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); }

      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)
            sanonymous Nokia Qt Support (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes