PySide Bugzilla Closed for New Bugs

PySide is now a Qt Add-on and uses the Qt Project's JIRA Bug Tracker instead of this Bugzilla instance. This Bugzilla is left for reference purposes.

Bug 956 - QSound should throw exception for missing files
: QSound should throw exception for missing files
Status: CLOSED INVALID
Product: PySide
Classification: Unclassified
Component: QtGui
: 1.0.4
: Macintosh Mac OS
: P5 normal
Assigned To: renato filho
:
:
:
  Show dependency treegraph
 
Reported: 2011-08-05 00:40 EEST by Daniel Ashbrook
Modified: 2011-08-23 00:37 EEST (History)
8 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Ashbrook 2011-08-05 00:40:24 EEST
The following code fails silently rather than throwing exceptions due to
missing files:


from PySide.QtCore import *
from PySide.QtGui  import *
import sys

app = QCoreApplication(sys.argv)

QSound.play('/some_nonexistent_file')
q = QSound('/nonexistent')
q.play()

QTimer.singleShot(200, app.exit)

app.exec_()
Comment 1 Hugo Parente Lima 2011-08-08 17:34:55 EEST
The Qt C++ API doesn't throw exceptions on fail, neither PySide[1] and PyQt.

If we change the behavior of QSound we must change the behavior of all Qt
classes that would throw exceptions and this isn't feasible.

Regards.

[1] PySide throw just TypeError exceptions when the argument types aren't
compatible.
Comment 2 renato filho 2011-08-23 00:37:12 EEST
Release PySide 1.0.6