[mythtv] Web services wsdl fails after commits c3cf321 and ea8a83d
David Hampton
mythtv at love2code.net
Sat Dec 30 19:07:52 UTC 2017
On Sat, 2017-12-30 at 10:34 -0500, Peter Bennett wrote:
>
> On 12/30/2017 10:16 AM, David Hampton wrote:
> > Reverting the changes would re-introduce compiler warnings and
> > usage of
> > objects that the Qt documentation says is bad behavior. My guess
> > (without looking at the code) would be that wsdl is looking up
> > "SomeTypeBasedOnQObject" instead of "SomeTypeBasedOnQObject*". Let
> > me
> > spend some time trying to fix this before I revert anything.
> >
> > David
>
> My take on it was (without much investigation):
> I saw that they were using copy constructors in objects based on
> QObject, which you are not supposed to do. You can get rid of the
> warnings by adding ": QObject()" or ": QObject(&parent)" to the
> constuctor.
That was my initial approach as well, but that just replaces all the
warning messages with errors. Instead of:
warning: base class ‘class QObject’ should be explicitly
initialized in the copy constructor [-Wextra]
you will get this:
error: ‘QObject::QObject(const QObject&)’ is private within
this context
> A better approach I believe would be in places where they are
> copying
> the object, to use
> ProgramList *x = new ProgramList();
> x->copy(y);
> Instead of ProgramList *x = new ProgramList(y);
> The copy methods are already there.
>
> This may be off base and there may be good reasons why it cannot or
> should not be done this way.
>
> I have some new service code from somebody else that is written the
> old
> way, so whatever the final approach is, I will have to make the same
> mods there. The same may apply to others with code in the works.
> There
> are some tickets with contributions of service code that would need
> to
> be changed.
If I remove the two places where wsdl explicitly strips the '*' from
type names, http://localhost:6544/Dvr/wsdl from my test build matches
the same response from my fixes-29 build. I also checked a couple of
the service definitions, and they all seem to use object pointers. I'm
unfamiliar with WSDL, though I know I need to learn about it. What
else should I do to test the wsdl code? Is there a suite of tests
anywhere?
David
More information about the mythtv-dev
mailing list