Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
6.4.3
-
None
-
-
2fc19f2c6 (dev), 29b580340 (6.6), 69db4d51a (6.5)
Description
Prior to Qt 6.4, a signal whose name starts with an underscore could be connected via a Connections object to a function starting with "on" and ending with the name of the signal. As of Qt 6.4, the first character after the underscore must be uppercased. This is a runtime compatibility breakage; the function that was previously called, is no longer, and there is no warning printed/log output.
The convention is that the first character in the signal name is uppercased in on<Signal> handlers. There is no special rule for underscore, which is the same in uppercase and lowercase.
Consider the below inlined example; the on_foo() function is no longer called.
import QtQuick Item { id: root width: 100 height: 100 signal _foo Connections { target: root function on_Foo() { console.info("Emitted for both Qt 6.2 and 6.4!"); } function on_foo() { // <== Notice that the underscore is itself in uppercase console.info("Only emitted for Qt 6.2"); } } Timer { interval: 100 onTriggered: root._foo(); running: true } }