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

[Reg] Undeletable properties can't be deleted from C++

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P4: Low
    • None
    • 4.6.0
    • Qt Script
    • None

    Description

      QScriptEngine engine;
      QScriptValue object = engine.newObject();
      object.setProperty("undeletableProperty", 42, QScriptValue::Undeletable);
      object.setProperty("undeletableProperty", QScriptValue());
      qWarning() << object.property("undeletableProperty").toString();
      

      With Qt 4.5, the above program prints an empty string (because the property was deleted). Since 4.6, it prints "42" (the attempt to delete the property was ignored).
      We should decide and clarify whether the property attributes only affect property access from the JS side (4.5), or from both JS and C++ (4.6).

      Attachments

        Issue Links

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

          Activity

            People

              kenthans Kent Hansen (Inactive)
              kenthans Kent Hansen (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes