Opened 17 years ago
Closed 16 years ago
#4084 closed patch (fixed)
Mythtv uses QApplication::enter_loop which is obsolete
Reported by: | Owned by: | danielk | |
---|---|---|---|
Priority: | minor | Milestone: | unknown |
Component: | mythtv | Version: | head |
Severity: | medium | Keywords: | |
Cc: | Ticket locked: | no |
Description
Mythtv uses QApplication::enter_loop which is obsolete. QT advises against its use, and documentation for it is very scarce. It would probably be best to use whatever the recommended way to achieve this functionality is rather than use this obsolete method.
Attachments (2)
Change History (10)
comment:1 Changed 17 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
comment:2 Changed 17 years ago by
from qt3.3 reference document:
"int QApplication::enter_loop () This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code.
This function enters the main event loop (recursively). Do not call it unless you really know what you are doing.
Use QApplication::eventLoop()->enterLoop() instead."
comment:3 Changed 17 years ago by
That why I don't think Myth should be using it. Furthermore, enter_loop causes polling, which is a power consumption problem if you look at powertop (see #3757). I don't know what to replace the enter_loop and exit_loop calls with... I can't figure out what they were obsoleted in favor of, nor am I a QT developer. I suppose I'll hit IRC and see if anyone can tell me what to do / how to fix this.
comment:4 Changed 17 years ago by
Please do not use the bug reporting system for discussions, we have mailing lists for that.
Changed 17 years ago by
Attachment: | mythdialogs-up-to-date-loop.patch added |
---|
comment:5 Changed 17 years ago by
Resolution: | invalid |
---|---|
Status: | closed → reopened |
Attached a patch as requested
comment:6 Changed 17 years ago by
Owner: | changed from Isaac Richards to danielk |
---|---|
Status: | reopened → new |
Type: | defect → patch |
Version: | unknown → head |
Changed 17 years ago by
Attachment: | mythdialogs-up-to-date-loop.2.patch added |
---|
original patch was messed up - this one works!
comment:7 Changed 16 years ago by
FYI - the patch does not affect the polling problem.
Currently around 72 timeouts per second (mythwelcome at idle), with and without the patch.
comment:8 Changed 16 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
(In [14951]) Fixes #4084. Code tidy from candrews.
As of Qt 3.1 using the QApplication thunks for QEventLoop::enterLoop() and QEventLoop::exitLoop() is depreciated. Instead you get a pointer from QApplication to it's event loop, check that it isn't null, and then call enter and exit directly.
This does not offer any power saving enhancements or anything like that discussed in the ticket comments, but it should be one less thing to worry about for the Qt 4.x port.
Patch missing...