Details
-
Bug
-
Resolution: Done
-
P2: Important
-
Qt Creator 4.8.0
-
Qt Creator 4.8.0
Based on Qt 5.12.0 (GCC 5.3.1 20160406 (Red Hat 5.3.1-6), 64 bit)
Ubuntu 16.04
Clang Code Model active
-
-
975173af11da200e94517db7085dea46d2592f26 (qt-creator/qt-creator/master)
Description
see https://forum.qt.io/topic/97813/how-to-configure-qt-creator-code-completion-configuration-for-else
New bug in 4.8.0 C++ editor: Type a complete if block followed by else and <Enter>. For example:
if (false)
{
}
else
Expected behavior: The cursor is placed on the next line, indented relative to the else declaration (ideally) or (less ideally) brackets added per configuration settings.
Actual behavior: Brackets are added with the opening bracket on the same line as the else declaration and the closing bracket placed two lines below the else declaration. The cursor is placed on the next line below the opening bracket, indented relative to the else declaration.
Attachments
Issue Links
- is duplicated by
-
QTCREATORBUG-21781 Curly braces autocomplete after else
- Closed
-
QTCREATORBUG-21805 Brace placement in auto complete of C++ if/else statements
- Closed
-
QTCREATORBUG-21923 Cannot disable builtin snippets
- Closed
-
QTCREATORBUG-22068 Pressing new line in {} for else statement add extra }
- Closed
-
QTCREATORBUG-22194 Auto-completing certain C++ statements seems broken
- Closed
-
QTCREATORBUG-22426 Auto completion adds closing brackets twice
- Closed