summaryrefslogtreecommitdiff
path: root/src/plugins/qmldesigner
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/qmldesigner')
-rw-r--r--src/plugins/qmldesigner/components/componentcore/abstractaction.h5
-rw-r--r--src/plugins/qmldesigner/components/componentcore/abstractactiongroup.h5
-rw-r--r--src/plugins/qmldesigner/components/componentcore/actioninterface.h5
-rw-r--r--src/plugins/qmldesigner/components/componentcore/componentcore_constants.h5
-rw-r--r--src/plugins/qmldesigner/components/componentcore/crumblebar.cpp2
-rw-r--r--src/plugins/qmldesigner/components/componentcore/crumblebar.h5
-rw-r--r--src/plugins/qmldesigner/components/componentcore/designeractionmanager.h5
-rw-r--r--src/plugins/qmldesigner/components/componentcore/designeractionmanagerview.h5
-rw-r--r--src/plugins/qmldesigner/components/componentcore/findimplementation.h5
-rw-r--r--src/plugins/qmldesigner/components/componentcore/layoutingridlayout.h5
-rw-r--r--src/plugins/qmldesigner/components/componentcore/modelnodecontextmenu.cpp6
-rw-r--r--src/plugins/qmldesigner/components/componentcore/modelnodecontextmenu.h5
-rw-r--r--src/plugins/qmldesigner/components/componentcore/modelnodecontextmenu_helper.h5
-rw-r--r--src/plugins/qmldesigner/components/componentcore/modelnodeoperations.cpp6
-rw-r--r--src/plugins/qmldesigner/components/componentcore/modelnodeoperations.h5
-rw-r--r--src/plugins/qmldesigner/components/componentcore/selectioncontext.h5
-rw-r--r--src/plugins/qmldesigner/components/debugview/debugview.h5
-rw-r--r--src/plugins/qmldesigner/components/debugview/debugviewwidget.h6
-rw-r--r--src/plugins/qmldesigner/components/formeditor/formeditorscene.cpp2
-rw-r--r--src/plugins/qmldesigner/components/formeditor/formeditorscene.h2
-rw-r--r--src/plugins/qmldesigner/components/importmanager/importlabel.h4
-rw-r--r--src/plugins/qmldesigner/components/importmanager/importmanagercombobox.h5
-rw-r--r--src/plugins/qmldesigner/components/importmanager/importmanagerview.h5
-rw-r--r--src/plugins/qmldesigner/components/importmanager/importswidget.h5
-rw-r--r--src/plugins/qmldesigner/components/integration/componentaction.h5
-rw-r--r--src/plugins/qmldesigner/components/integration/componentview.cpp4
-rw-r--r--src/plugins/qmldesigner/components/integration/componentview.h5
-rw-r--r--src/plugins/qmldesigner/components/integration/designdocumentview.h5
-rw-r--r--src/plugins/qmldesigner/components/integration/xuifiledialog.h5
-rw-r--r--src/plugins/qmldesigner/components/itemlibrary/itemlibraryimageprovider.h5
-rw-r--r--src/plugins/qmldesigner/components/itemlibrary/itemlibraryitem.h5
-rw-r--r--src/plugins/qmldesigner/components/itemlibrary/itemlibrarymodel.h5
-rw-r--r--src/plugins/qmldesigner/components/itemlibrary/itemlibrarysection.h5
-rw-r--r--src/plugins/qmldesigner/components/itemlibrary/itemlibrarysectionmodel.h5
-rw-r--r--src/plugins/qmldesigner/components/itemlibrary/itemlibrarytreeview.h6
-rw-r--r--src/plugins/qmldesigner/components/itemlibrary/itemlibraryview.h4
-rw-r--r--src/plugins/qmldesigner/components/itemlibrary/itemlibrarywidget.h6
-rw-r--r--src/plugins/qmldesigner/components/itemlibrary/resourceitemdelegate.h5
-rw-r--r--src/plugins/qmldesigner/components/logger/logger.h5
-rw-r--r--src/plugins/qmldesigner/components/navigator/iconcheckboxitemdelegate.h5
-rw-r--r--src/plugins/qmldesigner/components/navigator/nameitemdelegate.h5
-rw-r--r--src/plugins/qmldesigner/components/navigator/navigatortreemodel.cpp6
-rw-r--r--src/plugins/qmldesigner/components/navigator/navigatortreemodel.h5
-rw-r--r--src/plugins/qmldesigner/components/navigator/navigatortreeview.h5
-rw-r--r--src/plugins/qmldesigner/components/navigator/navigatorview.h4
-rw-r--r--src/plugins/qmldesigner/components/navigator/navigatorwidget.h5
-rw-r--r--src/plugins/qmldesigner/components/pluginmanager/iplugin.h5
-rw-r--r--src/plugins/qmldesigner/components/pluginmanager/pluginmanager.h4
-rw-r--r--src/plugins/qmldesigner/components/pluginmanager/pluginpath.h4
-rw-r--r--src/plugins/qmldesigner/components/propertyeditor/designerpropertymap.h5
-rw-r--r--src/plugins/qmldesigner/components/propertyeditor/fileresourcesmodel.h5
-rw-r--r--src/plugins/qmldesigner/components/propertyeditor/gradientmodel.h5
-rw-r--r--src/plugins/qmldesigner/components/propertyeditor/propertyeditorcontextobject.h5
-rw-r--r--src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp63
-rw-r--r--src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.h11
-rw-r--r--src/plugins/qmldesigner/components/propertyeditor/propertyeditortransaction.h5
-rw-r--r--src/plugins/qmldesigner/components/propertyeditor/propertyeditorvalue.cpp17
-rw-r--r--src/plugins/qmldesigner/components/propertyeditor/propertyeditorvalue.h9
-rw-r--r--src/plugins/qmldesigner/components/propertyeditor/propertyeditorview.cpp15
-rw-r--r--src/plugins/qmldesigner/components/propertyeditor/propertyeditorview.h5
-rw-r--r--src/plugins/qmldesigner/components/propertyeditor/propertyeditorwidget.h5
-rw-r--r--src/plugins/qmldesigner/components/propertyeditor/qmlanchorbindingproxy.h1
-rw-r--r--src/plugins/qmldesigner/components/propertyeditor/qmlmodelnodeproxy.h5
-rw-r--r--src/plugins/qmldesigner/components/propertyeditor/quick2propertyeditorview.h5
-rw-r--r--src/plugins/qmldesigner/components/stateseditor/stateseditorimageprovider.h6
-rw-r--r--src/plugins/qmldesigner/components/stateseditor/stateseditormodel.h5
-rw-r--r--src/plugins/qmldesigner/components/stateseditor/stateseditorview.h5
-rw-r--r--src/plugins/qmldesigner/components/stateseditor/stateseditorwidget.h5
-rw-r--r--src/plugins/qmldesigner/componentsplugin/addtabdesigneraction.h5
-rw-r--r--src/plugins/qmldesigner/componentsplugin/addtabtotabviewdialog.h5
-rw-r--r--src/plugins/qmldesigner/componentsplugin/componentsplugin.h6
-rw-r--r--src/plugins/qmldesigner/componentsplugin/entertabdesigneraction.h5
-rw-r--r--src/plugins/qmldesigner/componentsplugin/tabviewindexmodel.h5
-rw-r--r--src/plugins/qmldesigner/designercore/exceptions/exception.cpp2
-rw-r--r--src/plugins/qmldesigner/designercore/filemanager/addarraymembervisitor.h5
-rw-r--r--src/plugins/qmldesigner/designercore/filemanager/addobjectvisitor.h5
-rw-r--r--src/plugins/qmldesigner/designercore/filemanager/addpropertyvisitor.cpp2
-rw-r--r--src/plugins/qmldesigner/designercore/filemanager/addpropertyvisitor.h5
-rw-r--r--src/plugins/qmldesigner/designercore/filemanager/astobjecttextextractor.h5
-rw-r--r--src/plugins/qmldesigner/designercore/filemanager/changeimportsvisitor.h5
-rw-r--r--src/plugins/qmldesigner/designercore/filemanager/changeobjecttypevisitor.h5
-rw-r--r--src/plugins/qmldesigner/designercore/filemanager/changepropertyvisitor.h5
-rw-r--r--src/plugins/qmldesigner/designercore/filemanager/firstdefinitionfinder.h5
-rw-r--r--src/plugins/qmldesigner/designercore/filemanager/moveobjectbeforeobjectvisitor.h5
-rw-r--r--src/plugins/qmldesigner/designercore/filemanager/moveobjectvisitor.cpp4
-rw-r--r--src/plugins/qmldesigner/designercore/filemanager/moveobjectvisitor.h5
-rw-r--r--src/plugins/qmldesigner/designercore/filemanager/objectlengthcalculator.h5
-rw-r--r--src/plugins/qmldesigner/designercore/filemanager/qmlrefactoring.cpp10
-rw-r--r--src/plugins/qmldesigner/designercore/filemanager/qmlrefactoring.h5
-rw-r--r--src/plugins/qmldesigner/designercore/filemanager/qmlrewriter.cpp2
-rw-r--r--src/plugins/qmldesigner/designercore/filemanager/qmlrewriter.h5
-rw-r--r--src/plugins/qmldesigner/designercore/filemanager/qmlwarningdialog.h5
-rw-r--r--src/plugins/qmldesigner/designercore/filemanager/removepropertyvisitor.h5
-rw-r--r--src/plugins/qmldesigner/designercore/filemanager/removeuiobjectmembervisitor.h5
-rw-r--r--src/plugins/qmldesigner/designercore/include/abstractproperty.h5
-rw-r--r--src/plugins/qmldesigner/designercore/include/abstractview.h5
-rw-r--r--src/plugins/qmldesigner/designercore/include/anchorline.h5
-rw-r--r--src/plugins/qmldesigner/designercore/include/basetexteditmodifier.h5
-rw-r--r--src/plugins/qmldesigner/designercore/include/bindingproperty.h5
-rw-r--r--src/plugins/qmldesigner/designercore/include/bytearraymodifier.h5
-rw-r--r--src/plugins/qmldesigner/designercore/include/componenttextmodifier.h5
-rw-r--r--src/plugins/qmldesigner/designercore/include/customnotifications.h5
-rw-r--r--src/plugins/qmldesigner/designercore/include/exception.h6
-rw-r--r--src/plugins/qmldesigner/designercore/include/forwardview.h5
-rw-r--r--src/plugins/qmldesigner/designercore/include/import.h5
-rw-r--r--src/plugins/qmldesigner/designercore/include/invalidargumentexception.h5
-rw-r--r--src/plugins/qmldesigner/designercore/include/invalididexception.h5
-rw-r--r--src/plugins/qmldesigner/designercore/include/invalidmetainfoexception.h5
-rw-r--r--src/plugins/qmldesigner/designercore/include/invalidmodelnodeexception.h5
-rw-r--r--src/plugins/qmldesigner/designercore/include/invalidmodelstateexception.h5
-rw-r--r--src/plugins/qmldesigner/designercore/include/invalidpropertyexception.h5
-rw-r--r--src/plugins/qmldesigner/designercore/include/invalidqmlsourceexception.h5
-rw-r--r--src/plugins/qmldesigner/designercore/include/invalidreparentingexception.h5
-rw-r--r--src/plugins/qmldesigner/designercore/include/invalidslideindexexception.h5
-rw-r--r--src/plugins/qmldesigner/designercore/include/itemlibraryinfo.h7
-rw-r--r--src/plugins/qmldesigner/designercore/include/iwidgetplugin.h5
-rw-r--r--src/plugins/qmldesigner/designercore/include/mathutils.h5
-rw-r--r--src/plugins/qmldesigner/designercore/include/metainfo.h5
-rw-r--r--src/plugins/qmldesigner/designercore/include/metainforeader.h4
-rw-r--r--src/plugins/qmldesigner/designercore/include/model.h5
-rw-r--r--src/plugins/qmldesigner/designercore/include/modelmerger.h5
-rw-r--r--src/plugins/qmldesigner/designercore/include/modelnode.h7
-rw-r--r--src/plugins/qmldesigner/designercore/include/modelnodepositionstorage.h5
-rw-r--r--src/plugins/qmldesigner/designercore/include/modificationgroupexception.h5
-rw-r--r--src/plugins/qmldesigner/designercore/include/modificationgrouptoken.h5
-rw-r--r--src/plugins/qmldesigner/designercore/include/nodeabstractproperty.h5
-rw-r--r--src/plugins/qmldesigner/designercore/include/nodeanchors.h5
-rw-r--r--src/plugins/qmldesigner/designercore/include/nodeinstance.h5
-rw-r--r--src/plugins/qmldesigner/designercore/include/nodeinstanceview.h5
-rw-r--r--src/plugins/qmldesigner/designercore/include/nodelistproperty.h5
-rw-r--r--src/plugins/qmldesigner/designercore/include/nodemetainfo.h7
-rw-r--r--src/plugins/qmldesigner/designercore/include/nodeproperty.h5
-rw-r--r--src/plugins/qmldesigner/designercore/include/notimplementedexception.h5
-rw-r--r--src/plugins/qmldesigner/designercore/include/objectpropertybinding.h5
-rw-r--r--src/plugins/qmldesigner/designercore/include/plaintexteditmodifier.h5
-rw-r--r--src/plugins/qmldesigner/designercore/include/propertybinding.h5
-rw-r--r--src/plugins/qmldesigner/designercore/include/propertycontainer.h7
-rw-r--r--src/plugins/qmldesigner/designercore/include/propertynode.h5
-rw-r--r--src/plugins/qmldesigner/designercore/include/propertyparser.h5
-rw-r--r--src/plugins/qmldesigner/designercore/include/qmlanchors.h5
-rw-r--r--src/plugins/qmldesigner/designercore/include/qmlchangeset.h5
-rw-r--r--src/plugins/qmldesigner/designercore/include/qmldesignercorelib_global.h6
-rw-r--r--src/plugins/qmldesigner/designercore/include/qmlitemnode.h8
-rw-r--r--src/plugins/qmldesigner/designercore/include/qmlmodelnodefacade.h5
-rw-r--r--src/plugins/qmldesigner/designercore/include/qmlobjectnode.h5
-rw-r--r--src/plugins/qmldesigner/designercore/include/qmlstate.h6
-rw-r--r--src/plugins/qmldesigner/designercore/include/removebasestateexception.h5
-rw-r--r--src/plugins/qmldesigner/designercore/include/rewriterview.h5
-rw-r--r--src/plugins/qmldesigner/designercore/include/rewritingexception.h5
-rw-r--r--src/plugins/qmldesigner/designercore/include/signalhandlerproperty.h5
-rw-r--r--src/plugins/qmldesigner/designercore/include/subcomponentmanager.h6
-rw-r--r--src/plugins/qmldesigner/designercore/include/textmodifier.h5
-rw-r--r--src/plugins/qmldesigner/designercore/include/variantproperty.h5
-rw-r--r--src/plugins/qmldesigner/designercore/include/viewmanager.h5
-rw-r--r--src/plugins/qmldesigner/designercore/instances/nodeinstanceserverproxy.cpp6
-rw-r--r--src/plugins/qmldesigner/designercore/instances/nodeinstanceserverproxy.h5
-rw-r--r--src/plugins/qmldesigner/designercore/instances/nodeinstanceview.cpp6
-rw-r--r--src/plugins/qmldesigner/designercore/instances/puppetbuildprogressdialog.h4
-rw-r--r--src/plugins/qmldesigner/designercore/instances/puppetcreator.h5
-rw-r--r--src/plugins/qmldesigner/designercore/instances/puppetdialog.h5
-rw-r--r--src/plugins/qmldesigner/designercore/metainfo/itemlibraryinfo.cpp6
-rw-r--r--src/plugins/qmldesigner/designercore/metainfo/nodemetainfo.cpp159
-rw-r--r--src/plugins/qmldesigner/designercore/model/abstractview.cpp4
-rw-r--r--src/plugins/qmldesigner/designercore/model/bindingproperty.cpp4
-rw-r--r--src/plugins/qmldesigner/designercore/model/internalbindingproperty.h5
-rw-r--r--src/plugins/qmldesigner/designercore/model/internalnode_p.h5
-rw-r--r--src/plugins/qmldesigner/designercore/model/internalnodeabstractproperty.h5
-rw-r--r--src/plugins/qmldesigner/designercore/model/internalnodelistproperty.h5
-rw-r--r--src/plugins/qmldesigner/designercore/model/internalnodeproperty.h5
-rw-r--r--src/plugins/qmldesigner/designercore/model/internalproperty.h5
-rw-r--r--src/plugins/qmldesigner/designercore/model/internalsignalhandlerproperty.h5
-rw-r--r--src/plugins/qmldesigner/designercore/model/internalvariantproperty.h5
-rw-r--r--src/plugins/qmldesigner/designercore/model/model.cpp8
-rw-r--r--src/plugins/qmldesigner/designercore/model/model_p.h6
-rw-r--r--src/plugins/qmldesigner/designercore/model/modelnode.cpp8
-rw-r--r--src/plugins/qmldesigner/designercore/model/modelnodepositionrecalculator.h5
-rw-r--r--src/plugins/qmldesigner/designercore/model/modeltotextmerger.h5
-rw-r--r--src/plugins/qmldesigner/designercore/model/qmlanchors.cpp40
-rw-r--r--src/plugins/qmldesigner/designercore/model/qmlitemnode.cpp2
-rw-r--r--src/plugins/qmldesigner/designercore/model/qmlobjectnode.cpp6
-rw-r--r--src/plugins/qmldesigner/designercore/model/qmltextgenerator.cpp11
-rw-r--r--src/plugins/qmldesigner/designercore/model/qmltextgenerator.h5
-rw-r--r--src/plugins/qmldesigner/designercore/model/rewriteaction.cpp32
-rw-r--r--src/plugins/qmldesigner/designercore/model/rewriteaction.h5
-rw-r--r--src/plugins/qmldesigner/designercore/model/rewriteactioncompressor.h5
-rw-r--r--src/plugins/qmldesigner/designercore/model/rewriterview.cpp8
-rw-r--r--src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp16
-rw-r--r--src/plugins/qmldesigner/designercore/model/texttomodelmerger.h5
-rw-r--r--src/plugins/qmldesigner/designercore/pluginmanager/widgetpluginmanager.h4
-rw-r--r--src/plugins/qmldesigner/designercore/pluginmanager/widgetpluginpath.h4
-rw-r--r--src/plugins/qmldesigner/designercore/rewritertransaction.h5
-rw-r--r--src/plugins/qmldesigner/designersettings.h5
-rw-r--r--src/plugins/qmldesigner/designmodecontext.h5
-rw-r--r--src/plugins/qmldesigner/designmodewidget.cpp2
-rw-r--r--src/plugins/qmldesigner/designmodewidget.h5
-rw-r--r--src/plugins/qmldesigner/documentmanager.h5
-rw-r--r--src/plugins/qmldesigner/qmldesignerconstants.h5
-rw-r--r--src/plugins/qmldesigner/qmldesignerextension/colortool/colortool.h5
-rw-r--r--src/plugins/qmldesigner/qmldesignerextension/connectioneditor/bindingmodel.cpp16
-rw-r--r--src/plugins/qmldesigner/qmldesignerextension/connectioneditor/bindingmodel.h5
-rw-r--r--src/plugins/qmldesigner/qmldesignerextension/connectioneditor/connectionmodel.cpp8
-rw-r--r--src/plugins/qmldesigner/qmldesignerextension/connectioneditor/connectionmodel.h5
-rw-r--r--src/plugins/qmldesigner/qmldesignerextension/connectioneditor/connectionview.h5
-rw-r--r--src/plugins/qmldesigner/qmldesignerextension/connectioneditor/connectionviewwidget.h5
-rw-r--r--src/plugins/qmldesigner/qmldesignerextension/connectioneditor/dynamicpropertiesmodel.cpp24
-rw-r--r--src/plugins/qmldesigner/qmldesignerextension/connectioneditor/dynamicpropertiesmodel.h6
-rw-r--r--src/plugins/qmldesigner/qmldesignerextension/pathtool/controlpoint.h5
-rw-r--r--src/plugins/qmldesigner/qmldesignerextension/pathtool/cubicsegment.h5
-rw-r--r--src/plugins/qmldesigner/qmldesignerextension/pathtool/pathitem.h5
-rw-r--r--src/plugins/qmldesigner/qmldesignerextension/pathtool/pathselectionmanipulator.h5
-rw-r--r--src/plugins/qmldesigner/qmldesignerextension/pathtool/pathtool.h5
-rw-r--r--src/plugins/qmldesigner/qmldesignerextension/pathtool/pathtoolview.h5
-rw-r--r--src/plugins/qmldesigner/qmldesignerextension/qmldesignerextension_global.h6
-rw-r--r--src/plugins/qmldesigner/qmldesignerextension/qmldesignerextensionconstants.h6
-rw-r--r--src/plugins/qmldesigner/qmldesignerextension/sourcetool/sourcetool.h4
-rw-r--r--src/plugins/qmldesigner/qmldesignerextension/texttool/texttool.h5
-rw-r--r--src/plugins/qmldesigner/qmldesignericons.h5
-rw-r--r--src/plugins/qmldesigner/qmldesignerplugin.cpp19
-rw-r--r--src/plugins/qmldesigner/qmldesignerplugin.h8
-rw-r--r--src/plugins/qmldesigner/qmldesignerplugin.pro1
-rw-r--r--src/plugins/qmldesigner/qtquickplugin/qtquickplugin.h6
-rw-r--r--src/plugins/qmldesigner/settingspage.h5
-rw-r--r--src/plugins/qmldesigner/shortcutmanager.h5
-rw-r--r--src/plugins/qmldesigner/styledoutputpaneplaceholder.cpp2
-rw-r--r--src/plugins/qmldesigner/styledoutputpaneplaceholder.h7
225 files changed, 470 insertions, 1027 deletions
diff --git a/src/plugins/qmldesigner/components/componentcore/abstractaction.h b/src/plugins/qmldesigner/components/componentcore/abstractaction.h
index f6b43e67d1..0c347b5d23 100644
--- a/src/plugins/qmldesigner/components/componentcore/abstractaction.h
+++ b/src/plugins/qmldesigner/components/componentcore/abstractaction.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef QMLDESIGNER_DEFAULTDESIGNERACTION_H
-#define QMLDESIGNER_DEFAULTDESIGNERACTION_H
+#pragma once
#include "actioninterface.h"
@@ -74,5 +73,3 @@ private:
};
} // namespace QmlDesigner
-
-#endif // QMLDESIGNER_DEFAULTDESIGNERACTION_H
diff --git a/src/plugins/qmldesigner/components/componentcore/abstractactiongroup.h b/src/plugins/qmldesigner/components/componentcore/abstractactiongroup.h
index f6997ab4c9..d13b7782cc 100644
--- a/src/plugins/qmldesigner/components/componentcore/abstractactiongroup.h
+++ b/src/plugins/qmldesigner/components/componentcore/abstractactiongroup.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef MENUDESIGNERACTION_H
-#define MENUDESIGNERACTION_H
+#pragma once
#include "actioninterface.h"
@@ -57,5 +56,3 @@ private:
};
} // namespace QmlDesigner
-
-#endif // MENUDESIGNERACTION_H
diff --git a/src/plugins/qmldesigner/components/componentcore/actioninterface.h b/src/plugins/qmldesigner/components/componentcore/actioninterface.h
index 9b6afc4edc..d3d23ca43a 100644
--- a/src/plugins/qmldesigner/components/componentcore/actioninterface.h
+++ b/src/plugins/qmldesigner/components/componentcore/actioninterface.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef ABSTRACTDESIGNERACTION_H
-#define ABSTRACTDESIGNERACTION_H
+#pragma once
#include "componentcore_constants.h"
#include "selectioncontext.h"
@@ -62,5 +61,3 @@ public:
};
} //QmlDesigner
-
-#endif //ABSTRACTDESIGNERACTION_H
diff --git a/src/plugins/qmldesigner/components/componentcore/componentcore_constants.h b/src/plugins/qmldesigner/components/componentcore/componentcore_constants.h
index 86f1ccf6de..9da0027c0c 100644
--- a/src/plugins/qmldesigner/components/componentcore/componentcore_constants.h
+++ b/src/plugins/qmldesigner/components/componentcore/componentcore_constants.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef COMPONENTCORE_CONSTANTS_H
-#define COMPONENTCORE_CONSTANTS_H
+#pragma once
#include <QtGlobal>
@@ -112,5 +111,3 @@ const int priorityLast = 60;
} //ComponentCoreConstants
} //QmlDesigner
-
-#endif //COMPONENTCORE_CONSTANTS_H
diff --git a/src/plugins/qmldesigner/components/componentcore/crumblebar.cpp b/src/plugins/qmldesigner/components/componentcore/crumblebar.cpp
index 05cb2b7585..cecb5a478a 100644
--- a/src/plugins/qmldesigner/components/componentcore/crumblebar.cpp
+++ b/src/plugins/qmldesigner/components/componentcore/crumblebar.cpp
@@ -50,7 +50,7 @@ static inline QString componentIdForModelNode(const ModelNode &modelNode)
if (modelNode.hasParentProperty()
&& modelNode.parentProperty().name() != "data"
&& modelNode.parentProperty().name() != "children") {
- return modelNode.parentProperty().name();
+ return QString::fromUtf8(modelNode.parentProperty().name());
} else {
return modelNode.simplifiedTypeName();
}
diff --git a/src/plugins/qmldesigner/components/componentcore/crumblebar.h b/src/plugins/qmldesigner/components/componentcore/crumblebar.h
index cb19c6ce0f..a09f2e3b4f 100644
--- a/src/plugins/qmldesigner/components/componentcore/crumblebar.h
+++ b/src/plugins/qmldesigner/components/componentcore/crumblebar.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef QMLDESIGNER_FORMEDITORCRUMBLEBAR_H
-#define QMLDESIGNER_FORMEDITORCRUMBLEBAR_H
+#pragma once
#include <QObject>
#include <utils/crumblepath.h>
@@ -70,5 +69,3 @@ bool operator !=(const CrumbleBarInfo &first, const CrumbleBarInfo &second);
} // namespace QmlDesigner
Q_DECLARE_METATYPE(QmlDesigner::CrumbleBarInfo)
-
-#endif // QMLDESIGNER_FORMEDITORCRUMBLEBAR_H
diff --git a/src/plugins/qmldesigner/components/componentcore/designeractionmanager.h b/src/plugins/qmldesigner/components/componentcore/designeractionmanager.h
index f0ed41cba1..fca668b679 100644
--- a/src/plugins/qmldesigner/components/componentcore/designeractionmanager.h
+++ b/src/plugins/qmldesigner/components/componentcore/designeractionmanager.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef DESIGNERACTIONMANAGER_H
-#define DESIGNERACTIONMANAGER_H
+#pragma once
#include <qmldesignercorelib_global.h>
#include "actioninterface.h"
@@ -51,5 +50,3 @@ private:
};
} //QmlDesigner
-
-#endif //DESIGNERACTIONMANAGER_H
diff --git a/src/plugins/qmldesigner/components/componentcore/designeractionmanagerview.h b/src/plugins/qmldesigner/components/componentcore/designeractionmanagerview.h
index 4613cb0332..b33d65f41b 100644
--- a/src/plugins/qmldesigner/components/componentcore/designeractionmanagerview.h
+++ b/src/plugins/qmldesigner/components/componentcore/designeractionmanagerview.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef QMLDESIGNER_DESIGNERACTIONMANAGERVIEW_H
-#define QMLDESIGNER_DESIGNERACTIONMANAGERVIEW_H
+#pragma once
#include <abstractview.h>
@@ -78,5 +77,3 @@ private:
} // namespace QmlDesigner
-
-#endif // QMLDESIGNER_DESIGNERACTIONMANAGERVIEW_H
diff --git a/src/plugins/qmldesigner/components/componentcore/findimplementation.h b/src/plugins/qmldesigner/components/componentcore/findimplementation.h
index d6f53e1b35..931e0aea94 100644
--- a/src/plugins/qmldesigner/components/componentcore/findimplementation.h
+++ b/src/plugins/qmldesigner/components/componentcore/findimplementation.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef FINDIMPLEMENTATION_H
-#define FINDIMPLEMENTATION_H
+#pragma once
#include <QList>
@@ -36,5 +35,3 @@ public:
FindImplementation();
static QList<QmlJSEditor::FindReferences::Usage> run(const QString &fileName, const QString &typeName, const QString &itemName);
};
-
-#endif // FINDIMPLEMENTATION_H
diff --git a/src/plugins/qmldesigner/components/componentcore/layoutingridlayout.h b/src/plugins/qmldesigner/components/componentcore/layoutingridlayout.h
index ed7b8eece6..4acc4291a6 100644
--- a/src/plugins/qmldesigner/components/componentcore/layoutingridlayout.h
+++ b/src/plugins/qmldesigner/components/componentcore/layoutingridlayout.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef LAYOUTINGRIDLAYOUT_H
-#define LAYOUTINGRIDLAYOUT_H
+#pragma once
#include "selectioncontext.h"
@@ -82,5 +81,3 @@ private:
};
} //QmlDesigner
-
-#endif // LAYOUTINGRIDLAYOUT_H
diff --git a/src/plugins/qmldesigner/components/componentcore/modelnodecontextmenu.cpp b/src/plugins/qmldesigner/components/componentcore/modelnodecontextmenu.cpp
index 8f1e3cdd0c..7e9423c2df 100644
--- a/src/plugins/qmldesigner/components/componentcore/modelnodecontextmenu.cpp
+++ b/src/plugins/qmldesigner/components/componentcore/modelnodecontextmenu.cpp
@@ -42,7 +42,7 @@ ModelNodeContextMenu::ModelNodeContextMenu(AbstractView *view) :
}
static QSet<ActionInterface* > findMembers(QSet<ActionInterface* > actionInterface,
- const QString &category)
+ const QByteArray &category)
{
QSet<ActionInterface* > ret;
@@ -55,7 +55,7 @@ static QSet<ActionInterface* > findMembers(QSet<ActionInterface* > actionInterfa
void populateMenu(QSet<ActionInterface* > &actionInterfaces,
- const QString &category,
+ const QByteArray &category,
QMenu* menu,
const SelectionContext &selectionContext)
{
@@ -96,7 +96,7 @@ void ModelNodeContextMenu::execute(const QPoint &position, bool selectionMenuBoo
QSet<ActionInterface* > factories =
QSet<ActionInterface* >::fromList(QmlDesignerPlugin::instance()->designerActionManager().designerActions());
- populateMenu(factories, QString(""), mainMenu, m_selectionContext);
+ populateMenu(factories, QByteArray(), mainMenu, m_selectionContext);
mainMenu->exec(position);
mainMenu->deleteLater();
diff --git a/src/plugins/qmldesigner/components/componentcore/modelnodecontextmenu.h b/src/plugins/qmldesigner/components/componentcore/modelnodecontextmenu.h
index 615ac45128..58a1d1f9cf 100644
--- a/src/plugins/qmldesigner/components/componentcore/modelnodecontextmenu.h
+++ b/src/plugins/qmldesigner/components/componentcore/modelnodecontextmenu.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef MODELNODECONTEXTMENU_H
-#define MODELNODECONTEXTMENU_H
+#pragma once
#include <QPoint>
#include <QCoreApplication>
@@ -50,5 +49,3 @@ private:
};
} // namespace QmlDesigner
-
-#endif // MODELNODECONTEXTMENU_H
diff --git a/src/plugins/qmldesigner/components/componentcore/modelnodecontextmenu_helper.h b/src/plugins/qmldesigner/components/componentcore/modelnodecontextmenu_helper.h
index 11fd6e2dea..233e5c5649 100644
--- a/src/plugins/qmldesigner/components/componentcore/modelnodecontextmenu_helper.h
+++ b/src/plugins/qmldesigner/components/componentcore/modelnodecontextmenu_helper.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef MODELNODECONTEXTMENU_HELPER_H
-#define MODELNODECONTEXTMENU_HELPER_H
+#pragma once
#include "modelnodeoperations.h"
#include "abstractaction.h"
@@ -191,5 +190,3 @@ private:
} //QmlDesigner
-
-#endif // MODELNODECONTEXTMENU_HELPER_H
diff --git a/src/plugins/qmldesigner/components/componentcore/modelnodeoperations.cpp b/src/plugins/qmldesigner/components/componentcore/modelnodeoperations.cpp
index 1e8ac14f93..6c6b9198aa 100644
--- a/src/plugins/qmldesigner/components/componentcore/modelnodeoperations.cpp
+++ b/src/plugins/qmldesigner/components/componentcore/modelnodeoperations.cpp
@@ -602,7 +602,7 @@ static void addSignal(const QString &typeName, const QString &itemId, const QStr
signalHandlerName = itemId.toUtf8() + ".on" + toUpper(signalName).toUtf8();
foreach (const ModelNode &modelNode, rewriterView.allModelNodes()) {
- if (modelNode.type() == typeName) {
+ if (modelNode.type() == typeName.toUtf8()) {
modelNode.signalHandlerProperty(signalHandlerName).setSource(QLatin1String("{\n}"));
}
}
@@ -627,11 +627,11 @@ static QStringList getSortedSignalNameList(const ModelNode &modelNode)
if (metaInfo.isValid()) {
foreach (const PropertyName &signalName, sortedPropertyNameList(metaInfo.signalNames()))
if (!signalName.contains("Changed"))
- signalNames.append(signalName);
+ signalNames.append(QString::fromUtf8(signalName));
foreach (const PropertyName &propertyName, sortedPropertyNameList(metaInfo.propertyNames()))
if (!propertyName.contains("."))
- signalNames.append(propertyName + "Changed");
+ signalNames.append(QString::fromUtf8(propertyName + "Changed"));
}
return signalNames;
diff --git a/src/plugins/qmldesigner/components/componentcore/modelnodeoperations.h b/src/plugins/qmldesigner/components/componentcore/modelnodeoperations.h
index 74682d7d03..bdc43684ce 100644
--- a/src/plugins/qmldesigner/components/componentcore/modelnodeoperations.h
+++ b/src/plugins/qmldesigner/components/componentcore/modelnodeoperations.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef MODELNODEOPERATIONS_H
-#define MODELNODEOPERATIONS_H
+#pragma once
#include "selectioncontext.h"
@@ -71,5 +70,3 @@ void removePositioner(const SelectionContext &selectionContext);
} // namespace ModelNodeOperationso
} //QmlDesigner
-
-#endif //MODELNODEOPERATIONS_H
diff --git a/src/plugins/qmldesigner/components/componentcore/selectioncontext.h b/src/plugins/qmldesigner/components/componentcore/selectioncontext.h
index 662c3b1ae9..17e5981e6d 100644
--- a/src/plugins/qmldesigner/components/componentcore/selectioncontext.h
+++ b/src/plugins/qmldesigner/components/componentcore/selectioncontext.h
@@ -28,8 +28,7 @@
#include <QPointF>
#include <QPointer>
-#ifndef SELECTIONCONTEXT_H
-#define SELECTIONCONTEXT_H
+#pragma once
namespace QmlDesigner {
@@ -72,5 +71,3 @@ private:
};
} //QmlDesigner
-
-#endif //SELECTIONCONTEXT_H
diff --git a/src/plugins/qmldesigner/components/debugview/debugview.h b/src/plugins/qmldesigner/components/debugview/debugview.h
index 898a85c748..51344f0696 100644
--- a/src/plugins/qmldesigner/components/debugview/debugview.h
+++ b/src/plugins/qmldesigner/components/debugview/debugview.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef DEBUGVIEW_H
-#define DEBUGVIEW_H
+#pragma once
#include <abstractview.h>
#include <QPointer>
@@ -101,5 +100,3 @@ private: //variables
} // namespace Internal
} // namespace QmlDesigner
-
-#endif // DEBUGVIEW_H
diff --git a/src/plugins/qmldesigner/components/debugview/debugviewwidget.h b/src/plugins/qmldesigner/components/debugview/debugviewwidget.h
index 34329f45c3..ca6cdfb8fa 100644
--- a/src/plugins/qmldesigner/components/debugview/debugviewwidget.h
+++ b/src/plugins/qmldesigner/components/debugview/debugviewwidget.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef DEBUGVIEWWIDGET_H
-#define DEBUGVIEWWIDGET_H
+#pragma once
#include <QWidget>
@@ -56,6 +55,3 @@ private:
} //namespace Internal
} //namespace QmlDesigner
-
-#endif //DEBUGVIEWWIDGET_H
-
diff --git a/src/plugins/qmldesigner/components/formeditor/formeditorscene.cpp b/src/plugins/qmldesigner/components/formeditor/formeditorscene.cpp
index 048ef76340..0f958a0f96 100644
--- a/src/plugins/qmldesigner/components/formeditor/formeditorscene.cpp
+++ b/src/plugins/qmldesigner/components/formeditor/formeditorscene.cpp
@@ -173,7 +173,7 @@ void FormEditorScene::synchronizeParent(const QmlItemNode &qmlItemNode)
reparentItem(qmlItemNode, parentNode);
}
-void FormEditorScene::synchronizeOtherProperty(const QmlItemNode &qmlItemNode, const QString &propertyName)
+void FormEditorScene::synchronizeOtherProperty(const QmlItemNode &qmlItemNode, const QByteArray &propertyName)
{
if (hasItemForQmlItemNode(qmlItemNode)) {
FormEditorItem *item = itemForQmlItemNode(qmlItemNode);
diff --git a/src/plugins/qmldesigner/components/formeditor/formeditorscene.h b/src/plugins/qmldesigner/components/formeditor/formeditorscene.h
index a356d69cca..a16b45dab2 100644
--- a/src/plugins/qmldesigner/components/formeditor/formeditorscene.h
+++ b/src/plugins/qmldesigner/components/formeditor/formeditorscene.h
@@ -71,7 +71,7 @@ public:
void synchronizeTransformation(const QmlItemNode &qmlItemNode);
void synchronizeParent(const QmlItemNode &qmlItemNode);
- void synchronizeOtherProperty(const QmlItemNode &qmlItemNode, const QString &propertyName);
+ void synchronizeOtherProperty(const QmlItemNode &qmlItemNode, const QByteArray &propertyName);
void synchronizeState(const QmlItemNode &qmlItemNode);
FormEditorItem* calulateNewParent(FormEditorItem *widget);
diff --git a/src/plugins/qmldesigner/components/importmanager/importlabel.h b/src/plugins/qmldesigner/components/importmanager/importlabel.h
index 35150ac7c1..6df9e0286c 100644
--- a/src/plugins/qmldesigner/components/importmanager/importlabel.h
+++ b/src/plugins/qmldesigner/components/importmanager/importlabel.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef IMPORTLABEL_H
-#define IMPORTLABEL_H
+#pragma once
#include <QLabel>
#include <QPushButton>
@@ -56,4 +55,3 @@ private:
};
}
-#endif // IMPORTLABEL_H
diff --git a/src/plugins/qmldesigner/components/importmanager/importmanagercombobox.h b/src/plugins/qmldesigner/components/importmanager/importmanagercombobox.h
index 3378621c45..dd566a12bc 100644
--- a/src/plugins/qmldesigner/components/importmanager/importmanagercombobox.h
+++ b/src/plugins/qmldesigner/components/importmanager/importmanagercombobox.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef IMPORTMANAGERCOMBOBOX_H
-#define IMPORTMANAGERCOMBOBOX_H
+#pragma once
#include <QComboBox>
@@ -37,5 +36,3 @@ public:
protected:
void paintEvent(QPaintEvent *e);
};
-
-#endif // IMPORTMANAGERCOMBOBOX_H
diff --git a/src/plugins/qmldesigner/components/importmanager/importmanagerview.h b/src/plugins/qmldesigner/components/importmanager/importmanagerview.h
index e4a2a8630f..340f81fd65 100644
--- a/src/plugins/qmldesigner/components/importmanager/importmanagerview.h
+++ b/src/plugins/qmldesigner/components/importmanager/importmanagerview.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef QMLDESIGNER_IMPORTMANAGERVIEW_H
-#define QMLDESIGNER_IMPORTMANAGERVIEW_H
+#pragma once
#include <abstractview.h>
#include <QPointer>
@@ -60,5 +59,3 @@ private:
};
} // namespace QmlDesigner
-
-#endif // QMLDESIGNER_IMPORTMANAGERVIEW_H
diff --git a/src/plugins/qmldesigner/components/importmanager/importswidget.h b/src/plugins/qmldesigner/components/importmanager/importswidget.h
index 647d68e9d3..bfac06f75c 100644
--- a/src/plugins/qmldesigner/components/importmanager/importswidget.h
+++ b/src/plugins/qmldesigner/components/importmanager/importswidget.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef QMLDESIGNER_IMPORTSWIDGET_H
-#define QMLDESIGNER_IMPORTSWIDGET_H
+#pragma once
#include <import.h>
@@ -69,5 +68,3 @@ private:
};
} // namespace QmlDesigner
-
-#endif // QMLDESIGNER_IMPORTSWIDGET_H
diff --git a/src/plugins/qmldesigner/components/integration/componentaction.h b/src/plugins/qmldesigner/components/integration/componentaction.h
index a61b3147fc..4d697cc7f4 100644
--- a/src/plugins/qmldesigner/components/integration/componentaction.h
+++ b/src/plugins/qmldesigner/components/integration/componentaction.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef COMPONENTACTION_H
-#define COMPONENTACTION_H
+#pragma once
#include <QWidgetAction>
#include <QPointer>
@@ -64,5 +63,3 @@ private:
};
} // namespace QmlDesigner
-
-#endif // COMPONENTACTION_H
diff --git a/src/plugins/qmldesigner/components/integration/componentview.cpp b/src/plugins/qmldesigner/components/integration/componentview.cpp
index 1c4e554544..be304dd44d 100644
--- a/src/plugins/qmldesigner/components/integration/componentview.cpp
+++ b/src/plugins/qmldesigner/components/integration/componentview.cpp
@@ -135,9 +135,9 @@ QString ComponentView::descriptionForNode(const ModelNode &node) const
ModelNode parentNode = node.parentProperty().parentModelNode();
if (parentNode.id().isEmpty())
- description = QString::fromUtf8(parentNode.simplifiedTypeName()) + QLatin1Char(' ');
+ description = parentNode.simplifiedTypeName() + ' ';
else
- description = parentNode.id() + QLatin1Char(' ');
+ description = parentNode.id() + ' ';
description += QString::fromUtf8(node.parentProperty().name());
}
diff --git a/src/plugins/qmldesigner/components/integration/componentview.h b/src/plugins/qmldesigner/components/integration/componentview.h
index 865c1cf4f0..4740a7196a 100644
--- a/src/plugins/qmldesigner/components/integration/componentview.h
+++ b/src/plugins/qmldesigner/components/integration/componentview.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef COMPONENTVIEW_H
-#define COMPONENTVIEW_H
+#pragma once
#include <abstractview.h>
#include <modelnode.h>
@@ -94,5 +93,3 @@ private:
};
} // namespace QmlDesigner
-
-#endif // COMPONENTVIEW_H
diff --git a/src/plugins/qmldesigner/components/integration/designdocumentview.h b/src/plugins/qmldesigner/components/integration/designdocumentview.h
index 45a6f7ae0b..d3fc45c38d 100644
--- a/src/plugins/qmldesigner/components/integration/designdocumentview.h
+++ b/src/plugins/qmldesigner/components/integration/designdocumentview.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef DesignDocumentVIEW_H
-#define DesignDocumentVIEW_H
+#pragma once
#include <abstractview.h>
#include <modelmerger.h>
@@ -54,5 +53,3 @@ private:
};
}// namespace QmlDesigner
-
-#endif // DesignDocumentVIEW_H
diff --git a/src/plugins/qmldesigner/components/integration/xuifiledialog.h b/src/plugins/qmldesigner/components/integration/xuifiledialog.h
index cc1d2af48c..1ac647322e 100644
--- a/src/plugins/qmldesigner/components/integration/xuifiledialog.h
+++ b/src/plugins/qmldesigner/components/integration/xuifiledialog.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef XUIFILEDIALOG_H
-#define XUIFILEDIALOG_H
+#pragma once
#include <QString>
#include <QStringList>
@@ -57,5 +56,3 @@ signals:
} // namespace Internal
} // namespace QmlDesigner
-
-#endif // XUIFILEDIALOG_H
diff --git a/src/plugins/qmldesigner/components/itemlibrary/itemlibraryimageprovider.h b/src/plugins/qmldesigner/components/itemlibrary/itemlibraryimageprovider.h
index 613520d8d8..54b6424d71 100644
--- a/src/plugins/qmldesigner/components/itemlibrary/itemlibraryimageprovider.h
+++ b/src/plugins/qmldesigner/components/itemlibrary/itemlibraryimageprovider.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef ITEMLIBRARYIMAGEPROVIDER_H
-#define ITEMLIBRARYIMAGEPROVIDER_H
+#pragma once
#include <QQuickImageProvider>
@@ -43,5 +42,3 @@ public:
}
}
-
-#endif // ITEMLIBRARYIMAGEPROVIDER_H
diff --git a/src/plugins/qmldesigner/components/itemlibrary/itemlibraryitem.h b/src/plugins/qmldesigner/components/itemlibrary/itemlibraryitem.h
index f411ccbd0f..c5ac7d8d87 100644
--- a/src/plugins/qmldesigner/components/itemlibrary/itemlibraryitem.h
+++ b/src/plugins/qmldesigner/components/itemlibrary/itemlibraryitem.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef QMLDESIGNER_ITEMLIBRARYITEMMODEL_H
-#define QMLDESIGNER_ITEMLIBRARYITEMMODEL_H
+#pragma once
#include <QObject>
#include <QString>
@@ -66,5 +65,3 @@ private:
};
} // namespace QmlDesigner
-
-#endif // QMLDESIGNER_ITEMLIBRARYITEMMODEL_H
diff --git a/src/plugins/qmldesigner/components/itemlibrary/itemlibrarymodel.h b/src/plugins/qmldesigner/components/itemlibrary/itemlibrarymodel.h
index 78f5fa3e2e..bf1a211248 100644
--- a/src/plugins/qmldesigner/components/itemlibrary/itemlibrarymodel.h
+++ b/src/plugins/qmldesigner/components/itemlibrary/itemlibrarymodel.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef ITEMLIBRARYMODEL_H
-#define ITEMLIBRARYMODEL_H
+#pragma once
#include <QMap>
#include <QIcon>
@@ -96,5 +95,3 @@ private: // variables
} // namespace QmlDesigner
QML_DECLARE_TYPE(QmlDesigner::ItemLibraryModel)
-#endif // ITEMLIBRARYMODEL_H
-
diff --git a/src/plugins/qmldesigner/components/itemlibrary/itemlibrarysection.h b/src/plugins/qmldesigner/components/itemlibrary/itemlibrarysection.h
index 74e52d9785..d2a1d914b1 100644
--- a/src/plugins/qmldesigner/components/itemlibrary/itemlibrarysection.h
+++ b/src/plugins/qmldesigner/components/itemlibrary/itemlibrarysection.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef QMLDESIGNER_ITEMLIBRARYSECTION_H
-#define QMLDESIGNER_ITEMLIBRARYSECTION_H
+#pragma once
#include "itemlibrarysectionmodel.h"
@@ -68,5 +67,3 @@ private:
};
} // namespace QmlDesigner
-
-#endif // QMLDESIGNER_ITEMLIBRARYSECTION_H
diff --git a/src/plugins/qmldesigner/components/itemlibrary/itemlibrarysectionmodel.h b/src/plugins/qmldesigner/components/itemlibrary/itemlibrarysectionmodel.h
index dc5a11737d..6e5d9ebf4b 100644
--- a/src/plugins/qmldesigner/components/itemlibrary/itemlibrarysectionmodel.h
+++ b/src/plugins/qmldesigner/components/itemlibrary/itemlibrarysectionmodel.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef QMLDESIGNER_ITEMLIBRARYSECTIONMODEL_H
-#define QMLDESIGNER_ITEMLIBRARYSECTIONMODEL_H
+#pragma once
#include "itemlibrarymodel.h"
@@ -66,5 +65,3 @@ private: // variables
} // namespace QmlDesigner
QML_DECLARE_TYPE(QmlDesigner::ItemLibrarySectionModel)
-
-#endif // QMLDESIGNER_ITEMLIBRARYSECTIONMODEL_H
diff --git a/src/plugins/qmldesigner/components/itemlibrary/itemlibrarytreeview.h b/src/plugins/qmldesigner/components/itemlibrary/itemlibrarytreeview.h
index 2a79a69919..37faaeef68 100644
--- a/src/plugins/qmldesigner/components/itemlibrary/itemlibrarytreeview.h
+++ b/src/plugins/qmldesigner/components/itemlibrary/itemlibrarytreeview.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef ITEMLIBRARYCOMPONENTS_H
-#define ITEMLIBRARYCOMPONENTS_H
+#pragma once
#include <QTreeView>
#include <QStyledItemDelegate>
@@ -61,6 +60,3 @@ private:
};
} // namespace QmlDesigner
-
-#endif // ITEMLIBRARYCOMPONENTS_H
-
diff --git a/src/plugins/qmldesigner/components/itemlibrary/itemlibraryview.h b/src/plugins/qmldesigner/components/itemlibrary/itemlibraryview.h
index f2d987cab9..6391d7bc4f 100644
--- a/src/plugins/qmldesigner/components/itemlibrary/itemlibraryview.h
+++ b/src/plugins/qmldesigner/components/itemlibrary/itemlibraryview.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef ITEMLIBRARYVIEW_H
-#define ITEMLIBRARYVIEW_H
+#pragma once
#include <abstractview.h>
@@ -63,4 +62,3 @@ private:
};
}
-#endif // ITEMLIBRARYVIEW_H
diff --git a/src/plugins/qmldesigner/components/itemlibrary/itemlibrarywidget.h b/src/plugins/qmldesigner/components/itemlibrary/itemlibrarywidget.h
index ecdf6aa171..3665d34a95 100644
--- a/src/plugins/qmldesigner/components/itemlibrary/itemlibrarywidget.h
+++ b/src/plugins/qmldesigner/components/itemlibrary/itemlibrarywidget.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef ITEMLIBRARYWIDGET_H
-#define ITEMLIBRARYWIDGET_H
+#pragma once
#include "itemlibraryinfo.h"
#include "itemlibrarytreeview.h"
@@ -138,6 +137,3 @@ private:
};
}
-
-#endif // ITEMLIBRARYWIDGET_H
-
diff --git a/src/plugins/qmldesigner/components/itemlibrary/resourceitemdelegate.h b/src/plugins/qmldesigner/components/itemlibrary/resourceitemdelegate.h
index 63aa7477fd..f90bb4f4be 100644
--- a/src/plugins/qmldesigner/components/itemlibrary/resourceitemdelegate.h
+++ b/src/plugins/qmldesigner/components/itemlibrary/resourceitemdelegate.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef QMLDESIGNER_RESOURCEITEMDELEGATE_H
-#define QMLDESIGNER_RESOURCEITEMDELEGATE_H
+#pragma once
#include <QStyledItemDelegate>
#include <QFileSystemModel>
@@ -50,5 +49,3 @@ private:
};
} // namespace QmlDesigner
-
-#endif // QMLDESIGNER_RESOURCEITEMDELEGATE_H
diff --git a/src/plugins/qmldesigner/components/logger/logger.h b/src/plugins/qmldesigner/components/logger/logger.h
index 3eae0fceb8..64002a8bde 100644
--- a/src/plugins/qmldesigner/components/logger/logger.h
+++ b/src/plugins/qmldesigner/components/logger/logger.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef QLOGGER_H
-#define QLOGGER_H
+#pragma once
#include <QString>
#include <QStringList>
@@ -73,5 +72,3 @@ private:
QTime *m_timer;
};
-
-#endif // QLOGGER_H
diff --git a/src/plugins/qmldesigner/components/navigator/iconcheckboxitemdelegate.h b/src/plugins/qmldesigner/components/navigator/iconcheckboxitemdelegate.h
index fa3ac6f89d..553a7f8c8e 100644
--- a/src/plugins/qmldesigner/components/navigator/iconcheckboxitemdelegate.h
+++ b/src/plugins/qmldesigner/components/navigator/iconcheckboxitemdelegate.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef QMLDESIGNER_ICONCHECKBOXITEMDELEGATE_H
-#define QMLDESIGNER_ICONCHECKBOXITEMDELEGATE_H
+#pragma once
#include <QStyledItemDelegate>
@@ -53,5 +52,3 @@ private:
NavigatorTreeModel *m_navigatorTreeModel;
};
} // namespace QmlDesigner
-
-#endif // QMLDESIGNER_ICONCHECKBOXITEMDELEGATE_H
diff --git a/src/plugins/qmldesigner/components/navigator/nameitemdelegate.h b/src/plugins/qmldesigner/components/navigator/nameitemdelegate.h
index 3df50b986d..281a2ea8a4 100644
--- a/src/plugins/qmldesigner/components/navigator/nameitemdelegate.h
+++ b/src/plugins/qmldesigner/components/navigator/nameitemdelegate.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef QMLDESIGNER_NAMEITEMDELEGATE_H
-#define QMLDESIGNER_NAMEITEMDELEGATE_H
+#pragma once
#include <QStyledItemDelegate>
@@ -53,5 +52,3 @@ private:
};
} // namespace QmlDesigner
-
-#endif // QMLDESIGNER_NAMEITEMDELEGATE_H
diff --git a/src/plugins/qmldesigner/components/navigator/navigatortreemodel.cpp b/src/plugins/qmldesigner/components/navigator/navigatortreemodel.cpp
index 1d291775ef..db3fb2183d 100644
--- a/src/plugins/qmldesigner/components/navigator/navigatortreemodel.cpp
+++ b/src/plugins/qmldesigner/components/navigator/navigatortreemodel.cpp
@@ -546,8 +546,8 @@ static void appendNodeToEndOfTheRow(const ModelNode &modelNode, const ItemRow &n
if (modelNode.hasParentProperty()) {
NodeAbstractProperty parentProperty(modelNode.parentProperty());
ItemRow parentRow = treeModel->itemRowForNode(parentProperty.parentModelNode());
- if (parentRow.propertyItems.contains(parentProperty.name())) {
- QStandardItem *parentPropertyItem = parentRow.propertyItems.value(parentProperty.name());
+ if (parentRow.propertyItems.contains(QString::fromUtf8(parentProperty.name()))) {
+ QStandardItem *parentPropertyItem = parentRow.propertyItems.value(QString::fromUtf8(parentProperty.name()));
parentPropertyItem->appendRow(newItemRow.toList());
} else {
QStandardItem *parentDefaultPropertyItem = parentRow.idItem;
@@ -768,7 +768,7 @@ void NavigatorTreeModel::handleItemLibraryImageDrop(const QMimeData *mimeData, i
bool foundTarget = computeTarget(rowModelIndex, this, &targetProperty, &targetRowNumber);
if (foundTarget) {
- QString imageFileName = QString::fromUtf8(mimeData->data("application/vnd.bauhaus.libraryresource"));
+ QString imageFileName = QString::fromUtf8(mimeData->data(QLatin1String("application/vnd.bauhaus.libraryresource")));
QmlItemNode newQmlItemNode = QmlItemNode::createQmlItemNodeFromImage(m_view, imageFileName, QPointF(), targetProperty);
if (newQmlItemNode.isValid()) {
diff --git a/src/plugins/qmldesigner/components/navigator/navigatortreemodel.h b/src/plugins/qmldesigner/components/navigator/navigatortreemodel.h
index a2b4b33033..f879393e86 100644
--- a/src/plugins/qmldesigner/components/navigator/navigatortreemodel.h
+++ b/src/plugins/qmldesigner/components/navigator/navigatortreemodel.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef NAVIGATORTREEMODEL_H
-#define NAVIGATORTREEMODEL_H
+#pragma once
#include <modelnode.h>
#include <nodemetainfo.h>
@@ -147,5 +146,3 @@ private:
};
} // namespace QmlDesigner
-
-#endif // NAVIGATORTREEMODEL_H
diff --git a/src/plugins/qmldesigner/components/navigator/navigatortreeview.h b/src/plugins/qmldesigner/components/navigator/navigatortreeview.h
index 24f7df7b4b..f5d4caa5ed 100644
--- a/src/plugins/qmldesigner/components/navigator/navigatortreeview.h
+++ b/src/plugins/qmldesigner/components/navigator/navigatortreeview.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef NAVIGATORTREEVIEW_H
-#define NAVIGATORTREEVIEW_H
+#pragma once
#include <QTreeView>
@@ -38,5 +37,3 @@ public:
static void drawSelectionBackground(QPainter *painter, const QStyleOption &option);
};
}
-
-#endif // NAVIGATORTREEVIEW_H
diff --git a/src/plugins/qmldesigner/components/navigator/navigatorview.h b/src/plugins/qmldesigner/components/navigator/navigatorview.h
index 537f17ae74..bbef3ec1d0 100644
--- a/src/plugins/qmldesigner/components/navigator/navigatorview.h
+++ b/src/plugins/qmldesigner/components/navigator/navigatorview.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef NAVIGATORVIEW_H
-#define NAVIGATORVIEW_H
+#pragma once
#include <abstractview.h>
@@ -99,4 +98,3 @@ private:
};
}
-#endif // NAVIGATORVIEW_H
diff --git a/src/plugins/qmldesigner/components/navigator/navigatorwidget.h b/src/plugins/qmldesigner/components/navigator/navigatorwidget.h
index 917151dda9..526004cf84 100644
--- a/src/plugins/qmldesigner/components/navigator/navigatorwidget.h
+++ b/src/plugins/qmldesigner/components/navigator/navigatorwidget.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef NAVIGATORWIDGET_H
-#define NAVIGATORWIDGET_H
+#pragma once
#include <QFrame>
#include <QPointer>
@@ -64,5 +63,3 @@ private: // variables
};
}
-
-#endif // NAVIGATORWIDGET_H
diff --git a/src/plugins/qmldesigner/components/pluginmanager/iplugin.h b/src/plugins/qmldesigner/components/pluginmanager/iplugin.h
index 2ceaab67cb..609cee3f4b 100644
--- a/src/plugins/qmldesigner/components/pluginmanager/iplugin.h
+++ b/src/plugins/qmldesigner/components/pluginmanager/iplugin.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef IPLUGIN_H
-#define IPLUGIN_H
+#pragma once
#include <QObject>
@@ -50,5 +49,3 @@ public:
QT_BEGIN_NAMESPACE
Q_DECLARE_INTERFACE(QmlDesigner::IPlugin, QMLDESIGNER_PLUGIN_INTERFACE)
QT_END_NAMESPACE
-
-#endif // IPLUGIN_H
diff --git a/src/plugins/qmldesigner/components/pluginmanager/pluginmanager.h b/src/plugins/qmldesigner/components/pluginmanager/pluginmanager.h
index d971c2d710..819d216e4a 100644
--- a/src/plugins/qmldesigner/components/pluginmanager/pluginmanager.h
+++ b/src/plugins/qmldesigner/components/pluginmanager/pluginmanager.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef PLUGINMANAGER_H
-#define PLUGINMANAGER_H
+#pragma once
#include "pluginpath.h"
@@ -72,4 +71,3 @@ private: // variables
};
} // namespace QmlDesigner
-#endif // PLUGINMANAGER_H
diff --git a/src/plugins/qmldesigner/components/pluginmanager/pluginpath.h b/src/plugins/qmldesigner/components/pluginmanager/pluginpath.h
index 7b526e5ca2..c1d7e81c22 100644
--- a/src/plugins/qmldesigner/components/pluginmanager/pluginpath.h
+++ b/src/plugins/qmldesigner/components/pluginmanager/pluginpath.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef PLUGINPATH_H
-#define PLUGINPATH_H
+#pragma once
#include <QObject>
#include <QPointer>
@@ -91,4 +90,3 @@ private:
PluginDataList m_plugins;
};
} // namespace QmlDesigner
-#endif // PLUGINPATH_H
diff --git a/src/plugins/qmldesigner/components/propertyeditor/designerpropertymap.h b/src/plugins/qmldesigner/components/propertyeditor/designerpropertymap.h
index 12e8feb7f8..d520cab714 100644
--- a/src/plugins/qmldesigner/components/propertyeditor/designerpropertymap.h
+++ b/src/plugins/qmldesigner/components/propertyeditor/designerpropertymap.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef DESIGNERPROPERTYMAP_H
-#define DESIGNERPROPERTYMAP_H
+#pragma once
#include <QQmlPropertyMap>
#include <QtQml>
@@ -44,5 +43,3 @@ public:
};
} //QmlDesigner
-
-#endif // DESIGNERPROPERTYMAP_H
diff --git a/src/plugins/qmldesigner/components/propertyeditor/fileresourcesmodel.h b/src/plugins/qmldesigner/components/propertyeditor/fileresourcesmodel.h
index 239cda43cc..37faaa9baf 100644
--- a/src/plugins/qmldesigner/components/propertyeditor/fileresourcesmodel.h
+++ b/src/plugins/qmldesigner/components/propertyeditor/fileresourcesmodel.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef FILERESOURCESMODEL_H
-#define FILERESOURCESMODEL_H
+#pragma once
#include <qmlitemnode.h>
@@ -83,5 +82,3 @@ private:
};
QML_DECLARE_TYPE(FileResourcesModel)
-
-#endif // FILERESOURCESMODEL_H
diff --git a/src/plugins/qmldesigner/components/propertyeditor/gradientmodel.h b/src/plugins/qmldesigner/components/propertyeditor/gradientmodel.h
index 9271cf17c3..56d8ce914d 100644
--- a/src/plugins/qmldesigner/components/propertyeditor/gradientmodel.h
+++ b/src/plugins/qmldesigner/components/propertyeditor/gradientmodel.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef GRADIENTMODEL_H
-#define GRADIENTMODEL_H
+#pragma once
#include <qmlitemnode.h>
@@ -88,5 +87,3 @@ private:
};
QML_DECLARE_TYPE(GradientModel)
-
-#endif // GRADIENTMODEL_H
diff --git a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorcontextobject.h b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorcontextobject.h
index 1794926079..785145c09a 100644
--- a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorcontextobject.h
+++ b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorcontextobject.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef PROPERTYEDITORCONTEXTOBJECT_H
-#define PROPERTYEDITORCONTEXTOBJECT_H
+#pragma once
#include <QObject>
#include <QUrl>
@@ -132,5 +131,3 @@ private:
};
} //QmlDesigner {
-
-#endif // PROPERTYEDITORCONTEXTOBJECT_H
diff --git a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp
index ec0da2a136..4f245c23f8 100644
--- a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp
+++ b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp
@@ -95,8 +95,8 @@ PropertyEditorQmlBackend::PropertyEditorQmlBackend(PropertyEditorView *propertyE
->settings().value(DesignerSettingsKey::SHOW_PROPERTYEDITOR_WARNINGS).toBool());
m_view->engine()->addImportPath(propertyEditorResourcesPath());
- m_dummyPropertyEditorValue->setValue("#000000");
- context()->setContextProperty("dummyBackendValue", m_dummyPropertyEditorValue.data());
+ m_dummyPropertyEditorValue->setValue(QLatin1String("#000000"));
+ context()->setContextProperty(QLatin1String("dummyBackendValue"), m_dummyPropertyEditorValue.data());
m_contextObject->setBackendValues(&m_backendValuesPropertyMap);
m_contextObject->insertInQmlContext(context());
@@ -111,7 +111,7 @@ void PropertyEditorQmlBackend::setupPropertyEditorValue(const PropertyName &name
{
QmlDesigner::PropertyName propertyName(name);
propertyName.replace('.', '_');
- PropertyEditorValue *valueObject = qobject_cast<PropertyEditorValue*>(variantToQObject(backendValuesPropertyMap().value(propertyName)));
+ PropertyEditorValue *valueObject = qobject_cast<PropertyEditorValue*>(variantToQObject(backendValuesPropertyMap().value(QString::fromUtf8(propertyName))));
if (!valueObject) {
valueObject = new PropertyEditorValue(&backendValuesPropertyMap());
QObject::connect(valueObject, &PropertyEditorValue::valueChanged, &backendValuesPropertyMap(), &DesignerPropertyMap::valueChanged);
@@ -119,8 +119,8 @@ void PropertyEditorQmlBackend::setupPropertyEditorValue(const PropertyName &name
backendValuesPropertyMap().insert(QString::fromUtf8(propertyName), QVariant::fromValue(valueObject));
}
valueObject->setName(propertyName);
- if (type == "QColor")
- valueObject->setValue(QVariant("#000000"));
+ if (type == QLatin1String("QColor"))
+ valueObject->setValue(QVariant(QLatin1String("#000000")));
else
valueObject->setValue(QVariant(1));
@@ -180,7 +180,7 @@ void PropertyEditorQmlBackend::createPropertyEditorValue(const QmlObjectNode &qm
{
PropertyName propertyName(name);
propertyName.replace('.', '_');
- PropertyEditorValue *valueObject = qobject_cast<PropertyEditorValue*>(variantToQObject(backendValuesPropertyMap().value(propertyName)));
+ PropertyEditorValue *valueObject = qobject_cast<PropertyEditorValue*>(variantToQObject(backendValuesPropertyMap().value(QString::fromUtf8(propertyName))));
if (!valueObject) {
valueObject = new PropertyEditorValue(&backendValuesPropertyMap());
QObject::connect(valueObject, &PropertyEditorValue::valueChanged, &backendValuesPropertyMap(), &DesignerPropertyMap::valueChanged);
@@ -212,7 +212,7 @@ void PropertyEditorQmlBackend::setValue(const QmlObjectNode & qmlObjectNode, con
{
PropertyName propertyName = name;
propertyName.replace('.', '_');
- PropertyEditorValue *propertyValue = qobject_cast<PropertyEditorValue*>(variantToQObject(m_backendValuesPropertyMap.value(propertyName)));
+ PropertyEditorValue *propertyValue = qobject_cast<PropertyEditorValue*>(variantToQObject(m_backendValuesPropertyMap.value(QString::fromUtf8(propertyName))));
if (propertyValue) {
propertyValue->setValue(value);
@@ -223,7 +223,6 @@ void PropertyEditorQmlBackend::setValue(const QmlObjectNode & qmlObjectNode, con
}
}
-
QQmlContext *PropertyEditorQmlBackend::context() {
return m_view->rootContext();
}
@@ -269,23 +268,23 @@ void PropertyEditorQmlBackend::setup(const QmlObjectNode &qmlObjectNode, const Q
setupLayoutAttachedProperties(qmlObjectNode, propertyEditor);
// className
- PropertyEditorValue *valueObject = qobject_cast<PropertyEditorValue*>(variantToQObject(m_backendValuesPropertyMap.value("className")));
+ PropertyEditorValue *valueObject = qobject_cast<PropertyEditorValue*>(variantToQObject(m_backendValuesPropertyMap.value(QLatin1String("className"))));
if (!valueObject)
valueObject = new PropertyEditorValue(&m_backendValuesPropertyMap);
valueObject->setName("className");
valueObject->setModelNode(qmlObjectNode.modelNode());
valueObject->setValue(qmlObjectNode.modelNode().simplifiedTypeName());
QObject::connect(valueObject, &PropertyEditorValue::valueChanged, &backendValuesPropertyMap(), &DesignerPropertyMap::valueChanged);
- m_backendValuesPropertyMap.insert("className", QVariant::fromValue(valueObject));
+ m_backendValuesPropertyMap.insert(QLatin1String("className"), QVariant::fromValue(valueObject));
// id
- valueObject = qobject_cast<PropertyEditorValue*>(variantToQObject(m_backendValuesPropertyMap.value("id")));
+ valueObject = qobject_cast<PropertyEditorValue*>(variantToQObject(m_backendValuesPropertyMap.value(QLatin1String("id"))));
if (!valueObject)
valueObject = new PropertyEditorValue(&m_backendValuesPropertyMap);
valueObject->setName("id");
valueObject->setValue(qmlObjectNode.id());
QObject::connect(valueObject, &PropertyEditorValue::valueChanged, &backendValuesPropertyMap(), &DesignerPropertyMap::valueChanged);
- m_backendValuesPropertyMap.insert("id", QVariant::fromValue(valueObject));
+ m_backendValuesPropertyMap.insert(QLatin1String("id"), QVariant::fromValue(valueObject));
QmlItemNode itemNode(qmlObjectNode.modelNode());
@@ -333,25 +332,25 @@ void PropertyEditorQmlBackend::initialSetup(const TypeName &typeName, const QUrl
NodeMetaInfo metaInfo = propertyEditor->model()->metaInfo(typeName);
foreach (const PropertyName &propertyName, metaInfo.propertyNames())
- setupPropertyEditorValue(propertyName, propertyEditor, metaInfo.propertyTypeName(propertyName));
+ setupPropertyEditorValue(propertyName, propertyEditor, QString::fromUtf8(metaInfo.propertyTypeName(propertyName)));
- PropertyEditorValue *valueObject = qobject_cast<PropertyEditorValue*>(variantToQObject(m_backendValuesPropertyMap.value("className")));
+ PropertyEditorValue *valueObject = qobject_cast<PropertyEditorValue*>(variantToQObject(m_backendValuesPropertyMap.value(QLatin1String("className"))));
if (!valueObject)
valueObject = new PropertyEditorValue(&m_backendValuesPropertyMap);
valueObject->setName("className");
valueObject->setValue(typeName);
QObject::connect(valueObject, &PropertyEditorValue::valueChanged, &backendValuesPropertyMap(), &DesignerPropertyMap::valueChanged);
- m_backendValuesPropertyMap.insert("className", QVariant::fromValue(valueObject));
+ m_backendValuesPropertyMap.insert(QLatin1String("className"), QVariant::fromValue(valueObject));
// id
- valueObject = qobject_cast<PropertyEditorValue*>(variantToQObject(m_backendValuesPropertyMap.value("id")));
+ valueObject = qobject_cast<PropertyEditorValue*>(variantToQObject(m_backendValuesPropertyMap.value(QLatin1String("id"))));
if (!valueObject)
valueObject = new PropertyEditorValue(&m_backendValuesPropertyMap);
valueObject->setName("id");
valueObject->setValue("id");
QObject::connect(valueObject, &PropertyEditorValue::valueChanged, &backendValuesPropertyMap(), &DesignerPropertyMap::valueChanged);
- m_backendValuesPropertyMap.insert("id", QVariant::fromValue(valueObject));
+ m_backendValuesPropertyMap.insert(QLatin1String("id"), QVariant::fromValue(valueObject));
context()->setContextProperty(QLatin1String("anchorBackend"), &m_backendAnchorBinding);
context()->setContextProperty(QLatin1String("modelNodeBackend"), &m_backendModelNode);
@@ -383,7 +382,7 @@ QString PropertyEditorQmlBackend::templateGeneration(NodeMetaInfo type,
QString qmlTemplate = imports.join(QLatin1Char('\n')) + QLatin1Char('\n');
qmlTemplate += QStringLiteral("Section {\n");
- qmlTemplate += QStringLiteral("caption: \"%1\"\n").arg(QString::fromUtf8(objectNode.modelNode().simplifiedTypeName()));
+ qmlTemplate += QStringLiteral("caption: \"%1\"\n").arg(objectNode.modelNode().simplifiedTypeName());
qmlTemplate += QStringLiteral("SectionLayout {\n");
QList<PropertyName> orderedList = type.propertyNames();
@@ -399,18 +398,18 @@ QString PropertyEditorQmlBackend::templateGeneration(NodeMetaInfo type,
properName.replace('.', '_');
- QString typeName = type.propertyTypeName(name);
+ TypeName typeName = type.propertyTypeName(name);
//alias resolution only possible with instance
- if (typeName == QStringLiteral("alias") && objectNode.isValid())
+ if (typeName == "alias" && objectNode.isValid())
typeName = objectNode.instanceType(name);
if (!superType.hasProperty(name) && type.propertyIsWritable(name) && !name.contains(".")) {
foreach (const QmlJS::SimpleReaderNode::Ptr &node, templateConfiguration()->children())
- if (variantToStringList(node->property(QStringLiteral("typeNames"))).contains(typeName)) {
+ if (variantToStringList(node->property(QStringLiteral("typeNames"))).contains(QString::fromLatin1(typeName))) {
const QString fileName = propertyTemplatesPath() + node->property(QStringLiteral("sourceFile")).toString();
QFile file(fileName);
if (file.open(QIODevice::ReadOnly)) {
- QString source = file.readAll();
+ QString source = QString::fromUtf8(file.readAll());
file.close();
qmlTemplate += source.arg(QString::fromUtf8(name)).arg(QString::fromUtf8(properName));
emptyTemplate = false;
@@ -429,22 +428,22 @@ QString PropertyEditorQmlBackend::templateGeneration(NodeMetaInfo type,
return qmlTemplate;
}
-QUrl PropertyEditorQmlBackend::getQmlFileUrl(const QString &relativeTypeName, const NodeMetaInfo &info)
+QUrl PropertyEditorQmlBackend::getQmlFileUrl(const TypeName &relativeTypeName, const NodeMetaInfo &info)
{
- return fileToUrl(locateQmlFile(info, fixTypeNameForPanes(relativeTypeName) + QStringLiteral(".qml")));
+ return fileToUrl(locateQmlFile(info, QString::fromUtf8(fixTypeNameForPanes(relativeTypeName) + ".qml")));
}
-QString PropertyEditorQmlBackend::fixTypeNameForPanes(const QString &typeName)
+TypeName PropertyEditorQmlBackend::fixTypeNameForPanes(const TypeName &typeName)
{
- QString fixedTypeName = typeName;
+ TypeName fixedTypeName = typeName;
fixedTypeName.replace('.', '/');
return fixedTypeName;
}
-QString PropertyEditorQmlBackend::qmlFileName(const NodeMetaInfo &nodeInfo)
+TypeName PropertyEditorQmlBackend::qmlFileName(const NodeMetaInfo &nodeInfo)
{
- const QString fixedTypeName = fixTypeNameForPanes(nodeInfo.typeName());
- return fixedTypeName + QStringLiteral("Pane.qml");
+ const TypeName fixedTypeName = fixTypeNameForPanes(nodeInfo.typeName());
+ return fixedTypeName + "Pane.qml";
}
QUrl PropertyEditorQmlBackend::fileToUrl(const QString &filePath) {
@@ -453,8 +452,8 @@ QUrl PropertyEditorQmlBackend::fileToUrl(const QString &filePath) {
if (filePath.isEmpty())
return fileUrl;
- if (filePath.startsWith(QLatin1Char(':'))) {
- fileUrl.setScheme("qrc");
+ if (filePath.startsWith(':')) {
+ fileUrl.setScheme(QLatin1String("qrc"));
QString path = filePath;
path.remove(0, 1); // remove trailing ':'
fileUrl.setPath(path);
@@ -505,7 +504,7 @@ QUrl PropertyEditorQmlBackend::getQmlUrlForModelNode(const ModelNode &modelNode,
hierarchy.append(modelNode.metaInfo().superClasses());
foreach (const NodeMetaInfo &info, hierarchy) {
- QUrl fileUrl = fileToUrl(locateQmlFile(info, qmlFileName(info)));
+ QUrl fileUrl = fileToUrl(locateQmlFile(info, QString::fromUtf8(qmlFileName(info))));
if (fileUrl.isValid()) {
className = info.typeName();
return fileUrl;
diff --git a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.h b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.h
index 78707ffb45..af4ceefff4 100644
--- a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.h
+++ b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef PROPERTYEDITORQMLBACKEND_H
-#define PROPERTYEDITORQMLBACKEND_H
+#pragma once
#include "qmlanchorbindingproxy.h"
#include "designerpropertymap.h"
@@ -70,7 +69,7 @@ public:
static QString templateGeneration(NodeMetaInfo type, NodeMetaInfo superType,
const QmlObjectNode &objectNode);
- static QUrl getQmlFileUrl(const QString &relativeTypeName, const NodeMetaInfo &info = NodeMetaInfo());
+ static QUrl getQmlFileUrl(const TypeName &relativeTypeName, const NodeMetaInfo &info = NodeMetaInfo());
static QUrl getQmlUrlForModelNode(const ModelNode &modelNode, TypeName &className);
static bool checkIfUrlExists(const QUrl &url);
@@ -88,11 +87,11 @@ private:
PropertyEditorView *propertyEditor);
void setupPropertyEditorValue(const PropertyName &name, PropertyEditorView *propertyEditor, const QString &type);
- static QString qmlFileName(const NodeMetaInfo &nodeInfo);
+ static TypeName qmlFileName(const NodeMetaInfo &nodeInfo);
static QUrl fileToUrl(const QString &filePath);
static QString fileFromUrl(const QUrl &url);
static QString locateQmlFile(const NodeMetaInfo &info, const QString &relativePath);
- static QString fixTypeNameForPanes(const QString &typeName);
+ static TypeName fixTypeNameForPanes(const TypeName &typeName);
private:
Quick2PropertyEditorView *m_view;
@@ -105,5 +104,3 @@ private:
};
} //QmlDesigner
-
-#endif //PROPERTYEDITORQMLBACKEND_H
diff --git a/src/plugins/qmldesigner/components/propertyeditor/propertyeditortransaction.h b/src/plugins/qmldesigner/components/propertyeditor/propertyeditortransaction.h
index 0854fe8fba..9a1ddca9bd 100644
--- a/src/plugins/qmldesigner/components/propertyeditor/propertyeditortransaction.h
+++ b/src/plugins/qmldesigner/components/propertyeditor/propertyeditortransaction.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef PROPERTYEDITORTRANSACTION_H
-#define PROPERTYEDITORTRANSACTION_H
+#pragma once
#include "propertyeditorview.h"
@@ -49,5 +48,3 @@ private:
};
} //QmlDesigner
-
-#endif // PROPERTYEDITORTRANSACTION_H
diff --git a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorvalue.cpp b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorvalue.cpp
index 7d2f60162b..9eec21692d 100644
--- a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorvalue.cpp
+++ b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorvalue.cpp
@@ -139,7 +139,7 @@ void PropertyEditorValue::setValueWithEmit(const QVariant &value)
setValue(newValue);
m_isBound = false;
- emit valueChanged(name(), value);
+ emit valueChanged(nameAsQString(), value);
emit valueChangedQml();
emit isBoundChanged();
}
@@ -174,7 +174,7 @@ void PropertyEditorValue::setExpressionWithEmit(const QString &expression)
{
if ( m_expression != expression) {
setExpression(expression);
- emit expressionChanged(name());
+ emit expressionChanged(nameAsQString());
}
}
@@ -213,6 +213,11 @@ QmlDesigner::PropertyName PropertyEditorValue::name() const
return m_name;
}
+QString PropertyEditorValue::nameAsQString() const
+{
+ return QString::fromUtf8(m_name);
+}
+
void PropertyEditorValue::setName(const QmlDesigner::PropertyName &name)
{
m_name = name;
@@ -273,7 +278,7 @@ void PropertyEditorValue::resetValue()
if (m_value.isValid() || isBound()) {
m_value = QVariant();
m_isBound = false;
- emit valueChanged(name(), QVariant());
+ emit valueChanged(nameAsQString(), QVariant());
}
}
@@ -314,7 +319,7 @@ QString PropertyEditorNodeWrapper::type()
if (!(m_modelNode.isValid()))
return QString();
- return QString::fromUtf8(m_modelNode.simplifiedTypeName());
+ return m_modelNode.simplifiedTypeName();
}
@@ -380,7 +385,7 @@ void PropertyEditorNodeWrapper::changeValue(const QString &propertyName)
if (m_modelNode.isValid()) {
QmlDesigner::QmlObjectNode qmlObjectNode(m_modelNode);
- PropertyEditorValue *valueObject = qvariant_cast<PropertyEditorValue *>(m_valuesPropertyMap.value(name));
+ PropertyEditorValue *valueObject = qvariant_cast<PropertyEditorValue *>(m_valuesPropertyMap.value(QString::fromLatin1(name)));
if (valueObject->value().isValid())
qmlObjectNode.setVariantProperty(name, valueObject->value());
@@ -406,7 +411,7 @@ void PropertyEditorNodeWrapper::setup()
valueObject->setName(propertyName);
valueObject->setValue(qmlObjectNode.instanceValue(propertyName));
connect(valueObject, SIGNAL(valueChanged(QString,QVariant)), &m_valuesPropertyMap, SIGNAL(valueChanged(QString,QVariant)));
- m_valuesPropertyMap.insert(propertyName, QVariant::fromValue(valueObject));
+ m_valuesPropertyMap.insert(QString::fromUtf8(propertyName), QVariant::fromValue(valueObject));
}
}
}
diff --git a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorvalue.h b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorvalue.h
index 6055455f85..26991db90d 100644
--- a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorvalue.h
+++ b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorvalue.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef PROPERTYEDITORVALUE_H
-#define PROPERTYEDITORVALUE_H
+#pragma once
#include <qmldesignercorelib_global.h>
@@ -84,7 +83,7 @@ class PropertyEditorValue : public QObject
Q_PROPERTY(bool isValid READ isValid NOTIFY isValidChanged FINAL)
Q_PROPERTY(bool isTranslated READ isTranslated NOTIFY expressionChanged FINAL)
- Q_PROPERTY(QString name READ name FINAL)
+ Q_PROPERTY(QString name READ nameAsQString FINAL)
Q_PROPERTY(PropertyEditorNodeWrapper* complexNode READ complexNode NOTIFY complexNodeChanged FINAL)
public:
@@ -114,6 +113,7 @@ public:
bool isTranslated() const;
QmlDesigner::PropertyName name() const;
+ QString nameAsQString() const;
void setName(const QmlDesigner::PropertyName &name);
QmlDesigner::ModelNode modelNode() const;
@@ -154,6 +154,3 @@ private: //variables
QML_DECLARE_TYPE(PropertyEditorValue)
QML_DECLARE_TYPE(PropertyEditorNodeWrapper)
QML_DECLARE_TYPE(QQmlPropertyMap)
-
-
-#endif // PROPERTYEDITORVALUE_H
diff --git a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorview.cpp b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorview.cpp
index e09d0150c6..109f5807ab 100644
--- a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorview.cpp
+++ b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorview.cpp
@@ -102,7 +102,7 @@ void PropertyEditorView::setupPane(const TypeName &typeName)
{
NodeMetaInfo metaInfo = model()->metaInfo(typeName);
- QUrl qmlFile = PropertyEditorQmlBackend::getQmlFileUrl(QStringLiteral("Qt/ItemPane"), metaInfo);
+ QUrl qmlFile = PropertyEditorQmlBackend::getQmlFileUrl("Qt/ItemPane", metaInfo);
QUrl qmlSpecificsFile;
qmlSpecificsFile = PropertyEditorQmlBackend::getQmlFileUrl(typeName + "Specifics", metaInfo);
@@ -144,7 +144,7 @@ void PropertyEditorView::changeValue(const QString &name)
return;
if (propertyName == "id") {
- PropertyEditorValue *value = m_qmlBackEndForCurrentType->propertyValueForName(propertyName);
+ PropertyEditorValue *value = m_qmlBackEndForCurrentType->propertyValueForName(QString::fromUtf8(propertyName));
const QString newId = value->value().toString();
if (newId == m_selectedNode.id())
@@ -166,7 +166,7 @@ void PropertyEditorView::changeValue(const QString &name)
PropertyName underscoreName(propertyName);
underscoreName.replace('.', '_');
- PropertyEditorValue *value = m_qmlBackEndForCurrentType->propertyValueForName(underscoreName);
+ PropertyEditorValue *value = m_qmlBackEndForCurrentType->propertyValueForName(QString::fromLatin1(underscoreName));
if (value ==0)
return;
@@ -242,7 +242,7 @@ void PropertyEditorView::changeExpression(const QString &propertyName)
underscoreName.replace('.', '_');
QmlObjectNode qmlObjectNode(m_selectedNode);
- PropertyEditorValue *value = m_qmlBackEndForCurrentType->propertyValueForName(underscoreName);
+ PropertyEditorValue *value = m_qmlBackEndForCurrentType->propertyValueForName(QString::fromLatin1(underscoreName));
if (!value) {
qWarning() << "PropertyEditor::changeExpression no value for " << underscoreName;
@@ -257,8 +257,9 @@ void PropertyEditorView::changeExpression(const QString &propertyName)
return;
}
} else if (qmlObjectNode.modelNode().metaInfo().propertyTypeName(name) == "bool") {
- if (value->expression().compare("false", Qt::CaseInsensitive) == 0 || value->expression().compare("true", Qt::CaseInsensitive) == 0) {
- if (value->expression().compare("true", Qt::CaseInsensitive) == 0)
+ if (value->expression().compare(QLatin1String("false"), Qt::CaseInsensitive) == 0
+ || value->expression().compare(QLatin1String("true"), Qt::CaseInsensitive) == 0) {
+ if (value->expression().compare(QLatin1String("true"), Qt::CaseInsensitive) == 0)
qmlObjectNode.setVariantProperty(name, true);
else
qmlObjectNode.setVariantProperty(name, false);
@@ -376,7 +377,7 @@ void PropertyEditorView::setupQmlBackend()
foreach (const NodeMetaInfo &metaInfo, hierarchy) {
if (PropertyEditorQmlBackend::checkIfUrlExists(qmlSpecificsFile))
break;
- qmlSpecificsFile = PropertyEditorQmlBackend::getQmlFileUrl(metaInfo.typeName() + QStringLiteral("Specifics"), metaInfo);
+ qmlSpecificsFile = PropertyEditorQmlBackend::getQmlFileUrl(metaInfo.typeName() + "Specifics", metaInfo);
diffClassName = metaInfo.typeName();
}
}
diff --git a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorview.h b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorview.h
index f09340170d..ac3bb9e7d0 100644
--- a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorview.h
+++ b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorview.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef PROPERTYEDITORVIEW_H
-#define PROPERTYEDITORVIEW_H
+#pragma once
#include <abstractview.h>
#include <QHash>
@@ -118,5 +117,3 @@ private: //variables
};
} //QmlDesigner
-
-#endif // PROPERTYEDITORVIEW_H
diff --git a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorwidget.h b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorwidget.h
index 4ca0b91f17..445a454f5d 100644
--- a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorwidget.h
+++ b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorwidget.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef PROPERTYEDITORWIDGET_H
-#define PROPERTYEDITORWIDGET_H
+#pragma once
#include <QStackedWidget>
@@ -46,5 +45,3 @@ protected:
};
} //QmlDesigner
-
-#endif //PROPERTYEDITORWIDGET_H
diff --git a/src/plugins/qmldesigner/components/propertyeditor/qmlanchorbindingproxy.h b/src/plugins/qmldesigner/components/propertyeditor/qmlanchorbindingproxy.h
index 0f768d6ed0..e73c55629f 100644
--- a/src/plugins/qmldesigner/components/propertyeditor/qmlanchorbindingproxy.h
+++ b/src/plugins/qmldesigner/components/propertyeditor/qmlanchorbindingproxy.h
@@ -251,4 +251,3 @@ private:
#endif //QmlAnchorBindingProxy
-
diff --git a/src/plugins/qmldesigner/components/propertyeditor/qmlmodelnodeproxy.h b/src/plugins/qmldesigner/components/propertyeditor/qmlmodelnodeproxy.h
index 511fb99dbb..f60e4ce024 100644
--- a/src/plugins/qmldesigner/components/propertyeditor/qmlmodelnodeproxy.h
+++ b/src/plugins/qmldesigner/components/propertyeditor/qmlmodelnodeproxy.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef QMLMODELNODEPROXY_H
-#define QMLMODELNODEPROXY_H
+#pragma once
#include <qmlitemnode.h>
@@ -64,5 +63,3 @@ private:
};
} //QmlDesigner
-
-#endif // QMLMODELNODEPROXY_H
diff --git a/src/plugins/qmldesigner/components/propertyeditor/quick2propertyeditorview.h b/src/plugins/qmldesigner/components/propertyeditor/quick2propertyeditorview.h
index f3f354eb85..0394c72ec3 100644
--- a/src/plugins/qmldesigner/components/propertyeditor/quick2propertyeditorview.h
+++ b/src/plugins/qmldesigner/components/propertyeditor/quick2propertyeditorview.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef QUICK2PROERTYEDITORVIEW_H
-#define QUICK2PROERTYEDITORVIEW_H
+#pragma once
#include <QQuickWidget>
@@ -42,5 +41,3 @@ public:
};
} //QmlDesigner
-
-#endif // QUICK2PROERTYEDITORVIEW_H
diff --git a/src/plugins/qmldesigner/components/stateseditor/stateseditorimageprovider.h b/src/plugins/qmldesigner/components/stateseditor/stateseditorimageprovider.h
index 36e630ece0..9576152009 100644
--- a/src/plugins/qmldesigner/components/stateseditor/stateseditorimageprovider.h
+++ b/src/plugins/qmldesigner/components/stateseditor/stateseditorimageprovider.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef STATESEDITORIMAGEPROVIDER_H
-#define STATESEDITORIMAGEPROVIDER_H
+#pragma once
#include"abstractview.h"
@@ -51,6 +50,3 @@ private:
} // namespace Internal
} // namespace QmlDesigner
-
-#endif // STATESEDITORIMAGEPROVIDER_H
-
diff --git a/src/plugins/qmldesigner/components/stateseditor/stateseditormodel.h b/src/plugins/qmldesigner/components/stateseditor/stateseditormodel.h
index 4bdc1127b5..0dbc8c0925 100644
--- a/src/plugins/qmldesigner/components/stateseditor/stateseditormodel.h
+++ b/src/plugins/qmldesigner/components/stateseditor/stateseditormodel.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef STATESEDITORMODEL_H
-#define STATESEDITORMODEL_H
+#pragma once
#include <QAbstractListModel>
#include <QPointer>
@@ -72,5 +71,3 @@ private:
};
} // namespace QmlDesigner
-
-#endif // STATESEDITORMODEL_H
diff --git a/src/plugins/qmldesigner/components/stateseditor/stateseditorview.h b/src/plugins/qmldesigner/components/stateseditor/stateseditorview.h
index c74b92fe33..c7215874b6 100644
--- a/src/plugins/qmldesigner/components/stateseditor/stateseditorview.h
+++ b/src/plugins/qmldesigner/components/stateseditor/stateseditorview.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef STATESEDITORVIEW_H
-#define STATESEDITORVIEW_H
+#pragma once
#include <abstractview.h>
@@ -97,5 +96,3 @@ private:
};
} // namespace QmlDesigner
-
-#endif // STATESEDITORVIEW_H
diff --git a/src/plugins/qmldesigner/components/stateseditor/stateseditorwidget.h b/src/plugins/qmldesigner/components/stateseditor/stateseditorwidget.h
index 3af714c182..e82e48fa1f 100644
--- a/src/plugins/qmldesigner/components/stateseditor/stateseditorwidget.h
+++ b/src/plugins/qmldesigner/components/stateseditor/stateseditorwidget.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef STATESEDITORWIDGET_H
-#define STATESEDITORWIDGET_H
+#pragma once
#include <QQuickWidget>
#include <QPointer>
@@ -70,5 +69,3 @@ private:
};
}
-
-#endif // STATESEDITORWIDGET_H
diff --git a/src/plugins/qmldesigner/componentsplugin/addtabdesigneraction.h b/src/plugins/qmldesigner/componentsplugin/addtabdesigneraction.h
index 3429dc1fb4..66b8a19b82 100644
--- a/src/plugins/qmldesigner/componentsplugin/addtabdesigneraction.h
+++ b/src/plugins/qmldesigner/componentsplugin/addtabdesigneraction.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef QMLDESIGNER_TABVIEWDESIGNERACTION_H
-#define QMLDESIGNER_TABVIEWDESIGNERACTION_H
+#pragma once
#include "abstractaction.h"
@@ -50,5 +49,3 @@ private slots:
};
} // namespace QmlDesigner
-
-#endif // QMLDESIGNER_TABVIEWDESIGNERACTION_H
diff --git a/src/plugins/qmldesigner/componentsplugin/addtabtotabviewdialog.h b/src/plugins/qmldesigner/componentsplugin/addtabtotabviewdialog.h
index 389e28c611..8128985d64 100644
--- a/src/plugins/qmldesigner/componentsplugin/addtabtotabviewdialog.h
+++ b/src/plugins/qmldesigner/componentsplugin/addtabtotabviewdialog.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef ADDTABTOTABVIEWDIALOG_H
-#define ADDTABTOTABVIEWDIALOG_H
+#pragma once
#include <QDialog>
@@ -46,5 +45,3 @@ private:
};
} // namespace QmlDesigner
-
-#endif // ADDTABTOTABVIEWDIALOG_H
diff --git a/src/plugins/qmldesigner/componentsplugin/componentsplugin.h b/src/plugins/qmldesigner/componentsplugin/componentsplugin.h
index d714fc8b77..1f43ada810 100644
--- a/src/plugins/qmldesigner/componentsplugin/componentsplugin.h
+++ b/src/plugins/qmldesigner/componentsplugin/componentsplugin.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef COMPONENTSPLUGIN_H
-#define COMPONENTSPLUGIN_H
+#pragma once
#include <iwidgetplugin.h>
@@ -51,6 +50,3 @@ public:
};
} // namespace QmlDesigner
-
-
-#endif //COMPONENTSPLUGIN_H
diff --git a/src/plugins/qmldesigner/componentsplugin/entertabdesigneraction.h b/src/plugins/qmldesigner/componentsplugin/entertabdesigneraction.h
index 5207aa652b..862790da00 100644
--- a/src/plugins/qmldesigner/componentsplugin/entertabdesigneraction.h
+++ b/src/plugins/qmldesigner/componentsplugin/entertabdesigneraction.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef ENTERTABDESIGNERACTION_H
-#define ENTERTABDESIGNERACTION_H
+#pragma once
#include <abstractactiongroup.h>
@@ -53,5 +52,3 @@ private:
};
} // namespace QmlDesigner
-
-#endif // ENTERTABDESIGNERACTION_H
diff --git a/src/plugins/qmldesigner/componentsplugin/tabviewindexmodel.h b/src/plugins/qmldesigner/componentsplugin/tabviewindexmodel.h
index 2105fe0e5b..e10f46a085 100644
--- a/src/plugins/qmldesigner/componentsplugin/tabviewindexmodel.h
+++ b/src/plugins/qmldesigner/componentsplugin/tabviewindexmodel.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef TABVIEWINDEXMODEL_H
-#define TABVIEWINDEXMODEL_H
+#pragma once
#include <qmlitemnode.h>
@@ -59,5 +58,3 @@ private:
};
QML_DECLARE_TYPE(TabViewIndexModel)
-
-#endif // TABVIEWINDEXMODEL_H
diff --git a/src/plugins/qmldesigner/designercore/exceptions/exception.cpp b/src/plugins/qmldesigner/designercore/exceptions/exception.cpp
index 59975648c1..46fd19d432 100644
--- a/src/plugins/qmldesigner/designercore/exceptions/exception.cpp
+++ b/src/plugins/qmldesigner/designercore/exceptions/exception.cpp
@@ -110,7 +110,7 @@ Exception::Exception(int line,
for (int i = 0; i < nSize; i++)
{
- m_backTrace.append(QString("%1\n").arg(symbols[i]));
+ m_backTrace.append(QString("%1\n").arg(QLatin1String(symbols[i])));
}
free(symbols);
diff --git a/src/plugins/qmldesigner/designercore/filemanager/addarraymembervisitor.h b/src/plugins/qmldesigner/designercore/filemanager/addarraymembervisitor.h
index e178a06ebb..d414e24664 100644
--- a/src/plugins/qmldesigner/designercore/filemanager/addarraymembervisitor.h
+++ b/src/plugins/qmldesigner/designercore/filemanager/addarraymembervisitor.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef ADDARRAYMEMBERVISITOR_H
-#define ADDARRAYMEMBERVISITOR_H
+#pragma once
#include "qmlrewriter.h"
@@ -64,5 +63,3 @@ private:
} // namespace Internal
} // namespace QmlDesigner
-
-#endif // ADDARRAYMEMBERVISITOR_H
diff --git a/src/plugins/qmldesigner/designercore/filemanager/addobjectvisitor.h b/src/plugins/qmldesigner/designercore/filemanager/addobjectvisitor.h
index ae62bdaa90..2b869cbc50 100644
--- a/src/plugins/qmldesigner/designercore/filemanager/addobjectvisitor.h
+++ b/src/plugins/qmldesigner/designercore/filemanager/addobjectvisitor.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef ADDOBJECTVISITOR_H
-#define ADDOBJECTVISITOR_H
+#pragma once
#include "qmlrewriter.h"
@@ -54,5 +53,3 @@ private:
} // namespace Internal
} // namespace QmlDesigner
-
-#endif // ADDOBJECTVISITOR_H
diff --git a/src/plugins/qmldesigner/designercore/filemanager/addpropertyvisitor.cpp b/src/plugins/qmldesigner/designercore/filemanager/addpropertyvisitor.cpp
index 7e51ae24ba..7628c6b828 100644
--- a/src/plugins/qmldesigner/designercore/filemanager/addpropertyvisitor.cpp
+++ b/src/plugins/qmldesigner/designercore/filemanager/addpropertyvisitor.cpp
@@ -156,7 +156,7 @@ void AddPropertyVisitor::addInMembers(QmlJS::AST::UiObjectInitializer *initializ
newPropertyTemplate.prepend(QLatin1Char('\n'));
}
- const QString newPropertyText = addIndentation(newPropertyTemplate.arg(m_name, m_value), depth);
+ const QString newPropertyText = addIndentation(newPropertyTemplate.arg(QString::fromLatin1(m_name), m_value), depth);
replace(endOfPreviousMember.end(), 0, newPropertyText);
setDidRewriting(true);
diff --git a/src/plugins/qmldesigner/designercore/filemanager/addpropertyvisitor.h b/src/plugins/qmldesigner/designercore/filemanager/addpropertyvisitor.h
index ea8a4dd4b0..9da136d82c 100644
--- a/src/plugins/qmldesigner/designercore/filemanager/addpropertyvisitor.h
+++ b/src/plugins/qmldesigner/designercore/filemanager/addpropertyvisitor.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef ADDPROPERTYVISITOR_H
-#define ADDPROPERTYVISITOR_H
+#pragma once
#include "qmlrefactoring.h"
#include "qmlrewriter.h"
@@ -62,5 +61,3 @@ private:
} // namespace Internal
} // namespace QmlDesigner
-
-#endif // ADDPROPERTYVISITOR_H
diff --git a/src/plugins/qmldesigner/designercore/filemanager/astobjecttextextractor.h b/src/plugins/qmldesigner/designercore/filemanager/astobjecttextextractor.h
index ee4a2b1bf3..a1dfb7b71a 100644
--- a/src/plugins/qmldesigner/designercore/filemanager/astobjecttextextractor.h
+++ b/src/plugins/qmldesigner/designercore/filemanager/astobjecttextextractor.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef ASTOBJECTTEXTEXTRACTOR_H
-#define ASTOBJECTTEXTEXTRACTOR_H
+#pragma once
#include <qmljs/parser/qmljsastvisitor_p.h>
#include <qmljs/qmljsdocument.h>
@@ -51,5 +50,3 @@ private:
};
} // namespace QmlDesigner
-
-#endif // ASTOBJECTTEXTEXTRACTOR_H
diff --git a/src/plugins/qmldesigner/designercore/filemanager/changeimportsvisitor.h b/src/plugins/qmldesigner/designercore/filemanager/changeimportsvisitor.h
index 2fe05cd088..f498d06aaa 100644
--- a/src/plugins/qmldesigner/designercore/filemanager/changeimportsvisitor.h
+++ b/src/plugins/qmldesigner/designercore/filemanager/changeimportsvisitor.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef CHANGEIMPORTSVISITOR_H
-#define CHANGEIMPORTSVISITOR_H
+#pragma once
#include "import.h"
#include "qmlrewriter.h"
@@ -48,5 +47,3 @@ private:
} // namespace Internal
} // namespace QmlDesigner
-
-#endif // CHANGEIMPORTSVISITOR_H
diff --git a/src/plugins/qmldesigner/designercore/filemanager/changeobjecttypevisitor.h b/src/plugins/qmldesigner/designercore/filemanager/changeobjecttypevisitor.h
index 0f2822a8a2..474f83b944 100644
--- a/src/plugins/qmldesigner/designercore/filemanager/changeobjecttypevisitor.h
+++ b/src/plugins/qmldesigner/designercore/filemanager/changeobjecttypevisitor.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef CHANGEOBJECTTYPEVISITOR_H
-#define CHANGEOBJECTTYPEVISITOR_H
+#pragma once
#include "qmlrewriter.h"
@@ -52,5 +51,3 @@ private:
} // namespace Internal
} // namespace QmlDesigner
-
-#endif // CHANGEOBJECTTYPEVISITOR_H
diff --git a/src/plugins/qmldesigner/designercore/filemanager/changepropertyvisitor.h b/src/plugins/qmldesigner/designercore/filemanager/changepropertyvisitor.h
index 6b0eeca86a..f97eea0a37 100644
--- a/src/plugins/qmldesigner/designercore/filemanager/changepropertyvisitor.h
+++ b/src/plugins/qmldesigner/designercore/filemanager/changepropertyvisitor.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef CHANGEPROPERTYVISITOR_H
-#define CHANGEPROPERTYVISITOR_H
+#pragma once
#include "qmlrefactoring.h"
#include "qmlrewriter.h"
@@ -64,5 +63,3 @@ private:
} // namespace Internal
} // namespace QmlDesigner
-
-#endif // CHANGEPROPERTYVISITOR_H
diff --git a/src/plugins/qmldesigner/designercore/filemanager/firstdefinitionfinder.h b/src/plugins/qmldesigner/designercore/filemanager/firstdefinitionfinder.h
index 7bc48559b2..9aca188a60 100644
--- a/src/plugins/qmldesigner/designercore/filemanager/firstdefinitionfinder.h
+++ b/src/plugins/qmldesigner/designercore/filemanager/firstdefinitionfinder.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef FIRSTDEFINITIONFINDER_H
-#define FIRSTDEFINITIONFINDER_H
+#pragma once
#include <qmljs/parser/qmljsastvisitor_p.h>
#include <qmljs/qmljsdocument.h>
@@ -54,5 +53,3 @@ private:
};
} // namespace QmlDesigner
-
-#endif // FIRSTDEFINITIONFINDER_H
diff --git a/src/plugins/qmldesigner/designercore/filemanager/moveobjectbeforeobjectvisitor.h b/src/plugins/qmldesigner/designercore/filemanager/moveobjectbeforeobjectvisitor.h
index 6afd688e46..909c77ef70 100644
--- a/src/plugins/qmldesigner/designercore/filemanager/moveobjectbeforeobjectvisitor.h
+++ b/src/plugins/qmldesigner/designercore/filemanager/moveobjectbeforeobjectvisitor.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef MOVEOBJECTBEFOREOBJECTVISITOR_H
-#define MOVEOBJECTBEFOREOBJECTVISITOR_H
+#pragma once
#include "qmlrewriter.h"
@@ -75,5 +74,3 @@ private:
} // namespace Internal
} // namespace QmlDesigner
-
-#endif // MOVEOBJECTBEFOREOBJECTVISITOR_H
diff --git a/src/plugins/qmldesigner/designercore/filemanager/moveobjectvisitor.cpp b/src/plugins/qmldesigner/designercore/filemanager/moveobjectvisitor.cpp
index d8b5fc440c..b0fe35fc90 100644
--- a/src/plugins/qmldesigner/designercore/filemanager/moveobjectvisitor.cpp
+++ b/src/plugins/qmldesigner/designercore/filemanager/moveobjectvisitor.cpp
@@ -101,7 +101,7 @@ private:
UiObjectMember *member = iter->member;
if (UiArrayBinding *arrayBinding = cast<UiArrayBinding*>(member)) {
- if (toString(arrayBinding->qualifiedId) == targetPropertyName) {
+ if (toString(arrayBinding->qualifiedId) == QString::fromUtf8(targetPropertyName)) {
appendToArray(arrayBinding);
setDidRewriting(true);
@@ -112,7 +112,7 @@ private:
{ // insert (create) a UiObjectBinding:
UiObjectMemberList *insertAfter = searchMemberToInsertAfter(ast->members, targetPropertyName, propertyOrder);
- moveInfo.prefixToInsert = QStringLiteral("\n") + targetPropertyName + (targetIsArrayBinding ? QStringLiteral(": [") : QStringLiteral(": "));
+ moveInfo.prefixToInsert = QStringLiteral("\n") + QString::fromUtf8(targetPropertyName) + (targetIsArrayBinding ? QStringLiteral(": [") : QStringLiteral(": "));
moveInfo.suffixToInsert = targetIsArrayBinding ? QStringLiteral("\n]") : QStringLiteral("");
if (insertAfter && insertAfter->member)
diff --git a/src/plugins/qmldesigner/designercore/filemanager/moveobjectvisitor.h b/src/plugins/qmldesigner/designercore/filemanager/moveobjectvisitor.h
index 7b499f42ca..cc6d44825d 100644
--- a/src/plugins/qmldesigner/designercore/filemanager/moveobjectvisitor.h
+++ b/src/plugins/qmldesigner/designercore/filemanager/moveobjectvisitor.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef MOVEOBJECTVISITOR_H
-#define MOVEOBJECTVISITOR_H
+#pragma once
#include "qmlrewriter.h"
@@ -64,5 +63,3 @@ private:
} // namespace Internal
} // namespace QmlDesigner
-
-#endif // MOVEOBJECTVISITOR_H
diff --git a/src/plugins/qmldesigner/designercore/filemanager/objectlengthcalculator.h b/src/plugins/qmldesigner/designercore/filemanager/objectlengthcalculator.h
index e771ef3bf4..e869bb98b4 100644
--- a/src/plugins/qmldesigner/designercore/filemanager/objectlengthcalculator.h
+++ b/src/plugins/qmldesigner/designercore/filemanager/objectlengthcalculator.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef OBJECTLENGTHCALCULATOR_H
-#define OBJECTLENGTHCALCULATOR_H
+#pragma once
#include <qmljs/parser/qmljsastvisitor_p.h>
#include <qmljs/qmljsdocument.h>
@@ -51,5 +50,3 @@ private:
};
} // namespace QmlDesigner
-
-#endif // OBJECTLENGTHCALCULATOR_H
diff --git a/src/plugins/qmldesigner/designercore/filemanager/qmlrefactoring.cpp b/src/plugins/qmldesigner/designercore/filemanager/qmlrefactoring.cpp
index e5bbc0b61e..f4e53d31d6 100644
--- a/src/plugins/qmldesigner/designercore/filemanager/qmlrefactoring.cpp
+++ b/src/plugins/qmldesigner/designercore/filemanager/qmlrefactoring.cpp
@@ -85,7 +85,7 @@ bool QmlRefactoring::addToArrayMemberList(int parentLocation, const PropertyName
if (parentLocation < 0)
return false;
- AddArrayMemberVisitor visit(*textModifier, (quint32) parentLocation, propertyName, content);
+ AddArrayMemberVisitor visit(*textModifier, (quint32) parentLocation, QString::fromUtf8(propertyName), content);
visit.setConvertObjectBindingIntoArrayBinding(true);
return visit(qmlDocument->qmlProgram());
}
@@ -117,7 +117,11 @@ bool QmlRefactoring::changeProperty(int parentLocation, const PropertyName &name
if (parentLocation < 0)
return false;
- ChangePropertyVisitor visit(*textModifier, (quint32) parentLocation, name, value, propertyType);
+ ChangePropertyVisitor visit(*textModifier,
+ (quint32) parentLocation,
+ QString::fromUtf8(name),
+ value,
+ propertyType);
return visit(qmlDocument->qmlProgram());
}
@@ -168,6 +172,6 @@ bool QmlRefactoring::removeProperty(int parentLocation, const PropertyName &name
if (parentLocation < 0 || name.isEmpty())
return false;
- RemovePropertyVisitor visit(*textModifier, (quint32) parentLocation, name);
+ RemovePropertyVisitor visit(*textModifier, (quint32) parentLocation, QString::fromUtf8(name));
return visit(qmlDocument->qmlProgram());
}
diff --git a/src/plugins/qmldesigner/designercore/filemanager/qmlrefactoring.h b/src/plugins/qmldesigner/designercore/filemanager/qmlrefactoring.h
index 4617569cef..d51ca90379 100644
--- a/src/plugins/qmldesigner/designercore/filemanager/qmlrefactoring.h
+++ b/src/plugins/qmldesigner/designercore/filemanager/qmlrefactoring.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef QMLREFACTORING_H
-#define QMLREFACTORING_H
+#pragma once
#include <import.h>
#include <textmodifier.h>
@@ -75,5 +74,3 @@ private:
};
} // namespace QmlDesigner
-
-#endif // QMLREFACTORING_H
diff --git a/src/plugins/qmldesigner/designercore/filemanager/qmlrewriter.cpp b/src/plugins/qmldesigner/designercore/filemanager/qmlrewriter.cpp
index b3b214cce2..354a384bd5 100644
--- a/src/plugins/qmldesigner/designercore/filemanager/qmlrewriter.cpp
+++ b/src/plugins/qmldesigner/designercore/filemanager/qmlrewriter.cpp
@@ -319,7 +319,7 @@ QmlJS::AST::UiObjectMemberList *QMLRewriter::searchMemberToInsertAfter(QmlJS::AS
idx = propertyOrder.size() - 1;
for (; idx > 0; --idx) {
- const QString prop = propertyOrder.at(idx - 1);
+ const QString prop = QString::fromLatin1(propertyOrder.at(idx - 1));
QmlJS::AST::UiObjectMemberList *candidate = orderedMembers.value(prop, 0);
if (candidate != 0)
return candidate;
diff --git a/src/plugins/qmldesigner/designercore/filemanager/qmlrewriter.h b/src/plugins/qmldesigner/designercore/filemanager/qmlrewriter.h
index 62380d2dc0..af54ba8c13 100644
--- a/src/plugins/qmldesigner/designercore/filemanager/qmlrewriter.h
+++ b/src/plugins/qmldesigner/designercore/filemanager/qmlrewriter.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef QMLREWRITER_H
-#define QMLREWRITER_H
+#pragma once
#include "textmodifier.h"
@@ -92,5 +91,3 @@ private:
} // namespace Internal
} // namespace QmlDesigner
-
-#endif // QMLREWRITER_H
diff --git a/src/plugins/qmldesigner/designercore/filemanager/qmlwarningdialog.h b/src/plugins/qmldesigner/designercore/filemanager/qmlwarningdialog.h
index 143d40ed77..178c32ca5f 100644
--- a/src/plugins/qmldesigner/designercore/filemanager/qmlwarningdialog.h
+++ b/src/plugins/qmldesigner/designercore/filemanager/qmlwarningdialog.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef QMLWARNINGDIALOG_H
-#define QMLWARNINGDIALOG_H
+#pragma once
#include <QDialog>
@@ -58,5 +57,3 @@ private:
} //Internal
} //QmlDesigner
-
-#endif // QMLWARNINGDIALOG_H
diff --git a/src/plugins/qmldesigner/designercore/filemanager/removepropertyvisitor.h b/src/plugins/qmldesigner/designercore/filemanager/removepropertyvisitor.h
index 7419d81192..7eb8b53fd9 100644
--- a/src/plugins/qmldesigner/designercore/filemanager/removepropertyvisitor.h
+++ b/src/plugins/qmldesigner/designercore/filemanager/removepropertyvisitor.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef REMOVEPROPERTYVISITOR_H
-#define REMOVEPROPERTYVISITOR_H
+#pragma once
#include <QString>
@@ -58,5 +57,3 @@ private:
} // namespace Internal
} // namespace QmlDesigner
-
-#endif // REMOVEPROPERTYVISITOR_H
diff --git a/src/plugins/qmldesigner/designercore/filemanager/removeuiobjectmembervisitor.h b/src/plugins/qmldesigner/designercore/filemanager/removeuiobjectmembervisitor.h
index 0d4d1ee785..6fc4d1d0b3 100644
--- a/src/plugins/qmldesigner/designercore/filemanager/removeuiobjectmembervisitor.h
+++ b/src/plugins/qmldesigner/designercore/filemanager/removeuiobjectmembervisitor.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef REMOVEUIOBJECTMEMBERVISITOR_H
-#define REMOVEUIOBJECTMEMBERVISITOR_H
+#pragma once
#include <QStack>
@@ -67,5 +66,3 @@ private:
} // namespace Internal
} // namespace QmlDesigner
-
-#endif // REMOVEUIOBJECTMEMBERVISITOR_H
diff --git a/src/plugins/qmldesigner/designercore/include/abstractproperty.h b/src/plugins/qmldesigner/designercore/include/abstractproperty.h
index 0c7c23e4fa..ebd286f646 100644
--- a/src/plugins/qmldesigner/designercore/include/abstractproperty.h
+++ b/src/plugins/qmldesigner/designercore/include/abstractproperty.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef ABSTRACTPROPERTY_H
-#define ABSTRACTPROPERTY_H
+#pragma once
#include <QPointer>
#include <QSharedPointer>
@@ -122,5 +121,3 @@ QMLDESIGNERCORE_EXPORT uint qHash(const AbstractProperty& property);
QMLDESIGNERCORE_EXPORT QTextStream& operator<<(QTextStream &stream, const AbstractProperty &property);
QMLDESIGNERCORE_EXPORT QDebug operator<<(QDebug debug, const AbstractProperty &AbstractProperty);
}
-
-#endif //ABSTRACTPROPERTY_H
diff --git a/src/plugins/qmldesigner/designercore/include/abstractview.h b/src/plugins/qmldesigner/designercore/include/abstractview.h
index 0807df0496..aae79fc9ef 100644
--- a/src/plugins/qmldesigner/designercore/include/abstractview.h
+++ b/src/plugins/qmldesigner/designercore/include/abstractview.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef ABSTRACTVIEW_H
-#define ABSTRACTVIEW_H
+#pragma once
#include <qmldesignercorelib_global.h>
@@ -269,5 +268,3 @@ QMLDESIGNERCORE_EXPORT QList<Internal::InternalNodePointer> toInternalNodeList(c
QMLDESIGNERCORE_EXPORT QList<ModelNode> toModelNodeList(const QList<Internal::InternalNodePointer> &nodeList, AbstractView *view);
}
-
-#endif // ABSTRACTVIEW_H
diff --git a/src/plugins/qmldesigner/designercore/include/anchorline.h b/src/plugins/qmldesigner/designercore/include/anchorline.h
index 0987611feb..98b6951f77 100644
--- a/src/plugins/qmldesigner/designercore/include/anchorline.h
+++ b/src/plugins/qmldesigner/designercore/include/anchorline.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef QMLDESIGNER_ANCHORLINE_H
-#define QMLDESIGNER_ANCHORLINE_H
+#pragma once
#include <qmldesignercorelib_global.h>
@@ -51,5 +50,3 @@ private:
};
} // namespace QmlDesigner
-
-#endif // QMLDESIGNER_ANCHORLINE_H
diff --git a/src/plugins/qmldesigner/designercore/include/basetexteditmodifier.h b/src/plugins/qmldesigner/designercore/include/basetexteditmodifier.h
index 5e31b4e343..58c1950ebd 100644
--- a/src/plugins/qmldesigner/designercore/include/basetexteditmodifier.h
+++ b/src/plugins/qmldesigner/designercore/include/basetexteditmodifier.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef BASETEXTEDITMODIFIER_H
-#define BASETEXTEDITMODIFIER_H
+#pragma once
#include "qmldesignercorelib_global.h"
#include "plaintexteditmodifier.h"
@@ -50,5 +49,3 @@ public:
};
} // namespace QmlDesigner
-
-#endif // BASETEXTEDITMODIFIER_H
diff --git a/src/plugins/qmldesigner/designercore/include/bindingproperty.h b/src/plugins/qmldesigner/designercore/include/bindingproperty.h
index 2dbc2d2197..3c4c6f69c5 100644
--- a/src/plugins/qmldesigner/designercore/include/bindingproperty.h
+++ b/src/plugins/qmldesigner/designercore/include/bindingproperty.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef BINDINGPROPERTY_H
-#define BINDINGPROPERTY_H
+#pragma once
#include "qmldesignercorelib_global.h"
#include "abstractproperty.h"
@@ -58,5 +57,3 @@ protected:
};
} // namespace QmlDesigner
-
-#endif // BINDINGPROPERTY_H
diff --git a/src/plugins/qmldesigner/designercore/include/bytearraymodifier.h b/src/plugins/qmldesigner/designercore/include/bytearraymodifier.h
index 45390bd2ab..5552f23ae6 100644
--- a/src/plugins/qmldesigner/designercore/include/bytearraymodifier.h
+++ b/src/plugins/qmldesigner/designercore/include/bytearraymodifier.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef BYTEARRAYMODIFIER_H
-#define BYTEARRAYMODIFIER_H
+#pragma once
#include <QPlainTextEdit>
@@ -50,5 +49,3 @@ private:
};
}
-
-#endif // BYTEARRAYMODIFIER_H
diff --git a/src/plugins/qmldesigner/designercore/include/componenttextmodifier.h b/src/plugins/qmldesigner/designercore/include/componenttextmodifier.h
index a8dfa6ba82..94b268ada5 100644
--- a/src/plugins/qmldesigner/designercore/include/componenttextmodifier.h
+++ b/src/plugins/qmldesigner/designercore/include/componenttextmodifier.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef COMPONENTTEXTMODIFIER_H
-#define COMPONENTTEXTMODIFIER_H
+#pragma once
#include "textmodifier.h"
@@ -68,5 +67,3 @@ private:
};
} // namespace QmlDesigner
-
-#endif // COMPONENTTEXTMODIFIER_H
diff --git a/src/plugins/qmldesigner/designercore/include/customnotifications.h b/src/plugins/qmldesigner/designercore/include/customnotifications.h
index 90c5a7c8ef..58cc433e7f 100644
--- a/src/plugins/qmldesigner/designercore/include/customnotifications.h
+++ b/src/plugins/qmldesigner/designercore/include/customnotifications.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef CUSTOMNOTIFICATIONS_H
-#define CUSTOMNOTIFICATIONS_H
+#pragma once
#include <QString>
@@ -34,5 +33,3 @@ const QString StartRewriterAmend = QStringLiteral("__start rewriter amend__");
const QString EndRewriterAmend = QStringLiteral("__end rewriter amend__");
}
-
-#endif //CUSTOMNOTIFICATIONS_H
diff --git a/src/plugins/qmldesigner/designercore/include/exception.h b/src/plugins/qmldesigner/designercore/include/exception.h
index 31514fc887..ea9a5ac876 100644
--- a/src/plugins/qmldesigner/designercore/include/exception.h
+++ b/src/plugins/qmldesigner/designercore/include/exception.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef EXCEPTION_H
-#define EXCEPTION_H
+#pragma once
#include <qmldesignercorelib_global.h>
@@ -67,6 +66,3 @@ private:
QMLDESIGNERCORE_EXPORT QDebug operator<<(QDebug debug, const Exception &exception);
}
-
-
-#endif // EXCEPTION_H
diff --git a/src/plugins/qmldesigner/designercore/include/forwardview.h b/src/plugins/qmldesigner/designercore/include/forwardview.h
index 5c94ae22d1..b34cd107e9 100644
--- a/src/plugins/qmldesigner/designercore/include/forwardview.h
+++ b/src/plugins/qmldesigner/designercore/include/forwardview.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef FORWARDVIEW_H
-#define FORWARDVIEW_H
+#pragma once
#include <abstractview.h>
@@ -286,5 +285,3 @@ ViewType *ForwardView<ViewType>::firstView() const
} // namespace QmlDesigner
-
-#endif // FORWARDVIEW_H
diff --git a/src/plugins/qmldesigner/designercore/include/import.h b/src/plugins/qmldesigner/designercore/include/import.h
index 6cd6a801ee..573e682c0b 100644
--- a/src/plugins/qmldesigner/designercore/include/import.h
+++ b/src/plugins/qmldesigner/designercore/include/import.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef IMPORT_H
-#define IMPORT_H
+#pragma once
#include <QString>
#include <QStringList>
@@ -77,5 +76,3 @@ QMLDESIGNERCORE_EXPORT uint qHash(const Import &import);
} // namespace QmlDesigner
Q_DECLARE_METATYPE(QmlDesigner::Import)
-
-#endif // IMPORT_H
diff --git a/src/plugins/qmldesigner/designercore/include/invalidargumentexception.h b/src/plugins/qmldesigner/designercore/include/invalidargumentexception.h
index 295282a56b..b3b4b86a29 100644
--- a/src/plugins/qmldesigner/designercore/include/invalidargumentexception.h
+++ b/src/plugins/qmldesigner/designercore/include/invalidargumentexception.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef INVALIDARGUMENTEXCEPTION_H
-#define INVALIDARGUMENTEXCEPTION_H
+#pragma once
#include "exception.h"
@@ -48,5 +47,3 @@ private:
};
}
-
-#endif // INVALIDARGUMENTEXCEPTION_H
diff --git a/src/plugins/qmldesigner/designercore/include/invalididexception.h b/src/plugins/qmldesigner/designercore/include/invalididexception.h
index f1a59e69ab..7f74ac7deb 100644
--- a/src/plugins/qmldesigner/designercore/include/invalididexception.h
+++ b/src/plugins/qmldesigner/designercore/include/invalididexception.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef INVALIDIDEXCEPTION_H
-#define INVALIDIDEXCEPTION_H
+#pragma once
#include "invalidargumentexception.h"
@@ -56,5 +55,3 @@ private:
};
}
-
-#endif // INVALIDIDEXCEPTION_H
diff --git a/src/plugins/qmldesigner/designercore/include/invalidmetainfoexception.h b/src/plugins/qmldesigner/designercore/include/invalidmetainfoexception.h
index 72f1c1b424..079d3e27d6 100644
--- a/src/plugins/qmldesigner/designercore/include/invalidmetainfoexception.h
+++ b/src/plugins/qmldesigner/designercore/include/invalidmetainfoexception.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef INVALIDMETAINFOEXCEPTION_H
-#define INVALIDMETAINFOEXCEPTION_H
+#pragma once
#include "exception.h"
@@ -42,5 +41,3 @@ public:
};
}
-
-#endif // INVALIDMETAINFOEXCEPTION_H
diff --git a/src/plugins/qmldesigner/designercore/include/invalidmodelnodeexception.h b/src/plugins/qmldesigner/designercore/include/invalidmodelnodeexception.h
index a51b41ea90..e1a38d00c8 100644
--- a/src/plugins/qmldesigner/designercore/include/invalidmodelnodeexception.h
+++ b/src/plugins/qmldesigner/designercore/include/invalidmodelnodeexception.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef INVALIDMODELNODEEXCEPTION_H
-#define INVALIDMODELNODEEXCEPTION_H
+#pragma once
#include "exception.h"
@@ -42,5 +41,3 @@ public:
};
}
-
-#endif // INVALIDMODELNODEEXCEPTION_H
diff --git a/src/plugins/qmldesigner/designercore/include/invalidmodelstateexception.h b/src/plugins/qmldesigner/designercore/include/invalidmodelstateexception.h
index ebd92aeb11..76d48e880a 100644
--- a/src/plugins/qmldesigner/designercore/include/invalidmodelstateexception.h
+++ b/src/plugins/qmldesigner/designercore/include/invalidmodelstateexception.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef INVALIDMODELSTATEEXCEPTION_H
-#define INVALIDMODELSTATEEXCEPTION_H
+#pragma once
#include "exception.h"
@@ -42,5 +41,3 @@ public:
};
} // namespace QmlDesigner
-
-#endif // INVALIDMODELSTATEEXCEPTION_H
diff --git a/src/plugins/qmldesigner/designercore/include/invalidpropertyexception.h b/src/plugins/qmldesigner/designercore/include/invalidpropertyexception.h
index 5bbe02e265..38a9e86290 100644
--- a/src/plugins/qmldesigner/designercore/include/invalidpropertyexception.h
+++ b/src/plugins/qmldesigner/designercore/include/invalidpropertyexception.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef INVALIDPROPERTYEXCEPTION_H
-#define INVALIDPROPERTYEXCEPTION_H
+#pragma once
#include "exception.h"
@@ -46,5 +45,3 @@ private:
};
} // namespace QmlDesigner
-
-#endif // INVALIDPROPERTYEXCEPTION_H
diff --git a/src/plugins/qmldesigner/designercore/include/invalidqmlsourceexception.h b/src/plugins/qmldesigner/designercore/include/invalidqmlsourceexception.h
index 63b7c8a580..9793bb4ddb 100644
--- a/src/plugins/qmldesigner/designercore/include/invalidqmlsourceexception.h
+++ b/src/plugins/qmldesigner/designercore/include/invalidqmlsourceexception.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef INVALIDQMLSOURCEEXCEPTION_H
-#define INVALIDQMLSOURCEEXCEPTION_H
+#pragma once
#include <exception.h>
@@ -46,5 +45,3 @@ private:
};
} // namespace QmlDesigner
-
-#endif // INVALIDQMLSOURCEEXCEPTION_H
diff --git a/src/plugins/qmldesigner/designercore/include/invalidreparentingexception.h b/src/plugins/qmldesigner/designercore/include/invalidreparentingexception.h
index 316dee31e7..2460ceba1b 100644
--- a/src/plugins/qmldesigner/designercore/include/invalidreparentingexception.h
+++ b/src/plugins/qmldesigner/designercore/include/invalidreparentingexception.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef INVALIDREPARENTINGEXCEPTION_H
-#define INVALIDREPARENTINGEXCEPTION_H
+#pragma once
#include "exception.h"
@@ -41,5 +40,3 @@ public:
};
} // namespace QmlDesigner
-
-#endif // INVALIDREPARENTINGEXCEPTION_H
diff --git a/src/plugins/qmldesigner/designercore/include/invalidslideindexexception.h b/src/plugins/qmldesigner/designercore/include/invalidslideindexexception.h
index 82110299b8..7f95604c7b 100644
--- a/src/plugins/qmldesigner/designercore/include/invalidslideindexexception.h
+++ b/src/plugins/qmldesigner/designercore/include/invalidslideindexexception.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef INVALIDSLIDEINDEXEXCEPTION_H
-#define INVALIDSLIDEINDEXEXCEPTION_H
+#pragma once
#include "exception.h"
@@ -40,5 +39,3 @@ public:
};
} // namespace QmlDesigner
-
-#endif // INVALIDSLIDEINDEXEXCEPTION_H
diff --git a/src/plugins/qmldesigner/designercore/include/itemlibraryinfo.h b/src/plugins/qmldesigner/designercore/include/itemlibraryinfo.h
index 4b876815e7..2fc5a9b794 100644
--- a/src/plugins/qmldesigner/designercore/include/itemlibraryinfo.h
+++ b/src/plugins/qmldesigner/designercore/include/itemlibraryinfo.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef ITEMLIBRARYINFO_H
-#define ITEMLIBRARYINFO_H
+#pragma once
#include "qmldesignercorelib_global.h"
@@ -98,7 +97,7 @@ class QMLDESIGNERCORE_EXPORT ItemLibraryInfo : public QObject
public:
QList<ItemLibraryEntry> entries() const;
- QList<ItemLibraryEntry> entriesForType(const QString &typeName, int majorVersion, int minorVersion) const;
+ QList<ItemLibraryEntry> entriesForType(const QByteArray &typeName, int majorVersion, int minorVersion) const;
ItemLibraryEntry entry(const QString &name) const;
void addEntry(const ItemLibraryEntry &entry, bool overwriteDuplicate = false);
@@ -120,5 +119,3 @@ private: // variables
} // namespace QmlDesigner
Q_DECLARE_METATYPE(QmlDesigner::ItemLibraryEntry)
-
-#endif // ITEMLIBRARYINFO_H
diff --git a/src/plugins/qmldesigner/designercore/include/iwidgetplugin.h b/src/plugins/qmldesigner/designercore/include/iwidgetplugin.h
index ec59ec1af2..f85ad1e144 100644
--- a/src/plugins/qmldesigner/designercore/include/iwidgetplugin.h
+++ b/src/plugins/qmldesigner/designercore/include/iwidgetplugin.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef IWIDGETPLUGIN_H
-#define IWIDGETPLUGIN_H
+#pragma once
#include <QObject>
@@ -46,5 +45,3 @@ public:
QT_BEGIN_NAMESPACE
Q_DECLARE_INTERFACE(QmlDesigner::IWidgetPlugin, QMLDESIGNER_WIDGETPLUGIN_INTERFACE)
QT_END_NAMESPACE
-
-#endif // IWIDGETPLUGIN_H
diff --git a/src/plugins/qmldesigner/designercore/include/mathutils.h b/src/plugins/qmldesigner/designercore/include/mathutils.h
index eec4660dfb..5e35d77111 100644
--- a/src/plugins/qmldesigner/designercore/include/mathutils.h
+++ b/src/plugins/qmldesigner/designercore/include/mathutils.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef MATHUTILS_H
-#define MATHUTILS_H
+#pragma once
#include <QtGlobal>
@@ -38,5 +37,3 @@ inline double round(double value, int digits)
}
-
-#endif // MATHUTILS_H
diff --git a/src/plugins/qmldesigner/designercore/include/metainfo.h b/src/plugins/qmldesigner/designercore/include/metainfo.h
index d5d5e406b5..90d94c324a 100644
--- a/src/plugins/qmldesigner/designercore/include/metainfo.h
+++ b/src/plugins/qmldesigner/designercore/include/metainfo.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef METAINFO_H
-#define METAINFO_H
+#pragma once
#include "qmldesignercorelib_global.h"
@@ -83,5 +82,3 @@ private:
};
} //namespace QmlDesigner
-
-#endif // METAINFO_H
diff --git a/src/plugins/qmldesigner/designercore/include/metainforeader.h b/src/plugins/qmldesigner/designercore/include/metainforeader.h
index 9f1904e6d7..f2e7c81333 100644
--- a/src/plugins/qmldesigner/designercore/include/metainforeader.h
+++ b/src/plugins/qmldesigner/designercore/include/metainforeader.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef METAINFOREADER_H
-#define METAINFOREADER_H
+#pragma once
#include "qmldesignercorelib_global.h"
#include <metainfo.h>
@@ -117,4 +116,3 @@ private:
}
}
-#endif // METAINFOREADER_H
diff --git a/src/plugins/qmldesigner/designercore/include/model.h b/src/plugins/qmldesigner/designercore/include/model.h
index c18b63292b..dafc4d2c46 100644
--- a/src/plugins/qmldesigner/designercore/include/model.h
+++ b/src/plugins/qmldesigner/designercore/include/model.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef DESIGNERMODEL_H
-#define DESIGNERMODEL_H
+#pragma once
#include <qmldesignercorelib_global.h>
#include <QObject>
@@ -118,5 +117,3 @@ public:
};
}
-
-#endif // DESIGNERMODEL_H
diff --git a/src/plugins/qmldesigner/designercore/include/modelmerger.h b/src/plugins/qmldesigner/designercore/include/modelmerger.h
index bf680675d9..b49bfeb24b 100644
--- a/src/plugins/qmldesigner/designercore/include/modelmerger.h
+++ b/src/plugins/qmldesigner/designercore/include/modelmerger.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef MODELMERGER_H
-#define MODELMERGER_H
+#pragma once
#include <QPointer>
@@ -51,5 +50,3 @@ private:
};
} //namespace QmlDesigner
-
-#endif // MODELMERGER_H
diff --git a/src/plugins/qmldesigner/designercore/include/modelnode.h b/src/plugins/qmldesigner/designercore/include/modelnode.h
index c0aa93102b..3b8b1fcf68 100644
--- a/src/plugins/qmldesigner/designercore/include/modelnode.h
+++ b/src/plugins/qmldesigner/designercore/include/modelnode.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef MODELNODE_H
-#define MODELNODE_H
+#pragma once
#include "qmldesignercorelib_global.h"
#include <QPointer>
@@ -93,7 +92,7 @@ public:
ModelNode& operator=(const ModelNode &other);
TypeName type() const;
- TypeName simplifiedTypeName() const;
+ QString simplifiedTypeName() const;
int minorVersion() const;
int majorVersion() const;
@@ -210,5 +209,3 @@ QMLDESIGNERCORE_EXPORT QTextStream& operator<<(QTextStream &stream, const ModelN
}
Q_DECLARE_METATYPE(QmlDesigner::ModelNode)
-
-#endif // MODELNODE_H
diff --git a/src/plugins/qmldesigner/designercore/include/modelnodepositionstorage.h b/src/plugins/qmldesigner/designercore/include/modelnodepositionstorage.h
index 181fee548a..283c15d1ce 100644
--- a/src/plugins/qmldesigner/designercore/include/modelnodepositionstorage.h
+++ b/src/plugins/qmldesigner/designercore/include/modelnodepositionstorage.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef MODELNODEPOSITIONSTORAGE_H
-#define MODELNODEPOSITIONSTORAGE_H
+#pragma once
#include "modelnode.h"
@@ -74,5 +73,3 @@ private:
} // namespace Internal
} // namespace QmlDesigner
-
-#endif // MODELNODEPOSITIONSTORAGE_H
diff --git a/src/plugins/qmldesigner/designercore/include/modificationgroupexception.h b/src/plugins/qmldesigner/designercore/include/modificationgroupexception.h
index 5a61a37fd8..7397ed3e3f 100644
--- a/src/plugins/qmldesigner/designercore/include/modificationgroupexception.h
+++ b/src/plugins/qmldesigner/designercore/include/modificationgroupexception.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef MODIFICATIONGROUPEXCEPTION_H
-#define MODIFICATIONGROUPEXCEPTION_H
+#pragma once
#include "exception.h"
@@ -39,5 +38,3 @@ public:
};
}
-
-#endif // MODIFICATIONGROUPEXCEPTION_H
diff --git a/src/plugins/qmldesigner/designercore/include/modificationgrouptoken.h b/src/plugins/qmldesigner/designercore/include/modificationgrouptoken.h
index 62a48242a2..dffa975f9d 100644
--- a/src/plugins/qmldesigner/designercore/include/modificationgrouptoken.h
+++ b/src/plugins/qmldesigner/designercore/include/modificationgrouptoken.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef MODIFICATIONGROUPTOKEN_H
-#define MODIFICATIONGROUPTOKEN_H
+#pragma once
#include <corelib_global.h>
@@ -67,5 +66,3 @@ private:
};
}
-
-#endif // MODIFICATIONGROUPTOKEN_H
diff --git a/src/plugins/qmldesigner/designercore/include/nodeabstractproperty.h b/src/plugins/qmldesigner/designercore/include/nodeabstractproperty.h
index d5c3209f7f..07f75d07a6 100644
--- a/src/plugins/qmldesigner/designercore/include/nodeabstractproperty.h
+++ b/src/plugins/qmldesigner/designercore/include/nodeabstractproperty.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef NODEABSTRACTPROPERTY_H
-#define NODEABSTRACTPROPERTY_H
+#pragma once
#include "abstractproperty.h"
@@ -71,5 +70,3 @@ QMLDESIGNERCORE_EXPORT QTextStream& operator<<(QTextStream &stream, const NodeAb
QMLDESIGNERCORE_EXPORT QDebug operator<<(QDebug debug, const NodeAbstractProperty &property);
} // namespace QmlDesigner
-
-#endif // NODEABSTRACTPROPERTY_H
diff --git a/src/plugins/qmldesigner/designercore/include/nodeanchors.h b/src/plugins/qmldesigner/designercore/include/nodeanchors.h
index ca1518a297..efa20cc1a3 100644
--- a/src/plugins/qmldesigner/designercore/include/nodeanchors.h
+++ b/src/plugins/qmldesigner/designercore/include/nodeanchors.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef NODEANCHORS_H
-#define NODEANCHORS_H
+#pragma once
#include <QPointer>
@@ -106,5 +105,3 @@ CORESHARED_EXPORT QDebug operator<<(QDebug debug, const NodeAnchors &anchors);
CORESHARED_EXPORT QTextStream& operator<<(QTextStream &stream, const NodeAnchors &anchors);
} // namespace QmlDesigner
-
-#endif // NODEANCHORS_H
diff --git a/src/plugins/qmldesigner/designercore/include/nodeinstance.h b/src/plugins/qmldesigner/designercore/include/nodeinstance.h
index a5f64c92c6..9595396ae9 100644
--- a/src/plugins/qmldesigner/designercore/include/nodeinstance.h
+++ b/src/plugins/qmldesigner/designercore/include/nodeinstance.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef PROXYNODEINSTANCE_H
-#define PROXYNODEINSTANCE_H
+#pragma once
#include <QSharedPointer>
#include <QTransform>
@@ -131,5 +130,3 @@ private:
bool operator ==(const NodeInstance &first, const NodeInstance &second);
}
-
-#endif // PROXYNODEINSTANCE_H
diff --git a/src/plugins/qmldesigner/designercore/include/nodeinstanceview.h b/src/plugins/qmldesigner/designercore/include/nodeinstanceview.h
index dc11a2296e..4d4ffaa629 100644
--- a/src/plugins/qmldesigner/designercore/include/nodeinstanceview.h
+++ b/src/plugins/qmldesigner/designercore/include/nodeinstanceview.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef NODEINSTANCEVIEW_H
-#define NODEINSTANCEVIEW_H
+#pragma once
#include "qmldesignercorelib_global.h"
#include "abstractview.h"
@@ -205,5 +204,3 @@ private: //variables
};
} // namespace ProxyNodeInstanceView
-
-#endif // NODEINSTANCEVIEW_H
diff --git a/src/plugins/qmldesigner/designercore/include/nodelistproperty.h b/src/plugins/qmldesigner/designercore/include/nodelistproperty.h
index 065b954f20..94af238bef 100644
--- a/src/plugins/qmldesigner/designercore/include/nodelistproperty.h
+++ b/src/plugins/qmldesigner/designercore/include/nodelistproperty.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef NODELISTPROPERTY_H
-#define NODELISTPROPERTY_H
+#pragma once
#include "qmldesignercorelib_global.h"
@@ -60,5 +59,3 @@ protected:
NodeListProperty(const Internal::InternalNodeListPropertyPointer &internalNodeListProperty, Model* model, AbstractView *view);
};
}
-
-#endif //NODELISTROPERTY_H
diff --git a/src/plugins/qmldesigner/designercore/include/nodemetainfo.h b/src/plugins/qmldesigner/designercore/include/nodemetainfo.h
index 1e81226f1f..0ed326b804 100644
--- a/src/plugins/qmldesigner/designercore/include/nodemetainfo.h
+++ b/src/plugins/qmldesigner/designercore/include/nodemetainfo.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef NODEMETAINFO_H
-#define NODEMETAINFO_H
+#pragma once
#include <QList>
#include <QString>
@@ -82,7 +81,7 @@ public:
QList<NodeMetaInfo> superClasses() const;
NodeMetaInfo directSuperClass() const;
- QList<TypeName> superClassNames() const;
+ QStringList superClassNames() const;
bool defaultPropertyIsComponent() const;
@@ -112,5 +111,3 @@ private:
};
} //QmlDesigner
-
-#endif // NODEMETAINFO_H
diff --git a/src/plugins/qmldesigner/designercore/include/nodeproperty.h b/src/plugins/qmldesigner/designercore/include/nodeproperty.h
index aaa5cf1b04..6c90488ec6 100644
--- a/src/plugins/qmldesigner/designercore/include/nodeproperty.h
+++ b/src/plugins/qmldesigner/designercore/include/nodeproperty.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef NODEPROPERTY_H
-#define NODEPROPERTY_H
+#pragma once
#include "qmldesignercorelib_global.h"
#include "nodeabstractproperty.h"
@@ -51,5 +50,3 @@ protected:
};
} // namespace QmlDesigner
-
-#endif // NODEPROPERTY_H
diff --git a/src/plugins/qmldesigner/designercore/include/notimplementedexception.h b/src/plugins/qmldesigner/designercore/include/notimplementedexception.h
index d93dc757c0..170d70c89d 100644
--- a/src/plugins/qmldesigner/designercore/include/notimplementedexception.h
+++ b/src/plugins/qmldesigner/designercore/include/notimplementedexception.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef NOTIMPLEMENTEDEXCEPTION_H
-#define NOTIMPLEMENTEDEXCEPTION_H
+#pragma once
#include "exception.h"
@@ -42,5 +41,3 @@ public:
};
}
-
-#endif // NOTIMPLEMENTEDEXCEPTION_H
diff --git a/src/plugins/qmldesigner/designercore/include/objectpropertybinding.h b/src/plugins/qmldesigner/designercore/include/objectpropertybinding.h
index a6d948b91c..e2e6f05689 100644
--- a/src/plugins/qmldesigner/designercore/include/objectpropertybinding.h
+++ b/src/plugins/qmldesigner/designercore/include/objectpropertybinding.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef OBJECTPROPERTYBINDING_H
-#define OBJECTPROPERTYBINDING_H
+#pragma once
#include <modelnode.h>
@@ -47,5 +46,3 @@ private:
} // namespace QmlDesigner
Q_DECLARE_METATYPE(QmlDesigner::ObjectPropertyBinding);
-
-#endif // OBJECTPROPERTYBINDING_H
diff --git a/src/plugins/qmldesigner/designercore/include/plaintexteditmodifier.h b/src/plugins/qmldesigner/designercore/include/plaintexteditmodifier.h
index c11180e562..7530be3b40 100644
--- a/src/plugins/qmldesigner/designercore/include/plaintexteditmodifier.h
+++ b/src/plugins/qmldesigner/designercore/include/plaintexteditmodifier.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef PLAINTEXTEDITMODIFIER_H
-#define PLAINTEXTEDITMODIFIER_H
+#pragma once
#include "qmldesignercorelib_global.h"
#include "textmodifier.h"
@@ -104,5 +103,3 @@ public:
};
}
-
-#endif // PLAINTEXTEDITMODIFIER_H
diff --git a/src/plugins/qmldesigner/designercore/include/propertybinding.h b/src/plugins/qmldesigner/designercore/include/propertybinding.h
index 7bb04d3bbd..bb2a835eac 100644
--- a/src/plugins/qmldesigner/designercore/include/propertybinding.h
+++ b/src/plugins/qmldesigner/designercore/include/propertybinding.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef PROPERTYBINDING_H
-#define PROPERTYBINDING_H
+#pragma once
#include <QMetaType>
#include <QSharedPointer>
@@ -54,5 +53,3 @@ private:
} // namespace QmlDesigner
Q_DECLARE_METATYPE(QmlDesigner::PropertyBinding);
-
-#endif // PROPERTYBINDING_H
diff --git a/src/plugins/qmldesigner/designercore/include/propertycontainer.h b/src/plugins/qmldesigner/designercore/include/propertycontainer.h
index 04ce101921..5eebf01fbd 100644
--- a/src/plugins/qmldesigner/designercore/include/propertycontainer.h
+++ b/src/plugins/qmldesigner/designercore/include/propertycontainer.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef PROPERTYCONTAINER_H
-#define PROPERTYCONTAINER_H
+#pragma once
#include "qmldesignercorelib_global.h"
@@ -72,7 +71,3 @@ QMLDESIGNERCORE_EXPORT QDataStream &operator>>(QDataStream &stream, QList<Proper
QMLDESIGNERCORE_EXPORT QDebug operator<<(QDebug debug, QList<PropertyContainer> &propertyContainerList);
} //namespace QmlDesigner
-
-
-
-#endif //PROPERTYCONTAINER_H
diff --git a/src/plugins/qmldesigner/designercore/include/propertynode.h b/src/plugins/qmldesigner/designercore/include/propertynode.h
index 26e576c185..1f4c90aedb 100644
--- a/src/plugins/qmldesigner/designercore/include/propertynode.h
+++ b/src/plugins/qmldesigner/designercore/include/propertynode.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef PROPERTYNODE_H
-#define PROPERTYNODE_H
+#pragma once
#include "qmldesignercorelib_global.h"
@@ -40,5 +39,3 @@ public:
};
} // namespace QmlDesigner
-
-#endif // PROPERTYNODE_H
diff --git a/src/plugins/qmldesigner/designercore/include/propertyparser.h b/src/plugins/qmldesigner/designercore/include/propertyparser.h
index 2a447a51b7..d5211ca7d5 100644
--- a/src/plugins/qmldesigner/designercore/include/propertyparser.h
+++ b/src/plugins/qmldesigner/designercore/include/propertyparser.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef PROPERTYPARSER_H
-#define PROPERTYPARSER_H
+#pragma once
#include <QVariant>
@@ -42,5 +41,3 @@ QVariant variantFromString(const QString &s);
} // namespace PropertyParser
} // namespace Internal
} // namespace Designer
-
-#endif // PROPERTYPARSER_H
diff --git a/src/plugins/qmldesigner/designercore/include/qmlanchors.h b/src/plugins/qmldesigner/designercore/include/qmlanchors.h
index 8993f3bd87..cd0736a682 100644
--- a/src/plugins/qmldesigner/designercore/include/qmlanchors.h
+++ b/src/plugins/qmldesigner/designercore/include/qmlanchors.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef QmlAnchors_H
-#define QmlAnchors_H
+#pragma once
#include <qmldesignercorelib_global.h>
#include <qmlitemnode.h>
@@ -84,5 +83,3 @@ private:
};
} //QmlDesigner
-
-#endif // QmlAnchors_H
diff --git a/src/plugins/qmldesigner/designercore/include/qmlchangeset.h b/src/plugins/qmldesigner/designercore/include/qmlchangeset.h
index c7e38f0522..8440a6a785 100644
--- a/src/plugins/qmldesigner/designercore/include/qmlchangeset.h
+++ b/src/plugins/qmldesigner/designercore/include/qmlchangeset.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef QMLCHANGESET_H
-#define QMLCHANGESET_H
+#pragma once
#include <qmldesignercorelib_global.h>
#include <modelnode.h>
@@ -55,5 +54,3 @@ public:
};
} //QmlDesigner
-
-#endif // QMLCHANGESET_H
diff --git a/src/plugins/qmldesigner/designercore/include/qmldesignercorelib_global.h b/src/plugins/qmldesigner/designercore/include/qmldesignercorelib_global.h
index 1e9b41ae86..964625cbc1 100644
--- a/src/plugins/qmldesigner/designercore/include/qmldesignercorelib_global.h
+++ b/src/plugins/qmldesigner/designercore/include/qmldesignercorelib_global.h
@@ -23,13 +23,11 @@
**
****************************************************************************/
-#ifndef CORELIB_GLOBAL_H
-#define CORELIB_GLOBAL_H
+#pragma once
#include <QtGlobal>
#include <QList>
-
// Unnecessary since core isn't a dll any more.
#define TEST_CORESHARED_EXPORT
@@ -75,5 +73,3 @@ enum AnchorLineType {
//#endif
#include <qglobal.h>
-
-#endif // CORELIB_GLOBAL_H
diff --git a/src/plugins/qmldesigner/designercore/include/qmlitemnode.h b/src/plugins/qmldesigner/designercore/include/qmlitemnode.h
index e5e4b3cf2d..1f1f98ca5c 100644
--- a/src/plugins/qmldesigner/designercore/include/qmlitemnode.h
+++ b/src/plugins/qmldesigner/designercore/include/qmlitemnode.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef QmlItemNode_H
-#define QmlItemNode_H
+#pragma once
#include <qmldesignercorelib_global.h>
#include <modelnode.h>
@@ -110,7 +109,7 @@ public:
QPixmap instanceRenderPixmap() const;
QPixmap instanceBlurredRenderPixmap() const;
- TypeName simplifiedTypeName() const;
+ QString simplifiedTypeName() const;
const QList<QmlItemNode> allDirectSubModelNodes() const;
const QList<QmlItemNode> allSubModelNodes() const;
@@ -152,6 +151,3 @@ QMLDESIGNERCORE_EXPORT QList<ModelNode> toModelNodeList(const QList<QmlItemNode>
QMLDESIGNERCORE_EXPORT QList<QmlItemNode> toQmlItemNodeList(const QList<ModelNode> &modelNodeList);
} //QmlDesigner
-
-
-#endif // QmlItemNode_H
diff --git a/src/plugins/qmldesigner/designercore/include/qmlmodelnodefacade.h b/src/plugins/qmldesigner/designercore/include/qmlmodelnodefacade.h
index 00f9df6c82..db2c36381b 100644
--- a/src/plugins/qmldesigner/designercore/include/qmlmodelnodefacade.h
+++ b/src/plugins/qmldesigner/designercore/include/qmlmodelnodefacade.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef QMLMODELNODEFACADE_H
-#define QMLMODELNODEFACADE_H
+#pragma once
#include <qmldesignercorelib_global.h>
#include <modelnode.h>
@@ -59,5 +58,3 @@ private:
};
} //QmlDesigner
-
-#endif // QMLMODELNODEFACADE_H
diff --git a/src/plugins/qmldesigner/designercore/include/qmlobjectnode.h b/src/plugins/qmldesigner/designercore/include/qmlobjectnode.h
index 5ce65e09f5..3e9d5ff7e4 100644
--- a/src/plugins/qmldesigner/designercore/include/qmlobjectnode.h
+++ b/src/plugins/qmldesigner/designercore/include/qmlobjectnode.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef QMLOBJECTNODE_H
-#define QMLOBJECTNODE_H
+#pragma once
#include <qmldesignercorelib_global.h>
#include "qmlmodelnodefacade.h"
@@ -126,5 +125,3 @@ QMLDESIGNERCORE_EXPORT uint qHash(const QmlObjectNode &node);
QMLDESIGNERCORE_EXPORT QList<ModelNode> toModelNodeList(const QList<QmlObjectNode> &fxObjectNodeList);
QMLDESIGNERCORE_EXPORT QList<QmlObjectNode> toQmlObjectNodeList(const QList<ModelNode> &modelNodeList);
}// QmlDesigner
-
-#endif // QMLOBJECTNODE_H
diff --git a/src/plugins/qmldesigner/designercore/include/qmlstate.h b/src/plugins/qmldesigner/designercore/include/qmlstate.h
index c6a8332c76..4ee216f84f 100644
--- a/src/plugins/qmldesigner/designercore/include/qmlstate.h
+++ b/src/plugins/qmldesigner/designercore/include/qmlstate.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef QMLSTATE_H
-#define QMLSTATE_H
+#pragma once
#include <qmldesignercorelib_global.h>
#include "qmlmodelnodefacade.h"
@@ -77,6 +76,3 @@ protected:
};
} //QmlDesigner
-
-
-#endif // QMLSTATE_H
diff --git a/src/plugins/qmldesigner/designercore/include/removebasestateexception.h b/src/plugins/qmldesigner/designercore/include/removebasestateexception.h
index 45ab1c7ff5..f088036da1 100644
--- a/src/plugins/qmldesigner/designercore/include/removebasestateexception.h
+++ b/src/plugins/qmldesigner/designercore/include/removebasestateexception.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef REMOVEBASESTATEEXCEPTION_H
-#define REMOVEBASESTATEEXCEPTION_H
+#pragma once
#include <exception.h>
@@ -41,5 +40,3 @@ public:
};
} // namespace QmlDesigner
-
-#endif // REMOVEBASESTATEEXCEPTION_H
diff --git a/src/plugins/qmldesigner/designercore/include/rewriterview.h b/src/plugins/qmldesigner/designercore/include/rewriterview.h
index b82abef2a7..1bcc4ffccb 100644
--- a/src/plugins/qmldesigner/designercore/include/rewriterview.h
+++ b/src/plugins/qmldesigner/designercore/include/rewriterview.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef REWRITERVIEW_H
-#define REWRITERVIEW_H
+#pragma once
#include "qmldesignercorelib_global.h"
#include "abstractview.h"
@@ -215,5 +214,3 @@ private: //variables
};
} //QmlDesigner
-
-#endif // REWRITERVIEW_H
diff --git a/src/plugins/qmldesigner/designercore/include/rewritingexception.h b/src/plugins/qmldesigner/designercore/include/rewritingexception.h
index 067ecd1dc3..b732e9269e 100644
--- a/src/plugins/qmldesigner/designercore/include/rewritingexception.h
+++ b/src/plugins/qmldesigner/designercore/include/rewritingexception.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef REWRITINGEXCEPTION_H
-#define REWRITINGEXCEPTION_H
+#pragma once
#include "exception.h"
@@ -48,5 +47,3 @@ private:
};
} // namespace QmlDesigner
-
-#endif // REWRITINGEXCEPTION_H
diff --git a/src/plugins/qmldesigner/designercore/include/signalhandlerproperty.h b/src/plugins/qmldesigner/designercore/include/signalhandlerproperty.h
index 4e76c0fa6b..47763a37f2 100644
--- a/src/plugins/qmldesigner/designercore/include/signalhandlerproperty.h
+++ b/src/plugins/qmldesigner/designercore/include/signalhandlerproperty.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef SIGNALHANDLERPROPERTY_H
-#define SIGNALHANDLERPROPERTY_H
+#pragma once
#include "qmldesignercorelib_global.h"
#include "abstractproperty.h"
@@ -49,5 +48,3 @@ protected:
};
} // namespace QmlDesigner
-
-#endif // SIGNALHANDLERPROPERTY_H
diff --git a/src/plugins/qmldesigner/designercore/include/subcomponentmanager.h b/src/plugins/qmldesigner/designercore/include/subcomponentmanager.h
index b965c02716..15e2c41d01 100644
--- a/src/plugins/qmldesigner/designercore/include/subcomponentmanager.h
+++ b/src/plugins/qmldesigner/designercore/include/subcomponentmanager.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef SUBCOMPONENTMANAGER_H
-#define SUBCOMPONENTMANAGER_H
+#pragma once
#include "qmldesignercorelib_global.h"
@@ -77,6 +76,3 @@ private: // variables
};
} // namespace QmlDesigner
-
-
-#endif // SUBCOMPONENTMANAGER_H
diff --git a/src/plugins/qmldesigner/designercore/include/textmodifier.h b/src/plugins/qmldesigner/designercore/include/textmodifier.h
index 6e93e7f07f..863ecabd9f 100644
--- a/src/plugins/qmldesigner/designercore/include/textmodifier.h
+++ b/src/plugins/qmldesigner/designercore/include/textmodifier.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef TEXTMODIFIER_H
-#define TEXTMODIFIER_H
+#pragma once
#include "qmldesignercorelib_global.h"
@@ -91,5 +90,3 @@ signals:
};
}
-
-#endif // TEXTMODIFIER_H
diff --git a/src/plugins/qmldesigner/designercore/include/variantproperty.h b/src/plugins/qmldesigner/designercore/include/variantproperty.h
index e05697e256..c909958de0 100644
--- a/src/plugins/qmldesigner/designercore/include/variantproperty.h
+++ b/src/plugins/qmldesigner/designercore/include/variantproperty.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef VARIANTPROPERTY_H
-#define VARIANTPROPERTY_H
+#pragma once
#include "qmldesignercorelib_global.h"
#include "abstractproperty.h"
@@ -67,5 +66,3 @@ QMLDESIGNERCORE_EXPORT QTextStream& operator<<(QTextStream &stream, const Varian
QMLDESIGNERCORE_EXPORT QDebug operator<<(QDebug debug, const VariantProperty &VariantProperty);
}
-
-#endif //VARIANTPROPERTY_H
diff --git a/src/plugins/qmldesigner/designercore/include/viewmanager.h b/src/plugins/qmldesigner/designercore/include/viewmanager.h
index 7690ff98a1..f6a594f54b 100644
--- a/src/plugins/qmldesigner/designercore/include/viewmanager.h
+++ b/src/plugins/qmldesigner/designercore/include/viewmanager.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef QMLDESIGNER_VIEWMANAGER_H
-#define QMLDESIGNER_VIEWMANAGER_H
+#pragma once
#include "abstractview.h"
@@ -107,5 +106,3 @@ private: // variables
};
} // namespace QmlDesigner
-
-#endif // QMLDESIGNER_VIEWMANAGER_H
diff --git a/src/plugins/qmldesigner/designercore/instances/nodeinstanceserverproxy.cpp b/src/plugins/qmldesigner/designercore/instances/nodeinstanceserverproxy.cpp
index 0df45b4b53..aa6e057c03 100644
--- a/src/plugins/qmldesigner/designercore/instances/nodeinstanceserverproxy.cpp
+++ b/src/plugins/qmldesigner/designercore/instances/nodeinstanceserverproxy.cpp
@@ -540,7 +540,7 @@ void NodeInstanceServerProxy::printEditorProcessOutput()
while (m_qmlPuppetEditorProcess && m_qmlPuppetEditorProcess->canReadLine()) {
QByteArray line = m_qmlPuppetEditorProcess->readLine();
line.chop(1);
- qDebug().nospace() << "Editor Puppet: " << qPrintable(line);
+ qDebug().nospace() << "Editor Puppet: " << line;
}
qDebug() << "\n";
}
@@ -550,7 +550,7 @@ void NodeInstanceServerProxy::printPreviewProcessOutput()
while (m_qmlPuppetPreviewProcess && m_qmlPuppetPreviewProcess->canReadLine()) {
QByteArray line = m_qmlPuppetPreviewProcess->readLine();
line.chop(1);
- qDebug().nospace() << "Preview Puppet: " << qPrintable(line);
+ qDebug().nospace() << "Preview Puppet: " << line;
}
qDebug() << "\n";
}
@@ -560,7 +560,7 @@ void NodeInstanceServerProxy::printRenderProcessOutput()
while (m_qmlPuppetRenderProcess && m_qmlPuppetRenderProcess->canReadLine()) {
QByteArray line = m_qmlPuppetRenderProcess->readLine();
line.chop(1);
- qDebug().nospace() << "Render Puppet: " << qPrintable(line);
+ qDebug().nospace() << "Render Puppet: " << line;
}
qDebug() << "\n";
diff --git a/src/plugins/qmldesigner/designercore/instances/nodeinstanceserverproxy.h b/src/plugins/qmldesigner/designercore/instances/nodeinstanceserverproxy.h
index 56f7d18228..1b770749a8 100644
--- a/src/plugins/qmldesigner/designercore/instances/nodeinstanceserverproxy.h
+++ b/src/plugins/qmldesigner/designercore/instances/nodeinstanceserverproxy.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef NODEINSTANCESERVERPROXY_H
-#define NODEINSTANCESERVERPROXY_H
+#pragma once
#include "nodeinstanceserverinterface.h"
@@ -124,5 +123,3 @@ private:
};
} // namespace QmlDesigner
-
-#endif // NODEINSTANCESERVERPROXY_H
diff --git a/src/plugins/qmldesigner/designercore/instances/nodeinstanceview.cpp b/src/plugins/qmldesigner/designercore/instances/nodeinstanceview.cpp
index 2b110747b3..d5bcfaff6b 100644
--- a/src/plugins/qmldesigner/designercore/instances/nodeinstanceview.cpp
+++ b/src/plugins/qmldesigner/designercore/instances/nodeinstanceview.cpp
@@ -124,7 +124,7 @@ NodeInstanceView::~NodeInstanceView()
bool isSkippedRootNode(const ModelNode &node)
{
- static QStringList skipList = QStringList() << "Qt.ListModel" << "QtQuick.ListModel" << "Qt.ListModel" << "QtQuick.ListModel";
+ static PropertyNameList skipList = PropertyNameList() << "Qt.ListModel" << "QtQuick.ListModel" << "Qt.ListModel" << "QtQuick.ListModel";
if (skipList.contains(node.type()))
return true;
@@ -135,7 +135,7 @@ bool isSkippedRootNode(const ModelNode &node)
bool isSkippedNode(const ModelNode &node)
{
- static QStringList skipList = QStringList() << "QtQuick.XmlRole" << "Qt.XmlRole" << "QtQuick.ListElement" << "Qt.ListElement";
+ static PropertyNameList skipList = PropertyNameList() << "QtQuick.XmlRole" << "Qt.XmlRole" << "QtQuick.ListElement" << "Qt.ListElement";
if (skipList.contains(node.type()))
return true;
@@ -318,7 +318,7 @@ void NodeInstanceView::propertiesAboutToBeRemoved(const QList<AbstractProperty>&
nodeInstanceServer()->removeProperties(createRemovePropertiesCommand(nonNodePropertyList));
foreach (const AbstractProperty &property, propertyList) {
- const QString &name = property.name();
+ const PropertyName &name = property.name();
if (name == "anchors.fill") {
resetHorizontalAnchors(property.parentModelNode());
resetVerticalAnchors(property.parentModelNode());
diff --git a/src/plugins/qmldesigner/designercore/instances/puppetbuildprogressdialog.h b/src/plugins/qmldesigner/designercore/instances/puppetbuildprogressdialog.h
index 2dc6919d3a..4952335f23 100644
--- a/src/plugins/qmldesigner/designercore/instances/puppetbuildprogressdialog.h
+++ b/src/plugins/qmldesigner/designercore/instances/puppetbuildprogressdialog.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef PUPPETBUILDPROGRESSDIALOG_H
-#define PUPPETBUILDPROGRESSDIALOG_H
+#pragma once
#include <QDialog>
@@ -59,4 +58,3 @@ private:
};
}
-#endif // PUPPETBUILDPROGRESSDIALOG_H
diff --git a/src/plugins/qmldesigner/designercore/instances/puppetcreator.h b/src/plugins/qmldesigner/designercore/instances/puppetcreator.h
index eac79607d3..f39d210a3e 100644
--- a/src/plugins/qmldesigner/designercore/instances/puppetcreator.h
+++ b/src/plugins/qmldesigner/designercore/instances/puppetcreator.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef QMLDESIGNER_PUPPETCREATOR_H
-#define QMLDESIGNER_PUPPETCREATOR_H
+#pragma once
#include <QString>
#include <QProcessEnvironment>
@@ -120,5 +119,3 @@ private:
};
} // namespace QmlDesigner
-
-#endif // QMLDESIGNER_PUPPETCREATOR_H
diff --git a/src/plugins/qmldesigner/designercore/instances/puppetdialog.h b/src/plugins/qmldesigner/designercore/instances/puppetdialog.h
index 91654fb125..c65094042c 100644
--- a/src/plugins/qmldesigner/designercore/instances/puppetdialog.h
+++ b/src/plugins/qmldesigner/designercore/instances/puppetdialog.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef PUPPETDIALOG_H
-#define PUPPETDIALOG_H
+#pragma once
#include <QDialog>
@@ -56,5 +55,3 @@ private:
};
} //QmlDesigner
-
-#endif // PUPPETDIALOG_H
diff --git a/src/plugins/qmldesigner/designercore/metainfo/itemlibraryinfo.cpp b/src/plugins/qmldesigner/designercore/metainfo/itemlibraryinfo.cpp
index ea7cdbb061..786a5b8cc8 100644
--- a/src/plugins/qmldesigner/designercore/metainfo/itemlibraryinfo.cpp
+++ b/src/plugins/qmldesigner/designercore/metainfo/itemlibraryinfo.cpp
@@ -170,7 +170,7 @@ void ItemLibraryEntry::setLibraryEntryIconPath(const QString &iconPath)
m_data->libraryEntryIconPath = iconPath;
}
-static QString getSourceForUrl(const QString &fileURl)
+static QByteArray getSourceForUrl(const QString &fileURl)
{
Utils::FileReader fileReader;
@@ -184,7 +184,7 @@ void ItemLibraryEntry::setQmlPath(const QString &qml)
{
m_data->qml = qml;
- m_data->qmlSource = getSourceForUrl(qml);
+ m_data->qmlSource = QString::fromUtf8(getSourceForUrl(qml));
}
void ItemLibraryEntry::setRequiredImport(const QString &requiredImport)
@@ -264,7 +264,7 @@ ItemLibraryInfo::ItemLibraryInfo(QObject *parent)
-QList<ItemLibraryEntry> ItemLibraryInfo::entriesForType(const QString &typeName, int majorVersion, int minorVersion) const
+QList<ItemLibraryEntry> ItemLibraryInfo::entriesForType(const QByteArray &typeName, int majorVersion, int minorVersion) const
{
QList<ItemLibraryEntry> entries;
diff --git a/src/plugins/qmldesigner/designercore/metainfo/nodemetainfo.cpp b/src/plugins/qmldesigner/designercore/metainfo/nodemetainfo.cpp
index ccd4e21cc0..e7f13239fd 100644
--- a/src/plugins/qmldesigner/designercore/metainfo/nodemetainfo.cpp
+++ b/src/plugins/qmldesigner/designercore/metainfo/nodemetainfo.cpp
@@ -46,7 +46,7 @@ namespace Internal {
struct TypeDescription
{
- TypeName className;
+ QString className;
int minorVersion;
int majorVersion;
};
@@ -330,9 +330,9 @@ private:
const ContextPtr m_context;
};
-static inline bool isValueType(const QString &type)
+static inline bool isValueType(const TypeName &type)
{
- QStringList objectValuesList;
+ PropertyTypeList objectValuesList;
objectValuesList << "QFont" << "QPoint" << "QPointF" << "QSize" << "QSizeF" << "QVector3D" << "QVector2D";
return objectValuesList.contains(type);
}
@@ -367,7 +367,7 @@ QStringList prototypes(const ObjectValue *ov, const ContextPtr &context, bool ve
}
} else {
if (versions)
- list << ov->className() + " -1.-1";
+ list << ov->className() + QLatin1String(" -1.-1");
else
list << ov->className();
}
@@ -394,10 +394,11 @@ QList<PropertyInfo> getQmlTypes(const CppComponentValue *objectValue, const Cont
QList<PropertyInfo> newList = processor.properties();
foreach (PropertyInfo property, newList) {
- PropertyName name = property.first;
- if (!objectValue->isWritable(name) && objectValue->isPointer(name)) {
+ const PropertyName name = property.first;
+ const QString nameAsString = QString::fromUtf8(name);
+ if (!objectValue->isWritable(nameAsString) && objectValue->isPointer(nameAsString)) {
//dot property
- const CppComponentValue * qmlValue = value_cast<CppComponentValue>(objectValue->lookupMember(name, context));
+ const CppComponentValue * qmlValue = value_cast<CppComponentValue>(objectValue->lookupMember(nameAsString, context));
if (qmlValue) {
QList<PropertyInfo> dotProperties = getQmlTypes(qmlValue, context, false, rec + 1);
foreach (const PropertyInfo &propertyInfo, dotProperties) {
@@ -408,8 +409,8 @@ QList<PropertyInfo> getQmlTypes(const CppComponentValue *objectValue, const Cont
}
}
}
- if (isValueType(objectValue->propertyType(name))) {
- const ObjectValue *dotObjectValue = value_cast<ObjectValue>(objectValue->lookupMember(name, context));
+ if (isValueType(objectValue->propertyType(nameAsString).toUtf8())) {
+ const ObjectValue *dotObjectValue = value_cast<ObjectValue>(objectValue->lookupMember(nameAsString, context));
if (dotObjectValue) {
QList<PropertyInfo> dotProperties = getObjectTypes(dotObjectValue, context, false, rec + 1);
foreach (const PropertyInfo &propertyInfo, dotProperties) {
@@ -421,8 +422,8 @@ QList<PropertyInfo> getQmlTypes(const CppComponentValue *objectValue, const Cont
}
}
TypeName type = property.second;
- if (!objectValue->isPointer(name) && !objectValue->isListProperty(name))
- type = objectValue->propertyType(name).toUtf8();
+ if (!objectValue->isPointer(nameAsString) && !objectValue->isListProperty(nameAsString))
+ type = objectValue->propertyType(nameAsString).toUtf8();
propertyList.append(qMakePair(name, type));
}
@@ -444,7 +445,7 @@ PropertyNameList getSignals(const ObjectValue *objectValue, const ContextPtr &co
{
PropertyNameList signalList;
- if (!objectValue)
+ if (!objectValue)
return signalList;
if (objectValue->className().isEmpty())
return signalList;
@@ -537,7 +538,7 @@ public:
bool isPropertyEnum(const PropertyName &propertyName) const;
QString propertyEnumScope(const PropertyName &propertyName) const;
QStringList keysForEnum(const QString &enumName) const;
- bool cleverCheckType(const QString &otherType) const;
+ bool cleverCheckType(const TypeName &otherType) const;
QVariant::Type variantTypeId(const PropertyName &properyName) const;
int majorVersion() const;
@@ -545,7 +546,7 @@ public:
TypeName qualfiedTypeName() const;
Model *model() const;
- QString cppPackageName() const;
+ QByteArray cppPackageName() const;
QString componentSource() const;
QString componentFileName() const;
@@ -553,8 +554,8 @@ public:
static Pointer create(Model *model, const TypeName &type, int maj = -1, int min = -1);
- QSet<QString> &prototypeCachePositives();
- QSet<QString> &prototypeCacheNegatives();
+ QSet<QByteArray> &prototypeCachePositives();
+ QSet<QByteArray> &prototypeCacheNegatives();
static void clearCache();
@@ -582,18 +583,18 @@ private:
PropertyNameList m_localProperties;
PropertyName m_defaultPropertyName;
QList<TypeDescription> m_prototypes;
- QSet<QString> m_prototypeCachePositives;
- QSet<QString> m_prototypeCacheNegatives;
+ QSet<QByteArray> m_prototypeCachePositives;
+ QSet<QByteArray> m_prototypeCacheNegatives;
//storing the pointer would not be save
ContextPtr context() const;
const Document *document() const;
QPointer<Model> m_model;
- static QHash<QString, Pointer> m_nodeMetaInfoCache;
+ static QHash<TypeName, Pointer> m_nodeMetaInfoCache;
};
-QHash<QString, NodeMetaInfoPrivate::Pointer> NodeMetaInfoPrivate::m_nodeMetaInfoCache;
+QHash<TypeName, NodeMetaInfoPrivate::Pointer> NodeMetaInfoPrivate::m_nodeMetaInfoCache;
bool NodeMetaInfoPrivate::isFileComponent() const
{
@@ -615,12 +616,12 @@ PropertyNameList NodeMetaInfoPrivate::signalNames() const
return m_signals;
}
-QSet<QString> &NodeMetaInfoPrivate::prototypeCachePositives()
+QSet<QByteArray> &NodeMetaInfoPrivate::prototypeCachePositives()
{
return m_prototypeCachePositives;
}
-QSet<QString> &NodeMetaInfoPrivate::prototypeCacheNegatives()
+QSet<QByteArray> &NodeMetaInfoPrivate::prototypeCacheNegatives()
{
return m_prototypeCacheNegatives;
}
@@ -637,9 +638,9 @@ PropertyName NodeMetaInfoPrivate::defaultPropertyName() const
return PropertyName("data");
}
-static inline QString stringIdentifier( const QString &type, int maj, int min)
+static inline TypeName stringIdentifier( const TypeName &type, int maj, int min)
{
- return type + QString::number(maj) + '_' + QString::number(min);
+ return type + QString::number(maj).toLatin1() + '_' + QString::number(min).toLatin1();
}
NodeMetaInfoPrivate::Pointer NodeMetaInfoPrivate::create(Model *model, const TypeName &type, int major, int minor)
@@ -748,7 +749,7 @@ const CppComponentValue *NodeMetaInfoPrivate::getCppComponentValue() const
return value;
// maybe 'type' is a cpp name
- const CppComponentValue *cppValue = context()->valueOwner()->cppQmlTypes().objectByCppName(type);
+ const CppComponentValue *cppValue = context()->valueOwner()->cppQmlTypes().objectByCppName(QString::fromUtf8(type));
if (cppValue) {
foreach (const LanguageUtils::FakeMetaObject::Export &exportValue, cppValue->metaObject()->exports()) {
@@ -813,12 +814,12 @@ bool NodeMetaInfoPrivate::isPropertyWritable(const PropertyName &propertyName) c
const PropertyNameList parts = propertyName.split('.');
const PropertyName objectName = parts.first();
const PropertyName rawPropertyName = parts.last();
- const QString objectType = propertyType(objectName);
+ const TypeName objectType = propertyType(objectName);
if (isValueType(objectType))
return true;
- QSharedPointer<NodeMetaInfoPrivate> objectInfo(create(m_model, objectType.toUtf8()));
+ QSharedPointer<NodeMetaInfoPrivate> objectInfo(create(m_model, objectType));
if (objectInfo->isValid())
return objectInfo->isPropertyWritable(rawPropertyName);
else
@@ -828,8 +829,8 @@ bool NodeMetaInfoPrivate::isPropertyWritable(const PropertyName &propertyName) c
const CppComponentValue *qmlObjectValue = getNearestCppComponentValue();
if (!qmlObjectValue)
return true;
- if (qmlObjectValue->hasProperty(propertyName))
- return qmlObjectValue->isWritable(propertyName);
+ if (qmlObjectValue->hasProperty(QString::fromUtf8(propertyName)))
+ return qmlObjectValue->isWritable(QString::fromUtf8(propertyName));
else
return true; //all properties of components are writable
}
@@ -844,12 +845,12 @@ bool NodeMetaInfoPrivate::isPropertyList(const PropertyName &propertyName) const
const PropertyNameList parts = propertyName.split('.');
const PropertyName objectName = parts.first();
const PropertyName rawPropertyName = parts.last();
- const QString objectType = propertyType(objectName);
+ const TypeName objectType = propertyType(objectName);
if (isValueType(objectType))
return false;
- QSharedPointer<NodeMetaInfoPrivate> objectInfo(create(m_model, objectType.toUtf8()));
+ QSharedPointer<NodeMetaInfoPrivate> objectInfo(create(m_model, objectType));
if (objectInfo->isValid())
return objectInfo->isPropertyList(rawPropertyName);
else
@@ -859,7 +860,7 @@ bool NodeMetaInfoPrivate::isPropertyList(const PropertyName &propertyName) const
const CppComponentValue *qmlObjectValue = getNearestCppComponentValue();
if (!qmlObjectValue)
return false;
- return qmlObjectValue->isListProperty(propertyName);
+ return qmlObjectValue->isListProperty(QString::fromUtf8(propertyName));
}
bool NodeMetaInfoPrivate::isPropertyPointer(const PropertyName &propertyName) const
@@ -871,12 +872,12 @@ bool NodeMetaInfoPrivate::isPropertyPointer(const PropertyName &propertyName) co
const PropertyNameList parts = propertyName.split('.');
const PropertyName objectName = parts.first();
const PropertyName rawPropertyName = parts.last();
- const QString objectType = propertyType(objectName);
+ const TypeName objectType = propertyType(objectName);
if (isValueType(objectType))
return false;
- QSharedPointer<NodeMetaInfoPrivate> objectInfo(create(m_model, objectType.toUtf8()));
+ QSharedPointer<NodeMetaInfoPrivate> objectInfo(create(m_model, objectType));
if (objectInfo->isValid())
return objectInfo->isPropertyPointer(rawPropertyName);
else
@@ -886,7 +887,7 @@ bool NodeMetaInfoPrivate::isPropertyPointer(const PropertyName &propertyName) co
const CppComponentValue *qmlObjectValue = getNearestCppComponentValue();
if (!qmlObjectValue)
return false;
- return qmlObjectValue->isPointer(propertyName);
+ return qmlObjectValue->isPointer(QString::fromUtf8(propertyName));
}
bool NodeMetaInfoPrivate::isPropertyEnum(const PropertyName &propertyName) const
@@ -901,12 +902,12 @@ bool NodeMetaInfoPrivate::isPropertyEnum(const PropertyName &propertyName) const
const PropertyNameList parts = propertyName.split('.');
const PropertyName objectName = parts.first();
const PropertyName rawPropertyName = parts.last();
- const QString objectType = propertyType(objectName);
+ const TypeName objectType = propertyType(objectName);
if (isValueType(objectType))
return false;
- QSharedPointer<NodeMetaInfoPrivate> objectInfo(create(m_model, objectType.toUtf8()));
+ QSharedPointer<NodeMetaInfoPrivate> objectInfo(create(m_model, objectType));
if (objectInfo->isValid())
return objectInfo->isPropertyEnum(rawPropertyName);
else
@@ -916,7 +917,7 @@ bool NodeMetaInfoPrivate::isPropertyEnum(const PropertyName &propertyName) const
const CppComponentValue *qmlObjectValue = getNearestCppComponentValue();
if (!qmlObjectValue)
return false;
- return qmlObjectValue->getEnum(propertyType(propertyName)).isValid();
+ return qmlObjectValue->getEnum(QString::fromUtf8(propertyType(propertyName))).isValid();
}
QString NodeMetaInfoPrivate::propertyEnumScope(const PropertyName &propertyName) const
@@ -931,12 +932,12 @@ QString NodeMetaInfoPrivate::propertyEnumScope(const PropertyName &propertyName)
const PropertyNameList parts = propertyName.split('.');
const PropertyName objectName = parts.first();
const PropertyName rawPropertyName = parts.last();
- const QString objectType = propertyType(objectName);
+ const TypeName objectType = propertyType(objectName);
if (isValueType(objectType))
return QString();
- QSharedPointer<NodeMetaInfoPrivate> objectInfo(create(m_model, objectType.toUtf8()));
+ QSharedPointer<NodeMetaInfoPrivate> objectInfo(create(m_model, objectType));
if (objectInfo->isValid())
return objectInfo->propertyEnumScope(rawPropertyName);
else
@@ -947,7 +948,7 @@ QString NodeMetaInfoPrivate::propertyEnumScope(const PropertyName &propertyName)
if (!qmlObjectValue)
return QString();
const CppComponentValue *definedIn = 0;
- qmlObjectValue->getEnum(propertyType(propertyName), &definedIn);
+ qmlObjectValue->getEnum(QString::fromUtf8(propertyType(propertyName)), &definedIn);
if (definedIn) {
QString nonCppPackage;
foreach (const LanguageUtils::FakeMetaObject::Export &qmlExport, definedIn->metaObject()->exports()) {
@@ -966,25 +967,25 @@ QString NodeMetaInfoPrivate::propertyEnumScope(const PropertyName &propertyName)
return QString();
}
-static QString getUnqualifiedName(const QString &name)
+static QByteArray getUnqualifiedName(const QByteArray &name)
{
- const QStringList nameComponents = name.split('.');
+ const QList<QByteArray> nameComponents = name.split('.');
if (nameComponents.size() < 2)
return name;
return nameComponents.last();
}
-static QString getPackage(const QString &name)
+static QByteArray getPackage(const QByteArray &name)
{
- QStringList nameComponents = name.split('.');
+ QList<QByteArray> nameComponents = name.split('.');
if (nameComponents.size() < 2)
- return QString();
+ return QByteArray();
nameComponents.removeLast();
- return nameComponents.join(QLatin1Char('.'));
+ return nameComponents.join('.');
}
-bool NodeMetaInfoPrivate::cleverCheckType(const QString &otherType) const
+bool NodeMetaInfoPrivate::cleverCheckType(const TypeName &otherType) const
{
if (otherType == qualfiedTypeName())
return true;
@@ -992,28 +993,28 @@ bool NodeMetaInfoPrivate::cleverCheckType(const QString &otherType) const
if (isFileComponent())
return false;
- const QString typeName = getUnqualifiedName(otherType);
- const QString package = getPackage(otherType);
+ const QByteArray typeName = getUnqualifiedName(otherType);
+ const QByteArray package = getPackage(otherType);
if (cppPackageName() == package)
- return QString(package + '.' + typeName) == cppPackageName() + '.' + getUnqualifiedName(qualfiedTypeName());
+ return QByteArray(package + '.' + typeName) == (cppPackageName() + '.' + getUnqualifiedName(qualfiedTypeName()));
const CppComponentValue *qmlObjectValue = getCppComponentValue();
if (!qmlObjectValue)
return false;
const LanguageUtils::FakeMetaObject::Export exp =
- qmlObjectValue->metaObject()->exportInPackage(package);
+ qmlObjectValue->metaObject()->exportInPackage(QString::fromUtf8(package));
QString convertedName = exp.type;
if (convertedName.isEmpty())
convertedName = qmlObjectValue->className();
- return typeName == convertedName;
+ return typeName == convertedName.toUtf8();
}
QVariant::Type NodeMetaInfoPrivate::variantTypeId(const PropertyName &properyName) const
{
- QString typeName = propertyType(properyName);
+ TypeName typeName = propertyType(properyName);
if (typeName == "string")
return QVariant::String;
@@ -1044,7 +1045,7 @@ QVariant::Type NodeMetaInfoPrivate::variantTypeId(const PropertyName &properyNam
if (typeName == "var")
return QVariant::UserType;
- return QVariant::nameToType(typeName.toUtf8().data());
+ return QVariant::nameToType(typeName.data());
}
int NodeMetaInfoPrivate::majorVersion() const
@@ -1079,13 +1080,13 @@ QStringList NodeMetaInfoPrivate::keysForEnum(const QString &enumName) const
return qmlObjectValue->getEnum(enumName).keys();
}
-QString NodeMetaInfoPrivate::cppPackageName() const
+QByteArray NodeMetaInfoPrivate::cppPackageName() const
{
if (!isFileComponent()) {
if (const CppComponentValue *qmlObject = getCppComponentValue())
- return qmlObject->moduleName();
+ return qmlObject->moduleName().toUtf8();
}
- return QString();
+ return QByteArray();
}
QString NodeMetaInfoPrivate::componentSource() const
@@ -1131,7 +1132,7 @@ QString NodeMetaInfoPrivate::importDirectoryPath() const
if (QDir(targetPath).exists())
return targetPath;
const QString targetPathVersion = QDir(importPath).filePath(importInfo.path()
- + QLatin1Char('.')
+ + '.'
+ QString::number(importInfo.version().majorVersion()));
if (QDir(targetPathVersion).exists())
return targetPathVersion;
@@ -1147,10 +1148,10 @@ QString NodeMetaInfoPrivate::lookupName() const
QString className = QString::fromUtf8(m_qualfiedTypeName);
QString packageName;
- QStringList packageClassName = className.split(QLatin1Char('.'));
+ QStringList packageClassName = className.split('.');
if (packageClassName.size() > 1) {
className = packageClassName.takeLast();
- packageName = packageClassName.join(QLatin1Char('.'));
+ packageName = packageClassName.join('.');
}
return CppQmlTypes::qualifiedName(
@@ -1200,32 +1201,32 @@ void NodeMetaInfoPrivate::setupPrototypes()
foreach (const ObjectValue *ov, objects) {
TypeDescription description;
- description.className = ov->className().toUtf8();
+ description.className = ov->className();
description.minorVersion = -1;
description.majorVersion = -1;
if (const CppComponentValue * qmlValue = value_cast<CppComponentValue>(ov)) {
description.minorVersion = qmlValue->componentVersion().minorVersion();
description.majorVersion = qmlValue->componentVersion().majorVersion();
- LanguageUtils::FakeMetaObject::Export qtquickExport = qmlValue->metaObject()->exportInPackage("QtQuick");
- LanguageUtils::FakeMetaObject::Export cppExport = qmlValue->metaObject()->exportInPackage("<cpp>");
+ LanguageUtils::FakeMetaObject::Export qtquickExport = qmlValue->metaObject()->exportInPackage(QLatin1String("QtQuick"));
+ LanguageUtils::FakeMetaObject::Export cppExport = qmlValue->metaObject()->exportInPackage(QLatin1String("<cpp>"));
if (qtquickExport.isValid()) {
- description.className = qtquickExport.package.toUtf8() + '.' + qtquickExport.type.toUtf8();
+ description.className = qtquickExport.package + '.' + qtquickExport.type;
} else {
bool found = false;
if (cppExport.isValid()) {
foreach (const LanguageUtils::FakeMetaObject::Export &exportValue, qmlValue->metaObject()->exports()) {
if (exportValue.package.toUtf8() != "<cpp>") {
found = true;
- description.className = exportValue.package.toUtf8() + '.' + exportValue.type.toUtf8();
+ description.className = exportValue.package + '.' + exportValue.type;
}
}
}
if (!found) {
if (qmlValue->moduleName().isEmpty() && cppExport.isValid()) {
- description.className = cppExport.package.toUtf8() + '.' + cppExport.type.toUtf8();
+ description.className = cppExport.package + '.' + cppExport.type;
} else if (!qmlValue->moduleName().isEmpty()) {
- description.className = qmlValue->moduleName().toUtf8() + '.' + description.className;
+ description.className.prepend(qmlValue->moduleName() + QLatin1Char('.'));
}
}
}
@@ -1239,7 +1240,7 @@ void NodeMetaInfoPrivate::setupPrototypes()
QString uri = importInfo.name();
uri.replace(QStringLiteral(","), QStringLiteral("."));
if (!uri.isEmpty())
- description.className = QString(uri + QString::fromLatin1(".") + QString::fromUtf8(description.className)).toUtf8();
+ description.className = QString(uri + "." + description.className);
}
m_prototypes.append(description);
@@ -1264,8 +1265,8 @@ const CppComponentValue *NodeMetaInfoPrivate::getNearestCppComponentValue() cons
QString NodeMetaInfoPrivate::fullQualifiedImportAliasType() const
{
if (m_model && m_model->rewriterView())
- return model()->rewriterView()->convertTypeToImportAlias(m_qualfiedTypeName);
- return m_qualfiedTypeName;
+ return model()->rewriterView()->convertTypeToImportAlias(QString::fromUtf8(m_qualfiedTypeName));
+ return QString::fromUtf8(m_qualfiedTypeName);
}
} //namespace Internal
@@ -1369,7 +1370,7 @@ QString NodeMetaInfo::propertyEnumScope(const PropertyName &propertyName) const
QStringList NodeMetaInfo::propertyKeysForEnum(const PropertyName &propertyName) const
{
- return m_privateData->keysForEnum(propertyTypeName(propertyName));
+ return m_privateData->keysForEnum(QString::fromUtf8(propertyTypeName(propertyName)));
}
QVariant NodeMetaInfo::propertyCastedValue(const PropertyName &propertyName, const QVariant &value) const
@@ -1381,17 +1382,17 @@ QVariant NodeMetaInfo::propertyCastedValue(const PropertyName &propertyName, con
|| variant.canConvert<Enumeration>())
return variant;
- const QString typeName = propertyTypeName(propertyName);
+ const TypeName typeName = propertyTypeName(propertyName);
QVariant::Type typeId = m_privateData->variantTypeId(propertyName);
if (variant.type() == QVariant::UserType && variant.userType() == ModelNode::variantUserType()) {
return variant;
- } else if (typeId == QVariant::UserType && typeName == QStringLiteral("QVariant")) {
+ } else if (typeId == QVariant::UserType && typeName == "QVariant") {
return variant;
- } else if (typeId == QVariant::UserType && typeName == QStringLiteral("variant")) {
+ } else if (typeId == QVariant::UserType && typeName == "variant") {
return variant;
- } else if (typeId == QVariant::UserType && typeName == QStringLiteral("var")) {
+ } else if (typeId == QVariant::UserType && typeName == "var") {
return variant;
} else if (variant.type() == QVariant::List) {
// TODO: check the contents of the list
@@ -1413,7 +1414,7 @@ QList<NodeMetaInfo> NodeMetaInfo::superClasses() const
QList<NodeMetaInfo> list;
foreach (const Internal::TypeDescription &type, m_privateData->prototypes()) {
- list.append(NodeMetaInfo(m_privateData->model(), type.className, type.majorVersion, type.minorVersion));
+ list.append(NodeMetaInfo(m_privateData->model(), type.className.toUtf8(), type.majorVersion, type.minorVersion));
}
return list;
}
@@ -1426,9 +1427,9 @@ NodeMetaInfo NodeMetaInfo::directSuperClass() const
return NodeMetaInfo();
}
-QList<TypeName> NodeMetaInfo::superClassNames() const
+QStringList NodeMetaInfo::superClassNames() const
{
- QList<TypeName> list;
+ QStringList list;
foreach (const Internal::TypeDescription &type, m_privateData->prototypes()) {
list.append(type.className);
diff --git a/src/plugins/qmldesigner/designercore/model/abstractview.cpp b/src/plugins/qmldesigner/designercore/model/abstractview.cpp
index 374797b250..91a0effec3 100644
--- a/src/plugins/qmldesigner/designercore/model/abstractview.cpp
+++ b/src/plugins/qmldesigner/designercore/model/abstractview.cpp
@@ -467,12 +467,12 @@ QString AbstractView::generateNewId(const QString &prefixName) const
{
int counter = 1;
- QString newId = QString("%1%2").arg(firstCharToLower(prefixName)).arg(counter);
+ QString newId = QString(QStringLiteral("%1%2")).arg(firstCharToLower(prefixName)).arg(counter);
newId.remove(QRegExp(QStringLiteral("[^a-zA-Z0-9_]")));
while (hasId(newId)) {
counter += 1;
- newId = QString("%1%2").arg(firstCharToLower(prefixName)).arg(counter);
+ newId = QString(QStringLiteral("%1%2")).arg(firstCharToLower(prefixName)).arg(counter);
newId.remove(QRegExp(QStringLiteral("[^a-zA-Z0-9_]")));
}
diff --git a/src/plugins/qmldesigner/designercore/model/bindingproperty.cpp b/src/plugins/qmldesigner/designercore/model/bindingproperty.cpp
index 743de64e1d..0a7f3cfc38 100644
--- a/src/plugins/qmldesigner/designercore/model/bindingproperty.cpp
+++ b/src/plugins/qmldesigner/designercore/model/bindingproperty.cpp
@@ -96,7 +96,7 @@ static ModelNode resolveBinding(const QString &binding, ModelNode currentNode, A
while (!element.isEmpty())
{
if (currentNode.isValid()) {
- if (element == "parent") {
+ if (element == QLatin1String("parent")) {
if (currentNode.hasParentProperty())
currentNode = currentNode.parentProperty().toNodeAbstractProperty().parentModelNode();
else
@@ -200,7 +200,7 @@ bool BindingProperty::isAliasExport() const
return parentModelNode() == parentModelNode().view()->rootModelNode()
&& isDynamic()
&& dynamicTypeName() == "alias"
- && name() == expression()
+ && name() == expression().toUtf8()
&& parentModelNode().view()->modelNodeForId(expression()).isValid();
}
diff --git a/src/plugins/qmldesigner/designercore/model/internalbindingproperty.h b/src/plugins/qmldesigner/designercore/model/internalbindingproperty.h
index 56ab2c5bd8..5cb82205fa 100644
--- a/src/plugins/qmldesigner/designercore/model/internalbindingproperty.h
+++ b/src/plugins/qmldesigner/designercore/model/internalbindingproperty.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef INTERNALBINDINGPROPERTY_H
-#define INTERNALBINDINGPROPERTY_H
+#pragma once
#include "internalproperty.h"
@@ -57,5 +56,3 @@ private:
} // namespace Internal
} // namespace QmlDesigner
-
-#endif // INTERNALBINDINGPROPERTY_H
diff --git a/src/plugins/qmldesigner/designercore/model/internalnode_p.h b/src/plugins/qmldesigner/designercore/model/internalnode_p.h
index 2e9ff3dcdf..f34cf6c03e 100644
--- a/src/plugins/qmldesigner/designercore/model/internalnode_p.h
+++ b/src/plugins/qmldesigner/designercore/model/internalnode_p.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef INTERNALNODE_H
-#define INTERNALNODE_H
+#pragma once
#include <QMap>
#include <QHash>
@@ -158,5 +157,3 @@ uint qHash(const InternalNodePointer& node);
bool operator <(const InternalNodePointer &firstNode, const InternalNodePointer &secondNode);
} // Internal
} // QtQmlDesigner
-
-#endif // INTERNALNODE_H
diff --git a/src/plugins/qmldesigner/designercore/model/internalnodeabstractproperty.h b/src/plugins/qmldesigner/designercore/model/internalnodeabstractproperty.h
index 0be05f5a22..0ea7d49eff 100644
--- a/src/plugins/qmldesigner/designercore/model/internalnodeabstractproperty.h
+++ b/src/plugins/qmldesigner/designercore/model/internalnodeabstractproperty.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef INTERNALNODEABSTRACTPROPERTY_H
-#define INTERNALNODEABSTRACTPROPERTY_H
+#pragma once
#include "internalproperty.h"
@@ -61,5 +60,3 @@ protected:
} // namespace Internal
} // namespace QmlDesigner
-
-#endif // INTERNALNODEABSTRACTPROPERTY_H
diff --git a/src/plugins/qmldesigner/designercore/model/internalnodelistproperty.h b/src/plugins/qmldesigner/designercore/model/internalnodelistproperty.h
index c769219944..d58e44d08c 100644
--- a/src/plugins/qmldesigner/designercore/model/internalnodelistproperty.h
+++ b/src/plugins/qmldesigner/designercore/model/internalnodelistproperty.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef INTERNALNODELISTPROPERTY_H
-#define INTERNALNODELISTPROPERTY_H
+#pragma once
#include "internalnodeabstractproperty.h"
@@ -66,5 +65,3 @@ private:
} // namespace Internal
} // namespace QmlDesigner
-
-#endif // INTERNALNODELISTPROPERTY_H
diff --git a/src/plugins/qmldesigner/designercore/model/internalnodeproperty.h b/src/plugins/qmldesigner/designercore/model/internalnodeproperty.h
index 9e37ad5d3a..7da520b011 100644
--- a/src/plugins/qmldesigner/designercore/model/internalnodeproperty.h
+++ b/src/plugins/qmldesigner/designercore/model/internalnodeproperty.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef INTERNALNODEPROPERTY_H
-#define INTERNALNODEPROPERTY_H
+#pragma once
#include "internalnodeabstractproperty.h"
@@ -61,5 +60,3 @@ private:
} // namespace Internal
} // namespace QmlDesigner
-
-#endif // INTERNALNODEPROPERTY_H
diff --git a/src/plugins/qmldesigner/designercore/model/internalproperty.h b/src/plugins/qmldesigner/designercore/model/internalproperty.h
index 9ad33f2b17..df6896bf9a 100644
--- a/src/plugins/qmldesigner/designercore/model/internalproperty.h
+++ b/src/plugins/qmldesigner/designercore/model/internalproperty.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef INTERNALPROPERTY_H
-#define INTERNALPROPERTY_H
+#pragma once
#include "qmldesignercorelib_global.h"
@@ -97,5 +96,3 @@ private:
} // namespace Internal
} // namespace QmlDesigner
-
-#endif // INTERNALPROPERTY_H
diff --git a/src/plugins/qmldesigner/designercore/model/internalsignalhandlerproperty.h b/src/plugins/qmldesigner/designercore/model/internalsignalhandlerproperty.h
index f3aa86a69f..c0875f7e5b 100644
--- a/src/plugins/qmldesigner/designercore/model/internalsignalhandlerproperty.h
+++ b/src/plugins/qmldesigner/designercore/model/internalsignalhandlerproperty.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef INTERNALSIGNALHANDLERPROPERTY_H
-#define INTERNALSIGNALHANDLERPROPERTY_H
+#pragma once
#include "internalproperty.h"
@@ -54,5 +53,3 @@ private:
} // namespace Internal
} // namespace QmlDesigner
-
-#endif // INTERNALSIGNALHANDLERPROPERTY_H
diff --git a/src/plugins/qmldesigner/designercore/model/internalvariantproperty.h b/src/plugins/qmldesigner/designercore/model/internalvariantproperty.h
index 40af21e5e9..6edfe7a492 100644
--- a/src/plugins/qmldesigner/designercore/model/internalvariantproperty.h
+++ b/src/plugins/qmldesigner/designercore/model/internalvariantproperty.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef INTERNALVARIANTPROPERTY_H
-#define INTERNALVARIANTPROPERTY_H
+#pragma once
#include "internalproperty.h"
@@ -56,5 +55,3 @@ private:
} // namespace Internal
} // namespace QmlDesigner
-
-#endif // INTERNALVARIANTPROPERTY_H
diff --git a/src/plugins/qmldesigner/designercore/model/model.cpp b/src/plugins/qmldesigner/designercore/model/model.cpp
index 7a5f453812..e1937b4544 100644
--- a/src/plugins/qmldesigner/designercore/model/model.cpp
+++ b/src/plugins/qmldesigner/designercore/model/model.cpp
@@ -311,16 +311,16 @@ void ModelPrivate::changeNodeId(const InternalNode::Pointer& internalNodePointer
}
}
-void ModelPrivate::checkPropertyName(const QString &propertyName)
+void ModelPrivate::checkPropertyName(const PropertyName &propertyName)
{
if (propertyName.isEmpty()) {
Q_ASSERT_X(propertyName.isEmpty(), Q_FUNC_INFO, "empty property name");
throw InvalidPropertyException(__LINE__, __FUNCTION__, __FILE__, "<empty property name>");
}
- if (propertyName == QLatin1String("id")) {
- Q_ASSERT_X(propertyName != QLatin1String("id"), Q_FUNC_INFO, "cannot add property id");
- throw InvalidPropertyException(__LINE__, __FUNCTION__, __FILE__, propertyName.toUtf8());
+ if (propertyName == "id") {
+ Q_ASSERT_X(propertyName != "id", Q_FUNC_INFO, "cannot add property id");
+ throw InvalidPropertyException(__LINE__, __FUNCTION__, __FILE__, propertyName);
}
}
diff --git a/src/plugins/qmldesigner/designercore/model/model_p.h b/src/plugins/qmldesigner/designercore/model/model_p.h
index 9a4ae5da64..a8f8eae963 100644
--- a/src/plugins/qmldesigner/designercore/model/model_p.h
+++ b/src/plugins/qmldesigner/designercore/model/model_p.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef MODEL_P_H
-#define MODEL_P_H
+#pragma once
#include <QList>
#include <QPointer>
@@ -194,7 +193,7 @@ public:
void setDynamicBindingProperty(const InternalNodePointer &internalNodePointer, const PropertyName &name, const TypeName &dynamicPropertyType, const QString &expression);
void reparentNode(const InternalNodePointer &internalNodePointer, const PropertyName &name, const InternalNodePointer &internalNodeToBeAppended, bool list = true);
void changeNodeOrder(const InternalNodePointer &internalParentNode, const PropertyName &listPropertyName, int from, int to);
- void checkPropertyName(const QString &propertyName);
+ void checkPropertyName(const PropertyName &propertyName);
void clearParent(const InternalNodePointer &internalNodePointer);
void changeRootNodeType(const TypeName &type, int majorVersion, int minorVersion);
void setScriptFunctions(const InternalNodePointer &internalNode, const QStringList &scriptFunctionList);
@@ -254,4 +253,3 @@ private:
}
}
-#endif // MODEL_P_H
diff --git a/src/plugins/qmldesigner/designercore/model/modelnode.cpp b/src/plugins/qmldesigner/designercore/model/modelnode.cpp
index 780eb2cdb7..8af40b27aa 100644
--- a/src/plugins/qmldesigner/designercore/model/modelnode.cpp
+++ b/src/plugins/qmldesigner/designercore/model/modelnode.cpp
@@ -136,7 +136,7 @@ QString ModelNode::id() const
QString ModelNode::validId()
{
if (id().isEmpty())
- setIdWithRefactoring(view()->generateNewId(QString::fromUtf8(simplifiedTypeName())));
+ setIdWithRefactoring(view()->generateNewId(simplifiedTypeName()));
return id();
}
@@ -236,14 +236,14 @@ int ModelNode::majorVersion() const
}
/*! \return the short-hand type name of the node. */
-TypeName ModelNode::simplifiedTypeName() const
+QString ModelNode::simplifiedTypeName() const
{
if (!isValid()) {
Q_ASSERT_X(isValid(), Q_FUNC_INFO, "model node is invalid");
throw InvalidModelNodeException(__LINE__, __FUNCTION__, __FILE__);
}
- return type().split('.').last();
+ return QString::fromUtf8(type().split('.').last());
}
/*! \brief Returns whether the node is valid
@@ -584,7 +584,7 @@ void ModelNode::removeProperty(const PropertyName &name) const
if (!isValid())
throw InvalidModelNodeException(__LINE__, __FUNCTION__, __FILE__);
- model()->d->checkPropertyName(QString::fromUtf8(name));
+ model()->d->checkPropertyName(name);
if (internalNode()->hasProperty(name))
model()->d->removeProperty(internalNode()->property(name));
diff --git a/src/plugins/qmldesigner/designercore/model/modelnodepositionrecalculator.h b/src/plugins/qmldesigner/designercore/model/modelnodepositionrecalculator.h
index 9828132c4c..d71956df3e 100644
--- a/src/plugins/qmldesigner/designercore/model/modelnodepositionrecalculator.h
+++ b/src/plugins/qmldesigner/designercore/model/modelnodepositionrecalculator.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef MODELNODEPOSITIONRECALCULATOR_H
-#define MODELNODEPOSITIONRECALCULATOR_H
+#pragma once
#include <QMap>
#include <QObject>
@@ -62,5 +61,3 @@ private:
} // namespace Internal
} // namespace QmlDesigner
-
-#endif // MODELNODEPOSITIONRECALCULATOR_H
diff --git a/src/plugins/qmldesigner/designercore/model/modeltotextmerger.h b/src/plugins/qmldesigner/designercore/model/modeltotextmerger.h
index 89abfee724..7405fcbca0 100644
--- a/src/plugins/qmldesigner/designercore/model/modeltotextmerger.h
+++ b/src/plugins/qmldesigner/designercore/model/modeltotextmerger.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef MODELTOTEXTMERGER_H
-#define MODELTOTEXTMERGER_H
+#pragma once
#include "qmldesignercorelib_global.h"
#include <modelnode.h>
@@ -96,5 +95,3 @@ private:
} //Internal
} //QmlDesigner
-
-#endif // MODELTOTEXTMERGER_H
diff --git a/src/plugins/qmldesigner/designercore/model/qmlanchors.cpp b/src/plugins/qmldesigner/designercore/model/qmlanchors.cpp
index ae81fb33b6..4aad77f709 100644
--- a/src/plugins/qmldesigner/designercore/model/qmlanchors.cpp
+++ b/src/plugins/qmldesigner/designercore/model/qmlanchors.cpp
@@ -48,25 +48,25 @@ static PropertyName lineTypeToString(AnchorLineType lineType)
}
}
-static AnchorLineType propertyNameToLineType(const QString & string)
+static AnchorLineType propertyNameToLineType(const PropertyName & name)
{
- if (string == QStringLiteral("left"))
+ if (name == "left")
return AnchorLineLeft;
- else if (string == QStringLiteral("top"))
+ else if (name == "top")
return AnchorLineTop;
- else if (string == QStringLiteral("right"))
+ else if (name == "right")
return AnchorLineRight;
- else if (string == QStringLiteral("bottom"))
+ else if (name == "bottom")
return AnchorLineBottom;
- else if (string == QStringLiteral("horizontalCenter"))
+ else if (name == "horizontalCenter")
return AnchorLineHorizontalCenter;
- else if (string == QStringLiteral("verticalCenter"))
+ else if (name == "verticalCenter")
return AnchorLineVerticalCenter;
- else if (string == QStringLiteral("baseline"))
+ else if (name == "baseline")
return AnchorLineVerticalCenter;
- else if (string == QStringLiteral("centerIn"))
+ else if (name == "centerIn")
return AnchorLineCenter;
- else if (string == QStringLiteral("fill"))
+ else if (name == "fill")
return AnchorLineFill;
return AnchorLineInvalid;
@@ -173,9 +173,9 @@ void QmlAnchors::setAnchor(AnchorLineType sourceAnchorLine,
ModelNode targetModelNode = targetQmlItemNode.modelNode();
QString targetExpression = targetModelNode.validId();
if (targetQmlItemNode.modelNode() == qmlItemNode().modelNode().parentProperty().parentModelNode())
- targetExpression = "parent";
+ targetExpression = QLatin1String("parent");
if (sourceAnchorLine != AnchorLineCenter && sourceAnchorLine != AnchorLineFill)
- targetExpression = targetExpression + QLatin1Char('.') + lineTypeToString(targetAnchorLine);
+ targetExpression = targetExpression + QLatin1Char('.') + QString::fromLatin1(lineTypeToString(targetAnchorLine));
qmlItemNode().modelNode().bindingProperty(propertyName).setExpression(targetExpression);
}
}
@@ -321,15 +321,15 @@ void QmlAnchors::removeAnchor(AnchorLineType sourceAnchorLine)
const PropertyName propertyName = anchorPropertyName(sourceAnchorLine);
if (qmlItemNode().nodeInstance().hasAnchor("anchors.fill") && (sourceAnchorLine & AnchorLineFill)) {
qmlItemNode().modelNode().removeProperty("anchors.fill");
- qmlItemNode().modelNode().bindingProperty("anchors.top").setExpression("parent.top");
- qmlItemNode().modelNode().bindingProperty("anchors.left").setExpression("parent.left");
- qmlItemNode().modelNode().bindingProperty("anchors.bottom").setExpression("parent.bottom");
- qmlItemNode().modelNode().bindingProperty("anchors.right").setExpression("parent.right");
+ qmlItemNode().modelNode().bindingProperty("anchors.top").setExpression(QLatin1String("parent.top"));
+ qmlItemNode().modelNode().bindingProperty("anchors.left").setExpression(QLatin1String("parent.left"));
+ qmlItemNode().modelNode().bindingProperty("anchors.bottom").setExpression(QLatin1String("parent.bottom"));
+ qmlItemNode().modelNode().bindingProperty("anchors.right").setExpression(QLatin1String("parent.right"));
} else if (qmlItemNode().nodeInstance().hasAnchor("anchors.centerIn") && (sourceAnchorLine & AnchorLineCenter)) {
qmlItemNode().modelNode().removeProperty("anchors.centerIn");
- qmlItemNode().modelNode().bindingProperty("anchors.horizontalCenter").setExpression("parent.horizontalCenter");
- qmlItemNode().modelNode().bindingProperty("anchors.verticalCenter").setExpression("parent.verticalCenter");
+ qmlItemNode().modelNode().bindingProperty("anchors.horizontalCenter").setExpression(QLatin1String("parent.horizontalCenter"));
+ qmlItemNode().modelNode().bindingProperty("anchors.verticalCenter").setExpression(QLatin1String("parent.verticalCenter"));
}
qmlItemNode().modelNode().removeProperty(propertyName);
@@ -549,7 +549,7 @@ void QmlAnchors::fill()
if (instanceHasAnchors())
removeAnchors();
- qmlItemNode().modelNode().bindingProperty("anchors.fill").setExpression("parent");
+ qmlItemNode().modelNode().bindingProperty("anchors.fill").setExpression(QLatin1String("parent"));
}
void QmlAnchors::centerIn()
@@ -557,7 +557,7 @@ void QmlAnchors::centerIn()
if (instanceHasAnchors())
removeAnchors();
- qmlItemNode().modelNode().bindingProperty("anchors.centerIn").setExpression("parent");
+ qmlItemNode().modelNode().bindingProperty("anchors.centerIn").setExpression(QLatin1String("parent"));
}
bool QmlAnchors::checkForCycle(AnchorLineType anchorLineTyp, const QmlItemNode &sourceItem) const
diff --git a/src/plugins/qmldesigner/designercore/model/qmlitemnode.cpp b/src/plugins/qmldesigner/designercore/model/qmlitemnode.cpp
index f86798b1c0..4503650c8d 100644
--- a/src/plugins/qmldesigner/designercore/model/qmlitemnode.cpp
+++ b/src/plugins/qmldesigner/designercore/model/qmlitemnode.cpp
@@ -488,7 +488,7 @@ QList<QmlModelState> QmlModelStateGroup::allStates() const
return returnList;
}
-TypeName QmlItemNode::simplifiedTypeName() const
+QString QmlItemNode::simplifiedTypeName() const
{
return modelNode().simplifiedTypeName();
}
diff --git a/src/plugins/qmldesigner/designercore/model/qmlobjectnode.cpp b/src/plugins/qmldesigner/designercore/model/qmlobjectnode.cpp
index f8141796f1..e2df00454c 100644
--- a/src/plugins/qmldesigner/designercore/model/qmlobjectnode.cpp
+++ b/src/plugins/qmldesigner/designercore/model/qmlobjectnode.cpp
@@ -315,9 +315,9 @@ void QmlObjectNode::ensureAliasExport()
if (!isAliasExported()) {
modelNode().validId();
- PropertyName modelNodeId = modelNode().id().toUtf8();
ModelNode rootModelNode = view()->rootModelNode();
- rootModelNode.bindingProperty(modelNodeId).setDynamicTypeNameAndExpression("alias", modelNodeId);
+ rootModelNode.bindingProperty(modelNode().id().toUtf8()).
+ setDynamicTypeNameAndExpression("alias", modelNode().id());
}
}
@@ -330,7 +330,7 @@ bool QmlObjectNode::isAliasExported() const
Q_ASSERT(rootModelNode.isValid());
if (rootModelNode.hasBindingProperty(modelNodeId)
&& rootModelNode.bindingProperty(modelNodeId).isDynamic()
- && rootModelNode.bindingProperty(modelNodeId).expression().toUtf8() == modelNodeId)
+ && rootModelNode.bindingProperty(modelNodeId).expression() == modelNode().id())
return true;
}
diff --git a/src/plugins/qmldesigner/designercore/model/qmltextgenerator.cpp b/src/plugins/qmldesigner/designercore/model/qmltextgenerator.cpp
index 12ecbe274a..c8e5888aea 100644
--- a/src/plugins/qmldesigner/designercore/model/qmltextgenerator.cpp
+++ b/src/plugins/qmldesigner/designercore/model/qmltextgenerator.cpp
@@ -144,7 +144,7 @@ QString QmlTextGenerator::toQml(const AbstractProperty &property, int indentDept
QString QmlTextGenerator::toQml(const ModelNode &node, int indentDepth) const
{
- QString type = node.type();
+ QString type = QString::fromLatin1(node.type());
QString url;
if (type.contains('.')) {
QStringList nameComponents = type.split('.');
@@ -232,13 +232,16 @@ QString QmlTextGenerator::propertyToQml(const AbstractProperty &property, int in
if (property.isDynamic()) {
result = QString(indentDepth, QLatin1Char(' '))
+ QStringLiteral("property ")
- + property.dynamicTypeName()
+ + QString::fromUtf8(property.dynamicTypeName())
+ QStringLiteral(" ")
- + property.name()
+ + QString::fromUtf8(property.name())
+ QStringLiteral(": ")
+ toQml(property, indentDepth);
} else {
- result = QString(indentDepth, QLatin1Char(' ')) + property.name() + QStringLiteral(": ") + toQml(property, indentDepth);
+ result = QString(indentDepth, QLatin1Char(' '))
+ + QString::fromUtf8(property.name())
+ + QStringLiteral(": ")
+ + toQml(property, indentDepth);
}
}
diff --git a/src/plugins/qmldesigner/designercore/model/qmltextgenerator.h b/src/plugins/qmldesigner/designercore/model/qmltextgenerator.h
index af7deb65d7..5c2823573e 100644
--- a/src/plugins/qmldesigner/designercore/model/qmltextgenerator.h
+++ b/src/plugins/qmldesigner/designercore/model/qmltextgenerator.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef QMLTEXTGENERATOR_H
-#define QMLTEXTGENERATOR_H
+#pragma once
#include <QString>
@@ -60,5 +59,3 @@ private:
} // namespace Internal
} // namespace QmlDesigner
-
-#endif // QMLTEXTGENERATOR_H
diff --git a/src/plugins/qmldesigner/designercore/model/rewriteaction.cpp b/src/plugins/qmldesigner/designercore/model/rewriteaction.cpp
index 32266c6d0b..9d620d24cf 100644
--- a/src/plugins/qmldesigner/designercore/model/rewriteaction.cpp
+++ b/src/plugins/qmldesigner/designercore/model/rewriteaction.cpp
@@ -119,7 +119,7 @@ bool AddPropertyRewriteAction::execute(QmlRefactoring &refactoring, ModelNodePos
QString AddPropertyRewriteAction::info() const
{
- return QStringLiteral("AddPropertyRewriteAction for property \"%1\" (type: %2)").arg(m_property.name(), toString(m_propertyType));
+ return QStringLiteral("AddPropertyRewriteAction for property \"%1\" (type: %2)").arg(QString::fromUtf8(m_property.name()), toString(m_propertyType));
}
bool ChangeIdRewriteAction::execute(QmlRefactoring &refactoring, ModelNodePositionStorage &positionStore)
@@ -164,7 +164,7 @@ bool ChangeIdRewriteAction::execute(QmlRefactoring &refactoring, ModelNodePositi
QString ChangeIdRewriteAction::info() const
{
- return QString("ChangeIdRewriteAction from \"%1\" to \"%2\"").arg(m_oldId, m_newId);
+ return QString(QStringLiteral("ChangeIdRewriteAction from \"%1\" to \"%2\"")).arg(m_oldId, m_newId);
}
bool ChangePropertyRewriteAction::execute(QmlRefactoring &refactoring, ModelNodePositionStorage &positionStore)
@@ -209,12 +209,12 @@ bool ChangePropertyRewriteAction::execute(QmlRefactoring &refactoring, ModelNode
QString ChangePropertyRewriteAction::info() const
{
- return QString("ChangePropertyRewriteAction for property \"%1\" (type: %2) of node \"%3\" with value >>%4<< and contained object \"%5\"")
- .arg(m_property.name(),
+ return QString(QStringLiteral("ChangePropertyRewriteAction for property \"%1\" (type: %2) of node \"%3\" with value >>%4<< and contained object \"%5\""))
+ .arg(QString::fromUtf8(m_property.name()),
toString(m_propertyType),
- (m_property.parentModelNode().isValid() ? m_property.parentModelNode().id() : "(invalid)"),
- QString(m_valueText).replace('\n', "\\n"),
- (m_containedModelNode.isValid() ? m_containedModelNode.id() : "(none)"));
+ (m_property.parentModelNode().isValid() ? m_property.parentModelNode().id() : QLatin1String("(invalid)")),
+ QString(m_valueText).replace(QLatin1Char('\n'), QLatin1String("\\n")),
+ (m_containedModelNode.isValid() ? m_containedModelNode.id() : QString(QStringLiteral("(none)"))));
}
bool ChangeTypeRewriteAction::execute(QmlRefactoring &refactoring, ModelNodePositionStorage &positionStore)
@@ -240,7 +240,7 @@ bool ChangeTypeRewriteAction::execute(QmlRefactoring &refactoring, ModelNodePosi
QString ChangeTypeRewriteAction::info() const
{
- return QString("ChangeTypeRewriteAction");
+ return QLatin1String("ChangeTypeRewriteAction");
}
bool RemoveNodeRewriteAction::execute(QmlRefactoring &refactoring, ModelNodePositionStorage &positionStore)
@@ -258,7 +258,7 @@ bool RemoveNodeRewriteAction::execute(QmlRefactoring &refactoring, ModelNodePosi
QString RemoveNodeRewriteAction::info() const
{
- return QString("RemoveNodeRewriteAction");
+ return QLatin1String("RemoveNodeRewriteAction");
}
bool RemovePropertyRewriteAction::execute(QmlRefactoring &refactoring, ModelNodePositionStorage &positionStore)
@@ -277,7 +277,7 @@ bool RemovePropertyRewriteAction::execute(QmlRefactoring &refactoring, ModelNode
QString RemovePropertyRewriteAction::info() const
{
- return QStringLiteral("RemovePropertyRewriteAction for property \"%1\"").arg(QLatin1String(m_property.name()));
+ return QStringLiteral("RemovePropertyRewriteAction for property \"%1\"").arg(QString::fromUtf8(m_property.name()));
}
bool ReparentNodeRewriteAction::execute(QmlRefactoring &refactoring, ModelNodePositionStorage &positionStore)
@@ -307,12 +307,12 @@ bool ReparentNodeRewriteAction::execute(QmlRefactoring &refactoring, ModelNodePo
QString ReparentNodeRewriteAction::info() const
{
if (m_node.isValid())
- return QString("ReparentNodeRewriteAction for node \"%1\" into property \"%2\" of node \"%3\"")
+ return QString(QStringLiteral("ReparentNodeRewriteAction for node \"%1\" into property \"%2\" of node \"%3\""))
.arg(m_node.id(),
- m_targetProperty.name(),
+ QString::fromUtf8(m_targetProperty.name()),
m_targetProperty.parentModelNode().id());
else
- return QString("ReparentNodeRewriteAction for an invalid node");
+ return QLatin1String("ReparentNodeRewriteAction for an invalid node");
}
bool MoveNodeRewriteAction::execute(QmlRefactoring &refactoring,
@@ -339,11 +339,11 @@ QString MoveNodeRewriteAction::info() const
{
if (m_movingNode.isValid()) {
if (m_newTrailingNode.isValid())
- return QString("MoveNodeRewriteAction for node \"%1\" before node \"%2\"").arg(m_movingNode.id(), m_newTrailingNode.id());
+ return QString(QStringLiteral("MoveNodeRewriteAction for node \"%1\" before node \"%2\"")).arg(m_movingNode.id(), m_newTrailingNode.id());
else
- return QString("MoveNodeRewriteAction for node \"%1\" to the end of its containing property").arg(m_movingNode.id());
+ return QString(QStringLiteral("MoveNodeRewriteAction for node \"%1\" to the end of its containing property")).arg(m_movingNode.id());
} else {
- return QString("MoveNodeRewriteAction for an invalid node");
+ return QString(QStringLiteral("MoveNodeRewriteAction for an invalid node"));
}
}
diff --git a/src/plugins/qmldesigner/designercore/model/rewriteaction.h b/src/plugins/qmldesigner/designercore/model/rewriteaction.h
index 58cc56b41e..63cb8db2e7 100644
--- a/src/plugins/qmldesigner/designercore/model/rewriteaction.h
+++ b/src/plugins/qmldesigner/designercore/model/rewriteaction.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef REWRITEACTION_H
-#define REWRITEACTION_H
+#pragma once
#include "abstractproperty.h"
#include "modelnodepositionstorage.h"
@@ -301,5 +300,3 @@ private:
} // namespace Internal
} // namespace QmlDesigner
-
-#endif // REWRITEACTION_H
diff --git a/src/plugins/qmldesigner/designercore/model/rewriteactioncompressor.h b/src/plugins/qmldesigner/designercore/model/rewriteactioncompressor.h
index 461238230c..2702ab0d60 100644
--- a/src/plugins/qmldesigner/designercore/model/rewriteactioncompressor.h
+++ b/src/plugins/qmldesigner/designercore/model/rewriteactioncompressor.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef REWRITEACTIONCOMPRESSOR_H
-#define REWRITEACTIONCOMPRESSOR_H
+#pragma once
#include "rewriteaction.h"
@@ -54,5 +53,3 @@ private:
} // namespace Internal
} // namespace QmlDesigner
-
-#endif // REWRITEACTIONCOMPRESSOR_H
diff --git a/src/plugins/qmldesigner/designercore/model/rewriterview.cpp b/src/plugins/qmldesigner/designercore/model/rewriterview.cpp
index adb9f806c1..51ffd854eb 100644
--- a/src/plugins/qmldesigner/designercore/model/rewriterview.cpp
+++ b/src/plugins/qmldesigner/designercore/model/rewriterview.cpp
@@ -296,9 +296,9 @@ void RewriterView::importAdded(const Import &import)
if (textToModelMerger()->isActive())
return;
- if (import.url() == "Qt")
+ if (import.url() == QLatin1String("Qt"))
foreach (const Import &import, model()->imports()) {
- if (import.url() == "QtQuick")
+ if (import.url() == QLatin1String("QtQuick"))
return; //QtQuick magic we do not have to add an import for Qt
}
@@ -470,7 +470,7 @@ void RewriterView::applyChanges()
qDebug() << "Content:" << content;
if (!errors().isEmpty())
qDebug() << "Error:" << errors().first().description();
- throw RewritingException(__LINE__, __FUNCTION__, __FILE__, m_rewritingErrorMessage.toUtf8(), content.toUtf8());
+ throw RewritingException(__LINE__, __FUNCTION__, __FILE__, qPrintable(m_rewritingErrorMessage), content);
}
}
@@ -611,7 +611,7 @@ bool RewriterView::renameId(const QString& oldId, const QString& newId)
if (refactoring && hasAliasExport) { //Keep export alias properties
rootModelNode().removeProperty(propertyName);
PropertyName newPropertyName = newId.toUtf8();
- rootModelNode().bindingProperty(newPropertyName).setDynamicTypeNameAndExpression("alias", newPropertyName);
+ rootModelNode().bindingProperty(newPropertyName).setDynamicTypeNameAndExpression("alias", QString::fromUtf8(newPropertyName));
}
return refactoring;
}
diff --git a/src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp b/src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp
index 7d7f007a7a..b1750aaede 100644
--- a/src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp
+++ b/src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp
@@ -147,7 +147,7 @@ static inline bool isHexDigit(ushort c)
static inline QString fixEscapedUnicodeChar(const QString &value) //convert "\u2939"
{
- if (value.count() == 6 && value.at(0) == '\\' && value.at(1) == 'u' &&
+ if (value.count() == 6 && value.at(0) == QLatin1Char('\\') && value.at(1) == QLatin1Char('u') &&
isHexDigit(value.at(2).unicode()) && isHexDigit(value.at(3).unicode()) &&
isHexDigit(value.at(4).unicode()) && isHexDigit(value.at(5).unicode())) {
return convertUnicode(value.at(2).unicode(), value.at(3).unicode(), value.at(4).unicode(), value.at(5).unicode());
@@ -169,9 +169,9 @@ static inline bool isSignalPropertyName(const QString &signalName)
static inline QVariant cleverConvert(const QString &value)
{
- if (value == "true")
+ if (value == QLatin1String("true"))
return QVariant(true);
- if (value == "false")
+ if (value == QLatin1String("false"))
return QVariant(false);
bool flag;
int i = value.toInt(&flag);
@@ -273,7 +273,7 @@ static bool isComponentType(const QmlDesigner::TypeName &type)
return type == "Component" || type == "Qt.Component" || type == "QtQuick.Component" || type == "<cpp>.QQmlComponent";
}
-static bool isCustomParserType(const QString &type)
+static bool isCustomParserType(const QmlDesigner::TypeName &type)
{
return type == "QtQuick.VisualItemModel" || type == "Qt.VisualItemModel" ||
type == "QtQuick.VisualDataModel" || type == "Qt.VisualDataModel" ||
@@ -307,7 +307,7 @@ static inline QString extractComponentFromQml(const QString &source)
return QString();
QString result;
- if (source.contains("Component")) { //explicit component
+ if (source.contains(QLatin1String("Component"))) { //explicit component
QmlDesigner::FirstDefinitionFinder firstDefinitionFinder(source);
int offset = firstDefinitionFinder(0);
if (offset < 0)
@@ -1100,7 +1100,7 @@ void TextToModelMerger::syncNode(ModelNode &modelNode,
const TypeName &astType = property->memberType.toUtf8();
AbstractProperty modelProperty = modelNode.property(astName.toUtf8());
if (!property->statement || isLiteralValue(property->statement)) {
- const QVariant variantValue = convertDynamicPropertyValueToVariant(astValue, astType);
+ const QVariant variantValue = convertDynamicPropertyValueToVariant(astValue, QString::fromLatin1(astType));
syncVariantProperty(modelProperty, variantValue, astType, differenceHandler);
} else {
syncExpressionProperty(modelProperty, astValue, astType, differenceHandler);
@@ -1196,7 +1196,7 @@ QmlDesigner::PropertyName TextToModelMerger::syncScriptBinding(ModelNode &modelN
{
QString astPropertyName = toString(script->qualifiedId);
if (!prefix.isEmpty())
- astPropertyName.prepend(prefix + QLatin1Char('.'));
+ astPropertyName.prepend(prefix + '.');
QString astValue;
if (script->statement) {
@@ -1490,7 +1490,7 @@ QStringList TextToModelMerger::syncGroupedProperties(ModelNode &modelNode,
AST::UiObjectMember *member = iter->member;
if (AST::UiScriptBinding *script = AST::cast<AST::UiScriptBinding *>(member)) {
- const QString prop = syncScriptBinding(modelNode, name, script, context, differenceHandler);
+ const QString prop = QString::fromLatin1(syncScriptBinding(modelNode, name, script, context, differenceHandler));
if (!prop.isEmpty())
props.append(prop);
}
diff --git a/src/plugins/qmldesigner/designercore/model/texttomodelmerger.h b/src/plugins/qmldesigner/designercore/model/texttomodelmerger.h
index cd543879ed..45e225b109 100644
--- a/src/plugins/qmldesigner/designercore/model/texttomodelmerger.h
+++ b/src/plugins/qmldesigner/designercore/model/texttomodelmerger.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef TEXTTOMODELMERGER_H
-#define TEXTTOMODELMERGER_H
+#pragma once
#include "qmldesignercorelib_global.h"
#include "import.h"
@@ -308,5 +307,3 @@ public:
} //Internal
} //QmlDesigner
-
-#endif // TEXTTOMODELMERGER_H
diff --git a/src/plugins/qmldesigner/designercore/pluginmanager/widgetpluginmanager.h b/src/plugins/qmldesigner/designercore/pluginmanager/widgetpluginmanager.h
index 77108480a0..31d94a17c5 100644
--- a/src/plugins/qmldesigner/designercore/pluginmanager/widgetpluginmanager.h
+++ b/src/plugins/qmldesigner/designercore/pluginmanager/widgetpluginmanager.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef WIDGETPLUGINMANAGER_H
-#define WIDGETPLUGINMANAGER_H
+#pragma once
#include <QObject>
#include <QList>
@@ -70,4 +69,3 @@ private:
} // namespace Internal
} // namespace QmlDesigner
-#endif // WIDGETPLUGINMANAGER_H
diff --git a/src/plugins/qmldesigner/designercore/pluginmanager/widgetpluginpath.h b/src/plugins/qmldesigner/designercore/pluginmanager/widgetpluginpath.h
index 5354ae7217..391fe86fe9 100644
--- a/src/plugins/qmldesigner/designercore/pluginmanager/widgetpluginpath.h
+++ b/src/plugins/qmldesigner/designercore/pluginmanager/widgetpluginpath.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef WIDGETPLUGINPATH_H
-#define WIDGETPLUGINPATH_H
+#pragma once
#include <QObject>
#include <QPointer>
@@ -94,4 +93,3 @@ private:
} // namespace Internal
} // namespace QmlDesigner
-#endif // WIDGETPLUGINPATH_H
diff --git a/src/plugins/qmldesigner/designercore/rewritertransaction.h b/src/plugins/qmldesigner/designercore/rewritertransaction.h
index b983273258..213b9e5618 100644
--- a/src/plugins/qmldesigner/designercore/rewritertransaction.h
+++ b/src/plugins/qmldesigner/designercore/rewritertransaction.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef REWRITERTRANSACTION_H
-#define REWRITERTRANSACTION_H
+#pragma once
#include <qmldesignercorelib_global.h>
@@ -59,5 +58,3 @@ private:
};
} //QmlDesigner
-
-#endif // REWRITERTRANSACTION_H
diff --git a/src/plugins/qmldesigner/designersettings.h b/src/plugins/qmldesigner/designersettings.h
index cc93e4be55..b5e0b2fd29 100644
--- a/src/plugins/qmldesigner/designersettings.h
+++ b/src/plugins/qmldesigner/designersettings.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef DESIGNERSETTINGS_H
-#define DESIGNERSETTINGS_H
+#pragma once
#include <QtGlobal>
#include <QHash>
@@ -74,5 +73,3 @@ private:
};
} // namespace QmlDesigner
-
-#endif // DESIGNERSETTINGS_H
diff --git a/src/plugins/qmldesigner/designmodecontext.h b/src/plugins/qmldesigner/designmodecontext.h
index da8d545b11..aa89c619f3 100644
--- a/src/plugins/qmldesigner/designmodecontext.h
+++ b/src/plugins/qmldesigner/designmodecontext.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef DESIGNMODECONTEXT_H
-#define DESIGNMODECONTEXT_H
+#pragma once
#include <coreplugin/icontext.h>
@@ -57,5 +56,3 @@ public:
}
}
-
-#endif // DESIGNMODECONTEXT_H
diff --git a/src/plugins/qmldesigner/designmodewidget.cpp b/src/plugins/qmldesigner/designmodewidget.cpp
index 38d474626c..f26ca694dc 100644
--- a/src/plugins/qmldesigner/designmodewidget.cpp
+++ b/src/plugins/qmldesigner/designmodewidget.cpp
@@ -575,7 +575,7 @@ static Core::MiniSplitter *createCentralSplitter(const QList<WidgetInfo> &widget
outputPlaceholderSplitter->setStretchFactor(1, 0);
outputPlaceholderSplitter->setOrientation(Qt::Vertical);
- StyledOutputpanePlaceHolder *outputPanePlaceholder = new StyledOutputpanePlaceHolder(Core::DesignMode::instance(), outputPlaceholderSplitter);
+ auto outputPanePlaceholder = new StyledOutputpanePlaceHolder(Core::Constants::MODE_DESIGN, outputPlaceholderSplitter);
if (centralWidgetInfos.count() == 1)
outputPlaceholderSplitter->addWidget(centralWidgetInfos.first().widget);
diff --git a/src/plugins/qmldesigner/designmodewidget.h b/src/plugins/qmldesigner/designmodewidget.h
index 41d9af758b..f1a68b3a9c 100644
--- a/src/plugins/qmldesigner/designmodewidget.h
+++ b/src/plugins/qmldesigner/designmodewidget.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef DESIGNMODEWIDGET_H
-#define DESIGNMODEWIDGET_H
+#pragma once
#include <coreplugin/minisplitter.h>
#include <utils/faketooltip.h>
@@ -158,5 +157,3 @@ private: // variables
} // namespace Internal
} // namespace Designer
-
-#endif // DESIGNMODEWIDGET_H
diff --git a/src/plugins/qmldesigner/documentmanager.h b/src/plugins/qmldesigner/documentmanager.h
index 21e9f5b62f..83d773d75f 100644
--- a/src/plugins/qmldesigner/documentmanager.h
+++ b/src/plugins/qmldesigner/documentmanager.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef QMLDESIGNER_DOCUMENTMANAGER_H
-#define QMLDESIGNER_DOCUMENTMANAGER_H
+#pragma once
#include <QObject>
#include <QList>
@@ -71,5 +70,3 @@ private:
};
} // namespace QmlDesigner
-
-#endif // QMLDESIGNER_DOCUMENTMANAGER_H
diff --git a/src/plugins/qmldesigner/qmldesignerconstants.h b/src/plugins/qmldesigner/qmldesignerconstants.h
index 0deb1dcaf9..e0e8081d1f 100644
--- a/src/plugins/qmldesigner/qmldesignerconstants.h
+++ b/src/plugins/qmldesigner/qmldesignerconstants.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef QMLDESIGNERCONSTANTS_H
-#define QMLDESIGNERCONSTANTS_H
+#pragma once
namespace QmlDesigner {
namespace Constants {
@@ -55,5 +54,3 @@ namespace Internal {
} // Constants
} // QmlDesigner
-
-#endif //QMLDESIGNERCONSTANTS_H
diff --git a/src/plugins/qmldesigner/qmldesignerextension/colortool/colortool.h b/src/plugins/qmldesigner/qmldesignerextension/colortool/colortool.h
index 889dfcb928..439971855e 100644
--- a/src/plugins/qmldesigner/qmldesignerextension/colortool/colortool.h
+++ b/src/plugins/qmldesigner/qmldesignerextension/colortool/colortool.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef COLORTOOL_H
-#define COLORTOOL_H
+#pragma once
#include "abstractcustomtool.h"
#include "selectionindicator.h"
@@ -88,5 +87,3 @@ private:
};
}
-#endif // COLORTOOL_H
-
diff --git a/src/plugins/qmldesigner/qmldesignerextension/connectioneditor/bindingmodel.cpp b/src/plugins/qmldesigner/qmldesignerextension/connectioneditor/bindingmodel.cpp
index 58f3a5fd28..25f31da04c 100644
--- a/src/plugins/qmldesigner/qmldesignerextension/connectioneditor/bindingmodel.cpp
+++ b/src/plugins/qmldesigner/qmldesignerextension/connectioneditor/bindingmodel.cpp
@@ -152,7 +152,7 @@ QStringList BindingModel::possibleTargetProperties(const BindingProperty &bindin
QStringList possibleProperties;
foreach (const PropertyName &propertyName, metaInfo.propertyNames()) {
if (metaInfo.propertyIsWritable(propertyName))
- possibleProperties << QString::fromLatin1(propertyName);
+ possibleProperties << QString::fromUtf8(propertyName);
}
return possibleProperties;
@@ -189,18 +189,18 @@ QStringList BindingModel::possibleSourceProperties(const BindingProperty &bindin
foreach (VariantProperty variantProperty, modelNode.variantProperties()) {
if (variantProperty.isDynamic())
- possibleProperties << QString::fromLatin1((variantProperty.name()));
+ possibleProperties << QString::fromUtf8(variantProperty.name());
}
foreach (BindingProperty bindingProperty, modelNode.bindingProperties()) {
if (bindingProperty.isDynamic())
- possibleProperties << QString::fromLatin1((bindingProperty.name()));
+ possibleProperties << QString::fromUtf8((bindingProperty.name()));
}
if (metaInfo.isValid()) {
foreach (const PropertyName &propertyName, metaInfo.propertyNames()) {
if (metaInfo.propertyTypeName(propertyName) == typeName) //### todo proper check
- possibleProperties << QString::fromLatin1(propertyName);
+ possibleProperties << QString::fromUtf8(propertyName);
}
} else {
qWarning() << " BindingModel::possibleSourcePropertiesForRow no meta info for source node";
@@ -280,10 +280,10 @@ void BindingModel::addBindingProperty(const BindingProperty &property)
QString idLabel = property.parentModelNode().id();
if (idLabel.isEmpty())
- idLabel = QString::fromLatin1(property.parentModelNode().simplifiedTypeName());
+ idLabel = property.parentModelNode().simplifiedTypeName();
idItem = new QStandardItem(idLabel);
updateCustomData(idItem, property);
- targetPropertyNameItem = new QStandardItem(QString::fromLatin1(property.name()));
+ targetPropertyNameItem = new QStandardItem(QString::fromUtf8(property.name()));
QList<QStandardItem*> items;
items.append(idItem);
@@ -306,7 +306,7 @@ void BindingModel::updateBindingProperty(int rowNumber)
BindingProperty bindingProperty = bindingPropertyForRow(rowNumber);
if (bindingProperty.isValid()) {
- QString targetPropertyName = QString::fromLatin1(bindingProperty.name());
+ QString targetPropertyName = QString::fromUtf8(bindingProperty.name());
updateDisplayRole(rowNumber, TargetPropertyNameRow, targetPropertyName);
QString sourceNodeName;
QString sourcePropertyName;
@@ -352,7 +352,7 @@ void BindingModel::updatePropertyName(int rowNumber)
{
BindingProperty bindingProperty = bindingPropertyForRow(rowNumber);
- const PropertyName newName = data(index(rowNumber, TargetPropertyNameRow)).toString().toLatin1();
+ const PropertyName newName = data(index(rowNumber, TargetPropertyNameRow)).toString().toUtf8();
const QString expression = bindingProperty.expression();
const PropertyName dynamicPropertyType = bindingProperty.dynamicTypeName();
ModelNode targetNode = bindingProperty.parentModelNode();
diff --git a/src/plugins/qmldesigner/qmldesignerextension/connectioneditor/bindingmodel.h b/src/plugins/qmldesigner/qmldesignerextension/connectioneditor/bindingmodel.h
index 9f1334c33c..51489a60d6 100644
--- a/src/plugins/qmldesigner/qmldesignerextension/connectioneditor/bindingmodel.h
+++ b/src/plugins/qmldesigner/qmldesignerextension/connectioneditor/bindingmodel.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef BINDINGMODEL_H
-#define BINDINGMODEL_H
+#pragma once
#include <modelnode.h>
#include <nodemetainfo.h>
@@ -118,5 +117,3 @@ public:
} // namespace Internal
} // namespace QmlDesigner
-
-#endif // BINDINGMODEL_H
diff --git a/src/plugins/qmldesigner/qmldesignerextension/connectioneditor/connectionmodel.cpp b/src/plugins/qmldesigner/qmldesignerextension/connectioneditor/connectionmodel.cpp
index d89f8f06f3..1322bf08c5 100644
--- a/src/plugins/qmldesigner/qmldesignerextension/connectioneditor/connectionmodel.cpp
+++ b/src/plugins/qmldesigner/qmldesignerextension/connectioneditor/connectionmodel.cpp
@@ -60,7 +60,7 @@ QStringList propertyNameListToStringList(const QmlDesigner::PropertyNameList &pr
{
QStringList stringList;
foreach (QmlDesigner::PropertyName propertyName, propertyNameList) {
- stringList << QString::fromLatin1(propertyName);
+ stringList << QString::fromUtf8(propertyName);
}
return stringList;
}
@@ -124,7 +124,7 @@ SignalHandlerProperty ConnectionModel::signalHandlerPropertyForRow(int rowNumber
ModelNode modelNode = connectionView()->modelNodeForInternalId(internalId);
if (modelNode.isValid())
- return modelNode.signalHandlerProperty(targetPropertyName.toLatin1());
+ return modelNode.signalHandlerProperty(targetPropertyName.toUtf8());
return SignalHandlerProperty();
}
@@ -160,7 +160,7 @@ void ConnectionModel::addSignalHandler(const SignalHandlerProperty &signalHandle
targetItem = new QStandardItem(idLabel);
updateCustomData(targetItem, signalHandlerProperty);
- const QString propertyName = QString::fromLatin1(signalHandlerProperty.name());
+ const QString propertyName = QString::fromUtf8(signalHandlerProperty.name());
const QString source = signalHandlerProperty.source();
signalItem = new QStandardItem(propertyName);
@@ -210,7 +210,7 @@ void ConnectionModel::updateSignalName(int rowNumber)
{
SignalHandlerProperty signalHandlerProperty = signalHandlerPropertyForRow(rowNumber);
- const PropertyName newName = data(index(rowNumber, TargetPropertyNameRow)).toString().toLatin1();
+ const PropertyName newName = data(index(rowNumber, TargetPropertyNameRow)).toString().toUtf8();
const QString source = signalHandlerProperty.source();
ModelNode connectionNode = signalHandlerProperty.parentModelNode();
diff --git a/src/plugins/qmldesigner/qmldesignerextension/connectioneditor/connectionmodel.h b/src/plugins/qmldesigner/qmldesignerextension/connectioneditor/connectionmodel.h
index a4fb4b8a56..016ff66dd5 100644
--- a/src/plugins/qmldesigner/qmldesignerextension/connectioneditor/connectionmodel.h
+++ b/src/plugins/qmldesigner/qmldesignerextension/connectioneditor/connectionmodel.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef CONNECTIONMODEL_H
-#define CONNECTIONMODEL_H
+#pragma once
#include <modelnode.h>
#include <nodemetainfo.h>
@@ -119,5 +118,3 @@ public:
} // namespace Internal
} // namespace QmlDesigner
-
-#endif // CONNECTIONMODEL_H
diff --git a/src/plugins/qmldesigner/qmldesignerextension/connectioneditor/connectionview.h b/src/plugins/qmldesigner/qmldesignerextension/connectioneditor/connectionview.h
index 2b6b1d1535..cb122baf0b 100644
--- a/src/plugins/qmldesigner/qmldesignerextension/connectioneditor/connectionview.h
+++ b/src/plugins/qmldesigner/qmldesignerextension/connectioneditor/connectionview.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef CONNECTIONVIEW_H
-#define CONNECTIONVIEW_H
+#pragma once
#include <abstractview.h>
#include <qmlitemnode.h>
@@ -92,5 +91,3 @@ private: //variables
} // namespace Internal
} // namespace QmlDesigner
-
-#endif //CONNECTIONVIEW_H
diff --git a/src/plugins/qmldesigner/qmldesignerextension/connectioneditor/connectionviewwidget.h b/src/plugins/qmldesigner/qmldesignerextension/connectioneditor/connectionviewwidget.h
index 2fbb107e1c..fa5a88bbc4 100644
--- a/src/plugins/qmldesigner/qmldesignerextension/connectioneditor/connectionviewwidget.h
+++ b/src/plugins/qmldesigner/qmldesignerextension/connectioneditor/connectionviewwidget.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef CONNECTIONVIEWWIDGET_H
-#define CONNECTIONVIEWWIDGET_H
+#pragma once
#include <QFrame>
#include <QAbstractItemView>
@@ -99,5 +98,3 @@ private:
} // namespace Internal
} // namespace QmlDesigner
-
-#endif // CONNECTIONVIEWWIDGET_H
diff --git a/src/plugins/qmldesigner/qmldesignerextension/connectioneditor/dynamicpropertiesmodel.cpp b/src/plugins/qmldesigner/qmldesignerextension/connectioneditor/dynamicpropertiesmodel.cpp
index f7e5ac3609..e5a74b49ec 100644
--- a/src/plugins/qmldesigner/qmldesignerextension/connectioneditor/dynamicpropertiesmodel.cpp
+++ b/src/plugins/qmldesigner/qmldesignerextension/connectioneditor/dynamicpropertiesmodel.cpp
@@ -74,7 +74,7 @@ QString idOrTypeNameForNode(const QmlDesigner::ModelNode &modelNode)
{
QString idLabel = modelNode.id();
if (idLabel.isEmpty())
- idLabel = QString::fromLatin1(modelNode.simplifiedTypeName());
+ idLabel = modelNode.simplifiedTypeName();
return idLabel;
}
@@ -85,7 +85,7 @@ QmlDesigner::PropertyName unusedProperty(const QmlDesigner::ModelNode &modelNode
int i = 0;
if (modelNode.metaInfo().isValid()) {
while (true) {
- const QmlDesigner::PropertyName currentPropertyName = QString(QString::fromLatin1(propertyName) + QString::number(i)).toLatin1();
+ const QmlDesigner::PropertyName currentPropertyName = propertyName + QString::number(i).toLatin1();
if (!modelNode.hasProperty(currentPropertyName) && !modelNode.metaInfo().hasProperty(currentPropertyName))
return currentPropertyName;
i++;
@@ -228,7 +228,7 @@ BindingProperty DynamicPropertiesModel::bindingPropertyForRow(int rowNumber) con
ModelNode modelNode = connectionView()->modelNodeForInternalId(internalId);
if (modelNode.isValid())
- return modelNode.bindingProperty(targetPropertyName.toLatin1());
+ return modelNode.bindingProperty(targetPropertyName.toUtf8());
return BindingProperty();
}
@@ -241,7 +241,7 @@ VariantProperty DynamicPropertiesModel::variantPropertyForRow(int rowNumber) con
ModelNode modelNode = connectionView()->modelNodeForInternalId(internalId);
if (modelNode.isValid())
- return modelNode.variantProperty(targetPropertyName.toLatin1());
+ return modelNode.variantProperty(targetPropertyName.toUtf8());
return VariantProperty();
}
@@ -261,7 +261,7 @@ QStringList DynamicPropertiesModel::possibleTargetProperties(const BindingProper
QStringList possibleProperties;
foreach (const PropertyName &propertyName, metaInfo.propertyNames()) {
if (metaInfo.propertyIsWritable(propertyName))
- possibleProperties << QString::fromLatin1(propertyName);
+ possibleProperties << QString::fromUtf8(propertyName);
}
return possibleProperties;
@@ -315,7 +315,7 @@ QStringList DynamicPropertiesModel::possibleSourceProperties(const BindingProper
QStringList possibleProperties;
foreach (const PropertyName &propertyName, metaInfo.propertyNames()) {
if (metaInfo.propertyTypeName(propertyName) == typeName) //### todo proper check
- possibleProperties << QString::fromLatin1(propertyName);
+ possibleProperties << QString::fromUtf8(propertyName);
}
return possibleProperties;
@@ -377,7 +377,7 @@ void DynamicPropertiesModel::addProperty(const QVariant &propertyValue,
idItem = new QStandardItem(idOrTypeNameForNode(abstractProperty.parentModelNode()));
updateCustomData(idItem, abstractProperty);
- propertyNameItem = new QStandardItem(QString::fromLatin1(abstractProperty.name()));
+ propertyNameItem = new QStandardItem(QString::fromUtf8(abstractProperty.name()));
items.append(idItem);
items.append(propertyNameItem);
@@ -412,10 +412,10 @@ void DynamicPropertiesModel::updateBindingProperty(int rowNumber)
BindingProperty bindingProperty = bindingPropertyForRow(rowNumber);
if (bindingProperty.isValid()) {
- QString propertyName = QString::fromLatin1(bindingProperty.name());
+ QString propertyName = QString::fromUtf8(bindingProperty.name());
updateDisplayRole(rowNumber, PropertyNameRow, propertyName);
QString value = bindingProperty.expression();
- QString type = QString::fromLatin1(bindingProperty.dynamicTypeName());
+ QString type = QString::fromUtf8(bindingProperty.dynamicTypeName());
updateDisplayRole(rowNumber, PropertyTypeRow, type);
updateDisplayRole(rowNumber, PropertyValueRow, value);
}
@@ -426,10 +426,10 @@ void DynamicPropertiesModel::updateVariantProperty(int rowNumber)
VariantProperty variantProperty = variantPropertyForRow(rowNumber);
if (variantProperty.isValid()) {
- QString propertyName = QString::fromLatin1(variantProperty.name());
+ QString propertyName = QString::fromUtf8(variantProperty.name());
updateDisplayRole(rowNumber, PropertyNameRow, propertyName);
QVariant value = variantProperty.value();
- QString type = QString::fromLatin1(variantProperty.dynamicTypeName());
+ QString type = QString::fromUtf8(variantProperty.dynamicTypeName());
updateDisplayRole(rowNumber, PropertyTypeRow, type);
updateDisplayRoleFromVariant(rowNumber, PropertyValueRow, value);
@@ -489,7 +489,7 @@ void DynamicPropertiesModel::updateValue(int row)
void DynamicPropertiesModel::updatePropertyName(int rowNumber)
{
- const PropertyName newName = data(index(rowNumber, PropertyNameRow)).toString().toLatin1();
+ const PropertyName newName = data(index(rowNumber, PropertyNameRow)).toString().toUtf8();
if (newName.isEmpty()) {
qWarning() << "DynamicPropertiesModel::updatePropertyName invalid property name";
return;
diff --git a/src/plugins/qmldesigner/qmldesignerextension/connectioneditor/dynamicpropertiesmodel.h b/src/plugins/qmldesigner/qmldesignerextension/connectioneditor/dynamicpropertiesmodel.h
index 520985aafd..be0239b4f0 100644
--- a/src/plugins/qmldesigner/qmldesignerextension/connectioneditor/dynamicpropertiesmodel.h
+++ b/src/plugins/qmldesigner/qmldesignerextension/connectioneditor/dynamicpropertiesmodel.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef DYNCAMICPROPERTIESMODEL_H
-#define DYNCAMICPROPERTIESMODEL_H
+#pragma once
#include <modelnode.h>
#include <nodemetainfo.h>
@@ -130,7 +129,4 @@ public:
};
} // namespace Internal
-
} // namespace QmlDesigner
-
-#endif // DYNCAMICPROPERTIESMODEL_Hs
diff --git a/src/plugins/qmldesigner/qmldesignerextension/pathtool/controlpoint.h b/src/plugins/qmldesigner/qmldesignerextension/pathtool/controlpoint.h
index fea74bdb5b..39dc184978 100644
--- a/src/plugins/qmldesigner/qmldesignerextension/pathtool/controlpoint.h
+++ b/src/plugins/qmldesigner/qmldesignerextension/pathtool/controlpoint.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef QMLDESIGNER_CONTROLPOINT_H
-#define QMLDESIGNER_CONTROLPOINT_H
+#pragma once
#include <modelnode.h>
@@ -92,5 +91,3 @@ bool operator ==(const ControlPoint& firstControlPoint, const ControlPoint& seco
QDebug operator<<(QDebug debug, const ControlPoint &controlPoint);
} // namespace QmlDesigner
-
-#endif // QMLDESIGNER_CONTROLPOINT_H
diff --git a/src/plugins/qmldesigner/qmldesignerextension/pathtool/cubicsegment.h b/src/plugins/qmldesigner/qmldesignerextension/pathtool/cubicsegment.h
index 7b8d0e8cd1..260dcd2a6d 100644
--- a/src/plugins/qmldesigner/qmldesignerextension/pathtool/cubicsegment.h
+++ b/src/plugins/qmldesigner/qmldesignerextension/pathtool/cubicsegment.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef QMLDESIGNER_CUBICSEGMENT_H
-#define QMLDESIGNER_CUBICSEGMENT_H
+#pragma once
#include "controlpoint.h"
@@ -126,5 +125,3 @@ bool operator ==(const CubicSegment& firstCubicSegment, const CubicSegment& seco
QDebug operator<<(QDebug debug, const CubicSegment &cubicSegment);
} // namespace QmlDesigner
-
-#endif // QMLDESIGNER_CUBICSEGMENT_H
diff --git a/src/plugins/qmldesigner/qmldesignerextension/pathtool/pathitem.h b/src/plugins/qmldesigner/qmldesignerextension/pathtool/pathitem.h
index f32a0162d7..d431262b39 100644
--- a/src/plugins/qmldesigner/qmldesignerextension/pathtool/pathitem.h
+++ b/src/plugins/qmldesigner/qmldesignerextension/pathtool/pathitem.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef PATHITEM_H
-#define PATHITEM_H
+#pragma once
#include <QGraphicsObject>
#include <QWeakPointer>
@@ -139,5 +138,3 @@ inline int PathItem::type() const
return Type;
}
}
-
-#endif // PATHITEM_H
diff --git a/src/plugins/qmldesigner/qmldesignerextension/pathtool/pathselectionmanipulator.h b/src/plugins/qmldesigner/qmldesignerextension/pathtool/pathselectionmanipulator.h
index 6be7adb9a5..def0148367 100644
--- a/src/plugins/qmldesigner/qmldesignerextension/pathtool/pathselectionmanipulator.h
+++ b/src/plugins/qmldesigner/qmldesignerextension/pathtool/pathselectionmanipulator.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef QMLDESIGNER_PATHSELECTIONMANIPULATOR_H
-#define QMLDESIGNER_PATHSELECTIONMANIPULATOR_H
+#pragma once
#include <QList>
#include <QPair>
@@ -99,5 +98,3 @@ private:
bool operator ==(const SelectionPoint& firstSelectionPoint, const SelectionPoint& secondSelectionPoint);
} // namespace QmlDesigner
-
-#endif // QMLDESIGNER_PATHSELECTIONMANIPULATOR_H
diff --git a/src/plugins/qmldesigner/qmldesignerextension/pathtool/pathtool.h b/src/plugins/qmldesigner/qmldesignerextension/pathtool/pathtool.h
index 260425282f..281577fff0 100644
--- a/src/plugins/qmldesigner/qmldesignerextension/pathtool/pathtool.h
+++ b/src/plugins/qmldesigner/qmldesignerextension/pathtool/pathtool.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef PATHTOOL_H
-#define PATHTOOL_H
+#pragma once
#include "abstractcustomtool.h"
#include "selectionindicator.h"
@@ -90,5 +89,3 @@ private:
};
}
-#endif // PATHTOOL_H
-
diff --git a/src/plugins/qmldesigner/qmldesignerextension/pathtool/pathtoolview.h b/src/plugins/qmldesigner/qmldesignerextension/pathtool/pathtoolview.h
index 860789cd68..46b688923e 100644
--- a/src/plugins/qmldesigner/qmldesignerextension/pathtool/pathtoolview.h
+++ b/src/plugins/qmldesigner/qmldesignerextension/pathtool/pathtoolview.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef QMLDESIGNER_PATHTOOLVIEW_H
-#define QMLDESIGNER_PATHTOOLVIEW_H
+#pragma once
#include <abstractview.h>
@@ -46,5 +45,3 @@ private:
};
} // namespace QmlDesigner
-
-#endif // QMLDESIGNER_PATHTOOLVIEW_H
diff --git a/src/plugins/qmldesigner/qmldesignerextension/qmldesignerextension_global.h b/src/plugins/qmldesigner/qmldesignerextension/qmldesignerextension_global.h
index 00d06e2b6a..82ed1b076c 100644
--- a/src/plugins/qmldesigner/qmldesignerextension/qmldesignerextension_global.h
+++ b/src/plugins/qmldesigner/qmldesignerextension/qmldesignerextension_global.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef QMLDESIGNEREXTENSION_GLOBAL_H
-#define QMLDESIGNEREXTENSION_GLOBAL_H
+#pragma once
#include <QtGlobal>
@@ -33,6 +32,3 @@
#else
# define QMLDESIGNEREXTENSIONSHARED_EXPORT Q_DECL_IMPORT
#endif
-
-#endif // QMLDESIGNEREXTENSION_GLOBAL_H
-
diff --git a/src/plugins/qmldesigner/qmldesignerextension/qmldesignerextensionconstants.h b/src/plugins/qmldesigner/qmldesignerextension/qmldesignerextensionconstants.h
index 4a32df0bc4..9bf41a2f54 100644
--- a/src/plugins/qmldesigner/qmldesignerextension/qmldesignerextensionconstants.h
+++ b/src/plugins/qmldesigner/qmldesignerextension/qmldesignerextensionconstants.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef QMLDESIGNEREXTENSIONCONSTANTS_H
-#define QMLDESIGNEREXTENSIONCONSTANTS_H
+#pragma once
namespace QmlDesignerExtension {
namespace Constants {
@@ -34,6 +33,3 @@ const char MENU_ID[] = "QmlDesignerExtension.Menu";
} // namespace QmlDesignerExtension
} // namespace Constants
-
-#endif // QMLDESIGNEREXTENSIONCONSTANTS_H
-
diff --git a/src/plugins/qmldesigner/qmldesignerextension/sourcetool/sourcetool.h b/src/plugins/qmldesigner/qmldesignerextension/sourcetool/sourcetool.h
index 7d6a463a57..0757776d81 100644
--- a/src/plugins/qmldesigner/qmldesignerextension/sourcetool/sourcetool.h
+++ b/src/plugins/qmldesigner/qmldesignerextension/sourcetool/sourcetool.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef SOURCETOOL_H
-#define SOURCETOOL_H
+#pragma once
#include <abstractcustomtool.h>
#include "selectionindicator.h"
@@ -89,4 +88,3 @@ private:
};
}
-#endif // SOURCETOOL_H
diff --git a/src/plugins/qmldesigner/qmldesignerextension/texttool/texttool.h b/src/plugins/qmldesigner/qmldesignerextension/texttool/texttool.h
index abbfb4444b..ba13cdbcce 100644
--- a/src/plugins/qmldesigner/qmldesignerextension/texttool/texttool.h
+++ b/src/plugins/qmldesigner/qmldesignerextension/texttool/texttool.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef TEXTTOOL_H
-#define TEXTTOOL_H
+#pragma once
#include "abstractcustomtool.h"
#include "selectionindicator.h"
@@ -86,5 +85,3 @@ private:
};
}
-#endif // TEXTTOOL_H
-
diff --git a/src/plugins/qmldesigner/qmldesignericons.h b/src/plugins/qmldesigner/qmldesignericons.h
index e226143972..df1e1ca810 100644
--- a/src/plugins/qmldesigner/qmldesignericons.h
+++ b/src/plugins/qmldesigner/qmldesignericons.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef QMLDESIGNERICONS_H
-#define QMLDESIGNERICONS_H
+#pragma once
#include <utils/icon.h>
@@ -54,5 +53,3 @@ const Utils::Icon RESET({
} // Icons
} // QmlDesigner
-
-#endif // QMLDESIGNERICONS_H
diff --git a/src/plugins/qmldesigner/qmldesignerplugin.cpp b/src/plugins/qmldesigner/qmldesignerplugin.cpp
index 03d29bac69..473c585520 100644
--- a/src/plugins/qmldesigner/qmldesignerplugin.cpp
+++ b/src/plugins/qmldesigner/qmldesignerplugin.cpp
@@ -81,7 +81,7 @@ QmlDesignerPlugin *QmlDesignerPlugin::m_instance = 0;
static bool isInDesignerMode()
{
- return Core::ModeManager::currentMode() == Core::DesignMode::instance();
+ return Core::ModeManager::currentMode() == Core::Constants::MODE_DESIGN;
}
bool shouldAssertInException()
@@ -203,9 +203,8 @@ void QmlDesignerPlugin::createDesignModeWidget()
this,
SLOT(onTextEditorsClosed(QList<Core::IEditor*>)));
- connect(Core::ModeManager::instance(),
- SIGNAL(currentModeChanged(Core::IMode*,Core::IMode*)),
- SLOT(onCurrentModeChanged(Core::IMode*,Core::IMode*)));
+ connect(Core::ModeManager::instance(), &Core::ModeManager::currentModeChanged,
+ this, &QmlDesignerPlugin::onCurrentModeChanged);
}
@@ -392,21 +391,21 @@ void QmlDesignerPlugin::onCurrentEditorChanged(Core::IEditor *editor)
}
}
-static bool isDesignerMode(Core::IMode *mode)
+static bool isDesignerMode(Core::Id mode)
{
- return mode == Core::DesignMode::instance();
+ return mode == Core::DesignMode::instance()->id();
}
-static bool documentIsAlreadyOpen(DesignDocument *designDocument, Core::IEditor *editor, Core::IMode *newMode)
+static bool documentIsAlreadyOpen(DesignDocument *designDocument, Core::IEditor *editor, Core::Id newMode)
{
return designDocument
&& editor == designDocument->editor()
&& isDesignerMode(newMode);
}
-void QmlDesignerPlugin::onCurrentModeChanged(Core::IMode *newMode, Core::IMode *oldMode)
+void QmlDesignerPlugin::onCurrentModeChanged(Core::Id newMode, Core::Id oldMode)
{
if (data
&& Core::EditorManager::currentEditor()
@@ -492,11 +491,11 @@ const DesignerActionManager &QmlDesignerPlugin::designerActionManager() const
void QmlDesignerPlugin::switchTextDesign()
{
- if (Core::ModeManager::currentMode()->id() == Core::Constants::MODE_EDIT) {
+ if (Core::ModeManager::currentMode() == Core::Constants::MODE_EDIT) {
Core::IEditor *editor = Core::EditorManager::currentEditor();
if (checkIfEditorIsQtQuick(editor))
Core::ModeManager::activateMode(Core::Constants::MODE_DESIGN);
- } else if (Core::ModeManager::currentMode()->id() == Core::Constants::MODE_DESIGN) {
+ } else if (Core::ModeManager::currentMode() == Core::Constants::MODE_DESIGN) {
Core::ModeManager::activateMode(Core::Constants::MODE_EDIT);
}
}
diff --git a/src/plugins/qmldesigner/qmldesignerplugin.h b/src/plugins/qmldesigner/qmldesignerplugin.h
index 9717d50203..e71f6d355d 100644
--- a/src/plugins/qmldesigner/qmldesignerplugin.h
+++ b/src/plugins/qmldesigner/qmldesignerplugin.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef QMLDESIGNERPLUGIN_H
-#define QMLDESIGNERPLUGIN_H
+#pragma once
#include <qmldesigner/designersettings.h>
#include <qmldesigner/components/pluginmanager/pluginmanager.h>
@@ -45,7 +44,6 @@ QT_END_NAMESPACE
namespace Core {
class IEditor;
- class IMode;
}
namespace QmlDesigner {
@@ -91,7 +89,7 @@ private slots:
void switschToTextMode();
void onTextEditorsClosed(QList<Core::IEditor *> editors);
void onCurrentEditorChanged(Core::IEditor *editor);
- void onCurrentModeChanged(Core::IMode *mode, Core::IMode *oldMode);
+ void onCurrentModeChanged(Core::Id mode, Core::Id oldMode);
private: // functions
void createDesignModeWidget();
@@ -113,5 +111,3 @@ private: // variables
};
} // namespace QmlDesigner
-
-#endif // QMLDESIGNERPLUGIN_H
diff --git a/src/plugins/qmldesigner/qmldesignerplugin.pro b/src/plugins/qmldesigner/qmldesignerplugin.pro
index 273b9e5cd3..f74b5b0e91 100644
--- a/src/plugins/qmldesigner/qmldesignerplugin.pro
+++ b/src/plugins/qmldesigner/qmldesignerplugin.pro
@@ -23,7 +23,6 @@ include(components/importmanager/importmanager.pri)
include(qmldesignerextension/qmldesignerextension.pri)
include(qmldesignerplugin.pri)
-DEFINES -= QT_NO_CAST_FROM_ASCII
BUILD_PUPPET_IN_CREATOR_BINPATH = $$(BUILD_PUPPET_IN_CREATOR_BINPATH)
!isEmpty(BUILD_PUPPET_IN_CREATOR_BINPATH) {
diff --git a/src/plugins/qmldesigner/qtquickplugin/qtquickplugin.h b/src/plugins/qmldesigner/qtquickplugin/qtquickplugin.h
index 10ed2066f6..08dc48a450 100644
--- a/src/plugins/qmldesigner/qtquickplugin/qtquickplugin.h
+++ b/src/plugins/qmldesigner/qtquickplugin/qtquickplugin.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef QTQUICKPLUGIN_H
-#define QTQUICKPLUGIN_H
+#pragma once
#include <iwidgetplugin.h>
@@ -51,6 +50,3 @@ public:
};
} // namespace QmlDesigner
-
-
-#endif // QTQUICKPLUGIN_H
diff --git a/src/plugins/qmldesigner/settingspage.h b/src/plugins/qmldesigner/settingspage.h
index bcf8c130ab..c33a63b827 100644
--- a/src/plugins/qmldesigner/settingspage.h
+++ b/src/plugins/qmldesigner/settingspage.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef SETTINGSPAGE_H
-#define SETTINGSPAGE_H
+#pragma once
#include "ui_settingspage.h"
@@ -75,5 +74,3 @@ private:
} // namespace Internal
} // namespace QmlDesigner
-
-#endif // SETTINGSPAGE_H
diff --git a/src/plugins/qmldesigner/shortcutmanager.h b/src/plugins/qmldesigner/shortcutmanager.h
index fcd723b6ba..226babb987 100644
--- a/src/plugins/qmldesigner/shortcutmanager.h
+++ b/src/plugins/qmldesigner/shortcutmanager.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef QMLDESIGNER_SHORTCUTMANAGER_H
-#define QMLDESIGNER_SHORTCUTMANAGER_H
+#pragma once
#include <QObject>
#include <QAction>
@@ -95,5 +94,3 @@ private:
};
} // namespace QmlDesigner
-
-#endif // QMLDESIGNER_SHORTCUTMANAGER_H
diff --git a/src/plugins/qmldesigner/styledoutputpaneplaceholder.cpp b/src/plugins/qmldesigner/styledoutputpaneplaceholder.cpp
index 3163f271a6..5ea75c8236 100644
--- a/src/plugins/qmldesigner/styledoutputpaneplaceholder.cpp
+++ b/src/plugins/qmldesigner/styledoutputpaneplaceholder.cpp
@@ -33,7 +33,7 @@
namespace QmlDesigner {
namespace Internal {
-StyledOutputpanePlaceHolder::StyledOutputpanePlaceHolder(Core::IMode *mode, QSplitter *parent)
+StyledOutputpanePlaceHolder::StyledOutputpanePlaceHolder(Core::Id mode, QSplitter *parent)
: Core::OutputPanePlaceHolder(mode, parent)
{
QByteArray sheet = Utils::FileReader::fetchQrc(":/qmldesigner/outputpane-style.css");
diff --git a/src/plugins/qmldesigner/styledoutputpaneplaceholder.h b/src/plugins/qmldesigner/styledoutputpaneplaceholder.h
index 147b7192be..c55830115d 100644
--- a/src/plugins/qmldesigner/styledoutputpaneplaceholder.h
+++ b/src/plugins/qmldesigner/styledoutputpaneplaceholder.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef STYLEDOUTPUTPANEPLACEHOLDER_H
-#define STYLEDOUTPUTPANEPLACEHOLDER_H
+#pragma once
#include <coreplugin/outputpane.h>
@@ -34,7 +33,7 @@ namespace Internal {
class StyledOutputpanePlaceHolder : public Core::OutputPanePlaceHolder
{
public:
- explicit StyledOutputpanePlaceHolder(Core::IMode *mode, QSplitter *parent = 0);
+ explicit StyledOutputpanePlaceHolder(Core::Id mode, QSplitter *parent = 0);
protected:
void childEvent(QChildEvent *event) override;;
@@ -45,5 +44,3 @@ private:
} // namespace Internal
} // namespace QmlDesigner
-
-#endif // STYLEDOUTPUTPANEPLACEHOLDER_H