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-b...@kde.org Reporter: smok...@softpixel.com CC: smart...@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 watching all bug changes.