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

QSettings ASSERT and crash in debug mode when passing empty key

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P4: Low
    • 5.4.0
    • 5.3.2
    • Core: I/O
    • None
    • Windows 8.1
      Qt5.3.2 MSVC2013 OpenGL (64bits)
    • 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

            kleint Friedemann Kleint
            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