Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to rebuild just part of Qt 5 to test a bug fix?
Forum Updated to NodeBB v4.3 + New Features

How to rebuild just part of Qt 5 to test a bug fix?

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 2 Posters 1.0k Views 2 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.
  • D Offline
    D Offline
    davidb
    wrote on last edited by
    #1

    I have a fix for a bug in Qt 5.6.1 that I'd like to test. The file I'm changing is qtbase\src\gui\painting\qpdf.cpp.

    How do I go about rebuilding the minimum necessary (I assume QtGui)? Or do I have to start with a fresh download of Qt code, make my edit, then build all of Qt?

    In case it matters, here's my configure when I originally built Qt 5.6.1 from source:

    configure -prefix %CD%\qtbase -developer-build -opensource -opengl desktop -nomake tests -no-compile-examples -icu -plugin-sql-sqlite -platform win32-msvc2013 -confirm-license -qtlibinfix _fmosoft
    
    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Just build qtbase that will be enough.

      I recommend using an out of source build so you can fiddle with your sources without have all the generated stuff in it.

      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
      • D Offline
        D Offline
        davidb
        wrote on last edited by
        #3

        Thanks @SGaist, that worked beautifully - about 1 minute instead of 11 hours! For those like me who aren't too sure what they're doing, a few more details for Windows: I opened a command prompt the same way as when I initially built Qt 5. I cd to the qtbase directory, run

        nmake
        

        and about 1 minute later I could run my app and step into the Qt code, and see how my fix worked.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          You're welcome !

          Just in case, when needing to build Qt, you can also avoid modules you won't use that are pretty heavy to build like QtWebEngine or QtWebKit.

          In any case, since you have it running now, please mark the thread as solved using the "Topic Tools" button so that other forum users may know a solution has been found :)

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

          S 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