A custom class, a copy constructor and a warning
Solved
General and Desktop
-
Hello everyone,
I'm currently in the process of cleaning up my code and I stumbled over a particular compiler warning:
base class 'class QObject' should be explicitly initialized in the copy constructor Datagram::Datagram(const Datagram &data)
I only have QObject as a base class, to define enums in it and to register is as a Metaobject.
I need to pass it around via Signal&Slots and a QueuedConnection.I do not explicitly initalize QObject in the different constructors either.
The warning is only there with the mingw-compiler, msvc and clang have no problems with it.
So how would I do that?
heres my copy constructor:
Datagram::Datagram(const Datagram &data) { m_data = data.m_data; m_Type = data.m_Type; }