// Wrongif (address.isEmpty()) { return false; } for (int i = 0; i < 10; ++i) { qDebug("%i", i); } // Correct if (address.isEmpty()) return false; for (int i = 0; i < 10; ++i) qDebug("%i", i);
As a base rule, the left curly brace goes on the same line as the start of the statement:// Wrongif (codec) { } // Correct if (codec) { }