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

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

    XMLWordPrintable

Details

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

    Description

      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.

      Attachments

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

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes