Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
Qt Creator 3.3.0-rc1, Qt Creator 4.7.0, Qt Creator 4.14.0-beta2
-
None
-
Windows VS2013 64bit
-
a79b0c6558ef8b9ca1a0f5ae553c9cf73acccc82 (qt-creator/qt-creator/master)
Description
When editing a connect() the NEW Qt5 Style, the autocompletion does not limit the signal element to reals signals. Any member method is proposed... not just signals. The same holds for slots. This is not helpful for the novice user.
E.g. when entering:
connect(textEdit->document(), &QTextDocument::[cursor blinks here]) // now use CTRL+SPACE for autocomplete
every method of QTextDocument is shown... not just the signals.
But this is the case for the OLD connect style:
connect(textEdit->document(), SIGNAL(cursor blinks here])) // now CTRL+SPACE
only the signals are offered.
So: The old way is very convinient and less error prone..
As a side note:
The new QT5 style does compile even for stupid things like:
connect(textEdit->document(), &QTextDocument::adjustSize, this, &MainWindow::activateWindow);
At runtime you will have:
QObject::connect: signal not found in QTextDocument
which is not very informative .... which signal was not found, where is this wrong connect ???
For the OLD style you get for
connect(textEdit->document(), SIGNAL(adjustSize()),this, SLOT(activateWindow()));
an runtime warning:
QObject::connect: No such signal QTextDocument::adjustSize() in mainwindow.cpp:149
With a source line number and you can click on the warning and you will be at the right spot !!
Perfect
This looks error prone to me..
Attachments
Issue Links
- is duplicated by
-
QTCREATORBUG-20840 Provide better code completion for new-style connection
- Closed
- relates to
-
QTCREATORBUG-20399 Connect autocompletion does not work with implicit pointers
- Closed
-
QTCREATORBUG-17578 Invalid parentheses added to signal/slot names by autocomplete when using the Clang model
- Closed
- resulted from
-
QTCREATORBUG-20737 Autocompletion does not work in SIGNAL() and SLOT()
- Closed