Qt: don't save A to B state when the input item changes. Also go to A if before current time is before A