I'm type a line "return x>0?array[0]:0;" and press enter. After this indent in new line grow to 4 space. If line don't contain "[0]", bug not appear. Expected result: indent of new line must be the same as indent in prevision line. PS Also tested in qtcreator 3.6.0 (Debian Testing), result the same.
Confirmed. Another work around is to use parenthesis, return (x > 0 ? array[0] : 0); Thank you for your report. - Adam