If I have a class that declares a Qt signal:
class Test
{
signals:
void TestSignal();
}
This works fine in Qt. But Resharper C++ gives me the warning:
Function 'void Test::TestSignal()' is not implemented
This is correct but pointless since Qt doesn't want the function to be implemented. Is there any way to implemented this signal
so that Resharper doesn't complain?
I tried:
class Test
{
signals:
void TestSignal() = {};
}
but get the build error:
error : Not a signal declaration
As AcerExtensa explained, the MOC tool generates implementations of Qt signals. To silence the warning, you can include the generated source files into your solution so that ReSharper would see implementations of signals in your header. You are right though that this warning is useless, I've filed https://youtrack.jetbrains.com/issue/RSCPP-20044 to silence the "Function is not implemented" inspection for Qt signals.