[clazy] [Bug 403578] New: Add warnings for QDialog::exec and similar pseudo-synchronous methods
bugzilla_noreply at kde.org
bugzilla_noreply at kde.org
Fri Jan 25 01:51:47 GMT 2019
https://bugs.kde.org/show_bug.cgi?id=403578
Bug ID: 403578
Summary: Add warnings for QDialog::exec and similar
pseudo-synchronous methods
Product: clazy
Version: unspecified
Platform: Other
OS: All
Status: REPORTED
Severity: normal
Priority: NOR
Component: general
Assignee: unassigned-bugs at kde.org
Reporter: smokris at softpixel.com
CC: smartins at kde.org
Target Milestone: ---
The documentation for QDialog::exec (http://doc.qt.io/qt-5/qdialog.html#exec)
says:
> Note: Avoid using this function; instead, use open(). Unlike exec(), open()
> is asynchronous, and does not spin an additional event loop. This prevents a
> series of dangerous bugs from happening (e.g. deleting the dialog's parent
> while the dialog is open via exec()).
There's some more explanation at
https://blog.qt.io/blog/2010/02/23/unpredictable-exec/ . Also,
https://blogs.kde.org/2009/03/26/how-crash-almost-every-qtkde-application-and-how-fix-it-0
says that these methods should be avoided:
> QCoreApplication::processEvents
> QDialog::exec
> QDrag::exec
> QEventLoop::processEvents
> QProcess::waitForStarted
> QProcess::waitForFinished
It would be handy to have clazy emit warnings for calls to these methods.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the Unassigned-bugs
mailing list