[PyQt] PyQt examples phonon.

F.A.Pinkse fapinkse at gmail.com
Tue Jun 29 12:07:14 BST 2010


Hello Christoph,

I only reported the warning for others to pick up.

I did far more serious things to the code, chopped off every bit I did 
not need for my app, which needed a audio file player.

Frans.

Op 6/29/2010 10:44 AM, Christoph Burgmer schreef:
>> On Fri Jun 25 13:20:11 BST 2010, F.A.Pinkse wrote:
>>> I was looking inside the PyQt Examples source/phonon/musicplayer.pyw
>>> using Eric5 on Python3
>>>
>>> Eric found:
>>>
>>> warning: variable declared but never used.
>>>
>>>          source = self.metaInformationResolver.currentSource()
>>>
>>> It is in line number 185
>>
>> If source isn't used, and it seems that it isn't, then that line should
>> just be removed from the example.
>
> If you do this to the MainWindow, your application will crash.
> AFAIK an object is deleted once no reference is being held, so I'd be careful
> with deleting that. I might be wrong though.
>
> -Christoph




More information about the PyQt mailing list