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. Browsing the Qt source in an IDE?
Forum Updated to NodeBB v4.3 + New Features

Browsing the Qt source in an IDE?

Scheduled Pinned Locked Moved Unsolved General and Desktop
20 Posts 5 Posters 1.7k Views 4 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.
  • U Ulatekh

    I'm not sure what you're asking me to do.
    When I load qt.pro in Qt Creator, I "import build" from the qt5-build directory I created with configure, and deselect everything else.

    However, this time, I built qtbase (using nice -10 make -j 8 module-qtbase from inside my qt5-build directory), and now, when I load qtbase/qtbase.pro directly, it still logs lots of errors to "Issues" (e.g. "No module claims plugin type 'mockplugin'", "Cannot find feature sdk", and "docker-compose: Command not found", among many others), but at least the qtbase source loads and seems to be browsable!
    Not sure why building was necessary to get the project file to load. Maybe it was a coincidence.

    I'm fine with browsing version 5.15.2, since that's what I'm using in my project anyway...though I should probably get a development branch building if I'm going to submit bug fixes. (I'm up to 6 things that appear to need fixing.)

    kshegunovK Offline
    kshegunovK Offline
    kshegunov
    Moderators
    wrote on last edited by kshegunov
    #11

    @Ulatekh said in Browsing the Qt source in an IDE?:

    I'm not sure what you're asking me to do.

    To not mix Qt5 and Qt6 code.

    1. If you're going to do a fix for Qt5 only:
      Clone from git, go to the root dir and checkout 5.15 as a branch. Run init-repository and configure (use qmake to build). Then import the (sub)projects into creator.

    2. If you're going to do a fix for Qt5 and Qt6 (or only for Qt6)
      Clone from git, go to the root dir checkout dev as a branch. Run init-repository and configure (use cmake(!) to build). Qt6 isn't buildable with qmake as far as I know. Then load the root project and import the build from the build directory. You can't import (sub)projects with cmake as it works differently.

    Not sure why building was necessary to get the project file to load. Maybe it was a coincidence.

    It's not, but the makefiles need to be present for the (qmake) "Import build" to work, and the easiest way to get them is to build once from the command line after configuring, and then import whatever you want to work on.

    I'm fine with browsing version 5.15.2, since that's what I'm using in my project anyway...though I should probably get a development branch building if I'm going to submit bug fixes. (I'm up to 6 things that appear to need fixing.)

    Yes, but in a separate source/build directory as mentioned above.

    Read and abide by the Qt Code of Conduct

    1 Reply Last reply
    2
    • U Offline
      U Offline
      Ulatekh
      wrote on last edited by
      #12

      If you're going to do a fix for Qt5 only

      I assume I'd want my fixes to apply to all relevant versions?

      If you're going to do a fix for [...] Qt6

      As I stated above, I can't configure the dev branch – it reports that some Qt6 plugins have the same project name as Qt5 plugins, and errors out. I would like to know how to get past this. It seems like a bug in the cmake configuration.

      In any case, I can now browse Qt5 in an IDE under Fedora Core Linux, I've built qtbase (so far, the only part of Qt I'm using) with MSYS2/MinGW under MS Windows, and I can link my application to my hand-built qtbase, allowing me to set breakpoints and single-step through Qt & all that.

      I assume all fixes have to be submitted here? My first contribution will be simple...to get 5.15.2 (and maybe dev...don't know yet) to configure, under both Linux and MinGW, #include <limits> had to be added to qtbase's src/corelib/global/qfloat16.h, src/corelib/text/qbytearraymatcher.h, and src/corelib/tools/qoffsetstringarray_p.h. Maybe there's a better place to add that header-inclusion.

      Thanks to everyone for the help so far!

      kshegunovK 1 Reply Last reply
      0
      • U Ulatekh

        If you're going to do a fix for Qt5 only

        I assume I'd want my fixes to apply to all relevant versions?

        If you're going to do a fix for [...] Qt6

        As I stated above, I can't configure the dev branch – it reports that some Qt6 plugins have the same project name as Qt5 plugins, and errors out. I would like to know how to get past this. It seems like a bug in the cmake configuration.

        In any case, I can now browse Qt5 in an IDE under Fedora Core Linux, I've built qtbase (so far, the only part of Qt I'm using) with MSYS2/MinGW under MS Windows, and I can link my application to my hand-built qtbase, allowing me to set breakpoints and single-step through Qt & all that.

        I assume all fixes have to be submitted here? My first contribution will be simple...to get 5.15.2 (and maybe dev...don't know yet) to configure, under both Linux and MinGW, #include <limits> had to be added to qtbase's src/corelib/global/qfloat16.h, src/corelib/text/qbytearraymatcher.h, and src/corelib/tools/qoffsetstringarray_p.h. Maybe there's a better place to add that header-inclusion.

        Thanks to everyone for the help so far!

        kshegunovK Offline
        kshegunovK Offline
        kshegunov
        Moderators
        wrote on last edited by kshegunov
        #13

        @Ulatekh said in Browsing the Qt source in an IDE?:

        I assume I'd want my fixes to apply to all relevant versions?

        Obviously we all will want that, however this is done by cherry picking through gerrit. My original statement stands - do not mix Qt5 and Qt6 code, fixes for both - Qt6 code, fixes for Qt5 only - Qt5 code.

        I assume all fixes have to be submitted here?

        Yes.

        My first contribution will be simple...to get 5.15.2 (and maybe dev...don't know yet) to configure, under both Linux and MinGW, #include <limits> had to be added to qtbase's src/corelib/global/qfloat16.h, src/corelib/text/qbytearraymatcher.h, and src/corelib/tools/qoffsetstringarray_p.h. Maybe there's a better place to add that header-inclusion.

        Is it this one?
        https://codereview.qt-project.org/c/qt-creator/qt-creator/+/346438

        Read and abide by the Qt Code of Conduct

        1 Reply Last reply
        0
        • U Offline
          U Offline
          Ulatekh
          wrote on last edited by
          #14

          fixes for both - Qt6 code

          I will, as soon as I can configure Qt6 successfully...

          Is it this one?

          No, that's for src/plugins/qmlprofiler/qmlevent.h. I listed the 3 header files that need #include <limits> above.

          1 Reply Last reply
          0
          • U Offline
            U Offline
            Ulatekh
            wrote on last edited by
            #15

            OK, I've submitted my first merge request!

            I have two more changes that are appropriate for the 5.15.2 branch, but I apparently don't have permission to push to refs/for/5.15.2...not sure if that's even generally accepted. (Neither are applicable to the dev branch.)

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

              Hi,

              For 5.15 patches, the ref is 5.15. 5.15.2 has been closed a long time ago.

              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
              1
              • U Offline
                U Offline
                Ulatekh
                wrote on last edited by
                #17

                For 5.15 patches, the ref is 5.15. 5.15.2 has been closed a long time ago.

                Do I need permission? git push gerrit HEAD:refs/for/5.15 gets me remote: You need 'Create Change' rights to upload code review requests. and ! [remote rejected] HEAD -> refs/for/5.15 (prohibited by Gerrit: not permitted: create change on refs/heads/5.15).

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

                  My bad, I forgot that the 5.15 branch has been closed to public commits.

                  See here.

                  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
                  • U Offline
                    U Offline
                    Ulatekh
                    wrote on last edited by
                    #19

                    Thanks for letting me know.

                    In case anyone's interested, I'm putting my 5.15.2 bug fixes here.

                    1 Reply Last reply
                    0
                    • U Offline
                      U Offline
                      Ulatekh
                      wrote on last edited by
                      #20

                      So...no further ideas for getting the dev branch to configure without error?
                      Am I the only one seeing this?

                      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