We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0025710 commit 79835e4Copy full SHA for 79835e4
qmetaobject/src/future.rs
@@ -39,6 +39,7 @@ cpp! {{
39
bool woken = false;
40
bool completed = false;
41
QAtomicInt refs = 0;
42
+
43
void customEvent(QEvent *e) override {
44
Q_UNUSED(e);
45
woken = false;
@@ -56,18 +57,21 @@ cpp! {{
56
57
deref();
58
}
59
60
61
void deref() {
62
if (!--refs) {
63
deleteLater();
64
65
66
67
void wake() {
68
if (woken) {
69
return;
70
71
woken = true;
72
QApplication::postEvent(this, new QEvent(QEvent::User));
73
74
75
~Waker() {
76
rust!(QtDestroyFuture [future: *mut dyn Future<Output=()> as "TraitObject"] {
77
std::mem::drop(Box::from_raw(future))
0 commit comments