Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. C++ function argument continuation indented too much
Forum Updated to NodeBB v4.3 + New Features

C++ function argument continuation indented too much

Scheduled Pinned Locked Moved Qt Creator and other tools
2 Posts 2 Posters 984 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    hcjiv1
    wrote on last edited by
    #1

    My C++ coding style involves putting each function argument on its on line:

    @
    int
    add(
    int a,
    int b)
    {
    return a + b;
    }
    @

    However, qt creator adds an extra level of indentation to the argument continuation lines:

    @
    int
    add(
    int a,
    int b)
    {
    return a + b;
    }
    @

    I cannot figure out how to tell qt creator to only use one level of indentation. Am I doing something wrong or is this a known issue. FYI, I am running qt creator 3.0.1 on linux.

    Thanks!

    1 Reply Last reply
    0
    • JKSHJ Offline
      JKSHJ Offline
      JKSH
      Moderators
      wrote on last edited by
      #2

      Hi,

      In Qt Creator, go to Tools -> Options -> C++ -> Code Style -> Edit... -> General -> "Align continuation lines" and play with the settings

      Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved