Skip to content

Commit

Permalink
Add isNull() wrapper for QVariant
Browse files Browse the repository at this point in the history
  • Loading branch information
Ayush1325 committed Mar 14, 2022
1 parent 99d19cb commit 808d312
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions qttypes/src/qtcore/qvariant.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,15 @@ impl QVariant {
})
}

/// Wrapper around [`isNull()`][method] method.
///
/// [method]: https://doc.qt.io/qt-5/qvariant.html#isNull
pub fn is_null(&self) -> bool {
cpp!(unsafe [self as "const QVariant*"] -> bool as "bool" {
return self->isNull();
})
}

// FIXME: do more wrappers
}

Expand Down

0 comments on commit 808d312

Please sign in to comment.