diff options
Diffstat (limited to 'tests/auto/shared')
-rw-r--r-- | tests/auto/shared/util.cpp | 30 | ||||
-rw-r--r-- | tests/auto/shared/util.h | 6 |
2 files changed, 0 insertions, 36 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; diff --git a/tests/auto/shared/util.h b/tests/auto/shared/util.h index 33d7cbd1d0..6f3f0a06a8 100644 --- a/tests/auto/shared/util.h +++ b/tests/auto/shared/util.h @@ -35,9 +35,6 @@ #include <QtCore/QStringList> #include <QtTest/QTest> -QT_FORWARD_DECLARE_CLASS(QQmlComponent) -QT_FORWARD_DECLARE_CLASS(QQmlEngine) - /* Base class for tests with data that are located in a "data" subfolder. */ class QQmlDataTest : public QObject @@ -61,9 +58,6 @@ public: static inline QQmlDataTest *instance() { return m_instance; } - static QByteArray msgComponentError(const QQmlComponent &, - const QQmlEngine *engine = 0); - public slots: virtual void initTestCase(); |