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

Define a way to query if a property is in scope

    XMLWordPrintable

Details

    Description

      After resolving QTBUG-11606 accessing any property that is not currently in the scope will throw ReferenceError. I have run into this problem quite often when trying to create modular code that needs to interface with surrounding scopes. Rather than polluting the code with try-catch blocks (which for property assignment is downright ugly), it would be nice to have a way of telling if a property is available in the current scope or not. I.e Qt.canResolveProperty("orientation") or something similar.

      Attachments

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

        Activity

          People

            shausman Simon Hausmann
            bachewii Jens
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes