From 0523b04216b9d0660ee903fb5275abfba4d5d155 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Wed, 27 Dec 2023 18:42:59 -0300 Subject: [PATCH] QUrlQuery/Doc: fix resulting query with ( and ) delimiters There's no final ) because there's nothing there to be delimited. Pick-to: 6.6 6.5 Change-Id: I6e2677aad2ab45759db2fffd17a4ce4aa902e140 Reviewed-by: David Faure (cherry picked from commit 88e41fd03481d490e7fcf9429849c8fa5a5743e5) Reviewed-by: Qt Cherry-pick Bot --- src/corelib/doc/snippets/code/src_corelib_io_qurl.cpp | 2 +- src/corelib/io/qurlquery.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/corelib/doc/snippets/code/src_corelib_io_qurl.cpp b/src/corelib/doc/snippets/code/src_corelib_io_qurl.cpp index f002ea6fd53..945f3ae3e71 100644 --- a/src/corelib/doc/snippets/code/src_corelib_io_qurl.cpp +++ b/src/corelib/doc/snippets/code/src_corelib_io_qurl.cpp @@ -39,7 +39,7 @@ sock.connectToHost(url.host(), url.port(80)); //! [4] -http://www.example.com/cgi-bin/drawgraph.cgi?type(pie)color(green) +http://www.example.com/cgi-bin/drawgraph.cgi?type,pie;color,green //! [4] diff --git a/src/corelib/io/qurlquery.cpp b/src/corelib/io/qurlquery.cpp index 0ae8003ec77..1258c00ec2c 100644 --- a/src/corelib/io/qurlquery.cpp +++ b/src/corelib/io/qurlquery.cpp @@ -558,7 +558,7 @@ QString QUrlQuery::query(QUrl::ComponentFormattingOptions encoding) const representation of the keys and values of the query string are percent encoded when returned in query(). - If \a valueDelimiter is set to '(' and \a pairDelimiter is ')', + If \a valueDelimiter is set to ',' and \a pairDelimiter is ';', the above query string would instead be represented like this: \snippet code/src_corelib_io_qurl.cpp 4 @@ -569,7 +569,7 @@ QString QUrlQuery::query(QUrl::ComponentFormattingOptions encoding) const \snippet code/src_corelib_io_qurlquery.cpp 0 Use of other characters is not supported and may result in unexpected - behaviour. This method does not verify that you passed a valid delimiter. + behavior. This method does not verify that you passed a valid delimiter. \sa queryValueDelimiter(), queryPairDelimiter() */