Mailing List Archive

mythtv branch master updated by dhampton. v30-Pre-312-gb3938fa
The branch, master has been updated on the
mythtv repository by gitolite user dhampton.
via b3938fab9785088b023e6fa1c21c3ed991aebba9 (commit)
via e9687cc3ff84b75bd106d124ef86e3dbdee0b8dc (commit)
via c3cf321b315d6963cffd49cc33818ea2a1700719 (commit)
via ea8a83db328eacba2c05f930eb3dc948896b19a9 (commit)
from 708baf28f288cc693152d5cbfe8f6ecf7ff663bd (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit b3938fab9785088b023e6fa1c21c3ed991aebba9
Author: David Hampton <mythtv@love2code.net> at Sun, 12 Nov 2017 13:01:44 -0500
Committer: David Hampton <mythtv@love2code.net> at Sun, 12 Nov 2017 13:01:44 -0500
URL: http://code.mythtv.org/cgit/mythtv/commit/?id=b3938fab9785088b023e6fa1c21c3ed991aebba9

Last set of commits for cleaning up QObject related warnings from -Wextra.
1) Cleanup QObject related warnings for RecStatus. This class is
based on QObject, so only a pointer to it can be registered with
the Qt MetaType system, not the object itself. Also remove the
copy constructor.

2) Cleanup QObject related warnings for all the data/service contract
objects. These are all also based on QObjects, so only a pointers
to them can be registered with the Qt MetaType system, not the
objects themselves. Also cleanup unnecessary registration code.

3) Start on a test framework for the data contracts. This needs to be
extended to support all the contracts.

Fixes #13069.



commit e9687cc3ff84b75bd106d124ef86e3dbdee0b8dc
Author: David Hampton <mythtv@love2code.net> at Sun, 28 May 2017 13:33:45 -0400
Committer: David Hampton <mythtv@love2code.net> at Sun, 12 Nov 2017 08:54:43 -0500
URL: http://code.mythtv.org/cgit/mythtv/commit/?id=e9687cc3ff84b75bd106d124ef86e3dbdee0b8dc

Create a framework for testing data contracts.
This is a start on a test framework for the data contracts. It
currently builds five different types of objects, converts them to a
QVariant and back, and then compares the results to the original.

This should be extended to support all the contracts.

Are there other tests that should be added?



commit c3cf321b315d6963cffd49cc33818ea2a1700719
Author: David Hampton <mythtv@love2code.net> at Fri, 2 Jun 2017 19:43:10 -0400
Committer: David Hampton <mythtv@love2code.net> at Sun, 12 Nov 2017 08:54:43 -0500
URL: http://code.mythtv.org/cgit/mythtv/commit/?id=c3cf321b315d6963cffd49cc33818ea2a1700719

Cleanup QObject related warnings for the data/service contracts.
All the data/service contract objects are based on QObjects and
therefore the object itself cannot be used with the Qt MetaType
system. However, the pointer to any class derived from QObject is
automatically registered with the MetaType system. This allows all of
the declaration/registration code to be removed from the files.
Removing all the registrations creates a significant cleanup, as all
of the InitializeCustomTypes functions go away. Furthermore, now that
there are no InitializeCustomTypes functions, there is significant
cleanup to all of the service object constructors. This also adds in
the Q_DISABLE_COPY macro to the classes.

The CopyListContents code also needs to be simplified to not convert
from pointer to object to reference, because this causes an implicit
copy of the object. That means that all the object copy functions need
to be updated to use pointers instead of references.

General: Instances of QObject (and its subclasses) should be
considered unique items that cannot be copied. Knowing that each
object has only one parent and an arbitrary number of children makes
it easier to understand this. Even if you "clone" the object by
setting all the member variables to the same values, you can't set the
parent and child variables to the same values without screwing up the
one-to-many relationship of parent to children.

See:
http://doc.qt.io/qt-5/qobject.html#Q_DISABLE_COPY
https://www.ics.com/designpatterns/book/qobject.html



commit ea8a83db328eacba2c05f930eb3dc948896b19a9
Author: David Hampton <mythtv@love2code.net> at Thu, 20 Apr 2017 00:47:51 -0400
Committer: David Hampton <mythtv@love2code.net> at Sun, 12 Nov 2017 08:54:42 -0500
URL: http://code.mythtv.org/cgit/mythtv/commit/?id=ea8a83db328eacba2c05f930eb3dc948896b19a9

Cleanup QObject related warnings for RecStatus.
The RecStatus object is based on QObject and therefore the object
itself cannot be used with the Qt MetaType system. However, the
pointer to any class derived from QObject is automatically registered
with the MetaType system. QObject derived classes are also not
allowed to have a copy constructor, so remove that as well. This
allows all of the declaration/registration code to be removed from the
file. This also adds in the Q_DISABLE_COPY macro to the class.

Instances of QObject (and its subclasses) should be considered unique
items that cannot be copied. Knowing that each object has only one
parent and an arbitrary number of children makes it easier to
understand this. Even if you "clone" the object by setting all the
member variables to the same values, you can't set the parent and
child variables to the same values without screwing up the one-to-many
relationship of parent to children.

See:
http://doc.qt.io/qt-5/qobject.html#Q_DISABLE_COPY
https://www.ics.com/designpatterns/book/qobject.html



-----------------------------------------------------------------------

Summary of changes:
.../libmythservicecontracts/datacontracthelper.h | 2 +-
.../datacontracts/artworkInfo.h | 32 +---
.../datacontracts/artworkInfoList.h | 29 +---
.../datacontracts/backendInfo.h | 45 +----
.../datacontracts/blurayInfo.h | 64 +++-----
.../datacontracts/buildInfo.h | 30 +---
.../datacontracts/captureCard.h | 72 +++-----
.../datacontracts/captureCardList.h | 29 +---
.../datacontracts/castMember.h | 31 +---
.../datacontracts/castMemberList.h | 27 +---
.../datacontracts/channelGroup.h | 29 +---
.../datacontracts/channelGroupList.h | 27 +---
.../datacontracts/channelInfoList.h | 43 ++----
.../datacontracts/connectionInfo.h | 45 +----
.../datacontracts/cutList.h | 29 +---
.../datacontracts/cutting.h | 28 +---
.../datacontracts/databaseInfo.h | 44 ++----
.../datacontracts/encoder.h | 48 ++----
.../datacontracts/encoderList.h | 29 +---
.../libmythservicecontracts/datacontracts/enum.h | 31 +---
.../datacontracts/enumItem.h | 32 +---
.../datacontracts/envInfo.h | 34 +---
.../datacontracts/frontend.h | 31 +---
.../datacontracts/frontendActionList.h | 25 +---
.../datacontracts/frontendList.h | 29 +---
.../datacontracts/frontendStatus.h | 37 +---
.../libmythservicecontracts/datacontracts/genre.h | 26 +---
.../datacontracts/genreList.h | 29 +---
.../datacontracts/imageMetadataInfo.h | 32 +---
.../datacontracts/imageMetadataInfoList.h | 39 +----
.../datacontracts/imageSyncInfo.h | 30 +---
.../libmythservicecontracts/datacontracts/input.h | 44 ++----
.../datacontracts/inputList.h | 29 +---
.../datacontracts/labelValue.h | 34 +---
.../libmythservicecontracts/datacontracts/lineup.h | 60 ++------
.../datacontracts/liveStreamInfo.h | 72 +++-----
.../datacontracts/liveStreamInfoList.h | 29 +---
.../datacontracts/logInfo.h | 26 +---
.../datacontracts/logMessage.h | 46 ++----
.../datacontracts/logMessageList.h | 34 +---
.../datacontracts/musicMetadataInfo.h | 53 ++----
.../datacontracts/musicMetadataInfoList.h | 41 +----
.../datacontracts/programAndChannel.h | 160 ++++++------------
.../datacontracts/programGuide.h | 47 ++----
.../datacontracts/programList.h | 41 +----
.../datacontracts/recRule.h | 117 ++++++--------
.../datacontracts/recRuleFilter.h | 29 +---
.../datacontracts/recRuleFilterList.h | 35 +---
.../datacontracts/recRuleList.h | 35 +---
.../datacontracts/recording.h | 66 +++-----
.../datacontracts/settingList.h | 25 +--
.../datacontracts/storageGroupDir.h | 40 ++---
.../datacontracts/storageGroupDirList.h | 29 +---
.../datacontracts/timeZoneInfo.h | 30 +---
.../datacontracts/titleInfo.h | 30 +---
.../datacontracts/titleInfoList.h | 27 +---
.../datacontracts/versionInfo.h | 36 +---
.../datacontracts/videoLookupInfo.h | 97 ++++--------
.../datacontracts/videoLookupInfoList.h | 37 +---
.../datacontracts/videoMetadataInfo.h | 55 ++-----
.../datacontracts/videoMetadataInfoList.h | 43 ++----
.../datacontracts/videoMultiplex.h | 72 +++-----
.../datacontracts/videoMultiplexList.h | 35 +---
.../datacontracts/videoSource.h | 44 ++----
.../datacontracts/videoSourceList.h | 35 +---
.../datacontracts/wolInfo.h | 34 +---
.../libs/libmythservicecontracts/enums/recStatus.h | 15 +--
.../services/captureServices.h | 5 -
.../services/channelServices.h | 10 -
.../services/contentServices.h | 5 -
.../libmythservicecontracts/services/dvrServices.h | 10 -
.../services/frontendServices.h | 2 -
.../services/guideServices.h | 8 -
.../services/imageServices.h | 6 -
.../services/musicServices.h | 4 -
.../services/mythServices.h | 11 --
.../services/rttiServices.h | 4 -
.../services/videoServices.h | 6 -
.../test/test.pro | 0
.../test/test_datacontracts/.gitignore | 4 +
.../test/test_datacontracts/test_datacontracts.cpp | 179 ++++++++++++++++++++
.../test/test_datacontracts/test_datacontracts.h | 35 ++++
.../test/test_datacontracts/test_datacontracts.pro | 31 ++++
mythtv/libs/libs.pro | 8 +-
84 files changed, 952 insertions(+), 2116 deletions(-)
copy mythtv/libs/{libmyth => libmythservicecontracts}/test/test.pro (100%)
create mode 100644 mythtv/libs/libmythservicecontracts/test/test_datacontracts/.gitignore
create mode 100644 mythtv/libs/libmythservicecontracts/test/test_datacontracts/test_datacontracts.cpp
create mode 100644 mythtv/libs/libmythservicecontracts/test/test_datacontracts/test_datacontracts.h
create mode 100644 mythtv/libs/libmythservicecontracts/test/test_datacontracts/test_datacontracts.pro

--

_______________________________________________
mythtv-firehose mailing list
mythtv-firehose@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-firehose