summaryrefslogtreecommitdiffstats
path: root/src/corelib/text/qbytearray.h
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2022-03-03 13:46:50 +0100
committerEdward Welbourne <edward.welbourne@qt.io>2022-03-18 01:22:54 +0100
commite10d613509fb606526fe1a0535dcceb81dbc7840 (patch)
tree20127f07720147be01d393541a68eac7593c8fdd /src/corelib/text/qbytearray.h
parentGet rid of QByteArray::nulTerminated() (diff)
downloadqtbase-e10d613509fb606526fe1a0535dcceb81dbc7840.tar.xz
qtbase-e10d613509fb606526fe1a0535dcceb81dbc7840.zip
Add QByteArray::percentDecoded() as an instance method
Percent-decoding was previously only present as a static method taking a QBA parameter; it might as well be an instance method of that parameter. Change most QBA tests to use it rather the static method. [ChangeLog][QtCore][QByteArray] percentDecoded() is now available as an instance method of the byte array to be decoded, equivalent to the static QByteArray::fromPercentEncoding(). Change-Id: I982101c44bdac5cc4041e85598d52ac101d38fa1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/text/qbytearray.h')
-rw-r--r--src/corelib/text/qbytearray.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/corelib/text/qbytearray.h b/src/corelib/text/qbytearray.h
index f3c167d217..2f0b099db9 100644
--- a/src/corelib/text/qbytearray.h
+++ b/src/corelib/text/qbytearray.h
@@ -373,6 +373,7 @@ public:
QByteArray toPercentEncoding(const QByteArray &exclude = QByteArray(),
const QByteArray &include = QByteArray(),
char percent = '%') const;
+ [[nodiscard]] QByteArray percentDecoded(char percent = '%') const;
inline QByteArray &setNum(short, int base = 10);
inline QByteArray &setNum(ushort, int base = 10);