summaryrefslogtreecommitdiffstats
path: root/tests/auto/xmlpatternssdk/TestSuiteHandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/xmlpatternssdk/TestSuiteHandler.cpp')
-rw-r--r--tests/auto/xmlpatternssdk/TestSuiteHandler.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/auto/xmlpatternssdk/TestSuiteHandler.cpp b/tests/auto/xmlpatternssdk/TestSuiteHandler.cpp
index 74a6082..c46350a 100644
--- a/tests/auto/xmlpatternssdk/TestSuiteHandler.cpp
+++ b/tests/auto/xmlpatternssdk/TestSuiteHandler.cpp
@@ -40,6 +40,7 @@
****************************************************************************/
#include <QtDebug>
+#include <QDir>
#include "qacceltreeresourceloader_p.h"
#include "qnetworkaccessdelegator_p.h"
@@ -308,5 +309,21 @@ TestSuite *TestSuiteHandler::testSuite() const
return m_ts;
}
+bool TestSuiteHandler::resolveEntity(const QString& publicId,
+ const QString& systemId,
+ QXmlInputSource*& ret)
+{
+ QFileInfo catFileName(m_catalogFile.path());
+ QFileInfo externalFileName(catFileName.absolutePath(), systemId);
+ QFile *file = new QFile(externalFileName.absoluteFilePath());
+ if (file->open(QIODevice::ReadOnly | QIODevice::Text)) {
+ ret = new QXmlInputSource(file);
+ return true;
+ }
+ return false;
+ //return QXmlDefaultHandler::resolveEntity(publicId, systemId, ret);
+}
+
+
// vim: et:ts=4:sw=4:sts=4