Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-13265

Ctrl+clicking on a signal in a connect statement that belongs to an object managed by QSharedPointer takes you to qsharedpointer_impl.h instead of the signal declaration

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • Qt Creator 4.14.0-beta1
    • Qt Creator 3.2.2
    • C/C++/Obj-C++ Support
    • None
    • Qt Creator 3.2.2 (opensource)
      Based on Qt 5.3.2 (MSVC 2010, 32 bit)
      Built on Oct 10 2014 at 11:19:03
      From revision 34971be5cc
    • 7cd9699766b9ec6fd9e109cb92d83342ee3e0f54 (qt-creator/qt-creator/master)

    Description

      #include <QCoreApplication>
      #include <QSharedPointer>
      
      class Object : public QObject
      {
          Q_OBJECT
      public:
          Object() {
          }
      
          Q_INVOKABLE void func() const {
          }
      signals:
          void objectSignal();
      };
      
      int main(int argc, char** argv)
      {
          QCoreApplication app(argc, argv);
      
          QSharedPointer<Object> object(new Object);
          // Ctrl+clicking on signals and slots work when they appear like this:
          object->func();
          object->objectSignal();
          // Ctrl+clicking on a signal in a connect statement doesn't:
          QObject::connect(object.data(), SIGNAL(objectSignal()), object.data(), SIGNAL(objectSignal()));
      
          return app.exec();
      }
      
      #include "main.moc"
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            kandeler Christian Kandeler
            mitch_curtis Mitch Curtis
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes