https://bugs.kde.org/show_bug.cgi?id=407925
Bug ID: 407925 Summary: new check: directly calling a method on a QObject after it has been moved to another thread Product: clazy Version: unspecified Platform: Other OS: Linux Status: REPORTED Severity: wishlist Priority: NOR Component: general Assignee: unassigned-b...@kde.org Reporter: d3fa...@d3fault.net CC: smart...@kde.org Target Milestone: --- After a call to moveToThread, that object pointer shouldn't be used to directly call any methods, except thread-safe ones such as deleteLater. invokeMethod should be used instead. A fixit could be provided which automatically converts the direct method calls to invokeMethod calls, preferably using the new pmf/lambda invokeMethod overload. More generally we could flag and offer a fixit for _any_ direct call to a QObject's method, not just calls that occur after a moveToThread. It's good to always write thread-safe code. See QTCREATORBUG-15972 for the inspiration of this suggestion. -- You are receiving this mail because: You are watching all bug changes.