SF.net SVN: fclient:[793] trunk/fclient/src/fclient/impl/lib/qt4ex/lib/ tools.py
Status: Pre-Alpha
Brought to you by:
jurner
|
From: <jU...@us...> - 2008-07-27 21:53:10
|
Revision: 793
http://fclient.svn.sourceforge.net/fclient/?rev=793&view=rev
Author: jUrner
Date: 2008-07-27 21:53:19 +0000 (Sun, 27 Jul 2008)
Log Message:
-----------
have to copy strings for in place operations
Modified Paths:
--------------
trunk/fclient/src/fclient/impl/lib/qt4ex/lib/tools.py
Modified: trunk/fclient/src/fclient/impl/lib/qt4ex/lib/tools.py
===================================================================
--- trunk/fclient/src/fclient/impl/lib/qt4ex/lib/tools.py 2008-07-27 21:33:28 UTC (rev 792)
+++ trunk/fclient/src/fclient/impl/lib/qt4ex/lib/tools.py 2008-07-27 21:53:19 UTC (rev 793)
@@ -110,9 +110,13 @@
def truncateString(n, qString, ellipsis):
"""truncates a string from the right
@param n: size to truncate the string to
- @param qString: string to truncate
+ @param qString: (QString) string to truncate
@param ellispsis: (QString) ellipsis to be used for replacement chars
+ @return: (QString) truncated string
"""
+ qString = QtCore.QString(qString)
+ ellipsis = QtCore.QString(ellipsis)
+
if qString.count() <= n:
return qString
ellipsis = QtCore.QString(ellipsis)
@@ -124,4 +128,6 @@
n = 0
qString.truncate(n)
return qString + ellipsis
-
\ No newline at end of file
+
+
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|