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

QSettings ASSERT and crash in debug mode when passing empty key

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4: Low
    • Resolution: Done
    • Affects Version/s: 5.3.2
    • Fix Version/s: 5.4.0
    • Component/s: Core: I/O
    • Labels:
      None
    • Environment:
      Windows 8.1
      Qt5.3.2 MSVC2013 OpenGL (64bits)
    • Commits:
      0368b24a7f53c945b582097cc8ad22a053856d22 (5.4, 17.10.2014, 5.4)

      Description

      Hi,

      Reading value with a default value will ASSERT in debug mode if the key is empty.

      The code (from the doc !!):

      QSettings settings;
      settings.value("").toInt();
      

      will assert and exit the program on last line querying value for zebra
      (same for setValue()/value(), assert is in function actualKey(), see stack trace).

        Attachments

        For Gerrit Dashboard: QTBUG-41812
        # Subject Branch Project Status CR V

          Activity

            People

            Assignee:
            kleint Friedemann Kleint
            Reporter:
            ness522 St├ęphane Fabry
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes