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

Trigger an assert when QDataStream reads a QFile opened with mode "Text"

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Out of scope
    • Icon: P3: Somewhat important P3: Somewhat important
    • Some future release
    • 4.3.0
    • Core: I/O
    • None

      QDataStream will read a QFile opened with mode "Text". What would have been nice is if the QDataStream had checked the the QIODevice was in Text mode and warned me. For instance triggered an assert like:

      Q_ASSERT_X(dataStream.device()->isTextModeEnabled() == false, "Danger", "The device is a text device");

      Update: We never insert asserts (forcing the application to crash) because of this, but we can insert a qWarning.

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

            stormols Marius Storm-Olsen
            sanonymous Nokia Qt Support (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes