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 922 - QScriptValue's repr() should give some information about its data
: QScriptValue's repr() should give some information about its data
Status: CLOSED FIXED
Product: PySide
Classification: Unclassified
Component: QtScript
: HEAD
: PC Linux
: P4 enhancement
Assigned To: renato filho
:
:
:
  Show dependency treegraph
 
Reported: 2011-07-10 12:06 EEST by Thomas Perl
Modified: 2011-08-23 00:35 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 Thomas Perl 2011-07-10 12:06:03 EEST
For development, it would be good to have QScriptValue's repr() function return
some more details about which value it holds. Printing the repr() of the
value's toVariant() would be a good starting point, maybe you can come up with
something even more suitable.
Comment 1 Hugo Parente Lima 2011-07-11 21:43:09 EEST
Good, but we need to specify what string should the repr function return before
implementing it.
Comment 2 Thomas Perl 2011-07-13 22:38:12 EEST
(In reply to comment #1)
> Good, but we need to specify what string should the repr function return before
> implementing it.

For the generic case, <QScriptValue "..."> should be good with "..." being the
result of toVariant().toString(). Of course, if the script value is something
that is not a QVariant (isVariant() returns false), we should probably print
something else, e.g. <QScriptValue <javascript function>> in case isFunction()
returns true, etc..
Comment 3 renato filho 2011-07-28 17:29:19 EEST
fixed on pyside commit:

commit 74f8e9ab0aeb6d8a1429dc4646647005de0fefac
Author: Renato Filho <renato.filho@openbossa.org>
Date:   Wed Jul 27 17:54:27 2011 -0300
Comment 4 renato filho 2011-08-23 00:35:30 EEST
Released on PySide 1.0.6