[mythtv-commits] Ticket #2844: change LircClient to inherit & use QThread instead of pthreads
MythTV
mythtv at cvs.mythtv.org
Fri Dec 29 11:09:27 UTC 2006
#2844: change LircClient to inherit & use QThread instead of pthreads
------------------------------+---------------------------------------------
Reporter: keith at laynes.org | Owner: ijr
Type: patch | Status: new
Priority: trivial | Milestone: unknown
Component: mythtv | Version: 0.20
Severity: low |
------------------------------+---------------------------------------------
According to the coding standards, Qt should be used for non-gui tasks,
and code should be platform-independent. This patch is small and
accomplishes the following:
1. The `LircClient` class is changed to inherit from QThread (as well as
QObject). The `Process()` method is basically renamed to `run()`.
2. The unused member `pth` is removed from `LircClient`.
3. Static function `SpawnLirc` is removed from
`libs/libmythui/mythmainwindow.cpp` and much of its body is moved to where
the thread is started.
4. A `LircClient` object is created on the heap. On a failure in
`LircClient::Init`, it was not deleted. This is fixed.
5. A few minor changes in variable names etc. that help readability.
This patch really changes no functionality. With the exception of the
PTHREAD_CREATE_DETACHED flag, everything will work the same as before.
This also paves the way for more interesting changes in the LircClient,
like being able to restart the client without restarting the frontend.
--
Ticket URL: <http://svn.mythtv.org/trac/ticket/2844>
MythTV <http://www.mythtv.org/>
MythTV
More information about the mythtv-commits
mailing list