Ignore:
Timestamp:
Jul 9, 2010, 2:19:34 AM (15 years ago)
Author:
Simon Hausmann
Message:

Implementation of the QScriptValue::propertyFlags function.

Patch by Jedrzej Nowacki <[email protected]> on 2010-07-09
Reviewed by Simon Hausmann.

The function returns the flags of a property with the given name,
using a given mode to resolve the property. This is a simple
implementation that is sufficient to test the QScriptValueIterator.

[Qt] QScriptValue API should have a property flag accessor.
https://bugs.webkit.org/show_bug.cgi?id=41769

  • api/qscriptvalue.cpp:

(QScriptValue::propertyFlags):

  • api/qscriptvalue.h:
  • api/qscriptvalue_p.h:

(QScriptValuePrivate::propertyFlags):

  • tests/qscriptvalue/tst_qscriptvalue.cpp:

(tst_QScriptValue::propertyFlag_data):
(tst_QScriptValue::propertyFlag):

  • tests/qscriptvalue/tst_qscriptvalue.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/qt/api/qscriptvalue.cpp

    r62661 r62921  
    756756    d_ptr->setProperty(QScriptStringPrivate::get(name).constData(), QScriptValuePrivate::get(value), flags);
    757757}
     758
     759/*!
     760  Returns the flags of the property with the given \a name, using the
     761  given \a mode to resolve the property.
     762
     763  \sa property()
     764*/
     765QScriptValue::PropertyFlags QScriptValue::propertyFlags(const QString& name, const ResolveFlags& mode) const
     766{
     767    return d_ptr->propertyFlags(name, mode);
     768}
     769
     770/*!
     771  Returns the flags of the property with the given \a name, using the
     772  given \a mode to resolve the property.
     773
     774  \sa property()
     775*/
     776QScriptValue::PropertyFlags QScriptValue::propertyFlags(const QScriptString& name, const ResolveFlags& mode) const
     777{
     778    return d_ptr->propertyFlags(QScriptStringPrivate::get(name).constData(), mode);
     779}
Note: See TracChangeset for help on using the changeset viewer.