Opened 20 years ago
Closed 20 years ago
#2844 closed patch (invalid)
change LircClient to inherit & use QThread instead of pthreads
| Reported by: | Owned by: | Isaac Richards | |
|---|---|---|---|
| Priority: | trivial | Milestone: | unknown |
| Component: | mythtv | Version: | 0.20 |
| Severity: | low | Keywords: | Lirc LircClient |
| Cc: | Ticket locked: | no |
Description
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:
- The
LircClientclass is changed to inherit from QThread (as well as QObject). TheProcess()method is basically renamed torun(). - The unused member
pthis removed fromLircClient. - Static function
SpawnLircis removed fromlibs/libmythui/mythmainwindow.cppand much of its body is moved to where the thread is started. - A
LircClientobject is created on the heap. On a failure inLircClient::Init, it was not deleted. This is fixed. - 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.
Attachments (1)
Change History (2)
Note:
See TracTickets
for help on using tickets.

Discussed in mailing list. The thread's detached property is important, we don't want to leak threads.