Commit d445fcab authored by Thomas Hartmann's avatar Thomas Hartmann
Browse files

QmlDesigner: fix plugin loading for auto tests

parent cef244bc
......@@ -2,13 +2,14 @@ include(../../../../../src/plugins/qmldesigner/config.pri)
QT += testlib \
script \
declarative
DESTDIR = $$DESIGNER_BINARY_DIRECTORY
include(../../../../../src/plugins/qmldesigner/core/core.pri)
include(../../../../../src/libs/qmljs/qmljs-lib.pri)
HEADERS+=../../../../../src/libs/utils/changeset.h
SOURCES+=../../../../../src/libs/utils/changeset.cpp
INCLUDEPATH+=../../../../../src/libs
DEFINES+=QTCREATOR_UTILS_STATIC_LIB QML_BUILD_STATIC_LIB QTCREATOR_TEST
DESTDIR = ../../../../../bin
DEFINES+=MANUALTEST_PATH=\\\"$$PWD"/../../../../manual/qml/testfiles/"\\\"
......
......@@ -3220,6 +3220,15 @@ void TestCore::testMetaInfoEnums()
void TestCore::testMetaInfoDotProperties()
{
#ifdef Q_OS_MAC
const QString pluginPath = QCoreApplication::applicationDirPath() + "/../PlugIns/QmlDesigner";
#else
const QString pluginPath = QCoreApplication::applicationDirPath() + "/../"
+ QLatin1String("lib") + "/qmldesigner";
#endif
MetaInfo::setPluginPaths(QStringList() << pluginPath);
QScopedPointer<Model> model(Model::create("Qt/Text"));
QVERIFY(model.data());
......@@ -3228,6 +3237,9 @@ void TestCore::testMetaInfoDotProperties()
model->attachView(view.data());
QVERIFY(model->metaInfo().hasNodeMetaInfo("Qt/Text"));
QVERIFY(model->metaInfo().hasNodeMetaInfo("Qt/Pen"));
QCOMPARE(view->rootModelNode().metaInfo().typeName(), QString("Qt/Text"));
QVERIFY(!view->rootModelNode().metaInfo().property("text").isValueType());
QVERIFY(view->rootModelNode().metaInfo().hasProperty("font"));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment