forked from qt-creator/qt-creator
QmlDesigner.Tests: Compiling again
Change-Id: I85a7fc5c37d9beea6e2433a9fd2a3ef779f0d63c Reviewed-by: Alessandro Portale <alessandro.portale@nokia.com>
This commit is contained in:
@@ -1,15 +1,17 @@
|
||||
include(../../../qttest.pri)
|
||||
|
||||
QTCREATOR_SOURCE=$$PWD/../../../../..
|
||||
QTCREATOR_BUILD=$$OUT_PWD/../../../../..
|
||||
IDE_SOURCE_TREE=$$PWD/../../../../..
|
||||
IDE_BUILD_TREE=$$OUT_PWD/../../../../..
|
||||
# can we check that this is a valid build dir?
|
||||
|
||||
message($$IDE_SOURCE_TREE)
|
||||
message($$IDE_BUILD_TREE)
|
||||
OUT_PWD_SAVE=$$OUT_PWD
|
||||
OUT_PWD=QTCREATOR_BUILD
|
||||
OUT_PWD=IDE_BUILD_TREE
|
||||
include($$IDE_SOURCE_TREE/src/plugins/qmldesigner/config.pri)
|
||||
include(../../../qttest.pri)
|
||||
OUT_PWD=$$OUT_PWD_SAVE
|
||||
|
||||
message($$IDE_LIBRARY_PATH)
|
||||
message($$IDE_PLUGIN_PATH)
|
||||
LIBS += -L$$IDE_PLUGIN_PATH/Nokia
|
||||
LIBS += -L$$IDE_LIBRARY_PATH
|
||||
|
||||
unix: QMAKE_LFLAGS += \'-Wl,-rpath,$${IDE_LIBRARY_PATH}\' \'-Wl,-rpath,$${IDE_PLUGIN_PATH}/Nokia\'
|
||||
|
||||
@@ -24,10 +26,15 @@ DEFINES+=QT_CREATOR QTCREATOR_TEST
|
||||
|
||||
INCLUDEPATH += $$IDE_SOURCE_TREE/src/plugins/qmldesigner/designercore/include
|
||||
INCLUDEPATH += $$IDE_SOURCE_TREE/src/plugins/qmldesigner/designercore
|
||||
INCLUDEPATH += $$IDE_SOURCE_TREE//share/qtcreator/qml/qmlpuppet
|
||||
INCLUDEPATH += $$IDE_SOURCE_TREE/src/plugins/qmldesigner
|
||||
|
||||
|
||||
include($$IDE_SOURCE_TREE/src/plugins/qmldesigner/designercore/designercore.pri)
|
||||
include($$IDE_SOURCE_TREE/src/libs/utils/utils.pri)
|
||||
include($$IDE_SOURCE_TREE/src/plugins/qmljstools/qmljstools.pri)
|
||||
include($$IDE_SOURCE_TREE/src/libs/utils/utils.pri)
|
||||
include($$IDE_SOURCE_TREE/src/libs/qmljs/qmljs.pri)
|
||||
include($$IDE_SOURCE_TREE/src/libs/cplusplus/cplusplus.pri)
|
||||
|
||||
CONFIG += console
|
||||
CONFIG -= app_bundle
|
||||
|
@@ -75,6 +75,7 @@ using namespace QmlDesigner;
|
||||
#include "../common/statichelpers.cpp"
|
||||
|
||||
#include <qmljstools/qmljsmodelmanager.h>
|
||||
#include <qmljs/qmljsinterpreter.h>
|
||||
|
||||
#ifdef Q_OS_MAC
|
||||
# define SHARE_PATH "/Resources"
|
||||
@@ -108,9 +109,10 @@ static void initializeMetaTypeSystem(const QString &resourcePath)
|
||||
QDir::Files,
|
||||
QDir::Name);
|
||||
|
||||
const QStringList errors = QmlJS::Interpreter::CppQmlTypesLoader::loadQmlTypes(qmlFiles);
|
||||
foreach (const QString &error, errors)
|
||||
qWarning() << qPrintable(error);
|
||||
QStringList errorsAndWarnings;
|
||||
QmlJS::CppQmlTypesLoader::loadQmlTypes(qmlFiles, &errorsAndWarnings, &errorsAndWarnings);
|
||||
foreach (const QString &errorAndWarning, errorsAndWarnings)
|
||||
qWarning() << qPrintable(errorAndWarning);
|
||||
}
|
||||
|
||||
tst_TestCore::tst_TestCore()
|
||||
@@ -3478,7 +3480,7 @@ void tst_TestCore::testSubComponentManager()
|
||||
|
||||
QScopedPointer<Model> model(Model::create("Qt/Item"));
|
||||
model->setFileUrl(QUrl::fromLocalFile(fileName));
|
||||
QScopedPointer<SubComponentManager> subComponentManager(new SubComponentManager(model->metaInfo(), 0));
|
||||
QScopedPointer<SubComponentManager> subComponentManager(new SubComponentManager(model.data()));
|
||||
subComponentManager->update(QUrl::fromLocalFile(fileName), model->imports());
|
||||
|
||||
QScopedPointer<TestRewriterView> testRewriterView(new TestRewriterView());
|
||||
|
@@ -152,10 +152,10 @@ void TestView::nodeOrderChanged(const QmlDesigner::NodeListProperty &listPropert
|
||||
m_methodCalls += MethodCall("nodeOrderChanged", QStringList() << listProperty.name() << movedNode.id() << QString::number(oldIndex));
|
||||
}
|
||||
|
||||
void TestView::stateChanged(const QmlDesigner::QmlModelState &newQmlModelState, const QmlDesigner::QmlModelState &oldQmlModelState)
|
||||
void TestView::actualStateChanged(const QmlDesigner::ModelNode &node)
|
||||
{
|
||||
QmlDesigner::QmlModelView::stateChanged(newQmlModelState, oldQmlModelState);
|
||||
m_methodCalls += MethodCall("stateChanged", QStringList() << newQmlModelState.name() << oldQmlModelState.name());
|
||||
QmlDesigner::QmlModelView::actualStateChanged(node);
|
||||
m_methodCalls += MethodCall("actualStateChanged", QStringList() << node.id());
|
||||
}
|
||||
|
||||
QList<TestView::MethodCall> &TestView::methodCalls()
|
||||
|
@@ -73,8 +73,7 @@ public:
|
||||
|
||||
void nodeOrderChanged(const QmlDesigner::NodeListProperty &listProperty, const QmlDesigner::ModelNode &movedNode, int oldIndex);
|
||||
|
||||
void stateChanged(const QmlDesigner::QmlModelState &newQmlModelState, const QmlDesigner::QmlModelState &oldQmlModelState);
|
||||
|
||||
void actualStateChanged(const QmlDesigner::ModelNode &node);
|
||||
QList<MethodCall> &methodCalls();
|
||||
|
||||
QString lastFunction() const;
|
||||
|
Reference in New Issue
Block a user