Debugger: Mark elision of long QUrls in Locals and Expressions

Fixes: QTCREATORBUG-25404
Change-Id: Ieee42f9239c9ffe88da03765678e1d2c4b6bb11d
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
hjk
2021-03-02 07:22:38 +01:00
parent 9e4e44d180
commit 6df27ccbe7
2 changed files with 5 additions and 3 deletions

View File

@@ -1854,7 +1854,7 @@ def qdump__QUrl(d, value):
userNameEnc = d.encodeString(userName)
hostEnc = d.encodeString(host)
pathEnc = d.encodeString(path)
elided, pathEnc = d.encodeStringHelper(path, d.displayStringLimit)
url = d.encodeString(scheme)
url += '3a002f002f00' # '://'
if len(userNameEnc):
@@ -1863,7 +1863,7 @@ def qdump__QUrl(d, value):
if port >= 0:
url += '3a00' + ''.join(['%02x00' % ord(c) for c in str(port)])
url += pathEnc
d.putValue(url, 'utf16')
d.putValue(url, 'utf16', elided=elided)
displayFormat = d.currentItemFormat()
if displayFormat == DisplayFormat.Separate:

View File

@@ -3919,11 +3919,13 @@ namespace qurl {
void testQUrl()
{
QString s("123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_");
QUrl u(QString("123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_"));
QUrl url(QString("http://qt-project.org"));
BREAK_HERE;
// Check url "http://qt-project.org" QUrl.
// Continue.
dummyStatement(&url);
dummyStatement(&url, &u);
}
} // namespace qurl