Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Refactoring of Signals

Refactoring of Signals

Scheduled Pinned Locked Moved Qt Creator and other tools
4 Posts 2 Posters 1.4k Views 1 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
    dwickeroth
    wrote on last edited by
    #1

    Hi,

    I found a problem regarding the refactoring of signals. When I rightclick on the definition of a signal, and choose "find usages" qtcreator doesn't show me the connects of that signal.
    Here's an example

    in glwidget.h:
    signals:
    void pointAdded();

    I right-click on "pointAdded()" and chose "find Usages"

    The following lines of code are being found:
    emit pointAdded(); (in glwidget.cpp)
    void pointAdded(); (in glwidget.h)

    but this line is NOT found:
    connect (glWidget, SIGNAL pointAdded, this, SLOT updatePushButtons; (in file mainwindow.cpp)
    ( I intentionally removed some parentheses because the forum software was doing strange things)

    If I do this for a slot on the other hand, all lines of code are being found. (including connects in other files)
    Also, the refactoring/renaming function doesn't work for the signal, because in the lines beginning with connect... the name of the signal isn't changed. It works fine for slots though.

    I use qtcreator 3.2.1, (and also 2.8.1).
    Is this a bug? Is there maybe a workaround other than using the find function for signals?

    Regards,
    Daniel

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

      Hi and welcome to devnet,

      I don't know it can be considered as usage in the sense that it's not "active". What happens if you use the new connection style ?

      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
        dwickeroth
        wrote on last edited by
        #3

        Hi,

        thank you for the tip, it works! With the new connection style the occurrence of the signal in the connect order is found when using the "find usages" option.
        I like the new connection style :)

        Cheers,
        Daniel

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

          You're very welcome,

          Since you have it working correctly now, please update the thread title prepending [solved].

          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