Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Debug modifications to personal clone of qt.



  • Hi,

    Suppose I need to make some modifications to QLineEdit in my personal clone of Qt sources. And I've made a simple test application to debug those changes. What would be the best way to set-up a development environment in this situation? Modify qlineedit.cpp and re-compile Qt, then debug with TestApp?



  • what you mentioned above is the most simple and effective way I can think of. You are on right track.
    Make the changes in the src build the Qt and rebuild your application with the new build of Qt and test it.



  • Ok, so just to be clear. The process is:

      1. git clone <my-personal-git-clone-url> qt-latest
      1. configure -debug -opensource -shared -platform win32-g++ -no-dbus -no-phonon -no-phonon-backend -openssl -nomake demos -nomake examples
      1. mingw32-make

    Latest Qt compiled, then.

      1. Make modifications to Qt. qlineedit.h, qlineedit.cpp, etc..

    Rebuild Qt to debug changes

      1. configure -debug -opensource -shared -platform win32-g++ -no-dbus -no-phonon -no-phonon-backend -openssl -nomake demos -nomake examples
      1. mingw32-make

    Repeat process 4 , 5 & 6 ... every time I need to change something

    Is this the way Qt developers debug their modifications? It just seems a bit slow to recompile everything again and again.



  • Depends on your changes to qlineedit.h. If they are not binary compatible (eg. add/remove a ember), you will have to recompile the lib. If you just do changes to the .cpp or to qlineedit_p.h you need not recompile everything. Make should catch up everything you need.

    In any case, the configure step #5 is not necessary.



  • Ok thanks Volker.
    I'll let you know what happens, but so far so good.


Log in to reply