Details
-
Bug
-
Resolution: Done
-
P2: Important
-
6.2
-
None
-
acd888220b (qt/qtremoteobjects/dev) 79da0edb97 (qt/qtremoteobjects/6.3) a4155f2d0e (qt/qtremoteobjects/6.4) 79da0edb97 (qt/tqtc-qtremoteobjects/6.3) a4155f2d0e (qt/tqtc-qtremoteobjects/6.4) acd888220b (qt/tqtc-qtremoteobjects/dev)
Description
When generating code for a replica source, it also generates a SourceAPI template class.
Trying to use this template class can result in compiler warnings and by that can't compile with -Werror.
This only happens if no methods or no signals are provided in the rep file.
The generated code contains the following function:
QByteArrayList methodParameterNames(int index) const override { if (index < 0 || index >= m_methods[0]) return QByteArrayList(); return ObjectType::staticMetaObject.method(m_methods[index + 1]).parameterNames(); } ... int m_methods[1];
and results in the following warning:
warning: array subscript 1 is above array bounds of ‘const int [1]’ [-Warray-bounds]
Attachments
For Gerrit Dashboard: QTBUG-97790 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
423993,5 | repc: Fix warning in generated code | dev | qt/qtremoteobjects | Status: MERGED | +2 | 0 |
424239,2 | repc: Fix warning in generated code | 6.4 | qt/qtremoteobjects | Status: MERGED | +2 | 0 |
424240,2 | repc: Fix warning in generated code | 6.3 | qt/qtremoteobjects | Status: MERGED | +2 | 0 |
424245,2 | repc: Fix warning in generated code | tqtc/lts-6.2 | qt/tqtc-qtremoteobjects | Status: MERGED | +2 | 0 |
428915,3 | repc: Fix warning in generated code | dev | qt/qtremoteobjects | Status: MERGED | +2 | 0 |
429211,2 | repc: Fix warning in generated code | 6.4 | qt/qtremoteobjects | Status: MERGED | +2 | 0 |
429212,2 | repc: Fix warning in generated code | 6.3 | qt/qtremoteobjects | Status: MERGED | +2 | 0 |
429213,2 | repc: Fix warning in generated code | tqtc/lts-6.2 | qt/tqtc-qtremoteobjects | Status: MERGED | +2 | 0 |