Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
Qt Creator 4.13.2
-
None
-
-
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
For Gerrit Dashboard: QTCREATORBUG-24845 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
319361,2 | ClangTools: Do not include our wrapped Qt headers | 4.14 | qt-creator/qt-creator | Status: MERGED | +2 | 0 |