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

Qt won't compile with QT_NO_DEBUG_STREAM

    XMLWordPrintable

Details

    Description

      I provided a custom qconfig-my.h file, which contained, besides other things, these lines:

      #ifndef QT_NO_DEBUG_STREAM

      1. define QT_NO_DEBUG_STREAM
        #endif

      I expected to see a nice clean compilation without support for "qDebug() << xxx" or "qWarning() << yyy", which I won't use on my embedded target anyway.

      Instead I got 4 compilation errors, each in a line like this:

      qWarning() << "QAbstractItemModel::endInsertRows: Invalid index (" << old.row() + count << "," << old.column() << ") in model" << q_func();

      They're all in the same file, src/corelib/kernel/qabstractitemmodel.cpp.

      Please use qWarning("Invalid index (%d,%d) in model ...", x,y,z) instead. Use my attached patch as an idea-giver.

      I don't know what q_func() returns to the debug stream, so my patch simply emits the address ("%p").

      Attachments

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

        Activity

          People

            stormols Marius Storm-Olsen
            janichol Andy Nichols
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes