File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -937,6 +937,18 @@ pub enum QJSValueSpecialValue {
937937}
938938
939939impl QJSValue {
940+ pub fn null ( ) -> Self {
941+ cpp ! ( unsafe [ ] -> QJSValue as "QJSValue" {
942+ return QJSValue ( QJSValue :: SpecialValue :: NullValue ) ;
943+ } )
944+ }
945+
946+ pub fn undefined ( ) -> Self {
947+ cpp ! ( unsafe [ ] -> QJSValue as "QJSValue" {
948+ return QJSValue ( QJSValue :: SpecialValue :: UndefinedValue ) ;
949+ } )
950+ }
951+
940952 pub fn is_bool ( & self ) -> bool {
941953 cpp ! ( unsafe [ self as "const QJSValue *" ] -> bool as "bool" {
942954 return self ->isBool( ) ;
@@ -1008,6 +1020,12 @@ impl QJSValue {
10081020 }
10091021}
10101022
1023+ impl Default for QJSValue {
1024+ fn default ( ) -> Self {
1025+ QJSValue :: undefined ( )
1026+ }
1027+ }
1028+
10111029impl From < QString > for QJSValue {
10121030 fn from ( a : QString ) -> QJSValue {
10131031 cpp ! ( unsafe [ a as "QString" ] -> QJSValue as "QJSValue" {
You can’t perform that action at this time.
0 commit comments