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. Unable to install "Uncrustify" C++ Beautifier in Qt Creator

Unable to install "Uncrustify" C++ Beautifier in Qt Creator

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
beautifieruncrustifyinstallplugin
9 Posts 3 Posters 5.3k 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.
  • J Offline
    J Offline
    JonB
    wrote on 25 Jan 2016, 14:02 last edited by
    #1

    QtCreator (3.01, Ubuntu 14.04 LTS) allows the installation of C++ code Beautifier "Uncrustify", for reformatting existing code. This all looks simple from instructions here at http://doc.qt.io/qtcreator/creator-beautifier.html, but I am stuck on basic inability to install.

    I have downloaded, compiled and installed the latest uncrustify-0.61. This creates the executable etc. fine, and installs in system area.

    The instructions then state:

    Select Help > About Plugins > C++ > Beautifier to enable the plugin.
    

    Well, there is no "Beautifier" plugin showing under C++. Hardly surprising, since building/installing "Uncrustify" does not do anything to "tell" Qt Creator it is there/available. How do you get Qt Creator to know the plugin is available to Load?

    In have searched everywhere on the web for help. My guess is that in directory /usr/lib/x86_64-linux-gnu/qtcreator/plugins/QtProject there needs to be a file like Uncrustify.pluginspec (plus anything else), but there is no mention of this. I have scoured the web for anything to show how to actually install and make it work, but found nothing more than the instructions above, which do not work.

    I have spent hours on this, and am so frustrated. Since I have seen posts here implying some people have this working in Qt Creator, could someone please explain precisely what you have to do to get it installed?

    1 Reply Last reply
    0
    • J Offline
      J Offline
      JonB
      wrote on 26 Jan 2016, 14:46 last edited by
      #4

      Well, turns out this is an issue for the C++ Beautifier plugin in general rather than "Uncrustify" in particular, and a Qt Creator version-too-old.

      The files required are Beautifier.pluginspec and libBeautifier.so.

      Although I was being directed to the "Beautifier" Help from the Qt Creator Version 3.0.1 which gets installed from the Ubuntu 14.04 LTS Software Centre, Beautifier support was only introduced at Qt Creator 3.1 --- though that is hard to discover from web searching.

      So at Ubuntu 14.04 LTS, either Beautifier is simply not available by default, or you can go replace the shipped 3.0.1 Qt Creator with an Open Source 3.1+, or maybe just pick those 2 files out of a 3.1 distribution/installation and see if they work OK under 3.0.1.

      1 Reply Last reply
      0
      • S Offline
        S Offline
        SGaist
        Lifetime Qt Champion
        wrote on 25 Jan 2016, 22:36 last edited by
        #2

        Hi and welcome to devnet,

        Which version of Qt Creator are you using ?

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        J 1 Reply Last reply 26 Jan 2016, 14:54
        0
        • J Offline
          J Offline
          JonB
          wrote on 26 Jan 2016, 14:39 last edited by
          #3

          Thank you for your welcome. I wish you had been here yesterday while I was tearing my hair out! :) Your question is indeed to the point, and I am posting my finding/answer here now...

          1 Reply Last reply
          0
          • J Offline
            J Offline
            JonB
            wrote on 26 Jan 2016, 14:46 last edited by
            #4

            Well, turns out this is an issue for the C++ Beautifier plugin in general rather than "Uncrustify" in particular, and a Qt Creator version-too-old.

            The files required are Beautifier.pluginspec and libBeautifier.so.

            Although I was being directed to the "Beautifier" Help from the Qt Creator Version 3.0.1 which gets installed from the Ubuntu 14.04 LTS Software Centre, Beautifier support was only introduced at Qt Creator 3.1 --- though that is hard to discover from web searching.

            So at Ubuntu 14.04 LTS, either Beautifier is simply not available by default, or you can go replace the shipped 3.0.1 Qt Creator with an Open Source 3.1+, or maybe just pick those 2 files out of a 3.1 distribution/installation and see if they work OK under 3.0.1.

            1 Reply Last reply
            0
            • S SGaist
              25 Jan 2016, 22:36

              Hi and welcome to devnet,

              Which version of Qt Creator are you using ?

              J Offline
              J Offline
              JonB
              wrote on 26 Jan 2016, 14:54 last edited by
              #5

              @SGaist said:

              Hi and welcome to devnet,

              Which version of Qt Creator are you using ?

              Given that the Beautifier Help I was accessing is at http://doc.qt.io/qtcreator/creator-beautifier.html, how would I know that only applies from Qt Creator 3.1 onward? If I am (like many others) using the Qt Creator 3.0.1 that ships/installs with Ubuntu 14.04 LTS, is there a different Url for online and still-accessible Qt Creator Help as it was for an older version like 3.0.1?

              1 Reply Last reply
              0
              • S Offline
                S Offline
                SGaist
                Lifetime Qt Champion
                wrote on 26 Jan 2016, 21:38 last edited by
                #6

                The online documentation has the current version number of Qt Creator on the right, just under the search input field.

                I don't know whether old versions of Qt Creator's documentation are still available however, you should already have the documentation provided with Qt Creator that is accessible from the help panel.

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply
                0
                • J Offline
                  J Offline
                  JonB
                  wrote on 1 Feb 2016, 13:06 last edited by JonB 2 Jan 2016, 13:08
                  #7

                  @SGaist
                  Thank you.

                  I have tried to run the Beautifier plugin, fetched from Open Source Qt Creator 3.1.0, against the installed Qt Creator 3.0.1 that ships with Ubuntu 14.04 LTS, but the libBeautifier.so is indeed incompatible.

                  2 questions:

                  • How tied in are the Qt Creator versions to the Qt itself versions? For example, Qt Creator 3.1.0 seemed to run fine with my existing Qt 5.2.1 which shipped with Qt 3.0.1, but is that lucky/dangerous, am I expected to change Qt version if I change Qt Creator version?
                  • Do you/anyone here happen to know what version of Qt/Qt Creator will be supplied with the forthcoming Ubuntu 16.04 LTS Release? I do not know who decides that.
                  1 Reply Last reply
                  0
                  • S Offline
                    S Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on 1 Feb 2016, 16:42 last edited by
                    #8
                    1. You should be able to change Qt versions forward and backward. Only exception is if you are using a feature available only since e.g. 5.2.0 then that would be the minimal version.
                      However plugins may behave differently, it's only backward within a major release.

                    More details here

                    1. That's a question for the Qt Creator package maintainer. AFAIK, you have that information on the package page on packages.ubuntu.com.

                    Interested in AI ? www.idiap.ch
                    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                    1 Reply Last reply
                    0
                    • JKSHJ Offline
                      JKSHJ Offline
                      JKSH
                      Moderators
                      wrote on 1 Feb 2016, 23:50 last edited by
                      #9

                      Alternatively, you can get the standalone Qt + Qt Creator package from http://www.qt.io/download-open-source/ -- you don't need to wait for the distro packagers to catch up.

                      The latest versions are Qt 5.5 and Qt Creator 3.6.0

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

                      1 Reply Last reply
                      0

                      1/9

                      25 Jan 2016, 14:02

                      • Login

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