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

CLONE - Add Q_VERIFY

    XMLWordPrintable

Details

    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

            Unassigned Unassigned
            nikolaynnov Andrey
            Votes:
            5 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes