diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2018-04-23 13:57:11 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2018-04-24 19:24:12 +0000 |
commit | ac6e893c5c7b43cfc50c25bebee1dfd4d3840124 (patch) | |
tree | 050f0079983f6e9bd11513aca44cdfe0d7f212e8 /tests/auto/shared/util.cpp | |
parent | 5cc8db797a88a0b2654876e768ba9cdebc053534 (diff) |
Make the shared test code independent of QtQml
This enables us to drop the QML dependency from a number of tests. This
is desirable because we want to test that we didn't do any incompatible
changes to the debug framework.
Change-Id: I937dd45d3079eac15c200c9d68bb4c911f61afc0
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'tests/auto/shared/util.cpp')
-rw-r--r-- | tests/auto/shared/util.cpp | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/tests/auto/shared/util.cpp b/tests/auto/shared/util.cpp index 96beb51612..189398f0c2 100644 --- a/tests/auto/shared/util.cpp +++ b/tests/auto/shared/util.cpp @@ -28,11 +28,6 @@ #include "util.h" -#include <QtQml/QQmlComponent> -#include <QtQml/QQmlError> -#include <QtQml/QQmlContext> -#include <QtQml/QQmlEngine> -#include <QtCore/QTextStream> #include <QtCore/QDebug> #include <QtCore/QMutexLocker> @@ -72,31 +67,6 @@ QString QQmlDataTest::testFile(const QString &fileName) const return result; } -QByteArray QQmlDataTest::msgComponentError(const QQmlComponent &c, - const QQmlEngine *engine /* = 0 */) -{ - QString result; - const QList<QQmlError> errors = c.errors(); - QTextStream str(&result); - str << "Component '" << c.url().toString() << "' has " << errors.size() - << " errors: '"; - for (int i = 0; i < errors.size(); ++i) { - if (i) - str << ", '"; - str << errors.at(i).toString() << '\''; - - } - if (!engine) - if (QQmlContext *context = c.creationContext()) - engine = context->engine(); - if (engine) { - str << " Import paths: (" << engine->importPathList().join(QStringLiteral(", ")) - << ") Plugin paths: (" << engine->pluginPathList().join(QStringLiteral(", ")) - << ')'; - } - return result.toLocal8Bit(); -} - Q_GLOBAL_STATIC(QMutex, qQmlTestMessageHandlerMutex) QQmlTestMessageHandler *QQmlTestMessageHandler::m_instance = 0; |