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

clazy check old-style-connect fails to execute

    XMLWordPrintable

Details

    • Linux/X11
    • 7b6ab79f3ecaea8e1c3796efe2cbfbf37e09a0a1 (qt-creator/qt-creator/4.14)

    Description

      Run this simple example in clazy, with only the level 2 test old-style-connect enabled, and you would expect that it complains about the SIGNAL/SLOT connection with macros. However, it doesn't

       

      #include <QApplication>
      #include <QPushButton>class Foo :public QObject
      {
          Q_OBJECT
      public slots:
          void go() {
              qDebug("Hi");
          }
      };
      
      int main(int argc, char *argv[])
      {
          QApplication a(argc, argv);    auto cb = new QPushButton("Hi");
          auto foo = new Foo;
          QObject::connect(cb, SIGNAL(clicked()), foo, SLOT(go()));
          cb->show();
          return a.exec();
      }
      
      #include "main.moc"
      

      Using ps -aux I found the command line Qt Creator executes, and it reveals that you include the option -I /home/blackie/Qt/5.15.1/Tools/QtCreator/share/qtcreator/cplusplus/wrappedQtHeaders

      Without that option clazy correctly reports the old style connect.

      Attachments

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

        Activity

          People

            kandeler Christian Kandeler
            blackie Jesper K. Pedersen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes