| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before this change, QXmlStreamReader prefix value was always an empty
string for EndElement when the documentation state : "Returns the prefix
of a StartElement or EndElement."
The error was a missing update of the prefix value when parsing
EndElement.
I updated the tests data which were also wrong because no prefix were
reported even for </a:foo>. No new test is necessary, I think, the test
data already cover the cases of EndElement with a prefix and without one
(unchanged here).
Fixes: QTBUG-86847
Pick-to: 5.15 6.0 6.1
Change-Id: I0ad38b9741d760f1ce688a36f969ec14e20a928c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
They were pointing into the QHash structure which could
be invalidated on insert if growing was needed. This
caused some user-after-free issues.
Indexing into the QHash is quite fast, so let's just
store the name and a pointer to the QHash to do that.
Fixes: QTBUG-88246
Change-Id: If7f9b1c6ea7557c5bd0869b42b1b84aa824cc6ce
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
Use the new QtPrivate::XmlString class as the container holding
the string data internally. It basically a "QStringRef lite",
purely used in the implemntation. This replaces all usages of
QStringRef in the parser.
Fixes: QTBUG-84318
Change-Id: I557bbc6831301866602586d11d53283affd034a8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
|
|
|
|
|
|
|
|
|
| |
Pull the file apart, so that the parts generated from qxmlstream.g
are separated from the definition of the private class.
This will in the future simplify maintenance and refactoring.
Change-Id: I4a9c1bb1e377dee1e6d3b9aa9b0dfa64c5806c45
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use QStringDecoder to convert the data instead.
[ChangeLog][Important Behavior Changes] QXmlStreamWriter
always encodes XML in UTF-8, and QXmlStreamReader is limited to
XML files encoded in Unicode encodings (UTF-8, UTF-16 and UTF-32)
and latin1 (ISO-8859-1).
Change-Id: I10da612b951f4312ddaf63a89587697777dd8dc1
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
| |
This enables the use of QChar::fromUcs4() instead of
QString::fromUcs4() in a call to putStringLiteral().
Change-Id: I6ed933cc92bfbb70ed2b168b7deeeb466bc6bfeb
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
| |
Change-Id: Ie4ea7ca83dc1870d1a4a4cfbe4447b5d971b33bf
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
| |
Change-Id: I35c0700ed29d756949b95c3a26fdf9f087b5ef1c
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
|
| |
More compact and isolates against decltype(size()) issues.
Had to make QXmlStreamSimpleStack iterable.
Change-Id: Icfa7b2ab09995c7a442fd8a5b2f5d6ce90120822
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Replace
if (hash.contains(x)) { // lookup #1
~~~ hash[x]; // lookup #2
with
if (auto it = hash.find(x); it != hash.end()) { // lookup
~~~ *it; // no lookup
halving the number of QHash lookups. The container is not shared, so
there's no danger of a detach when going directly to the non-const
function.
Change-Id: Ifae409f98e0be972b31a24326ad548723831fda8
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Recursively defined entities can easily exhaust all available
memory. Limit entity expansion to a default of 4096 characters to
avoid DoS attacks when a user loads untrusted content.
Added a setter and getter to allow modifying the expansion limit.
[ChangeLog][QtCore][QXmlStream] QXmlStreamReader does now by default
limit the expansion of entities to 4096 characters. Documents where
a single entity expands to more characters than the limit are not
considered well formed. The limit is there to avoid DoS attacks through
recursively expanding entities when loading untrusted content. The
limit can be changed through the QXmlStreamReader::setEntityExpansionLimit()
method.
Fixes: QTBUG-47417
Change-Id: I94387815d74fcf34783e136387ee57fac5ded0c9
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
|
|
|
|
|
|
|
|
| |
Cleans up most of corelib to use nullptr or default enums
where appropriate.
Change-Id: Ifcaac14ecdaaee730f87f10941db3ce407d71ef9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Some updates that made it into qxmlstream_p.h have not been reflected
in qxmlstream.g. Also fix the expected amount of shift/reduce
conflicts.
Fixes: QTBUG-60186
Change-Id: I2a5e1c579dbbe8812a75ca6bb1e3a6a0ba909cdf
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
|
|
|
|
|
|
|
|
| |
Also clean up QTextCodec usage in qmake build and some includes
of qtextcodec.h.
Change-Id: I0475b82690024054add4e85a8724c8ea3adcf62a
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
|
|
This is in preparation to adding CBOR support. We don't need yet another
dir for CBOR and placing it in src/corelib/json is just wrong.
Change-Id: I9741f017961b410c910dfffd14ffb9d870340fa6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|