forked from qt-creator/qt-creator
CMake build: Compile QmlDesigner autotests
We cannot do this via a static library, because the tests need to compile the same files with different defines (QMLDESIGNER_TEST). Add a function which extends a target with the corresponding files. Also do not hardcode resource directories in the test - the Qt Creator app bundle is no longer in a "bin/" subdirectory on macOS. Use the build system provided IDE_*_PATH variables instead. Change-Id: I21850eba3cb47b4dcfd5e66227183b2d1ff35ff2 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -6,7 +6,7 @@ endif()
|
|||||||
add_qtc_plugin(QmlDesigner
|
add_qtc_plugin(QmlDesigner
|
||||||
DEPENDS
|
DEPENDS
|
||||||
QmlJS LanguageUtils QmlEditorWidgets AdvancedDockingSystem
|
QmlJS LanguageUtils QmlEditorWidgets AdvancedDockingSystem
|
||||||
Qt5::QuickWidgets Qt5::CorePrivate Sqlite Threads::Threads
|
Qt5::QuickWidgets Qt5::CorePrivate Sqlite
|
||||||
DEFINES
|
DEFINES
|
||||||
DESIGNER_CORE_LIBRARY
|
DESIGNER_CORE_LIBRARY
|
||||||
IDE_LIBRARY_BASENAME=\"${IDE_LIBRARY_BASE_PATH}\"
|
IDE_LIBRARY_BASENAME=\"${IDE_LIBRARY_BASE_PATH}\"
|
||||||
@@ -14,6 +14,8 @@ add_qtc_plugin(QmlDesigner
|
|||||||
PUBLIC_INCLUDES
|
PUBLIC_INCLUDES
|
||||||
"${CMAKE_CURRENT_LIST_DIR}"
|
"${CMAKE_CURRENT_LIST_DIR}"
|
||||||
"${CMAKE_CURRENT_LIST_DIR}/designercore/include"
|
"${CMAKE_CURRENT_LIST_DIR}/designercore/include"
|
||||||
|
"${CMAKE_CURRENT_LIST_DIR}/../../../share/qtcreator/qml/qmlpuppet/interfaces"
|
||||||
|
"${CMAKE_CURRENT_LIST_DIR}/../../../share/qtcreator/qml/qmlpuppet/types"
|
||||||
PLUGIN_DEPENDS
|
PLUGIN_DEPENDS
|
||||||
Core ProjectExplorer QmlJSEditor QmakeProjectManager QmlProjectManager
|
Core ProjectExplorer QmlJSEditor QmakeProjectManager QmlProjectManager
|
||||||
QtSupport TextEditor
|
QtSupport TextEditor
|
||||||
@@ -44,6 +46,9 @@ add_qtc_plugin(QmlDesigner
|
|||||||
QMLDESIGNER_PLUGIN_PATH "${QmlDesignerPluginInstallPrefix}"
|
QMLDESIGNER_PLUGIN_PATH "${QmlDesignerPluginInstallPrefix}"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
include(qmldesignercore.cmake)
|
||||||
|
extend_with_qmldesigner_core(QmlDesigner)
|
||||||
|
|
||||||
add_qtc_plugin(assetexporterplugin
|
add_qtc_plugin(assetexporterplugin
|
||||||
CONDITION TARGET QmlDesigner
|
CONDITION TARGET QmlDesigner
|
||||||
DEPENDS Core ProjectExplorer QmlDesigner Utils Qt5::Qml Qt5::QuickPrivate
|
DEPENDS Core ProjectExplorer QmlDesigner Utils Qt5::Qml Qt5::QuickPrivate
|
||||||
@@ -104,93 +109,6 @@ add_qtc_plugin(qtquickplugin
|
|||||||
SKIP_DEBUG_CMAKE_FILE_CHECK
|
SKIP_DEBUG_CMAKE_FILE_CHECK
|
||||||
)
|
)
|
||||||
|
|
||||||
extend_qtc_plugin(QmlDesigner
|
|
||||||
SOURCES_PREFIX ../../../share/qtcreator/qml/qmlpuppet/container
|
|
||||||
SOURCES
|
|
||||||
addimportcontainer.cpp addimportcontainer.h
|
|
||||||
idcontainer.cpp idcontainer.h
|
|
||||||
imagecontainer.cpp imagecontainer.h
|
|
||||||
informationcontainer.cpp informationcontainer.h
|
|
||||||
instancecontainer.cpp instancecontainer.h
|
|
||||||
mockuptypecontainer.cpp mockuptypecontainer.h
|
|
||||||
propertyabstractcontainer.cpp propertyabstractcontainer.h
|
|
||||||
propertybindingcontainer.cpp propertybindingcontainer.h
|
|
||||||
propertyvaluecontainer.cpp propertyvaluecontainer.h
|
|
||||||
reparentcontainer.cpp reparentcontainer.h
|
|
||||||
sharedmemory.h
|
|
||||||
)
|
|
||||||
|
|
||||||
if (UNIX)
|
|
||||||
extend_qtc_plugin(QmlDesigner
|
|
||||||
SOURCES_PREFIX ../../../share/qtcreator/qml/qmlpuppet/container
|
|
||||||
SOURCES sharedmemory_unix.cpp
|
|
||||||
)
|
|
||||||
if (NOT APPLE)
|
|
||||||
extend_qtc_plugin(QmlDesigner DEPENDS rt)
|
|
||||||
endif()
|
|
||||||
else()
|
|
||||||
extend_qtc_plugin(QmlDesigner
|
|
||||||
SOURCES_PREFIX ../../../share/qtcreator/qml/qmlpuppet/container
|
|
||||||
SOURCES sharedmemory_qt.cpp
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
extend_qtc_plugin(QmlDesigner
|
|
||||||
SOURCES_PREFIX ../../../share/qtcreator/qml/qmlpuppet/commands
|
|
||||||
SOURCES
|
|
||||||
changeauxiliarycommand.cpp changeauxiliarycommand.h
|
|
||||||
changebindingscommand.cpp changebindingscommand.h
|
|
||||||
changefileurlcommand.cpp changefileurlcommand.h
|
|
||||||
changeidscommand.cpp changeidscommand.h
|
|
||||||
changenodesourcecommand.cpp changenodesourcecommand.h
|
|
||||||
changestatecommand.cpp changestatecommand.h
|
|
||||||
changevaluescommand.cpp changevaluescommand.h
|
|
||||||
childrenchangedcommand.cpp childrenchangedcommand.h
|
|
||||||
clearscenecommand.cpp clearscenecommand.h
|
|
||||||
completecomponentcommand.cpp completecomponentcommand.h
|
|
||||||
componentcompletedcommand.cpp componentcompletedcommand.h
|
|
||||||
createinstancescommand.cpp createinstancescommand.h
|
|
||||||
createscenecommand.cpp createscenecommand.h
|
|
||||||
debugoutputcommand.cpp debugoutputcommand.h
|
|
||||||
endpuppetcommand.cpp endpuppetcommand.h
|
|
||||||
informationchangedcommand.cpp informationchangedcommand.h
|
|
||||||
pixmapchangedcommand.cpp pixmapchangedcommand.h
|
|
||||||
puppetalivecommand.cpp puppetalivecommand.h
|
|
||||||
removeinstancescommand.cpp removeinstancescommand.h
|
|
||||||
removepropertiescommand.cpp removepropertiescommand.h
|
|
||||||
removesharedmemorycommand.cpp removesharedmemorycommand.h
|
|
||||||
reparentinstancescommand.cpp reparentinstancescommand.h
|
|
||||||
statepreviewimagechangedcommand.cpp statepreviewimagechangedcommand.h
|
|
||||||
synchronizecommand.cpp synchronizecommand.h
|
|
||||||
changepreviewimagesizecommand.cpp changepreviewimagesizecommand.h
|
|
||||||
changelanguagecommand.cpp changelanguagecommand.h
|
|
||||||
tokencommand.cpp tokencommand.h
|
|
||||||
valueschangedcommand.cpp valueschangedcommand.h
|
|
||||||
changeselectioncommand.cpp changeselectioncommand.h
|
|
||||||
update3dviewstatecommand.cpp update3dviewstatecommand.h
|
|
||||||
puppettocreatorcommand.cpp puppettocreatorcommand.h
|
|
||||||
inputeventcommand.cpp inputeventcommand.h
|
|
||||||
view3dactioncommand.cpp view3dactioncommand.h
|
|
||||||
requestmodelnodepreviewimagecommand.cpp requestmodelnodepreviewimagecommand.h
|
|
||||||
)
|
|
||||||
|
|
||||||
extend_qtc_plugin(QmlDesigner
|
|
||||||
SOURCES_PREFIX ../../../share/qtcreator/qml/qmlpuppet/interfaces
|
|
||||||
PUBLIC_INCLUDES ../../../share/qtcreator/qml/qmlpuppet/interfaces
|
|
||||||
SOURCES
|
|
||||||
nodeinstanceserverinterface.cpp
|
|
||||||
commondefines.h
|
|
||||||
nodeinstanceclientinterface.h
|
|
||||||
nodeinstanceglobal.h
|
|
||||||
nodeinstanceserverinterface.h
|
|
||||||
)
|
|
||||||
|
|
||||||
extend_qtc_plugin(QmlDesigner
|
|
||||||
SOURCES_PREFIX ../../../share/qtcreator/qml/qmlpuppet/types
|
|
||||||
PUBLIC_INCLUDES ../../../share/qtcreator/qml/qmlpuppet/types
|
|
||||||
SOURCES enumeration.h
|
|
||||||
)
|
|
||||||
|
|
||||||
extend_qtc_plugin(QmlDesigner
|
extend_qtc_plugin(QmlDesigner
|
||||||
SOURCES_PREFIX components/componentcore
|
SOURCES_PREFIX components/componentcore
|
||||||
PUBLIC_INCLUDES components/componentcore
|
PUBLIC_INCLUDES components/componentcore
|
||||||
@@ -408,212 +326,30 @@ extend_qtc_plugin(QmlDesigner
|
|||||||
extend_qtc_plugin(QmlDesigner
|
extend_qtc_plugin(QmlDesigner
|
||||||
SOURCES_PREFIX designercore
|
SOURCES_PREFIX designercore
|
||||||
SOURCES
|
SOURCES
|
||||||
exceptions/exception.cpp
|
include/asynchronousimagecacheinterface.h
|
||||||
exceptions/invalidargumentexception.cpp
|
|
||||||
exceptions/invalididexception.cpp
|
|
||||||
exceptions/invalidmetainfoexception.cpp
|
|
||||||
exceptions/invalidmodelnodeexception.cpp
|
|
||||||
exceptions/invalidmodelstateexception.cpp
|
|
||||||
exceptions/invalidpropertyexception.cpp
|
|
||||||
exceptions/invalidqmlsourceexception.cpp
|
|
||||||
exceptions/invalidreparentingexception.cpp
|
|
||||||
exceptions/invalidslideindexexception.cpp
|
|
||||||
exceptions/notimplementedexception.cpp
|
|
||||||
exceptions/removebasestateexception.cpp
|
|
||||||
exceptions/rewritingexception.cpp
|
|
||||||
|
|
||||||
filemanager/addarraymembervisitor.cpp filemanager/addarraymembervisitor.h
|
|
||||||
filemanager/addobjectvisitor.cpp filemanager/addobjectvisitor.h
|
|
||||||
filemanager/addpropertyvisitor.cpp filemanager/addpropertyvisitor.h
|
|
||||||
filemanager/astobjecttextextractor.cpp filemanager/astobjecttextextractor.h
|
|
||||||
filemanager/changeimportsvisitor.cpp filemanager/changeimportsvisitor.h
|
|
||||||
filemanager/changeobjecttypevisitor.cpp filemanager/changeobjecttypevisitor.h
|
|
||||||
filemanager/changepropertyvisitor.cpp filemanager/changepropertyvisitor.h
|
|
||||||
filemanager/firstdefinitionfinder.cpp filemanager/firstdefinitionfinder.h
|
|
||||||
filemanager/moveobjectbeforeobjectvisitor.cpp filemanager/moveobjectbeforeobjectvisitor.h
|
|
||||||
filemanager/moveobjectvisitor.cpp filemanager/moveobjectvisitor.h
|
|
||||||
filemanager/objectlengthcalculator.cpp filemanager/objectlengthcalculator.h
|
|
||||||
filemanager/qmlrefactoring.cpp filemanager/qmlrefactoring.h
|
|
||||||
filemanager/qmlrewriter.cpp filemanager/qmlrewriter.h
|
|
||||||
filemanager/removepropertyvisitor.cpp filemanager/removepropertyvisitor.h
|
|
||||||
filemanager/removeuiobjectmembervisitor.cpp filemanager/removeuiobjectmembervisitor.h
|
|
||||||
|
|
||||||
include/abstractproperty.h
|
|
||||||
include/abstractview.h
|
|
||||||
include/anchorline.h
|
|
||||||
include/annotation.h
|
|
||||||
include/basetexteditmodifier.h
|
|
||||||
include/bindingproperty.h
|
|
||||||
include/bytearraymodifier.h
|
include/bytearraymodifier.h
|
||||||
include/componenttextmodifier.h
|
|
||||||
include/customnotifications.h
|
|
||||||
include/documentmessage.h
|
|
||||||
include/exception.h
|
|
||||||
include/forwardview.h
|
|
||||||
include/import.h
|
|
||||||
include/invalidargumentexception.h
|
|
||||||
include/invalididexception.h
|
|
||||||
include/invalidmetainfoexception.h
|
|
||||||
include/invalidmodelnodeexception.h
|
|
||||||
include/invalidmodelstateexception.h
|
|
||||||
include/invalidpropertyexception.h
|
|
||||||
include/invalidqmlsourceexception.h
|
|
||||||
include/invalidreparentingexception.h
|
|
||||||
include/invalidslideindexexception.h
|
|
||||||
include/itemlibraryinfo.h
|
|
||||||
include/iwidgetplugin.h
|
include/iwidgetplugin.h
|
||||||
include/mathutils.h
|
|
||||||
include/metainfo.h
|
|
||||||
include/metainforeader.h
|
|
||||||
include/model.h
|
|
||||||
include/modelmerger.h
|
|
||||||
include/modelnode.h
|
|
||||||
include/modelnodepositionstorage.h
|
|
||||||
include/modificationgroupexception.h
|
include/modificationgroupexception.h
|
||||||
include/modificationgrouptoken.h
|
include/modificationgrouptoken.h
|
||||||
include/nodeabstractproperty.h
|
|
||||||
include/nodeanchors.h
|
include/nodeanchors.h
|
||||||
include/nodehints.h
|
|
||||||
include/nodeinstance.h
|
|
||||||
include/nodeinstanceview.h
|
|
||||||
include/nodelistproperty.h
|
|
||||||
include/nodemetainfo.h
|
|
||||||
include/nodeproperty.h
|
|
||||||
include/notimplementedexception.h
|
|
||||||
include/objectpropertybinding.h
|
include/objectpropertybinding.h
|
||||||
include/plaintexteditmodifier.h
|
|
||||||
include/propertybinding.h
|
include/propertybinding.h
|
||||||
include/propertycontainer.h
|
|
||||||
include/propertynode.h
|
|
||||||
include/propertyparser.h
|
|
||||||
include/qmlanchors.h
|
|
||||||
include/qmlchangeset.h
|
|
||||||
include/qmldesignercorelib_global.h
|
|
||||||
include/qmlitemnode.h
|
|
||||||
include/qmlvisualnode.h
|
|
||||||
include/qml3dnode.h
|
include/qml3dnode.h
|
||||||
include/qmlmodelnodefacade.h
|
include/qmlvisualnode.h
|
||||||
include/qmlobjectnode.h
|
|
||||||
include/qmlstate.h
|
|
||||||
include/qmlconnections.h
|
|
||||||
include/qmltimeline.h
|
|
||||||
include/qmltimelinekeyframegroup.h
|
|
||||||
include/removebasestateexception.h
|
|
||||||
include/rewriterview.h
|
|
||||||
include/rewritingexception.h
|
|
||||||
include/signalhandlerproperty.h
|
|
||||||
include/stylesheetmerger.h
|
|
||||||
include/subcomponentmanager.h
|
|
||||||
include/textmodifier.h
|
|
||||||
include/variantproperty.h
|
|
||||||
include/viewmanager.h
|
|
||||||
include/asynchronousimagecache.h
|
|
||||||
include/synchronousimagecache.h
|
|
||||||
include/imagecacheauxiliarydata.h
|
|
||||||
include/asynchronousimagecacheinterface.h
|
|
||||||
)
|
)
|
||||||
|
|
||||||
extend_qtc_plugin(QmlDesigner
|
extend_qtc_plugin(QmlDesigner
|
||||||
SOURCES_PREFIX designercore/instances
|
SOURCES_PREFIX designercore/instances
|
||||||
SOURCES
|
SOURCES
|
||||||
nodeinstance.cpp
|
|
||||||
nodeinstanceserverproxy.cpp nodeinstanceserverproxy.h
|
|
||||||
nodeinstanceview.cpp
|
|
||||||
puppetbuildprogressdialog.cpp puppetbuildprogressdialog.h puppetbuildprogressdialog.ui
|
|
||||||
puppetcreator.cpp puppetcreator.h
|
|
||||||
puppetdialog.cpp puppetdialog.h puppetdialog.ui
|
|
||||||
connectionmanagerinterface.cpp connectionmanagerinterface.h
|
|
||||||
baseconnectionmanager.cpp baseconnectionmanager.h
|
|
||||||
connectionmanager.cpp connectionmanager.h
|
|
||||||
capturingconnectionmanager.cpp capturingconnectionmanager.h
|
capturingconnectionmanager.cpp capturingconnectionmanager.h
|
||||||
interactiveconnectionmanager.cpp interactiveconnectionmanager.h
|
interactiveconnectionmanager.cpp interactiveconnectionmanager.h
|
||||||
qprocessuniqueptr.h
|
|
||||||
)
|
)
|
||||||
|
|
||||||
extend_qtc_plugin(QmlDesigner
|
extend_qtc_plugin(QmlDesigner
|
||||||
SOURCES_PREFIX designercore
|
SOURCES_PREFIX designercore
|
||||||
PUBLIC_INCLUDES designercore
|
PUBLIC_INCLUDES designercore
|
||||||
SOURCES
|
SOURCES
|
||||||
metainfo/itemlibraryinfo.cpp
|
|
||||||
metainfo/metainfo.cpp
|
|
||||||
metainfo/metainforeader.cpp
|
|
||||||
metainfo/nodehints.cpp
|
|
||||||
metainfo/nodemetainfo.cpp
|
|
||||||
metainfo/subcomponentmanager.cpp
|
|
||||||
|
|
||||||
model/abstractproperty.cpp
|
|
||||||
model/abstractview.cpp
|
|
||||||
model/anchorline.cpp
|
|
||||||
model/annotation.cpp
|
|
||||||
model/basetexteditmodifier.cpp
|
model/basetexteditmodifier.cpp
|
||||||
model/bindingproperty.cpp
|
|
||||||
model/componenttextmodifier.cpp
|
|
||||||
model/documentmessage.cpp
|
|
||||||
model/import.cpp
|
|
||||||
model/internalbindingproperty.cpp model/internalbindingproperty.h
|
|
||||||
model/internalnode.cpp model/internalnode_p.h
|
|
||||||
model/internalnodeabstractproperty.cpp model/internalnodeabstractproperty.h
|
|
||||||
model/internalnodelistproperty.cpp model/internalnodelistproperty.h
|
|
||||||
model/internalnodeproperty.cpp model/internalnodeproperty.h
|
|
||||||
model/internalproperty.cpp model/internalproperty.h
|
|
||||||
model/internalsignalhandlerproperty.cpp model/internalsignalhandlerproperty.h
|
|
||||||
model/internalvariantproperty.cpp model/internalvariantproperty.h
|
|
||||||
model/model.cpp model/model_p.h
|
|
||||||
model/modelmerger.cpp
|
|
||||||
model/modelnode.cpp
|
|
||||||
model/modelnodepositionrecalculator.cpp model/modelnodepositionrecalculator.h
|
|
||||||
model/modelnodepositionstorage.cpp
|
|
||||||
model/modeltotextmerger.cpp model/modeltotextmerger.h
|
|
||||||
model/nodeabstractproperty.cpp
|
|
||||||
model/nodelistproperty.cpp
|
|
||||||
model/nodeproperty.cpp
|
|
||||||
model/plaintexteditmodifier.cpp
|
|
||||||
model/propertycontainer.cpp
|
|
||||||
model/propertynode.cpp
|
|
||||||
model/propertyparser.cpp
|
|
||||||
model/qmlanchors.cpp
|
|
||||||
model/qmlchangeset.cpp
|
|
||||||
model/qmlitemnode.cpp
|
|
||||||
model/qmlvisualnode.cpp
|
|
||||||
model/qml3dnode.cpp
|
|
||||||
model/qmlmodelnodefacade.cpp
|
|
||||||
model/qmlobjectnode.cpp
|
|
||||||
model/qmlstate.cpp
|
|
||||||
model/qmlconnections.cpp
|
|
||||||
model/qmltextgenerator.cpp model/qmltextgenerator.h
|
|
||||||
model/qmltimeline.cpp
|
|
||||||
model/qmltimelinekeyframegroup.cpp
|
|
||||||
model/rewriteaction.cpp model/rewriteaction.h
|
|
||||||
model/rewriteactioncompressor.cpp model/rewriteactioncompressor.h
|
|
||||||
model/rewriterview.cpp
|
|
||||||
model/signalhandlerproperty.cpp
|
|
||||||
model/stylesheetmerger.cpp
|
|
||||||
model/textmodifier.cpp
|
|
||||||
model/texttomodelmerger.cpp model/texttomodelmerger.h
|
|
||||||
model/variantproperty.cpp
|
|
||||||
model/viewmanager.cpp
|
|
||||||
|
|
||||||
pluginmanager/widgetpluginmanager.cpp pluginmanager/widgetpluginmanager.h
|
|
||||||
pluginmanager/widgetpluginpath.cpp pluginmanager/widgetpluginpath.h
|
|
||||||
rewritertransaction.cpp rewritertransaction.h
|
|
||||||
|
|
||||||
imagecache/imagecachecollector.h
|
|
||||||
imagecache/imagecachecollector.cpp
|
|
||||||
imagecache/imagecachefontcollector.h
|
|
||||||
imagecache/imagecachefontcollector.cpp
|
|
||||||
imagecache/asynchronousimagecache.cpp
|
|
||||||
imagecache/synchronousimagecache.cpp
|
|
||||||
imagecache/imagecachecollectorinterface.h
|
|
||||||
imagecache/imagecacheconnectionmanager.cpp
|
|
||||||
imagecache/imagecacheconnectionmanager.h
|
|
||||||
imagecache/imagecachegenerator.cpp
|
|
||||||
imagecache/imagecachegenerator.h
|
|
||||||
imagecache/imagecachestorage.h
|
|
||||||
imagecache/imagecachegeneratorinterface.h
|
|
||||||
imagecache/imagecachestorageinterface.h
|
|
||||||
imagecache/timestampproviderinterface.h
|
|
||||||
imagecache/timestampprovider.h
|
|
||||||
imagecache/timestampprovider.cpp
|
|
||||||
)
|
)
|
||||||
|
|
||||||
extend_qtc_plugin(QmlDesigner
|
extend_qtc_plugin(QmlDesigner
|
||||||
|
417
src/plugins/qmldesigner/qmldesignercore.cmake
Normal file
417
src/plugins/qmldesigner/qmldesignercore.cmake
Normal file
@@ -0,0 +1,417 @@
|
|||||||
|
# shared with tests
|
||||||
|
|
||||||
|
if(CMAKE_VERSION VERSION_LESS 3.17.0)
|
||||||
|
set(CMAKE_CURRENT_FUNCTION_LIST_DIR ${CMAKE_CURRENT_LIST_DIR})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
function(extend_with_qmldesigner_core target_name)
|
||||||
|
if(NOT TARGET ${target_name})
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
extend_qtc_target(${target_name}
|
||||||
|
DEPENDS
|
||||||
|
Threads::Threads
|
||||||
|
Qt5::CorePrivate
|
||||||
|
CPlusPlus
|
||||||
|
Sqlite
|
||||||
|
Utils
|
||||||
|
Qt5::Widgets
|
||||||
|
Qt5::Qml
|
||||||
|
Core
|
||||||
|
ProjectExplorer
|
||||||
|
QmakeProjectManager
|
||||||
|
QmlJS
|
||||||
|
QmlJSEditor
|
||||||
|
QmlJSTools
|
||||||
|
QmlProjectManager
|
||||||
|
QtSupport
|
||||||
|
TextEditor
|
||||||
|
DEFINES
|
||||||
|
DESIGNER_CORE_LIBRARY
|
||||||
|
TEST_EXPORTS
|
||||||
|
INCLUDES
|
||||||
|
${CMAKE_CURRENT_FUNCTION_LIST_DIR}
|
||||||
|
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/components
|
||||||
|
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/components/componentcore
|
||||||
|
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/components/debugview
|
||||||
|
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/components/edit3d
|
||||||
|
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/components/formeditor
|
||||||
|
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/components/integration
|
||||||
|
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/components/itemlibrary
|
||||||
|
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/components/navigator
|
||||||
|
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/components/propertyeditor
|
||||||
|
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/components/stateseditor
|
||||||
|
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/components/texteditor
|
||||||
|
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/designercore
|
||||||
|
SOURCES_PREFIX ${CMAKE_CURRENT_FUNCTION_LIST_DIR}/designercore
|
||||||
|
SOURCES
|
||||||
|
rewritertransaction.cpp
|
||||||
|
rewritertransaction.h
|
||||||
|
)
|
||||||
|
|
||||||
|
extend_qtc_target(${target_name}
|
||||||
|
INCLUDES
|
||||||
|
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/designercore/exceptions
|
||||||
|
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/designercore/filemanager
|
||||||
|
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/designercore/imagecache
|
||||||
|
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/designercore/include
|
||||||
|
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/designercore/instances
|
||||||
|
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/designercore/metainfo
|
||||||
|
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/designercore/model
|
||||||
|
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/designercore/pluginmanager
|
||||||
|
SOURCES_PREFIX ${CMAKE_CURRENT_FUNCTION_LIST_DIR}/designercore
|
||||||
|
SOURCES
|
||||||
|
exceptions/exception.cpp
|
||||||
|
exceptions/invalidargumentexception.cpp
|
||||||
|
exceptions/invalididexception.cpp
|
||||||
|
exceptions/invalidmetainfoexception.cpp
|
||||||
|
exceptions/invalidmodelnodeexception.cpp
|
||||||
|
exceptions/invalidmodelstateexception.cpp
|
||||||
|
exceptions/invalidpropertyexception.cpp
|
||||||
|
exceptions/invalidqmlsourceexception.cpp
|
||||||
|
exceptions/invalidreparentingexception.cpp
|
||||||
|
exceptions/invalidslideindexexception.cpp
|
||||||
|
exceptions/notimplementedexception.cpp
|
||||||
|
exceptions/removebasestateexception.cpp
|
||||||
|
exceptions/rewritingexception.cpp
|
||||||
|
|
||||||
|
filemanager/addarraymembervisitor.cpp
|
||||||
|
filemanager/addarraymembervisitor.h
|
||||||
|
filemanager/addobjectvisitor.cpp
|
||||||
|
filemanager/addobjectvisitor.h
|
||||||
|
filemanager/addpropertyvisitor.cpp
|
||||||
|
filemanager/addpropertyvisitor.h
|
||||||
|
filemanager/astobjecttextextractor.cpp
|
||||||
|
filemanager/astobjecttextextractor.h
|
||||||
|
filemanager/changeimportsvisitor.cpp
|
||||||
|
filemanager/changeimportsvisitor.h
|
||||||
|
filemanager/changeobjecttypevisitor.cpp
|
||||||
|
filemanager/changeobjecttypevisitor.h
|
||||||
|
filemanager/changepropertyvisitor.cpp
|
||||||
|
filemanager/changepropertyvisitor.h
|
||||||
|
filemanager/firstdefinitionfinder.cpp
|
||||||
|
filemanager/firstdefinitionfinder.h
|
||||||
|
filemanager/moveobjectbeforeobjectvisitor.cpp
|
||||||
|
filemanager/moveobjectbeforeobjectvisitor.h
|
||||||
|
filemanager/moveobjectvisitor.cpp
|
||||||
|
filemanager/moveobjectvisitor.h
|
||||||
|
filemanager/objectlengthcalculator.cpp
|
||||||
|
filemanager/objectlengthcalculator.h
|
||||||
|
filemanager/qmlrefactoring.cpp
|
||||||
|
filemanager/qmlrefactoring.h
|
||||||
|
filemanager/qmlrewriter.cpp
|
||||||
|
filemanager/qmlrewriter.h
|
||||||
|
filemanager/removepropertyvisitor.cpp
|
||||||
|
filemanager/removepropertyvisitor.h
|
||||||
|
filemanager/removeuiobjectmembervisitor.cpp
|
||||||
|
filemanager/removeuiobjectmembervisitor.h
|
||||||
|
|
||||||
|
imagecache/asynchronousimagecache.cpp
|
||||||
|
imagecache/imagecachecollector.cpp
|
||||||
|
imagecache/imagecachecollector.h
|
||||||
|
imagecache/imagecachecollectorinterface.h
|
||||||
|
imagecache/imagecacheconnectionmanager.cpp
|
||||||
|
imagecache/imagecacheconnectionmanager.h
|
||||||
|
imagecache/imagecachefontcollector.cpp
|
||||||
|
imagecache/imagecachefontcollector.h
|
||||||
|
imagecache/imagecachegenerator.cpp
|
||||||
|
imagecache/imagecachegenerator.h
|
||||||
|
imagecache/imagecachegeneratorinterface.h
|
||||||
|
imagecache/imagecachestorage.h
|
||||||
|
imagecache/imagecachestorageinterface.h
|
||||||
|
imagecache/synchronousimagecache.cpp
|
||||||
|
imagecache/timestampprovider.cpp
|
||||||
|
imagecache/timestampprovider.h
|
||||||
|
imagecache/timestampproviderinterface.h
|
||||||
|
|
||||||
|
include/abstractproperty.h
|
||||||
|
include/abstractview.h
|
||||||
|
include/anchorline.h
|
||||||
|
include/annotation.h
|
||||||
|
include/asynchronousimagecache.h
|
||||||
|
include/basetexteditmodifier.h
|
||||||
|
include/bindingproperty.h
|
||||||
|
include/componenttextmodifier.h
|
||||||
|
include/customnotifications.h
|
||||||
|
include/documentmessage.h
|
||||||
|
include/exception.h
|
||||||
|
include/forwardview.h
|
||||||
|
include/imagecacheauxiliarydata.h
|
||||||
|
include/import.h
|
||||||
|
include/invalidargumentexception.h
|
||||||
|
include/invalididexception.h
|
||||||
|
include/invalidmetainfoexception.h
|
||||||
|
include/invalidmodelnodeexception.h
|
||||||
|
include/invalidmodelstateexception.h
|
||||||
|
include/invalidpropertyexception.h
|
||||||
|
include/invalidqmlsourceexception.h
|
||||||
|
include/invalidreparentingexception.h
|
||||||
|
include/invalidslideindexexception.h
|
||||||
|
include/itemlibraryinfo.h
|
||||||
|
include/mathutils.h
|
||||||
|
include/metainfo.h
|
||||||
|
include/metainforeader.h
|
||||||
|
include/model.h
|
||||||
|
include/modelmerger.h
|
||||||
|
include/modelnode.h
|
||||||
|
include/modelnodepositionstorage.h
|
||||||
|
include/nodeabstractproperty.h
|
||||||
|
include/nodehints.h
|
||||||
|
include/nodeinstance.h
|
||||||
|
include/nodeinstanceview.h
|
||||||
|
include/nodelistproperty.h
|
||||||
|
include/nodemetainfo.h
|
||||||
|
include/nodeproperty.h
|
||||||
|
include/notimplementedexception.h
|
||||||
|
include/plaintexteditmodifier.h
|
||||||
|
include/propertycontainer.h
|
||||||
|
include/propertynode.h
|
||||||
|
include/propertyparser.h
|
||||||
|
include/qmlanchors.h
|
||||||
|
include/qmlchangeset.h
|
||||||
|
include/qmlconnections.h
|
||||||
|
include/qmldesignercorelib_global.h
|
||||||
|
include/qmlitemnode.h
|
||||||
|
include/qmlmodelnodefacade.h
|
||||||
|
include/qmlobjectnode.h
|
||||||
|
include/qmlstate.h
|
||||||
|
include/qmltimeline.h
|
||||||
|
include/qmltimelinekeyframegroup.h
|
||||||
|
include/removebasestateexception.h
|
||||||
|
include/rewriterview.h
|
||||||
|
include/rewritingexception.h
|
||||||
|
include/signalhandlerproperty.h
|
||||||
|
include/stylesheetmerger.h
|
||||||
|
include/subcomponentmanager.h
|
||||||
|
include/synchronousimagecache.h
|
||||||
|
include/textmodifier.h
|
||||||
|
include/variantproperty.h
|
||||||
|
include/viewmanager.h
|
||||||
|
|
||||||
|
instances/baseconnectionmanager.cpp
|
||||||
|
instances/baseconnectionmanager.h
|
||||||
|
instances/connectionmanager.cpp
|
||||||
|
instances/connectionmanager.h
|
||||||
|
instances/connectionmanagerinterface.cpp
|
||||||
|
instances/connectionmanagerinterface.h
|
||||||
|
instances/nodeinstance.cpp
|
||||||
|
instances/nodeinstanceserverproxy.cpp
|
||||||
|
instances/nodeinstanceserverproxy.h
|
||||||
|
instances/nodeinstanceview.cpp
|
||||||
|
instances/puppetbuildprogressdialog.cpp
|
||||||
|
instances/puppetbuildprogressdialog.h
|
||||||
|
instances/puppetbuildprogressdialog.ui
|
||||||
|
instances/puppetcreator.cpp
|
||||||
|
instances/puppetcreator.h
|
||||||
|
instances/puppetdialog.cpp
|
||||||
|
instances/puppetdialog.h
|
||||||
|
instances/puppetdialog.ui
|
||||||
|
instances/qprocessuniqueptr.h
|
||||||
|
|
||||||
|
metainfo/itemlibraryinfo.cpp
|
||||||
|
metainfo/metainfo.cpp
|
||||||
|
metainfo/metainforeader.cpp
|
||||||
|
metainfo/nodehints.cpp
|
||||||
|
metainfo/nodemetainfo.cpp
|
||||||
|
metainfo/subcomponentmanager.cpp
|
||||||
|
|
||||||
|
model/abstractproperty.cpp
|
||||||
|
model/abstractview.cpp
|
||||||
|
model/anchorline.cpp
|
||||||
|
model/annotation.cpp
|
||||||
|
model/bindingproperty.cpp
|
||||||
|
model/componenttextmodifier.cpp
|
||||||
|
model/documentmessage.cpp
|
||||||
|
model/import.cpp
|
||||||
|
model/internalbindingproperty.cpp
|
||||||
|
model/internalbindingproperty.h
|
||||||
|
model/internalnode.cpp
|
||||||
|
model/internalnode_p.h
|
||||||
|
model/internalnodeabstractproperty.cpp
|
||||||
|
model/internalnodeabstractproperty.h
|
||||||
|
model/internalnodelistproperty.cpp
|
||||||
|
model/internalnodelistproperty.h
|
||||||
|
model/internalnodeproperty.cpp
|
||||||
|
model/internalnodeproperty.h
|
||||||
|
model/internalproperty.cpp
|
||||||
|
model/internalproperty.h
|
||||||
|
model/internalsignalhandlerproperty.cpp
|
||||||
|
model/internalsignalhandlerproperty.h
|
||||||
|
model/internalvariantproperty.cpp
|
||||||
|
model/internalvariantproperty.h
|
||||||
|
model/model.cpp
|
||||||
|
model/model_p.h
|
||||||
|
model/modelmerger.cpp
|
||||||
|
model/modelnode.cpp
|
||||||
|
model/modelnodepositionrecalculator.cpp
|
||||||
|
model/modelnodepositionrecalculator.h
|
||||||
|
model/modelnodepositionstorage.cpp
|
||||||
|
model/modeltotextmerger.cpp
|
||||||
|
model/modeltotextmerger.h
|
||||||
|
model/nodeabstractproperty.cpp
|
||||||
|
model/nodelistproperty.cpp
|
||||||
|
model/nodeproperty.cpp
|
||||||
|
model/plaintexteditmodifier.cpp
|
||||||
|
model/propertycontainer.cpp
|
||||||
|
model/propertynode.cpp
|
||||||
|
model/propertyparser.cpp
|
||||||
|
model/qml3dnode.cpp
|
||||||
|
model/qmlanchors.cpp
|
||||||
|
model/qmlchangeset.cpp
|
||||||
|
model/qmlconnections.cpp
|
||||||
|
model/qmlitemnode.cpp
|
||||||
|
model/qmlmodelnodefacade.cpp
|
||||||
|
model/qmlobjectnode.cpp
|
||||||
|
model/qmlstate.cpp
|
||||||
|
model/qmltextgenerator.cpp
|
||||||
|
model/qmltextgenerator.h
|
||||||
|
model/qmltimeline.cpp
|
||||||
|
model/qmltimelinekeyframegroup.cpp
|
||||||
|
model/qmlvisualnode.cpp
|
||||||
|
model/rewriteaction.cpp
|
||||||
|
model/rewriteaction.h
|
||||||
|
model/rewriteactioncompressor.cpp
|
||||||
|
model/rewriteactioncompressor.h
|
||||||
|
model/rewriterview.cpp
|
||||||
|
model/signalhandlerproperty.cpp
|
||||||
|
model/stylesheetmerger.cpp
|
||||||
|
model/textmodifier.cpp
|
||||||
|
model/texttomodelmerger.cpp
|
||||||
|
model/texttomodelmerger.h
|
||||||
|
model/variantproperty.cpp
|
||||||
|
model/viewmanager.cpp
|
||||||
|
|
||||||
|
pluginmanager/widgetpluginmanager.cpp
|
||||||
|
pluginmanager/widgetpluginmanager.h
|
||||||
|
pluginmanager/widgetpluginpath.cpp
|
||||||
|
pluginmanager/widgetpluginpath.h
|
||||||
|
)
|
||||||
|
|
||||||
|
extend_qtc_target(${target_name}
|
||||||
|
SOURCES_PREFIX ${CMAKE_CURRENT_FUNCTION_LIST_DIR}/../../../share/qtcreator/qml/qmlpuppet
|
||||||
|
INCLUDES
|
||||||
|
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/../../../share/qtcreator/qml/qmlpuppet/commands
|
||||||
|
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/../../../share/qtcreator/qml/qmlpuppet/container
|
||||||
|
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/../../../share/qtcreator/qml/qmlpuppet/interfaces
|
||||||
|
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/../../../share/qtcreator/qml/qmlpuppet/types
|
||||||
|
SOURCES
|
||||||
|
commands/captureddatacommand.h
|
||||||
|
commands/changeauxiliarycommand.cpp
|
||||||
|
commands/changeauxiliarycommand.h
|
||||||
|
commands/changebindingscommand.cpp
|
||||||
|
commands/changebindingscommand.h
|
||||||
|
commands/changefileurlcommand.cpp
|
||||||
|
commands/changefileurlcommand.h
|
||||||
|
commands/changeidscommand.cpp
|
||||||
|
commands/changeidscommand.h
|
||||||
|
commands/changelanguagecommand.cpp
|
||||||
|
commands/changelanguagecommand.h
|
||||||
|
commands/changenodesourcecommand.cpp
|
||||||
|
commands/changenodesourcecommand.h
|
||||||
|
commands/changepreviewimagesizecommand.cpp
|
||||||
|
commands/changepreviewimagesizecommand.h
|
||||||
|
commands/changeselectioncommand.cpp
|
||||||
|
commands/changeselectioncommand.h
|
||||||
|
commands/changestatecommand.cpp
|
||||||
|
commands/changestatecommand.h
|
||||||
|
commands/changevaluescommand.cpp
|
||||||
|
commands/changevaluescommand.h
|
||||||
|
commands/childrenchangedcommand.cpp
|
||||||
|
commands/childrenchangedcommand.h
|
||||||
|
commands/clearscenecommand.cpp
|
||||||
|
commands/clearscenecommand.h
|
||||||
|
commands/completecomponentcommand.cpp
|
||||||
|
commands/completecomponentcommand.h
|
||||||
|
commands/componentcompletedcommand.cpp
|
||||||
|
commands/componentcompletedcommand.h
|
||||||
|
commands/createinstancescommand.cpp
|
||||||
|
commands/createinstancescommand.h
|
||||||
|
commands/createscenecommand.cpp
|
||||||
|
commands/createscenecommand.h
|
||||||
|
commands/debugoutputcommand.cpp
|
||||||
|
commands/debugoutputcommand.h
|
||||||
|
commands/endpuppetcommand.cpp
|
||||||
|
commands/endpuppetcommand.h
|
||||||
|
commands/informationchangedcommand.cpp
|
||||||
|
commands/informationchangedcommand.h
|
||||||
|
commands/inputeventcommand.cpp
|
||||||
|
commands/inputeventcommand.h
|
||||||
|
commands/pixmapchangedcommand.cpp
|
||||||
|
commands/pixmapchangedcommand.h
|
||||||
|
commands/puppetalivecommand.cpp
|
||||||
|
commands/puppetalivecommand.h
|
||||||
|
commands/puppettocreatorcommand.cpp
|
||||||
|
commands/puppettocreatorcommand.h
|
||||||
|
commands/removeinstancescommand.cpp
|
||||||
|
commands/removeinstancescommand.h
|
||||||
|
commands/removepropertiescommand.cpp
|
||||||
|
commands/removepropertiescommand.h
|
||||||
|
commands/removesharedmemorycommand.cpp
|
||||||
|
commands/removesharedmemorycommand.h
|
||||||
|
commands/reparentinstancescommand.cpp
|
||||||
|
commands/reparentinstancescommand.h
|
||||||
|
commands/requestmodelnodepreviewimagecommand.cpp
|
||||||
|
commands/requestmodelnodepreviewimagecommand.h
|
||||||
|
commands/scenecreatedcommand.h
|
||||||
|
commands/statepreviewimagechangedcommand.cpp
|
||||||
|
commands/statepreviewimagechangedcommand.h
|
||||||
|
commands/synchronizecommand.cpp
|
||||||
|
commands/synchronizecommand.h
|
||||||
|
commands/tokencommand.cpp
|
||||||
|
commands/tokencommand.h
|
||||||
|
commands/update3dviewstatecommand.cpp
|
||||||
|
commands/update3dviewstatecommand.h
|
||||||
|
commands/valueschangedcommand.cpp
|
||||||
|
commands/valueschangedcommand.h
|
||||||
|
commands/view3dactioncommand.cpp
|
||||||
|
commands/view3dactioncommand.h
|
||||||
|
|
||||||
|
container/addimportcontainer.cpp
|
||||||
|
container/addimportcontainer.h
|
||||||
|
container/idcontainer.cpp
|
||||||
|
container/idcontainer.h
|
||||||
|
container/imagecontainer.cpp
|
||||||
|
container/imagecontainer.h
|
||||||
|
container/informationcontainer.cpp
|
||||||
|
container/informationcontainer.h
|
||||||
|
container/instancecontainer.cpp
|
||||||
|
container/instancecontainer.h
|
||||||
|
container/mockuptypecontainer.cpp
|
||||||
|
container/mockuptypecontainer.h
|
||||||
|
container/propertyabstractcontainer.cpp
|
||||||
|
container/propertyabstractcontainer.h
|
||||||
|
container/propertybindingcontainer.cpp
|
||||||
|
container/propertybindingcontainer.h
|
||||||
|
container/propertyvaluecontainer.cpp
|
||||||
|
container/propertyvaluecontainer.h
|
||||||
|
container/reparentcontainer.cpp
|
||||||
|
container/reparentcontainer.h
|
||||||
|
container/sharedmemory.h
|
||||||
|
|
||||||
|
interfaces/commondefines.h
|
||||||
|
interfaces/nodeinstanceclientinterface.h
|
||||||
|
interfaces/nodeinstanceglobal.h
|
||||||
|
interfaces/nodeinstanceserverinterface.cpp
|
||||||
|
interfaces/nodeinstanceserverinterface.h
|
||||||
|
|
||||||
|
types/enumeration.h
|
||||||
|
)
|
||||||
|
|
||||||
|
extend_qtc_target(${target_name}
|
||||||
|
CONDITION UNIX
|
||||||
|
SOURCES_PREFIX ${CMAKE_CURRENT_FUNCTION_LIST_DIR}/../../../share/qtcreator/qml/qmlpuppet/container
|
||||||
|
SOURCES sharedmemory_unix.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
extend_qtc_target(${target_name}
|
||||||
|
CONDITION UNIX AND NOT APPLE
|
||||||
|
DEPENDS rt
|
||||||
|
)
|
||||||
|
|
||||||
|
extend_qtc_target(${target_name}
|
||||||
|
CONDITION NOT UNIX
|
||||||
|
SOURCES_PREFIX ${CMAKE_CURRENT_FUNCTION_LIST_DIR}/../../../share/qtcreator/qml/qmlpuppet/container
|
||||||
|
SOURCES sharedmemory_qt.cpp
|
||||||
|
)
|
||||||
|
endfunction()
|
@@ -1,21 +1,21 @@
|
|||||||
# TODO: fix compiler errors
|
|
||||||
return()
|
|
||||||
|
|
||||||
add_qtc_test(tst_qml_testcore
|
add_qtc_test(tst_qml_testcore
|
||||||
DEPENDS QmlJS Utils QmlEditorWidgets CPlusPlus Core QmlJSEditor
|
|
||||||
INCLUDES
|
|
||||||
"${PROJECT_SOURCE_DIR}/src/plugins/qmldesigner/designercore/include"
|
|
||||||
"${PROJECT_SOURCE_DIR}/src/plugins/qmldesigner/designercore"
|
|
||||||
"${PROJECT_SOURCE_DIR}/share/qtcreator/qml/qmlpuppet/interfaces"
|
|
||||||
"${PROJECT_SOURCE_DIR}/share/qtcreator/qml/qmlpuppet/types"
|
|
||||||
DEFINES
|
DEFINES
|
||||||
QT_CREATOR
|
QT_CREATOR
|
||||||
QTCREATORDIR="${PROJECT_SOURCE_DIR}"
|
QMLDESIGNER_TEST
|
||||||
|
IDE_PLUGIN_PATH="${PROJECT_BINARY_DIR}/${IDE_PLUGIN_PATH}"
|
||||||
|
IDE_DATA_PATH="${PROJECT_BINARY_DIR}/${IDE_DATA_PATH}"
|
||||||
TESTSRCDIR="${CMAKE_CURRENT_SOURCE_DIR}"
|
TESTSRCDIR="${CMAKE_CURRENT_SOURCE_DIR}"
|
||||||
SOURCES
|
SOURCES
|
||||||
../data/testfiles.qrc
|
../data/testfiles.qrc
|
||||||
../testview.cpp ../testview.h
|
../testview.cpp
|
||||||
testrewriterview.cpp testrewriterview.h
|
../testview.h
|
||||||
tst_testcore.cpp tst_testcore.h
|
testrewriterview.cpp
|
||||||
../testconnectionmanager.cpp ../testconnectionmanager.h
|
testrewriterview.h
|
||||||
|
tst_testcore.cpp
|
||||||
|
tst_testcore.h
|
||||||
|
../testconnectionmanager.cpp
|
||||||
|
../testconnectionmanager.h
|
||||||
)
|
)
|
||||||
|
|
||||||
|
include(../../../../../src/plugins/qmldesigner/qmldesignercore.cmake)
|
||||||
|
extend_with_qmldesigner_core(tst_qml_testcore)
|
||||||
|
@@ -31,8 +31,9 @@ greaterThan(QT_MAJOR_VERSION, 4) {
|
|||||||
|
|
||||||
unix:!openbsd:!osx: LIBS += -lrt # posix shared memory
|
unix:!openbsd:!osx: LIBS += -lrt # posix shared memory
|
||||||
|
|
||||||
DEFINES+=QTCREATORDIR=\\\"$$IDE_BUILD_TREE\\\"
|
DEFINES+=IDE_PLUGIN_PATH=$$system_quote(\"$$IDE_PLUGIN_PATH\")
|
||||||
DEFINES+=TESTSRCDIR=\\\"$$_PRO_FILE_PWD_\\\"
|
DEFINES+=IDE_DATA_PATH=$$system_quote(\"$$IDE_DATA_PATH\")
|
||||||
|
DEFINES+=TESTSRCDIR=$$system_quote(\"$$_PRO_FILE_PWD_\")
|
||||||
|
|
||||||
DEFINES += QTCREATOR_TEST
|
DEFINES += QTCREATOR_TEST
|
||||||
DEFINES += QMLDESIGNER_TEST
|
DEFINES += QMLDESIGNER_TEST
|
||||||
|
@@ -76,12 +76,6 @@ using namespace QmlDesigner;
|
|||||||
#include <qmljstools/qmljsmodelmanager.h>
|
#include <qmljstools/qmljsmodelmanager.h>
|
||||||
#include <qmljs/qmljsinterpreter.h>
|
#include <qmljs/qmljsinterpreter.h>
|
||||||
|
|
||||||
#ifdef Q_OS_MAC
|
|
||||||
# define SHARE_PATH "/Resources"
|
|
||||||
#else
|
|
||||||
# define SHARE_PATH "/share/qtcreator"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
//Allow comparison of QByteArray and QString. We always assume utf8 as the encoding.
|
//Allow comparison of QByteArray and QString. We always assume utf8 as the encoding.
|
||||||
@@ -114,11 +108,6 @@ static QString stripWhiteSpaces(const QString &str)
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString resourcePath()
|
|
||||||
{
|
|
||||||
return QDir::cleanPath(QTCREATORDIR + QLatin1String(SHARE_PATH));
|
|
||||||
}
|
|
||||||
|
|
||||||
class TestModelManager : public QmlJSTools::Internal::ModelManager
|
class TestModelManager : public QmlJSTools::Internal::ModelManager
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@@ -191,7 +180,7 @@ void tst_TestCore::initTestCase()
|
|||||||
if (!QmlJS::ModelManagerInterface::instance())
|
if (!QmlJS::ModelManagerInterface::instance())
|
||||||
new TestModelManager;
|
new TestModelManager;
|
||||||
|
|
||||||
initializeMetaTypeSystem(QLatin1String(QTCREATORDIR "/share/qtcreator"));
|
initializeMetaTypeSystem(IDE_DATA_PATH);
|
||||||
|
|
||||||
QStringList basePaths;
|
QStringList basePaths;
|
||||||
basePaths.append(QLibraryInfo::location(QLibraryInfo::Qml2ImportsPath));
|
basePaths.append(QLibraryInfo::location(QLibraryInfo::Qml2ImportsPath));
|
||||||
@@ -206,16 +195,16 @@ void tst_TestCore::initTestCase()
|
|||||||
// Load plugins
|
// Load plugins
|
||||||
|
|
||||||
#ifdef Q_OS_MAC
|
#ifdef Q_OS_MAC
|
||||||
const QString pluginPath = QTCREATORDIR "/bin/Qt Creator.app/Contents/PlugIns/QmlDesigner";
|
const QString pluginPath = IDE_PLUGIN_PATH "/QmlDesigner";
|
||||||
#else
|
#else
|
||||||
const QString pluginPath = QTCREATORDIR "/lib/qtcreator/plugins/qmldesigner";
|
const QString pluginPath = IDE_PLUGIN_PATH "/qmldesigner";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
qDebug() << pluginPath;
|
qDebug() << pluginPath;
|
||||||
Q_ASSERT(QFileInfo::exists(pluginPath));
|
Q_ASSERT(QFileInfo::exists(pluginPath));
|
||||||
MetaInfo::setPluginPaths(QStringList() << pluginPath);
|
MetaInfo::setPluginPaths(QStringList() << pluginPath);
|
||||||
|
|
||||||
QFileInfo builtins(resourcePath() + "/qml-type-descriptions/builtins.qmltypes");
|
QFileInfo builtins(IDE_DATA_PATH "/qml-type-descriptions/builtins.qmltypes");
|
||||||
QStringList errors, warnings;
|
QStringList errors, warnings;
|
||||||
QmlJS::CppQmlTypesLoader::defaultQtObjects = QmlJS::CppQmlTypesLoader::loadQmlTypes(QFileInfoList{builtins}, &errors, &warnings);
|
QmlJS::CppQmlTypesLoader::defaultQtObjects = QmlJS::CppQmlTypesLoader::loadQmlTypes(QFileInfoList{builtins}, &errors, &warnings);
|
||||||
}
|
}
|
||||||
@@ -1281,7 +1270,7 @@ void tst_TestCore::testModelCreateSubNode()
|
|||||||
model->attachView(view.data());
|
model->attachView(view.data());
|
||||||
|
|
||||||
QList<TestView::MethodCall> expectedCalls;
|
QList<TestView::MethodCall> expectedCalls;
|
||||||
expectedCalls << TestView::MethodCall("modelAttached", QStringList() << QString::number(reinterpret_cast<long>(model.data())));
|
expectedCalls << TestView::MethodCall("modelAttached", QStringList() << QString::number(reinterpret_cast<qint64>(model.data())));
|
||||||
QCOMPARE(view->methodCalls(), expectedCalls);
|
QCOMPARE(view->methodCalls(), expectedCalls);
|
||||||
|
|
||||||
QVERIFY(view->rootModelNode().isValid());
|
QVERIFY(view->rootModelNode().isValid());
|
||||||
@@ -2557,7 +2546,7 @@ void tst_TestCore::testModelViewNotification()
|
|||||||
QCOMPARE(view2->methodCalls().at(0).name,QString("modelAttached"));
|
QCOMPARE(view2->methodCalls().at(0).name,QString("modelAttached"));
|
||||||
|
|
||||||
QList<TestView::MethodCall> expectedCalls;
|
QList<TestView::MethodCall> expectedCalls;
|
||||||
expectedCalls << TestView::MethodCall("modelAttached", QStringList() << QString::number(reinterpret_cast<long>(model.data())));
|
expectedCalls << TestView::MethodCall("modelAttached", QStringList() << QString::number(reinterpret_cast<qint64>(model.data())));
|
||||||
QCOMPARE(view1->methodCalls(), expectedCalls);
|
QCOMPARE(view1->methodCalls(), expectedCalls);
|
||||||
QCOMPARE(view2->methodCalls(), expectedCalls);
|
QCOMPARE(view2->methodCalls(), expectedCalls);
|
||||||
|
|
||||||
@@ -2609,7 +2598,7 @@ void tst_TestCore::testModelViewNotification()
|
|||||||
QCOMPARE(view2->methodCalls(), expectedCalls);
|
QCOMPARE(view2->methodCalls(), expectedCalls);
|
||||||
|
|
||||||
model->detachView(view1.data());
|
model->detachView(view1.data());
|
||||||
expectedCalls << TestView::MethodCall("modelAboutToBeDetached", QStringList() << QString::number(reinterpret_cast<long>(model.data())));
|
expectedCalls << TestView::MethodCall("modelAboutToBeDetached", QStringList() << QString::number(reinterpret_cast<qint64>(model.data())));
|
||||||
QCOMPARE(view1->methodCalls(), expectedCalls);
|
QCOMPARE(view1->methodCalls(), expectedCalls);
|
||||||
|
|
||||||
QApplication::processEvents();
|
QApplication::processEvents();
|
||||||
|
@@ -51,13 +51,13 @@ TestView::TestView(QmlDesigner::Model *model)
|
|||||||
void TestView::modelAttached(QmlDesigner::Model *model)
|
void TestView::modelAttached(QmlDesigner::Model *model)
|
||||||
{
|
{
|
||||||
QmlDesigner::AbstractView::modelAttached(model);
|
QmlDesigner::AbstractView::modelAttached(model);
|
||||||
m_methodCalls += MethodCall("modelAttached", QStringList() << QString::number(reinterpret_cast<long>(model)));
|
m_methodCalls += MethodCall("modelAttached", QStringList() << QString::number(reinterpret_cast<qint64>(model)));
|
||||||
}
|
}
|
||||||
|
|
||||||
void TestView::modelAboutToBeDetached(QmlDesigner::Model *model)
|
void TestView::modelAboutToBeDetached(QmlDesigner::Model *model)
|
||||||
{
|
{
|
||||||
QmlDesigner::AbstractView::modelAboutToBeDetached(model);
|
QmlDesigner::AbstractView::modelAboutToBeDetached(model);
|
||||||
m_methodCalls += MethodCall("modelAboutToBeDetached", QStringList() << QString::number(reinterpret_cast<long>(model)));
|
m_methodCalls += MethodCall("modelAboutToBeDetached", QStringList() << QString::number(reinterpret_cast<qint64>(model)));
|
||||||
}
|
}
|
||||||
|
|
||||||
void TestView::nodeIdChanged(const QmlDesigner::ModelNode &node, const QString& newId, const QString &oldId)
|
void TestView::nodeIdChanged(const QmlDesigner::ModelNode &node, const QString& newId, const QString &oldId)
|
||||||
|
Reference in New Issue
Block a user