diff options
Diffstat (limited to 'tests/auto/shared/util.cpp')
-rw-r--r-- | tests/auto/shared/util.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/auto/shared/util.cpp b/tests/auto/shared/util.cpp index 2f6b7f54..31647d69 100644 --- a/tests/auto/shared/util.cpp +++ b/tests/auto/shared/util.cpp @@ -108,6 +108,14 @@ QByteArray QQmlDataTest::msgComponentError(const QQmlComponent &c, return result.toLocal8Bit(); } +bool QQmlDataTest::canImportModule(const QString &importTestQmlSource) const +{ + QQmlEngine engine; + QQmlComponent component(&engine); + component.setData(importTestQmlSource.toLatin1(), QUrl()); + return !component.isError(); +} + Q_GLOBAL_STATIC(QMutex, qQmlTestMessageHandlerMutex) QQmlTestMessageHandler *QQmlTestMessageHandler::m_instance = 0; |