Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. General talk
  3. Announcements
  4. QtCreator plugin for cppcheck, krazy and other tools
Forum Update on Monday, May 27th 2025

QtCreator plugin for cppcheck, krazy and other tools

Scheduled Pinned Locked Moved Announcements
40 Posts 10 Posters 30.0k 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.
  • L Offline
    L Offline
    last5bits
    wrote on last edited by
    #30

    Thanks, I got you

    I have several issues/suggestions:

    The most odd thing: launching cppcheck from external tools in QtCreator gives me one new instance of QtCreator (in addition to one I already have) Oo

    Your way with additional .pro-file works, but I have no output in "Issues" tab of QtCreator

    I believe, that it would be a better design to make qpt parsing subdirs-projects correctly, it is just recursive walking through the project tree, isn't it?

    1 Reply Last reply
    0
    • C Offline
      C Offline
      cmazieri
      wrote on last edited by
      #31
      1. Will check that, in my test on Windows it works:
        (messages pane) https://www.dropbox.com/s/aez4b2325ov0903/general_messages.png
        (issues pane) https://www.dropbox.com/s/9kvd13exo16blcl/issues.png

      2. check it there were issues, in the test you sent me I had change one file in order to have an issue.

      3. Next release perhaps.

      1 Reply Last reply
      0
      • L Offline
        L Offline
        last5bits
        wrote on last edited by
        #32
        1. "This":http://i41.tinypic.com/25i1wr5.png is what I get
        1 Reply Last reply
        0
        • C Offline
          C Offline
          cmazieri
          wrote on last edited by
          #33

          OK, I see.

          I have just posted a new version "0.9":http://sourceforge.net/projects/qtprojecttool/files/0.9/qpt-source-0.9.tgz/download over the previous version.
          I have tested this version against several qtcreator versions I have, Qt4 and Qt5, the only difference that can make explain somethingis that which has QTimer::singleShot(3800, ..).

          If it still does not work, try to increase that value and see if it works.

          @diff -w 09/src/backendtool.cpp 09-ok/src/backendtool.cpp
          204c204,206
          <

          #if DEBUG
          qDebug() << Q_FUNC_INFO << "cmd" << cmd;
          #endif
          273a276,281
          if (m_taskFile)
          {
          QTimer::singleShot(3800, this, SLOT(finishQtcPluginInvoke()));
          }
          else
          {
          275a284
          }
          356,357d364
          < if (QFile(fields[0]).exists())
          < {
          361a369,370
          if (fields.count() > 1 && QFile(fields[0]).exists())
          {
          398c407
          < qDebug() << Q_FUNC_INFO << taskFile() << "ret" << ret;


          qDebug() << Q_FUNC_INFO << taskFile&#40;&#41; << "ret" << ret << "size" << m_taskFile->size();
          

          419d427
          <
          445,446c453,454
          < qDebug() << "plugin" << qtcreator;
          < #endif

          m_taskFile->copy("taskfile_deb.task");
          

          #endif //DEBUG
          451a460,463
          else
          {
          Util::info(qtcreator, QLatin1String("running"));
          }
          @

          Please let me know if it solves the problem or not.

          Regards,
          Carlos

          1 Reply Last reply
          0
          • B Offline
            B Offline
            b4silio
            wrote on last edited by
            #34

            Hey there! First of all thanks for making this tool, very much appreciated!

            It works flawlessly on OSX, but I notice that there is an issue with qmake projects using the SUBDIRS template. Indeed there are no .cpp files on the main project file itself, so one has to individually select each subfolder and run the code on there. (otherwise the list of files created and passed to cppcheck/razy is empty)

            To have it running on qt creator I just changed %{CurrentProject:FilePath} into %{CurrentDocument:FilePath} and launch the tool from within each .pro file in the subfolders.

            1 Reply Last reply
            0
            • C Offline
              C Offline
              cmazieri
              wrote on last edited by
              #35

              Hey,

              Many thanks for the information, I will try this out.

              Anyway, in the previous page there is another way of getting SUBDIRS qmake project working.

              1 Reply Last reply
              0
              • L Offline
                L Offline
                last5bits
                wrote on last edited by
                #36

                About the problem with the second instance of QtCreator and no issues found -- totaly my fault, I've had poorly written script that launches QtCreator

                Thanks for your help

                1 Reply Last reply
                0
                • C Offline
                  C Offline
                  cmazieri
                  wrote on last edited by
                  #37

                  Hello All,

                  Version 1.0 is available.

                  Added support to subdirs projects.

                  Many thanks to Serhiy Moroz.

                  1 Reply Last reply
                  0
                  • L Offline
                    L Offline
                    last5bits
                    wrote on last edited by
                    #38

                    Cool, excellent job!

                    1 Reply Last reply
                    0
                    • N Offline
                      N Offline
                      ningen
                      wrote on last edited by
                      #39

                      it's working.
                      There is the plugin 1.2version.
                      After installation , need Tools->External->Configure...->cppcheck set Executable field to the qpt binary file path.
                      or in ~/.bashrc
                      @PATH=qpt_execute_path:$PATH@

                      1 Reply Last reply
                      0
                      • G Offline
                        G Offline
                        GirijaG
                        wrote on last edited by
                        #40

                        Hi,

                        Issues pane is empty when using qpt in QtCreator on windows OS. I am using qpt 1.2, cppcheck 1.66, Qt 3.1.2. I followed all steps which are required for integrating qpt into Qt. But issues pane is empty. Anyone faced the same problem? Any help is appreciated. 
                        

                        Thanks & Regards.

                        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