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. Bunch of Errors That Do Not Indicate What Source Code is at Fault
Forum Updated to NodeBB v4.3 + New Features

Bunch of Errors That Do Not Indicate What Source Code is at Fault

Scheduled Pinned Locked Moved Unsolved General and Desktop
7 Posts 3 Posters 338 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.
  • C Offline
    C Offline
    Crag_Hack
    wrote on 14 Jun 2024, 00:06 last edited by Crag_Hack
    #1

    Hi I'm getting some Visual Studio compilation errors I think are all related that do not indicate which source code is at fault. Any ideas on how to track down what's failing? I posted the errors below in a screenshot. It does say 'compiling source file ***.cpp' (I removed the actual source file name) at the end of the errors. Also it says these errors are occurring in qobject.h and qobjectdefs_impl.h and when I double-click them it takes me to the relevant code in the respective header file.

    The main error might be the first (I pasted for googlers):
    Error C2338 The slot requires more arguments than the signal provides

    I have some signal/slot connections using the connect(this,&Object::method,object,&Object::method); form and some using the connect(this, SIGNAL(method(parameters)), object, SLOT(method(parameters))); form. Does it look like a signal/slot connection is at fault? If it is a signal/slot connection at fault will switching to the first form mentioned help track down the source of the errors? Thanks!

    Screenshot:
    error.png

    C 1 Reply Last reply 14 Jun 2024, 04:20
    0
    • C Crag_Hack deleted this topic on 14 Jun 2024, 00:11
    • C Crag_Hack restored this topic on 14 Jun 2024, 03:15
    • C Crag_Hack
      14 Jun 2024, 00:06

      Hi I'm getting some Visual Studio compilation errors I think are all related that do not indicate which source code is at fault. Any ideas on how to track down what's failing? I posted the errors below in a screenshot. It does say 'compiling source file ***.cpp' (I removed the actual source file name) at the end of the errors. Also it says these errors are occurring in qobject.h and qobjectdefs_impl.h and when I double-click them it takes me to the relevant code in the respective header file.

      The main error might be the first (I pasted for googlers):
      Error C2338 The slot requires more arguments than the signal provides

      I have some signal/slot connections using the connect(this,&Object::method,object,&Object::method); form and some using the connect(this, SIGNAL(method(parameters)), object, SLOT(method(parameters))); form. Does it look like a signal/slot connection is at fault? If it is a signal/slot connection at fault will switching to the first form mentioned help track down the source of the errors? Thanks!

      Screenshot:
      error.png

      C Offline
      C Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on 14 Jun 2024, 04:20 last edited by
      #2

      @Crag_Hack said in Bunch of Errors That Do Not Indicate What Source Code is at Fault:

      Error C2338 The slot requires more arguments than the signal provides

      The error message tells you what's going wrong - the signal must have the same amount of arguments than the slot.

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      1 Reply Last reply
      4
      • S Offline
        S Offline
        SimonSchroeder
        wrote on 14 Jun 2024, 06:21 last edited by SimonSchroeder
        #3

        With Visual Studio a lot of times it helps to switch over to the "Output" pane. The errors will have a lot more context. This might help to find the actual line triggering this.

        To add what @Christian-Ehrlicher said: The signal can have more arguments than the slot, but the slot cannot have more arguments than the calling signal.

        1 Reply Last reply
        1
        • C Offline
          C Offline
          Crag_Hack
          wrote on 14 Jun 2024, 18:39 last edited by
          #4

          Thanks guys. All of the error messages were cause by one incorrect signal/slot connection. I narrowed it down with a binary search of the connect statements (they were mostly in one place). How come the compiler doesn't tell me where the error occurred?

          C 1 Reply Last reply 14 Jun 2024, 18:51
          0
          • C Crag_Hack
            14 Jun 2024, 18:39

            Thanks guys. All of the error messages were cause by one incorrect signal/slot connection. I narrowed it down with a binary search of the connect statements (they were mostly in one place). How come the compiler doesn't tell me where the error occurred?

            C Offline
            C Offline
            Christian Ehrlicher
            Lifetime Qt Champion
            wrote on 14 Jun 2024, 18:51 last edited by
            #5

            @Crag_Hack said in Bunch of Errors That Do Not Indicate What Source Code is at Fault:

            How come the compiler doesn't tell me where the error occurred?

            It does, look at the Output pane as @SimonSchroeder told you to see the complete compiler error message.

            Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
            Visit the Qt Academy at https://academy.qt.io/catalog

            1 Reply Last reply
            0
            • C Offline
              C Offline
              Crag_Hack
              wrote on 14 Jun 2024, 19:09 last edited by Crag_Hack
              #6

              @Christian-Ehrlicher OK but how come the errors don't show up in the error list where they usually are?

              C 1 Reply Last reply 14 Jun 2024, 19:25
              0
              • C Crag_Hack
                14 Jun 2024, 19:09

                @Christian-Ehrlicher OK but how come the errors don't show up in the error list where they usually are?

                C Offline
                C Offline
                Christian Ehrlicher
                Lifetime Qt Champion
                wrote on 14 Jun 2024, 19:25 last edited by
                #7

                @Crag_Hack said in Bunch of Errors That Do Not Indicate What Source Code is at Fault:

                OK but how come the errors don't show up in the error list where they usually are?

                Because template errors are large so they don't fit into the small line.

                Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                Visit the Qt Academy at https://academy.qt.io/catalog

                1 Reply Last reply
                1

                1/7

                14 Jun 2024, 00:06

                • Login

                • Login or register to search.
                1 out of 7
                • First post
                  1/7
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved