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. [Question]: Any tools to automatically format existing code base to a particular format?

[Question]: Any tools to automatically format existing code base to a particular format?

Scheduled Pinned Locked Moved Qt Creator and other tools
10 Posts 2 Posters 4.9k Views
  • 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.
  • ? This user is from outside of this forum
    ? This user is from outside of this forum
    Guest
    wrote on last edited by
    #1

    So that me and my team can be even more lazy ? ;)

    1 Reply Last reply
    0
    • G Offline
      G Offline
      goetz
      wrote on last edited by
      #2

      I only know of "astyle":http://astyle.sourceforge.net/. You can tweak almost everything there. I'm unsure to which degree it should be "automatic", but I'm sure it can at least be hooked into some save routine in popular IDEs.

      http://www.catb.org/~esr/faqs/smart-questions.html

      1 Reply Last reply
      0
      • ? This user is from outside of this forum
        ? This user is from outside of this forum
        Guest
        wrote on last edited by
        #3

        thanks volker, before I start looking into it, any idea if its been tried with creator

        1 Reply Last reply
        0
        • G Offline
          G Offline
          goetz
          wrote on last edited by
          #4

          It would not surprise me if someone already wrote a Creator plugin for astyle. Oh.... someone has: http://astyleplugin.berlios.de/. I don't know of any built in solution for Creator.

          http://www.catb.org/~esr/faqs/smart-questions.html

          1 Reply Last reply
          0
          • T Offline
            T Offline
            tobias.hunger
            wrote on last edited by
            #5

            This looks a bit like "some other thread":http://developer.qt.nokia.com/forums/viewthread/3364

            I did recommend astyle, the astyle plugin and a UI for astyle and others there.

            1 Reply Last reply
            0
            • ? This user is from outside of this forum
              ? This user is from outside of this forum
              Guest
              wrote on last edited by
              #6

              Thanks Tobias, I searched and somehow didn't find that thread ... I will chk this out further.

              What about the cpp code formatter available with CDT on eclipse? Anyone with feedback on that?

              1 Reply Last reply
              0
              • T Offline
                T Offline
                tobias.hunger
                wrote on last edited by
                #7

                Chetankjain: I guess the formatter from eclipse will also work. I never used that though, I generally found eclipse just too bloated for my taste and never got into it:-(

                1 Reply Last reply
                0
                • ? This user is from outside of this forum
                  ? This user is from outside of this forum
                  Guest
                  wrote on last edited by
                  #8

                  Tobias/Others: Could you specify which style of cpp coding Qt uses ...
                  Options:
                  a. K&R
                  b. BSD/Allman
                  c. GNU
                  d. Whitesmiths

                  1 Reply Last reply
                  0
                  • G Offline
                    G Offline
                    goetz
                    wrote on last edited by
                    #9

                    Chetan, in case you didn't know already, they have documented it on the "QtCoding Style":http://qt.gitorious.org/qt/pages/QtCodingStyle page on gitorious. Unfortunately they don't state what's the base style (if there is any).

                    Another good page is that on "Coding Conventions":http://qt.gitorious.org/qt/pages/CodingConventions

                    http://www.catb.org/~esr/faqs/smart-questions.html

                    1 Reply Last reply
                    0
                    • ? This user is from outside of this forum
                      ? This user is from outside of this forum
                      Guest
                      wrote on last edited by
                      #10

                      yes Volker I've seen the Coding Style and Conventions page, was curious to find if the base style was mentioned anywhere else. Else probably have to manually find out :)

                      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