diff options
author | Tim Jenssen <tim.jenssen@theqtcompany.com> | 2016-04-05 15:55:35 +0200 |
---|---|---|
committer | Tim Jenssen <tim.jenssen@theqtcompany.com> | 2016-04-06 10:04:55 +0000 |
commit | 1553eb04b4391edde4262e345b0fe21234ca861a (patch) | |
tree | ebd95738ee82892759257e8ba15c398b29ed6d49 /src/plugins | |
parent | cc1c2b790160a78c5956930bcfc80da7356977f4 (diff) | |
download | qt-creator-1553eb04b4391edde4262e345b0fe21234ca861a.tar.gz |
QmlDesigner: use default values at isSubclassOf
Change-Id: Ia31d698635a9b29a023f4d919f3741ac912923b7
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
Diffstat (limited to 'src/plugins')
20 files changed, 45 insertions, 45 deletions
diff --git a/src/plugins/qmldesigner/components/componentcore/designeractionmanager.cpp b/src/plugins/qmldesigner/components/componentcore/designeractionmanager.cpp index 6a18b55fdb..b419d7fc2e 100644 --- a/src/plugins/qmldesigner/components/componentcore/designeractionmanager.cpp +++ b/src/plugins/qmldesigner/components/componentcore/designeractionmanager.cpp @@ -300,7 +300,7 @@ bool singleSelectionAndInQtQuickLayout(const SelectionContext &context) if (!metaInfo.isValid()) return false; - return metaInfo.isSubclassOf("QtQuick.Layouts.Layout", -1, -1); + return metaInfo.isSubclassOf("QtQuick.Layouts.Layout"); } bool isLayout(const SelectionContext &context) @@ -321,7 +321,7 @@ bool isLayout(const SelectionContext &context) if (!metaInfo.isValid()) return false; - return metaInfo.isSubclassOf("QtQuick.Layouts.Layout", -1, -1); + return metaInfo.isSubclassOf("QtQuick.Layouts.Layout"); } bool isPositioner(const SelectionContext &context) @@ -342,8 +342,8 @@ bool isPositioner(const SelectionContext &context) if (!metaInfo.isValid()) return false; - return metaInfo.isSubclassOf("<cpp>.QDeclarativeBasePositioner", -1, -1) - || metaInfo.isSubclassOf("QtQuick.Positioner", -1, -1); + return metaInfo.isSubclassOf("<cpp>.QDeclarativeBasePositioner") + || metaInfo.isSubclassOf("QtQuick.Positioner"); } bool layoutOptionVisible(const SelectionContext &context) diff --git a/src/plugins/qmldesigner/components/formeditor/contentnoteditableindicator.cpp b/src/plugins/qmldesigner/components/formeditor/contentnoteditableindicator.cpp index fc84448788..d2bb2e02b0 100644 --- a/src/plugins/qmldesigner/components/formeditor/contentnoteditableindicator.cpp +++ b/src/plugins/qmldesigner/components/formeditor/contentnoteditableindicator.cpp @@ -88,7 +88,7 @@ void ContentNotEditableIndicator::updateItems(const QList<FormEditorItem *> &ite void ContentNotEditableIndicator::addAddiationEntries(const QList<FormEditorItem *> &itemList) { foreach (FormEditorItem *formEditorItem, itemList) { - if (formEditorItem->qmlItemNode().modelNode().metaInfo().isSubclassOf("QtQuick.Loader", -1, -1)) { + if (formEditorItem->qmlItemNode().modelNode().metaInfo().isSubclassOf("QtQuick.Loader")) { if (!m_entryList.contains(EntryPair(formEditorItem, 0))) { QGraphicsRectItem *indicatorShape = new QGraphicsRectItem(m_layerItem); diff --git a/src/plugins/qmldesigner/components/itemlibrary/itemlibrarymodel.cpp b/src/plugins/qmldesigner/components/itemlibrary/itemlibrarymodel.cpp index d2472826ac..3080c9befe 100644 --- a/src/plugins/qmldesigner/components/itemlibrary/itemlibrarymodel.cpp +++ b/src/plugins/qmldesigner/components/itemlibrary/itemlibrarymodel.cpp @@ -148,7 +148,7 @@ void ItemLibraryModel::update(ItemLibraryInfo *itemLibraryInfo, Model *model) foreach (ItemLibraryEntry entry, itemLibraryInfo->entries()) { - NodeMetaInfo metaInfo = model->metaInfo(entry.typeName(), -1, -1); + NodeMetaInfo metaInfo = model->metaInfo(entry.typeName()); bool valid = metaInfo.isValid() && metaInfo.majorVersion() == entry.majorVersion(); if (valid diff --git a/src/plugins/qmldesigner/components/navigator/navigatortreemodel.cpp b/src/plugins/qmldesigner/components/navigator/navigatortreemodel.cpp index 3446eeed82..1d291775ef 100644 --- a/src/plugins/qmldesigner/components/navigator/navigatortreemodel.cpp +++ b/src/plugins/qmldesigner/components/navigator/navigatortreemodel.cpp @@ -693,7 +693,7 @@ void NavigatorTreeModel::moveNodesInteractive(NodeAbstractProperty &parentProper if (modelNode.isValid() && modelNode != parentProperty.parentModelNode() && !modelNode.isAncestorOf(parentProperty.parentModelNode()) - && (modelNode.metaInfo().isSubclassOf(propertyQmlType, -1, -1) || propertyQmlType == "alias")) { + && (modelNode.metaInfo().isSubclassOf(propertyQmlType) || propertyQmlType == "alias")) { //### todo: allowing alias is just a heuristic //once the MetaInfo is part of instances we can do this right diff --git a/src/plugins/qmldesigner/components/stateseditor/stateseditorview.cpp b/src/plugins/qmldesigner/components/stateseditor/stateseditorview.cpp index 46fd80e40c..493fbf3bd7 100644 --- a/src/plugins/qmldesigner/components/stateseditor/stateseditorview.cpp +++ b/src/plugins/qmldesigner/components/stateseditor/stateseditorview.cpp @@ -77,7 +77,7 @@ void StatesEditorView::removeState(int nodeId) try { if (nodeId > 0 && hasModelNodeForInternalId(nodeId)) { ModelNode stateNode(modelNodeForInternalId(nodeId)); - Q_ASSERT(stateNode.metaInfo().isSubclassOf("QtQuick.State", -1, -1)); + Q_ASSERT(stateNode.metaInfo().isSubclassOf("QtQuick.State")); NodeListProperty parentProperty = stateNode.parentProperty().toNodeListProperty(); if (parentProperty.count() <= 1) { @@ -188,7 +188,7 @@ void StatesEditorView::duplicateCurrentState() void StatesEditorView::checkForWindow() { if (m_statesEditorWidget) - m_statesEditorWidget->showAddNewStatesButton(!rootModelNode().metaInfo().isSubclassOf("QtQuick.Window.Window", -1, -1)); + m_statesEditorWidget->showAddNewStatesButton(!rootModelNode().metaInfo().isSubclassOf("QtQuick.Window.Window")); } void StatesEditorView::setCurrentState(const QmlModelState &state) diff --git a/src/plugins/qmldesigner/componentsplugin/addtabdesigneraction.cpp b/src/plugins/qmldesigner/componentsplugin/addtabdesigneraction.cpp index 15310e221f..43b9230b1e 100644 --- a/src/plugins/qmldesigner/componentsplugin/addtabdesigneraction.cpp +++ b/src/plugins/qmldesigner/componentsplugin/addtabdesigneraction.cpp @@ -44,14 +44,14 @@ namespace QmlDesigner { bool isTabView(const ModelNode &modelNode) { - return modelNode.metaInfo().isSubclassOf("QtQuick.Controls.TabView", -1, -1); + return modelNode.metaInfo().isSubclassOf("QtQuick.Controls.TabView"); } bool isTabAndParentIsTabView(const ModelNode &modelNode) { - return modelNode.metaInfo().isSubclassOf("QtQuick.Controls.Tab", -1, -1) + return modelNode.metaInfo().isSubclassOf("QtQuick.Controls.Tab") && modelNode.hasParentProperty() - && modelNode.parentProperty().parentModelNode().metaInfo().isSubclassOf("QtQuick.Controls.TabView", -1, -1); + && modelNode.parentProperty().parentModelNode().metaInfo().isSubclassOf("QtQuick.Controls.TabView"); } AddTabDesignerAction::AddTabDesignerAction() @@ -97,7 +97,7 @@ bool AddTabDesignerAction::isEnabled(const SelectionContext &selectionContext) c static ModelNode findTabViewModelNode(const ModelNode ¤tModelNode) { - if (currentModelNode.metaInfo().isSubclassOf("QtQuick.Controls.TabView", -1, -1)) + if (currentModelNode.metaInfo().isSubclassOf("QtQuick.Controls.TabView")) return currentModelNode; else return findTabViewModelNode(currentModelNode.parentProperty().parentModelNode()); diff --git a/src/plugins/qmldesigner/componentsplugin/entertabdesigneraction.cpp b/src/plugins/qmldesigner/componentsplugin/entertabdesigneraction.cpp index 6500bf268c..c45b14dded 100644 --- a/src/plugins/qmldesigner/componentsplugin/entertabdesigneraction.cpp +++ b/src/plugins/qmldesigner/componentsplugin/entertabdesigneraction.cpp @@ -83,7 +83,7 @@ void EnterTabDesignerAction::updateContext() if (action()->isEnabled()) { const ModelNode selectedModelNode = selectionContext().currentSingleSelectedNode(); if (selectedModelNode.metaInfo().isValid() - && selectedModelNode.metaInfo().isSubclassOf("QtQuick.Controls.TabView", -1, -1)) { + && selectedModelNode.metaInfo().isSubclassOf("QtQuick.Controls.TabView")) { const NodeAbstractProperty defaultProperty = selectedModelNode.defaultNodeAbstractProperty(); foreach (const QmlDesigner::ModelNode &childModelNode, defaultProperty.directSubNodes()) { @@ -117,7 +117,7 @@ bool EnterTabDesignerAction::isEnabled(const SelectionContext &selectionContext) void EnterTabDesignerAction::createActionForTab(const ModelNode &modelNode) { if (modelNode.metaInfo().isValid() - && modelNode.metaInfo().isSubclassOf("QtQuick.Controls.Tab", -1, -1)) { + && modelNode.metaInfo().isSubclassOf("QtQuick.Controls.Tab")) { QmlDesigner::QmlItemNode itemNode(modelNode); diff --git a/src/plugins/qmldesigner/componentsplugin/tabviewindexmodel.cpp b/src/plugins/qmldesigner/componentsplugin/tabviewindexmodel.cpp index 5fc9d6e54a..751ec18235 100644 --- a/src/plugins/qmldesigner/componentsplugin/tabviewindexmodel.cpp +++ b/src/plugins/qmldesigner/componentsplugin/tabviewindexmodel.cpp @@ -60,11 +60,11 @@ void TabViewIndexModel::setupModel() m_tabViewIndexModel.clear(); if (m_modelNode.isValid() && m_modelNode.metaInfo().isValid() - && m_modelNode.metaInfo().isSubclassOf("QtQuick.Controls.TabView", -1, -1)) { + && m_modelNode.metaInfo().isSubclassOf("QtQuick.Controls.TabView")) { foreach (const QmlDesigner::ModelNode &childModelNode, m_modelNode.defaultNodeAbstractProperty().directSubNodes()) { if (childModelNode.metaInfo().isValid() - && childModelNode.metaInfo().isSubclassOf("QtQuick.Controls.Tab", -1, -1)) { + && childModelNode.metaInfo().isSubclassOf("QtQuick.Controls.Tab")) { QmlDesigner::QmlItemNode itemNode(childModelNode); if (itemNode.isValid()) { m_tabViewIndexModel.append(itemNode.instanceValue("title").toString()); diff --git a/src/plugins/qmldesigner/designercore/include/nodemetainfo.h b/src/plugins/qmldesigner/designercore/include/nodemetainfo.h index 134a8cf5fd..1e81226f1f 100644 --- a/src/plugins/qmldesigner/designercore/include/nodemetainfo.h +++ b/src/plugins/qmldesigner/designercore/include/nodemetainfo.h @@ -96,7 +96,7 @@ public: bool hasCustomParser() const; bool availableInVersion(int majorVersion, int minorVersion) const; - bool isSubclassOf(const TypeName &type, int majorVersion, int minorVersio) const; + bool isSubclassOf(const TypeName &type, int majorVersion = -1, int minorVersion = -1) const; bool isGraphicalItem() const; bool isLayoutable() const; diff --git a/src/plugins/qmldesigner/designercore/instances/nodeinstanceview.cpp b/src/plugins/qmldesigner/designercore/instances/nodeinstanceview.cpp index b5f245d316..2b110747b3 100644 --- a/src/plugins/qmldesigner/designercore/instances/nodeinstanceview.cpp +++ b/src/plugins/qmldesigner/designercore/instances/nodeinstanceview.cpp @@ -783,7 +783,7 @@ CreateSceneCommand NodeInstanceView::createCreateSceneCommand() InstanceContainer::NodeSourceType nodeSourceType = static_cast<InstanceContainer::NodeSourceType>(instance.modelNode().nodeSourceType()); InstanceContainer::NodeMetaType nodeMetaType = InstanceContainer::ObjectMetaType; - if (instance.modelNode().metaInfo().isSubclassOf("QtQuick.Item", -1, -1)) + if (instance.modelNode().metaInfo().isSubclassOf("QtQuick.Item")) nodeMetaType = InstanceContainer::ItemMetaType; InstanceContainer container(instance.instanceId(), @@ -885,7 +885,7 @@ CreateInstancesCommand NodeInstanceView::createCreateInstancesCommand(const QLis InstanceContainer::NodeSourceType nodeSourceType = static_cast<InstanceContainer::NodeSourceType>(instance.modelNode().nodeSourceType()); InstanceContainer::NodeMetaType nodeMetaType = InstanceContainer::ObjectMetaType; - if (instance.modelNode().metaInfo().isSubclassOf("QtQuick.Item", -1, -1)) + if (instance.modelNode().metaInfo().isSubclassOf("QtQuick.Item")) nodeMetaType = InstanceContainer::ItemMetaType; InstanceContainer container(instance.instanceId(), instance.modelNode().type(), instance.modelNode().majorVersion(), instance.modelNode().minorVersion(), diff --git a/src/plugins/qmldesigner/designercore/metainfo/nodemetainfo.cpp b/src/plugins/qmldesigner/designercore/metainfo/nodemetainfo.cpp index efb8ab9bec..ccd4e21cc0 100644 --- a/src/plugins/qmldesigner/designercore/metainfo/nodemetainfo.cpp +++ b/src/plugins/qmldesigner/designercore/metainfo/nodemetainfo.cpp @@ -1519,7 +1519,7 @@ bool NodeMetaInfo::isSubclassOf(const TypeName &type, int majorVersion, int mino bool NodeMetaInfo::isGraphicalItem() const { - return isSubclassOf("QtQuick.Item", -1, -1) || isSubclassOf("QtQuick.Window.Window", -1, -1); + return isSubclassOf("QtQuick.Item") || isSubclassOf("QtQuick.Window.Window"); } void NodeMetaInfo::clearCache() @@ -1529,25 +1529,25 @@ void NodeMetaInfo::clearCache() bool NodeMetaInfo::isLayoutable() const { - if (isSubclassOf("<cpp>.QDeclarativeBasePositioner", -1, -1)) + if (isSubclassOf("<cpp>.QDeclarativeBasePositioner")) return true; //QtQuick 1 - return isSubclassOf("QtQuick.Positioner", -1, -1) - || isSubclassOf("QtQuick.Layouts.Layout", -1, -1) - || isSubclassOf("QtQuick.Controls.SplitView", -1, -1); + return isSubclassOf("QtQuick.Positioner") + || isSubclassOf("QtQuick.Layouts.Layout") + || isSubclassOf("QtQuick.Controls.SplitView"); } bool NodeMetaInfo::isView() const { return isValid() && - (isSubclassOf("QtQuick.ListView", -1, -1) || - isSubclassOf("QtQuick.GridView", -1, -1) || - isSubclassOf("QtQuick.PathView", -1, -1)); + (isSubclassOf("QtQuick.ListView") || + isSubclassOf("QtQuick.GridView") || + isSubclassOf("QtQuick.PathView")); } bool NodeMetaInfo::isTabView() const { - return isSubclassOf("QtQuick.Controls.TabView", -1, -1); + return isSubclassOf("QtQuick.Controls.TabView"); } } // namespace QmlDesigner diff --git a/src/plugins/qmldesigner/designercore/model/modelnode.cpp b/src/plugins/qmldesigner/designercore/model/modelnode.cpp index c6ff5a9d96..780eb2cdb7 100644 --- a/src/plugins/qmldesigner/designercore/model/modelnode.cpp +++ b/src/plugins/qmldesigner/designercore/model/modelnode.cpp @@ -1056,7 +1056,7 @@ bool ModelNode::isComponent() const return true; } - if (metaInfo().isSubclassOf("QtQuick.Loader", -1 , -1)) { + if (metaInfo().isSubclassOf("QtQuick.Loader")) { if (hasNodeListProperty("component")) { diff --git a/src/plugins/qmldesigner/designercore/model/qmlchangeset.cpp b/src/plugins/qmldesigner/designercore/model/qmlchangeset.cpp index 564654882c..cb9a43753e 100644 --- a/src/plugins/qmldesigner/designercore/model/qmlchangeset.cpp +++ b/src/plugins/qmldesigner/designercore/model/qmlchangeset.cpp @@ -51,7 +51,7 @@ bool QmlPropertyChanges::isValid() const bool QmlPropertyChanges::isValidQmlPropertyChanges(const ModelNode &modelNode) { - return isValidQmlModelNodeFacade(modelNode) && modelNode.metaInfo().isSubclassOf("QtQuick.PropertyChanges", -1, -1); + return isValidQmlModelNodeFacade(modelNode) && modelNode.metaInfo().isSubclassOf("QtQuick.PropertyChanges"); } bool QmlModelStateOperation::isValid() const @@ -62,8 +62,8 @@ bool QmlModelStateOperation::isValid() const bool QmlModelStateOperation::isValidQmlModelStateOperation(const ModelNode &modelNode) { return isValidQmlModelNodeFacade(modelNode) - && (modelNode.metaInfo().isSubclassOf("<cpp>.QDeclarative1StateOperation", -1, -1) - || modelNode.metaInfo().isSubclassOf("<cpp>.QQuickStateOperation", -1, -1)); + && (modelNode.metaInfo().isSubclassOf("<cpp>.QDeclarative1StateOperation") + || modelNode.metaInfo().isSubclassOf("<cpp>.QQuickStateOperation")); } void QmlPropertyChanges::removeProperty(const PropertyName &name) diff --git a/src/plugins/qmldesigner/designercore/model/qmlitemnode.cpp b/src/plugins/qmldesigner/designercore/model/qmlitemnode.cpp index 6c85e89042..f86798b1c0 100644 --- a/src/plugins/qmldesigner/designercore/model/qmlitemnode.cpp +++ b/src/plugins/qmldesigner/designercore/model/qmlitemnode.cpp @@ -47,10 +47,10 @@ namespace QmlDesigner { bool QmlItemNode::isItemOrWindow(const ModelNode &modelNode) { - if (modelNode.metaInfo().isSubclassOf("QtQuick.Item", -1, -1)) + if (modelNode.metaInfo().isSubclassOf("QtQuick.Item")) return true; - if (modelNode.metaInfo().isSubclassOf("QtQuick.Window.Window", -1, -1) && modelNode.isRootNode()) + if (modelNode.metaInfo().isSubclassOf("QtQuick.Window.Window") && modelNode.isRootNode()) return true; return false; @@ -364,7 +364,7 @@ bool QmlItemNode::instanceHasRotationTransform() const bool itemIsMovable(const ModelNode &modelNode) { - if (modelNode.metaInfo().isSubclassOf("QtQuick.Controls.Tab", -1, -1)) + if (modelNode.metaInfo().isSubclassOf("QtQuick.Controls.Tab")) return false; if (modelNode.hasParentProperty()) { @@ -599,7 +599,7 @@ bool QmlItemNode::isInLayout() const ModelNode parent = modelNode().parentProperty().parentModelNode(); if (parent.isValid() && parent.metaInfo().isValid()) - return parent.metaInfo().isSubclassOf("QtQuick.Layouts.Layout", -1, -1); + return parent.metaInfo().isSubclassOf("QtQuick.Layouts.Layout"); } return false; diff --git a/src/plugins/qmldesigner/designercore/model/qmlstate.cpp b/src/plugins/qmldesigner/designercore/model/qmlstate.cpp index bb6edff74c..aecc77d491 100644 --- a/src/plugins/qmldesigner/designercore/model/qmlstate.cpp +++ b/src/plugins/qmldesigner/designercore/model/qmlstate.cpp @@ -224,7 +224,7 @@ bool QmlModelState::isValidQmlModelState(const ModelNode &modelNode) { return isValidQmlModelNodeFacade(modelNode) && modelNode.metaInfo().isValid() - && (modelNode.metaInfo().isSubclassOf("QtQuick.State", -1, -1) || isBaseState(modelNode)); + && (modelNode.metaInfo().isSubclassOf("QtQuick.State") || isBaseState(modelNode)); } /** diff --git a/src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp b/src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp index 8b743f9275..7d7f007a7a 100644 --- a/src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp +++ b/src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp @@ -294,7 +294,7 @@ static bool isConnectionsType(const QmlDesigner::TypeName &type) static bool propertyIsComponentType(const QmlDesigner::NodeAbstractProperty &property, const QmlDesigner::TypeName &type, QmlDesigner::Model *model) { - if (model->metaInfo(type, -1, -1).isSubclassOf("QtQuick.Component", -1, -1) && !isComponentType(type)) + if (model->metaInfo(type).isSubclassOf("QtQuick.Component") && !isComponentType(type)) return false; //If the type is already a subclass of Component keep it return property.parentModelNode().isValid() && diff --git a/src/plugins/qmldesigner/documentmanager.cpp b/src/plugins/qmldesigner/documentmanager.cpp index baa8d6a441..2870a87ce6 100644 --- a/src/plugins/qmldesigner/documentmanager.cpp +++ b/src/plugins/qmldesigner/documentmanager.cpp @@ -240,7 +240,7 @@ static bool isLoaderWithSourceComponent(const ModelNode &modelNode) { if (modelNode.isValid() && modelNode.metaInfo().isValid() - && modelNode.metaInfo().isSubclassOf("QtQuick.Loader", -1, -1)) { + && modelNode.metaInfo().isSubclassOf("QtQuick.Loader")) { if (modelNode.hasNodeProperty("sourceComponent")) return true; @@ -256,7 +256,7 @@ static bool hasSourceWithFileComponent(const ModelNode &modelNode) { if (modelNode.isValid() && modelNode.metaInfo().isValid() - && modelNode.metaInfo().isSubclassOf("QtQuick.Loader", -1, -1) + && modelNode.metaInfo().isSubclassOf("QtQuick.Loader") && modelNode.hasVariantProperty("source")) return true; diff --git a/src/plugins/qmldesigner/qmldesignerextension/pathtool/pathtool.cpp b/src/plugins/qmldesigner/qmldesignerextension/pathtool/pathtool.cpp index f9e768a48c..4b73ee59ba 100644 --- a/src/plugins/qmldesigner/qmldesignerextension/pathtool/pathtool.cpp +++ b/src/plugins/qmldesigner/qmldesignerextension/pathtool/pathtool.cpp @@ -78,7 +78,7 @@ static int pathRankForModelNode(const ModelNode &modelNode) { if (modelNode.metaInfo().hasProperty("path")) { if (modelNode.hasNodeProperty("path")) { ModelNode pathNode = modelNode.nodeProperty("path").modelNode(); - if (pathNode.metaInfo().isSubclassOf("QtQuick.Path", -1, -1) && pathNode.hasNodeListProperty("pathElements")) { + if (pathNode.metaInfo().isSubclassOf("QtQuick.Path") && pathNode.hasNodeListProperty("pathElements")) { QList<ModelNode> pathElements = pathNode.nodeListProperty("pathElements").toModelNodeList(); if (pathElements.isEmpty()) return 0; diff --git a/src/plugins/qmldesigner/qmldesignerextension/pathtool/pathtoolview.cpp b/src/plugins/qmldesigner/qmldesignerextension/pathtool/pathtoolview.cpp index 25e0d83043..a15abf569e 100644 --- a/src/plugins/qmldesigner/qmldesignerextension/pathtool/pathtoolview.cpp +++ b/src/plugins/qmldesigner/qmldesignerextension/pathtool/pathtoolview.cpp @@ -47,7 +47,7 @@ static bool isInEditedPath(const NodeAbstractProperty &propertyParent, const Mod if (editingPathViewModelNode.isValid()) { if (editingPathViewModelNode.hasNodeProperty("path")) { ModelNode pathModelNode = editingPathViewModelNode.nodeProperty("path").modelNode(); - if (pathModelNode.metaInfo().isSubclassOf("QtQuick.Path", -1, -1)) { + if (pathModelNode.metaInfo().isSubclassOf("QtQuick.Path")) { if (propertyParent.name() == "pathElements" && propertyParent.parentModelNode() == pathModelNode) return true; } diff --git a/src/plugins/qmldesigner/qmldesignerextension/texttool/textedititem.cpp b/src/plugins/qmldesigner/qmldesignerextension/texttool/textedititem.cpp index 38f62bfb64..bd22558a4e 100644 --- a/src/plugins/qmldesigner/qmldesignerextension/texttool/textedititem.cpp +++ b/src/plugins/qmldesigner/qmldesignerextension/texttool/textedititem.cpp @@ -65,8 +65,8 @@ void TextEditItem::setFormEditorItem(FormEditorItem *formEditorItem) NodeMetaInfo metaInfo = m_formEditorItem->qmlItemNode().modelNode().metaInfo(); if (metaInfo.isValid() && - (metaInfo.isSubclassOf("QtQuick.TextEdit", -1, -1) - || metaInfo.isSubclassOf("QtQuick.Controls.TextArea", -1, -1))) { + (metaInfo.isSubclassOf("QtQuick.TextEdit") + || metaInfo.isSubclassOf("QtQuick.Controls.TextArea"))) { QSize maximumSize = rect.size().toSize(); activateTextEdit(maximumSize); } else { |