[mythtv] Socket class?
David Engel
dlengel at attbi.com
Mon Nov 24 01:26:06 EST 2003
On Mon, Nov 24, 2003 at 12:05:49AM -0500, Isaac Richards wrote:
> On Sunday 23 November 2003 09:39 pm, Matt Zimmerman wrote:
> > What's wrong with the one that myth is already using?
>
> It'd be really nice if it didn't require the Qt event loop to run to
> function.
I think that's what he's after. It may be a moot point though. I
suspect QSqlDatabase uses QSocket so any database queries will have
the same problem so we still have to solve it.
I wasn't intending to work on this problem, but it came up again while
doing some work on ViewScheduled(* see below). What I came up with is
just some slight variations on what has already been done or
discussed. The basic idea has two components.
First, block keyPressEvents or customEvents with a flag if either is
already active. If a keyPressEvent gets blocked, just ignore it. If
a customEvent gets blocked, set aother flag to handle it at then end
of the active keyPressEvent.
Second, block paintEventss with a flag when the internal data
structures are being refilled from the network or database. If a
paintEvent gets blocked, set another flag to cause the next unblocked
paintEvent to always update everything.
I'm attaching a work-in-progress version of ViewScheduled for
comments. It's not finished and not fully tested but works enough to
show the approach is sound.
(*)I was mainly doing two other changes.
First, I wanted to take a stab at simplifying the UIListType handling
which I always thought was confusing and over complicated. I think
I've succeeded, but I'm biased.
Second, I wanted to add support for SCHEDULE_CHANGE customEvents. We
now get the recording data from the scheduler in the master backend.
However, updaed data isn't available instantaneously after a change.
If we wait for the SCHEDULE_CHANGE customEvent, we get the latest data
and don't refill the internal data twice.
David
--
David Engel
dlengel at attbi.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: viewscheduled.h.gz
Type: application/octet-stream
Size: 782 bytes
Desc: not available
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20031124/a6e0d8ef/viewscheduled.h.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: viewscheduled.cpp.gz
Type: application/octet-stream
Size: 3280 bytes
Desc: not available
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20031124/a6e0d8ef/viewscheduled.cpp.obj
More information about the mythtv-dev
mailing list