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]