[Qt-interest] another QEventLoop question
Malyushytsky, Alex
alex at wai.com
Sat Mar 5 00:04:53 CET 2011
Guard variable can become Null if dialog is destroyed as result or during event processing.
Alex
-----Original Message-----
From: qt-interest-bounces+alex=wai.com at qt.nokia.com [mailto:qt-interest-bounces+alex=wai.com at qt.nokia.com] On Behalf Of Joshua Grauman
Sent: Friday, March 04, 2011 12:32 PM
To: qt-interest at qt.nokia.com
Subject: [Qt-interest] another QEventLoop question
Hello all,
I'm trying to figure out how to get a QEventLoop to work properly. I think
I pretty much undestand it, but I saw this in the Qt code. Could someone
tell me the point of the guard variable below and why it is being checked
to see if it is null? Under what case would it be null? Thanks!
Josh
QEventLoop eventLoop;
d->eventLoop = &eventLoop;
QPointer<QDialog> guard = this;
(void) eventLoop.exec(QEventLoop::DialogExec);
if (guard.isNull())
return QDialog::Rejected;
d->eventLoop = 0;
_______________________________________________
Qt-interest mailing list
Qt-interest at qt.nokia.com
http://lists.qt.nokia.com/mailman/listinfo/qt-interest
---------------------------------------------------------------------------------------------------
Weidlinger Associates, Inc. made the following annotations.
“This message and any attachments are solely for the intended recipient and may contain confidential or privileged information. If you are not the intended recipient, any disclosure, copying, use, or distribution of the information included in this message and any attachments is prohibited. If you have received this communication in error, please notify us by reply e-mail and immediately and permanently delete this message and any attachments. Thank you.”
“Please consider our environment before printing this email.”
More information about the Qt-interest-old
mailing list