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. Signature not normalized warning
Forum Updated to NodeBB v4.3 + New Features

Signature not normalized warning

Scheduled Pinned Locked Moved Unsolved General and Desktop
8 Posts 5 Posters 1.7k 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.
  • K Offline
    K Offline
    Kaluss
    wrote on last edited by
    #1

    Hi,
    I got following annoying problem:

    I have following warning in my code:
    Signature is not normalized. Use locationCodeChanged(QString) instead of locationCodeChanged( QString ) [clazy-connect-not-normalized]

    I found this:
    https://forum.qt.io/topic/18651/understanding-signature-normalization-for-signals-and-slots
    but it doesn't help.

    My signal takes QString and slot takes const QString&.

    How should it look like to get rid of it?

    Pl45m4P JonBJ SGaistS 3 Replies Last reply
    0
    • K Kaluss

      Hi,
      I got following annoying problem:

      I have following warning in my code:
      Signature is not normalized. Use locationCodeChanged(QString) instead of locationCodeChanged( QString ) [clazy-connect-not-normalized]

      I found this:
      https://forum.qt.io/topic/18651/understanding-signature-normalization-for-signals-and-slots
      but it doesn't help.

      My signal takes QString and slot takes const QString&.

      How should it look like to get rid of it?

      Pl45m4P Offline
      Pl45m4P Offline
      Pl45m4
      wrote on last edited by
      #2

      @Kaluss said in Signature not normalized warning:

      Use locationCodeChanged(QString) instead of locationCodeChanged( QString )

      Do this.
      Normalization also removes spaces.
      If you write locationCodeChanged(QString) the warning should be gone.


      If debugging is the process of removing software bugs, then programming must be the process of putting them in.

      ~E. W. Dijkstra

      Christian EhrlicherC 1 Reply Last reply
      2
      • Pl45m4P Pl45m4

        @Kaluss said in Signature not normalized warning:

        Use locationCodeChanged(QString) instead of locationCodeChanged( QString )

        Do this.
        Normalization also removes spaces.
        If you write locationCodeChanged(QString) the warning should be gone.

        Christian EhrlicherC Offline
        Christian EhrlicherC Offline
        Christian Ehrlicher
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Or even better - use the new signal slot syntax.

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

        K 1 Reply Last reply
        3
        • Christian EhrlicherC Christian Ehrlicher

          Or even better - use the new signal slot syntax.

          K Offline
          K Offline
          Kaluss
          wrote on last edited by Kaluss
          #4

          @Christian-Ehrlicher ok, I will use new syntax, but regarding old one:
          removed all spaces as @Pl45m4 suggested, but it doesn't help at all:
          signature.png

          Is it even possible to get rid of this warning in old syntax?

          1 Reply Last reply
          0
          • K Kaluss

            Hi,
            I got following annoying problem:

            I have following warning in my code:
            Signature is not normalized. Use locationCodeChanged(QString) instead of locationCodeChanged( QString ) [clazy-connect-not-normalized]

            I found this:
            https://forum.qt.io/topic/18651/understanding-signature-normalization-for-signals-and-slots
            but it doesn't help.

            My signal takes QString and slot takes const QString&.

            How should it look like to get rid of it?

            JonBJ Offline
            JonBJ Offline
            JonB
            wrote on last edited by
            #5

            @Kaluss said in Signature not normalized warning:

            My signal takes QString and slot takes const QString&.

            Then why does your SLOT() not take const QString&?

            I would save file, exit, re-enter, and show exact warning being shown, not chopped off as per your last....

            K 1 Reply Last reply
            0
            • JonBJ JonB

              @Kaluss said in Signature not normalized warning:

              My signal takes QString and slot takes const QString&.

              Then why does your SLOT() not take const QString&?

              I would save file, exit, re-enter, and show exact warning being shown, not chopped off as per your last....

              K Offline
              K Offline
              Kaluss
              wrote on last edited by
              #6

              @JonB it's not taking const QString& according to this:
              https://forum.qt.io/topic/18651/understanding-signature-normalization-for-signals-and-slots

              JonBJ 1 Reply Last reply
              0
              • K Kaluss

                @JonB it's not taking const QString& according to this:
                https://forum.qt.io/topic/18651/understanding-signature-normalization-for-signals-and-slots

                JonBJ Offline
                JonBJ Offline
                JonB
                wrote on last edited by
                #7

                @Kaluss
                If you say so, since you won't show the full message against the changed signature I don't know.

                Whatever it's another reason not to waste time on a syntax which was replaced for the better a decade ago.

                1 Reply Last reply
                0
                • K Kaluss

                  Hi,
                  I got following annoying problem:

                  I have following warning in my code:
                  Signature is not normalized. Use locationCodeChanged(QString) instead of locationCodeChanged( QString ) [clazy-connect-not-normalized]

                  I found this:
                  https://forum.qt.io/topic/18651/understanding-signature-normalization-for-signals-and-slots
                  but it doesn't help.

                  My signal takes QString and slot takes const QString&.

                  How should it look like to get rid of it?

                  SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  @Kaluss said in Signature not normalized warning:

                  My signal takes QString and slot takes const QString&.

                  Out of curiosity, why not use a ˋconst QString &` as well for your signal ? There no reason to force a copy when it's not needed.

                  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

                  • Login

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