diff options
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/xmlpatternssdk/TestSuiteHandler.cpp | 4 | ||||
-rw-r--r-- | tests/auto/xmlpatternssdk/XSLTTestSuiteHandler.cpp | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/tests/auto/xmlpatternssdk/TestSuiteHandler.cpp b/tests/auto/xmlpatternssdk/TestSuiteHandler.cpp index 3f92297..e7423d1 100644 --- a/tests/auto/xmlpatternssdk/TestSuiteHandler.cpp +++ b/tests/auto/xmlpatternssdk/TestSuiteHandler.cpp @@ -52,7 +52,7 @@ using namespace QPatternistSDK; -QNetworkAccessManager s_networkManager; +Q_GLOBAL_STATIC(QNetworkAccessManager, networkAccessManager) TestSuiteHandler::TestSuiteHandler(const QUrl &catalogFile, const bool useEList) : m_ts(0) @@ -275,7 +275,7 @@ bool TestSuiteHandler::endElement(const QString &namespaceURI, } else if(localName == QLatin1String("sources")) { - const QPatternist::NetworkAccessDelegator::Ptr networkDelegator(new QPatternist::NetworkAccessDelegator(&s_networkManager, &s_networkManager)); + const QPatternist::NetworkAccessDelegator::Ptr networkDelegator(new QPatternist::NetworkAccessDelegator(networkAccessManager(), networkAccessManager())); m_resourceLoader = QPatternist::ResourceLoader::Ptr(new QPatternist::AccelTreeResourceLoader(Global::namePool(), networkDelegator)); diff --git a/tests/auto/xmlpatternssdk/XSLTTestSuiteHandler.cpp b/tests/auto/xmlpatternssdk/XSLTTestSuiteHandler.cpp index b487482..080ffac 100644 --- a/tests/auto/xmlpatternssdk/XSLTTestSuiteHandler.cpp +++ b/tests/auto/xmlpatternssdk/XSLTTestSuiteHandler.cpp @@ -52,7 +52,7 @@ using namespace QPatternistSDK; -extern QNetworkAccessManager s_networkManager; +Q_GLOBAL_STATIC(QNetworkAccessManager, networkAccessManager) XSLTTestSuiteHandler::XSLTTestSuiteHandler(const QUrl &catalogFile) : m_ts(0) , m_tc(0) @@ -60,7 +60,7 @@ XSLTTestSuiteHandler::XSLTTestSuiteHandler(const QUrl &catalogFile) : m_ts(0) , m_catalogFile(catalogFile) , m_removeTestcase(false) { - const QPatternist::NetworkAccessDelegator::Ptr networkDelegator(new QPatternist::NetworkAccessDelegator(&s_networkManager, &s_networkManager)); + const QPatternist::NetworkAccessDelegator::Ptr networkDelegator(new QPatternist::NetworkAccessDelegator(networkAccessManager(), networkAccessManager())); m_resourceLoader = QPatternist::ResourceLoader::Ptr(new QPatternist::AccelTreeResourceLoader(Global::namePool(), networkDelegator)); |