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

Add varargs variants of QFAIL(), QSKIP(), QVERIFY2() that take printf-type format strings and parameters for them

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • None
    • Testing: qtestlib
    • None
    • All
    • 8
    • Foundation PM Prioritized

    Description

      At present, if one wants to embed any relevant data in the messages these macros report, it has to be done by qPrintable(QString("...").arg(...)), which is unwieldy, ugly and expensive.
      Now that macro-varargs is a thing, there is nothing to keep us from supporting printf()-style formatting directly in such strings, just the same as we can in qDebug("...", ...) messages.
      Let's not name these by suffixing with numbers; I suggest QARG_FAIL(), QARG_SKIP() and QARG_VERIFY().

      Attachments

        Issue Links

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

          Activity

            People

              cnn Qt Core & Network
              Eddy Edward Welbourne
              Vladimir Minenko Vladimir Minenko
              Alex Blasche Alex Blasche
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes