diff options
author | Honglei Zhang <honglei.zhang@nokia.com> | 2011-04-19 14:29:27 (GMT) |
---|---|---|
committer | Honglei Zhang <honglei.zhang@nokia.com> | 2011-04-19 14:29:27 (GMT) |
commit | 986ab48f1128bdd56fa408fca8f4a564e874dd4d (patch) | |
tree | 46d5e20dbf23fbbc0d95b0a4bf111f301a45fa99 /tests | |
parent | 6dcb0028e44cba2a00c2fb867fb1757ad5b1a254 (diff) | |
download | Qt-986ab48f1128bdd56fa408fca8f4a564e874dd4d.zip Qt-986ab48f1128bdd56fa408fca8f4a564e874dd4d.tar.gz Qt-986ab48f1128bdd56fa408fca8f4a564e874dd4d.tar.bz2 |
Fix memory leak bugs in XmlPatterns
In XmlPatterns implementation, QExplicitlySharedDataPointer and
QSharedData classes are widely used. The over use of these classes
has cuased couple of cyclic references. Some codes are refactored
to use plain C++ pointer to break the reference loop.
Task-number: QTBUG-15191
Reviewed-by: Laszlo Agocs and Sami Merila
Diffstat (limited to 'tests')
4 files changed, 8 insertions, 2 deletions
diff --git a/tests/auto/qxmlquery/tst_qxmlquery.cpp b/tests/auto/qxmlquery/tst_qxmlquery.cpp index e3c97d2..2e0d1aa 100644 --- a/tests/auto/qxmlquery/tst_qxmlquery.cpp +++ b/tests/auto/qxmlquery/tst_qxmlquery.cpp @@ -3301,8 +3301,8 @@ void tst_QXmlQuery::bindVariableQXmlQueryInvalidate() const QXmlQuery query2; query2.setQuery("'query2'"); - query.bindVariable(QLatin1String("name"), query); - QVERIFY(!query.isValid()); + query2.bindVariable(QLatin1String("name"), query); + QVERIFY(!query2.isValid()); } void tst_QXmlQuery::unknownSourceLocation() const diff --git a/tests/auto/xmlpatternsdiagnosticsts/xmlpatternsdiagnosticsts.pro b/tests/auto/xmlpatternsdiagnosticsts/xmlpatternsdiagnosticsts.pro index 3e252f6..48c79d5 100644 --- a/tests/auto/xmlpatternsdiagnosticsts/xmlpatternsdiagnosticsts.pro +++ b/tests/auto/xmlpatternsdiagnosticsts/xmlpatternsdiagnosticsts.pro @@ -25,3 +25,5 @@ wince*|symbian { catalog.path = . DEPLOYMENT += catalog } + +requires(contains(QT_CONFIG,private_tests)) diff --git a/tests/auto/xmlpatternsschemats/xmlpatternsschemats.pro b/tests/auto/xmlpatternsschemats/xmlpatternsschemats.pro index f36211e..0fb5fef 100644 --- a/tests/auto/xmlpatternsschemats/xmlpatternsschemats.pro +++ b/tests/auto/xmlpatternsschemats/xmlpatternsschemats.pro @@ -25,3 +25,5 @@ INCLUDEPATH += $$QT_SOURCE_TREE/tests/auto/xmlpatternssdk/ \ $$QT_SOURCE_TREE/tests/auto/xmlpatternsxqts \ ../xmlpatternsxqts \ ../xmlpatternssdk + +requires(contains(QT_CONFIG,private_tests)) diff --git a/tests/auto/xmlpatternsxqts/xmlpatternsxqts.pro b/tests/auto/xmlpatternsxqts/xmlpatternsxqts.pro index e81888a..0ced633 100644 --- a/tests/auto/xmlpatternsxqts/xmlpatternsxqts.pro +++ b/tests/auto/xmlpatternsxqts/xmlpatternsxqts.pro @@ -19,3 +19,5 @@ INCLUDEPATH += $$(QTDIR)/include/QtXmlPatterns/private \ CONFIG += testlib QT += xml TARGET = tst_xmlpatternsxqts + +requires(contains(QT_CONFIG,private_tests)) |