diff options
Diffstat (limited to 'docs/checks/README-connect-by-name.md')
-rw-r--r-- | docs/checks/README-connect-by-name.md | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/docs/checks/README-connect-by-name.md b/docs/checks/README-connect-by-name.md new file mode 100644 index 00000000..e5f7d255 --- /dev/null +++ b/docs/checks/README-connect-by-name.md @@ -0,0 +1,10 @@ +# connect-by-name + +Warns when "auto-connection slots" are used. They're also known as "connect by name", a +very old and unpopular feature which shouldn't be used anymore. See http://doc.qt.io/qt-5/qobject.html#auto-connection for more information about them. + +These types of connections are very brittle, as a simple object rename would break your code. +In Qt 5 the PMF connect syntax is recommended as it catches errors at compile time. + +This check simply warns for any slot named like on_*_*, because even if you're not using .ui files +this naming is misleading and not good for readability, as the reader would think you're using auto-connection. |