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. [Tools] Static Analysis Tool used in development of Qt

[Tools] Static Analysis Tool used in development of Qt

Scheduled Pinned Locked Moved Qt Creator and other tools
7 Posts 7 Posters 7.5k 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.
  • T Offline
    T Offline
    t3chNo
    wrote on last edited by
    #1

    Hi, i read an article called "How to make fewer errors at the stage of code writing. Part N3":http://www.viva64.com/en/a/0075/. They used PVS-Studio tool to analyze Qt source code and found some errors that is very obvious. I'm curious about is there any static analysis tool used in development in Qt and if there is, which one is used.

    1 Reply Last reply
    0
    • C Offline
      C Offline
      Chuck Gao
      wrote on last edited by
      #2

      Waiting for the answers :D

      Chuck

      1 Reply Last reply
      0
      • C Offline
        C Offline
        changsheng230
        wrote on last edited by
        #3

        Static analysis such as Detecting Memory Leaks can be done in Qt creator:
        You can use the Memcheck tool included in the Valgrind tool suite to detect problems that are related to memory management in applications.
        Note: Memcheck is supported on Linux and Mac OS.
        After you download and install Memcheck, you can use it from Qt Creator. To analyze applications, select Debug > Start Analyzer > Start. While the application is running, Memcheck checks all reads and writes of memory and intercepts calls that allocate or free memory or create or delete memory blocks.

        Chang Sheng
        常升

        1 Reply Last reply
        0
        • I Offline
          I Offline
          itwiz
          wrote on last edited by
          #4

          Which tool should be used for Detecting Memory leaks in Symbian? Hooklogger doesn't seem to be good tool for Qt code.

          1 Reply Last reply
          0
          • L Offline
            L Offline
            loladiro
            wrote on last edited by
            #5

            [quote author="changsheng230" date="1310613164"]Static analysis such as Detecting Memory Leaks can be done in Qt creator:
            You can use the Memcheck tool included in the Valgrind tool suite to detect problems that are related to memory management in applications.
            Note: Memcheck is supported on Linux and Mac OS.
            After you download and install Memcheck, you can use it from Qt Creator. To analyze applications, select Debug > Start Analyzer > Start. While the application is running, Memcheck checks all reads and writes of memory and intercepts calls that allocate or free memory or create or delete memory blocks.
            [/quote]
            Valgrind is therefore more dynamic analysis, isn't it? ;)
            Very useful nontheless.

            1 Reply Last reply
            0
            • A Offline
              A Offline
              aureshinite
              wrote on last edited by
              #6

              By definition, static analysis means analysis the source code, not the program at running time. I have been using findbugs in Java, which is exceptional, and will be glad if there is something like that for C++\Qt.

              1 Reply Last reply
              0
              • S Offline
                S Offline
                sidewinder
                wrote on last edited by
                #7

                @aureshinite
                You may want to try "Cppcheck":http://cppcheck.sourceforge.net/. I've been successfully using it for some time and it does help :). It's not as good and sophisticated as commercial solutions (for example PVS-Studio mentioned higher) but nonetheless Cppcheck catches many common errors.

                "Never memorize what you can look up in books."
                Albert Einstein

                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