diff options
Diffstat (limited to 'share')
83 files changed, 129 insertions, 361 deletions
diff --git a/share/qtcreator/debugger/dumper.py b/share/qtcreator/debugger/dumper.py index cad3bed434..7e4ba8d979 100644 --- a/share/qtcreator/debugger/dumper.py +++ b/share/qtcreator/debugger/dumper.py @@ -30,6 +30,7 @@ import base64 import re import time import json +import inspect if sys.version_info[0] >= 3: xrange = range @@ -94,16 +95,6 @@ BreakpointOnQmlSignalEmit, \ BreakpointAtJavaScriptThrow, \ = range(0, 14) -# Display modes. Keep that synchronized with DebuggerDisplay in debuggerprotocol.h -StopDisplay, \ -DisplayImageData, \ -DisplayUtf16String, \ -DisplayImageFile, \ -DisplayLatin1String, \ -DisplayUtf8String, \ -DisplayPlotData \ - = range(7) - def arrayForms(): return [ArrayPlotFormat] @@ -372,7 +363,8 @@ class DumperBase: self.qqFormats = { "QVariant (QVariantMap)" : mapForms() } # This is a cache of all known dumpers. - self.qqDumpers = {} + self.qqDumpers = {} # Direct type match + self.qqDumpersEx = {} # Using regexp # This is a cache of all dumpers that support writing. self.qqEditable = {} @@ -536,23 +528,20 @@ class DumperBase: else: encodingType = "utf8" childType = "char" - displayType = DisplayLatin1String elif charSize == 2: encodingType = "utf16" childType = "short" - displayType = DisplayUtf16String else: encodingType = "ucs4" childType = "int" - displayType = DisplayUtf16String self.putValue(mem, encodingType, elided=elided) if displayFormat == SeparateLatin1StringFormat \ - or displayFormat == SeparateUtf8StringFormat: - self.putField("editformat", displayType) + or displayFormat == SeparateUtf8StringFormat \ + or displayFormat == SeparateFormat: elided, shown = self.computeLimit(bytelen, 100000) - self.putField("editvalue", self.readMemory(data, shown)) + self.putDisplay(encodingType + ':separate', self.readMemory(data, shown)) if makeExpandable: self.putNumChild(size) @@ -1027,6 +1016,12 @@ class DumperBase: dumper(self, value) return True + for pattern in self.qqDumpersEx.keys(): + dumper = self.qqDumpersEx[pattern] + if re.match(pattern, nsStrippedType): + dumper(self, value) + return True + return False def putSimpleCharArray(self, base, size = None): @@ -1071,7 +1066,7 @@ class DumperBase: self.putType(typeName) (elided, data) = self.encodeCArray(value, 1, limit) self.putValue(data, "latin1", elided=elided) - self.putDisplay(DisplayLatin1String, data) + self.putDisplay("latin1:separate", data) return True if displayFormat == Utf8StringFormat: @@ -1084,7 +1079,7 @@ class DumperBase: self.putType(typeName) (elided, data) = self.encodeCArray(value, 1, limit) self.putValue(data, "utf8", elided=elided) - self.putDisplay(DisplayUtf8String, data) + self.putDisplay("utf8:separate", data) return True if displayFormat == Local8BitStringFormat: @@ -1585,8 +1580,8 @@ class DumperBase: enc = self.simpleEncoding(innerType) if enc: self.putField("editencoding", enc) - self.putField("editvalue", self.readMemory(base, n * innerType.sizeof)) - self.putField("editformat", DisplayPlotData) + self.putDisplay("plotdata:separate", + self.readMemory(base, n * innerType.sizeof)) def putPlotData(self, base, n, innerType, maxNumChild = 1000*1000): self.putPlotDataHelper(base, n, innerType, maxNumChild=maxNumChild) @@ -1750,11 +1745,13 @@ class DumperBase: def registerDumper(self, funcname, function): try: - #warn("FUNCTION: %s " % funcname) - #funcname = function.func_name if funcname.startswith("qdump__"): typename = funcname[7:] - self.qqDumpers[typename] = function + spec = inspect.getargspec(function) + if len(spec.args) == 2: + self.qqDumpers[typename] = function + elif len(spec.args) == 3 and len(spec.defaults) == 1: + self.qqDumpersEx[spec.defaults[0]] = function self.qqFormats[typename] = self.qqFormats.get(typename, []) elif funcname.startswith("qform__"): typename = funcname[7:] diff --git a/share/qtcreator/debugger/misctypes.py b/share/qtcreator/debugger/misctypes.py index 75f0831013..0b8c877d09 100644 --- a/share/qtcreator/debugger/misctypes.py +++ b/share/qtcreator/debugger/misctypes.py @@ -231,28 +231,6 @@ if False: if False: - def qform__basic__Function(): - return "Normal,Displayed" - - def qdump__basic__Function(d, value): - min = value["min"] - max = value["max"] - data, size, alloc = d.byteArrayData(value["var"]) - var = extractCString(data, 0) - data, size, alloc = d.byteArrayData(value["f"]) - f = extractCString(data, 0) - d.putValue("%s, %s=%f..%f" % (f, var, min, max)) - d.putNumChild(0) - format = d.currentItemFormat() - if format == 1: - d.putDisplay(StopDisplay) - elif format == 2: - input = "plot [%s=%f:%f] %s" % (var, min, max, f) - d.putDisplay(DisplayProcess, input, "gnuplot") - - -if False: - def qdump__tree_entry(d, value): d.putValue("len: %s, offset: %s, type: %s" % (value["blocklength"], value["offset"], value["type"])) diff --git a/share/qtcreator/debugger/qttypes.py b/share/qtcreator/debugger/qttypes.py index ce475385a0..ef8778b649 100644 --- a/share/qtcreator/debugger/qttypes.py +++ b/share/qtcreator/debugger/qttypes.py @@ -61,14 +61,12 @@ def qdump__QByteArray(d, value): d.putValue(p, "latin1", elided=elided) elif displayFormat == SeparateLatin1StringFormat: d.putValue(p, "latin1", elided=elided) - d.putField("editformat", DisplayLatin1String) - d.putField("editvalue", d.encodeByteArray(value, limit=100000)) + d.putDisplay("latin1:separate", d.encodeByteArray(value, limit=100000)) elif displayFormat == Utf8StringFormat: d.putValue(p, "utf8", elided=elided) elif displayFormat == SeparateUtf8StringFormat: d.putValue(p, "utf8", elided=elided) - d.putField("editformat", DisplayUtf8String) - d.putField("editvalue", d.encodeByteArray(value, limit=100000)) + d.putDisplay("utf8:separate", d.encodeByteArray(value, limit=100000)) if d.isExpanded(): d.putArrayData(data, size, d.charType()) @@ -897,13 +895,12 @@ def qdump__QImage(d, value): # filename = file[1].replace("\\", "\\\\") # gdb.execute("dump binary memory %s %s %s" % # (filename, bits, bits + nbytes)) - # d.putDisplay(DisplayImageFile, " %d %d %d %d %s" + # d.putDisplay('imagefile:separate', " %d %d %d %d %s" # % (width, height, nbytes, iformat, filename)) - d.putField("editformat", DisplayImageData) - d.put('editvalue="') - d.put('%08x%08x%08x%08x' % (width, height, nbytes, iformat)) - d.put(d.readMemory(bits, nbytes)) - d.put('",') + d.putDisplay('imagedata:separate', + '%08x%08x%08x%08x' % (width, height, nbytes, iformat) + + d.readMemory(bits, nbytes)) + def qdump__QLinkedList(d, value): @@ -1788,8 +1785,7 @@ def qdump__QString(d, value): d.putNumChild(size) displayFormat = d.currentItemFormat() if displayFormat == SeparateFormat: - d.putField("editformat", DisplayUtf16String) - d.putField("editvalue", d.encodeString(value, limit=100000)) + d.putDisplay("utf16:separate", d.encodeString(value, limit=100000)) if d.isExpanded(): d.putArrayData(data, size, d.lookupType(d.qtNamespace() + "QChar")) @@ -1940,8 +1936,7 @@ def qdump__QUrl(d, value): displayFormat = d.currentItemFormat() if displayFormat == SeparateFormat: - d.putField("editformat", DisplayUtf16String) - d.putField("editvalue", url) + d.putDisplay("utf16:separate", url) d.putNumChild(8) if d.isExpanded(): diff --git a/share/qtcreator/qml/qmlpuppet/commands/changeauxiliarycommand.h b/share/qtcreator/qml/qmlpuppet/commands/changeauxiliarycommand.h index c0f366a7c6..669a747be8 100644 --- a/share/qtcreator/qml/qmlpuppet/commands/changeauxiliarycommand.h +++ b/share/qtcreator/qml/qmlpuppet/commands/changeauxiliarycommand.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef CHANGEAUXILIARYCOMMAND_H -#define CHANGEAUXILIARYCOMMAND_H +#pragma once #include <QMetaType> #include <QVector> @@ -56,5 +55,3 @@ QDebug operator <<(QDebug debug, const ChangeAuxiliaryCommand &command); } // namespace QmlDesigner Q_DECLARE_METATYPE(QmlDesigner::ChangeAuxiliaryCommand) - -#endif // CHANGEAUXILIARYCOMMAND_H diff --git a/share/qtcreator/qml/qmlpuppet/commands/changebindingscommand.h b/share/qtcreator/qml/qmlpuppet/commands/changebindingscommand.h index 5a9696b9f5..b2df9e326c 100644 --- a/share/qtcreator/qml/qmlpuppet/commands/changebindingscommand.h +++ b/share/qtcreator/qml/qmlpuppet/commands/changebindingscommand.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef CHANGEBINDINGSCOMMAND_H -#define CHANGEBINDINGSCOMMAND_H +#pragma once #include <QMetaType> #include <QVector> @@ -56,5 +55,3 @@ QDebug operator <<(QDebug debug, const ChangeBindingsCommand &command); } // namespace QmlDesigner Q_DECLARE_METATYPE(QmlDesigner::ChangeBindingsCommand) - -#endif // CHANGEBINDINGSCOMMAND_H diff --git a/share/qtcreator/qml/qmlpuppet/commands/changefileurlcommand.h b/share/qtcreator/qml/qmlpuppet/commands/changefileurlcommand.h index 6e20885cb4..5645274fc4 100644 --- a/share/qtcreator/qml/qmlpuppet/commands/changefileurlcommand.h +++ b/share/qtcreator/qml/qmlpuppet/commands/changefileurlcommand.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef CHANGEFILEURLCOMMAND_H -#define CHANGEFILEURLCOMMAND_H +#pragma once #include <qmetatype.h> #include <QUrl> @@ -53,5 +52,3 @@ QDebug operator <<(QDebug debug, const ChangeFileUrlCommand &command); } // namespace QmlDesigner Q_DECLARE_METATYPE(QmlDesigner::ChangeFileUrlCommand) - -#endif // CHANGEFILEURLCOMMAND_H diff --git a/share/qtcreator/qml/qmlpuppet/commands/changeidscommand.h b/share/qtcreator/qml/qmlpuppet/commands/changeidscommand.h index 80e01c8f46..b92fb3b558 100644 --- a/share/qtcreator/qml/qmlpuppet/commands/changeidscommand.h +++ b/share/qtcreator/qml/qmlpuppet/commands/changeidscommand.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef CHANGEIDSCOMMAND_H -#define CHANGEIDSCOMMAND_H +#pragma once #include <QMetaType> #include <QVector> @@ -57,5 +56,3 @@ QDebug operator <<(QDebug debug, const ChangeIdsCommand &command); } // namespace QmlDesigner Q_DECLARE_METATYPE(QmlDesigner::ChangeIdsCommand) - -#endif // CHANGEIDSCOMMAND_H diff --git a/share/qtcreator/qml/qmlpuppet/commands/changenodesourcecommand.h b/share/qtcreator/qml/qmlpuppet/commands/changenodesourcecommand.h index a11e2a8589..e5e2c48ac9 100644 --- a/share/qtcreator/qml/qmlpuppet/commands/changenodesourcecommand.h +++ b/share/qtcreator/qml/qmlpuppet/commands/changenodesourcecommand.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef CHANGENODESOURCECOMMAND_H -#define CHANGENODESOURCECOMMAND_H +#pragma once #include <QMetaType> #include <QString> @@ -56,5 +55,3 @@ QDebug operator <<(QDebug debug, const ChangeNodeSourceCommand &command); } // namespace QmlDesigner Q_DECLARE_METATYPE(QmlDesigner::ChangeNodeSourceCommand) - -#endif // CHANGENODESOURCECOMMAND_H diff --git a/share/qtcreator/qml/qmlpuppet/commands/changestatecommand.h b/share/qtcreator/qml/qmlpuppet/commands/changestatecommand.h index 91d74c9ebe..10ef832a32 100644 --- a/share/qtcreator/qml/qmlpuppet/commands/changestatecommand.h +++ b/share/qtcreator/qml/qmlpuppet/commands/changestatecommand.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef CHANGESTATECOMMAND_H -#define CHANGESTATECOMMAND_H +#pragma once #include <QMetaType> #include <QVector> @@ -56,5 +55,3 @@ QDebug operator <<(QDebug debug, const ChangeStateCommand &command); } // namespace QmlDesigner Q_DECLARE_METATYPE(QmlDesigner::ChangeStateCommand) - -#endif // CHANGESTATECOMMAND_H diff --git a/share/qtcreator/qml/qmlpuppet/commands/changevaluescommand.h b/share/qtcreator/qml/qmlpuppet/commands/changevaluescommand.h index 3272e54ef3..046e44ab62 100644 --- a/share/qtcreator/qml/qmlpuppet/commands/changevaluescommand.h +++ b/share/qtcreator/qml/qmlpuppet/commands/changevaluescommand.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef CHANGEVALUESCOMMAND_H -#define CHANGEVALUESCOMMAND_H +#pragma once #include <QMetaType> #include <QVector> @@ -56,5 +55,3 @@ QDebug operator <<(QDebug debug, const ChangeValuesCommand &command); } // namespace QmlDesigner Q_DECLARE_METATYPE(QmlDesigner::ChangeValuesCommand) - -#endif // CHANGEVALUESCOMMAND_H diff --git a/share/qtcreator/qml/qmlpuppet/commands/childrenchangedcommand.h b/share/qtcreator/qml/qmlpuppet/commands/childrenchangedcommand.h index a597724f67..d2be1dca86 100644 --- a/share/qtcreator/qml/qmlpuppet/commands/childrenchangedcommand.h +++ b/share/qtcreator/qml/qmlpuppet/commands/childrenchangedcommand.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef CHILDRENCHANGEDCOMMAND_H -#define CHILDRENCHANGEDCOMMAND_H +#pragma once #include <QMetaType> #include <QVector> @@ -62,5 +61,3 @@ QDebug operator <<(QDebug debug, const ChildrenChangedCommand &command); } // namespace QmlDesigner Q_DECLARE_METATYPE(QmlDesigner::ChildrenChangedCommand) - -#endif // CHILDRENCHANGEDCOMMAND_H diff --git a/share/qtcreator/qml/qmlpuppet/commands/clearscenecommand.h b/share/qtcreator/qml/qmlpuppet/commands/clearscenecommand.h index 45ef8e62fe..77c508ad4c 100644 --- a/share/qtcreator/qml/qmlpuppet/commands/clearscenecommand.h +++ b/share/qtcreator/qml/qmlpuppet/commands/clearscenecommand.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef CLEARSCENECOMMAND_H -#define CLEARSCENECOMMAND_H +#pragma once #include <qmetatype.h> @@ -44,5 +43,3 @@ QDebug operator <<(QDebug debug, const ClearSceneCommand &command); } // namespace QmlDesigner Q_DECLARE_METATYPE(QmlDesigner::ClearSceneCommand) - -#endif // CLEARSCENECOMMAND_H diff --git a/share/qtcreator/qml/qmlpuppet/commands/completecomponentcommand.h b/share/qtcreator/qml/qmlpuppet/commands/completecomponentcommand.h index af11ecc069..3eb86d9a13 100644 --- a/share/qtcreator/qml/qmlpuppet/commands/completecomponentcommand.h +++ b/share/qtcreator/qml/qmlpuppet/commands/completecomponentcommand.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef COMPLETECOMPONENT_H -#define COMPLETECOMPONENT_H +#pragma once #include <QMetaType> #include <QVector> @@ -55,5 +54,3 @@ QDebug operator <<(QDebug debug, const CompleteComponentCommand &command); } // namespace QmlDesigner Q_DECLARE_METATYPE(QmlDesigner::CompleteComponentCommand) - -#endif // COMPLETECOMPONENT_H diff --git a/share/qtcreator/qml/qmlpuppet/commands/componentcompletedcommand.h b/share/qtcreator/qml/qmlpuppet/commands/componentcompletedcommand.h index 5117031d8e..b55434b71a 100644 --- a/share/qtcreator/qml/qmlpuppet/commands/componentcompletedcommand.h +++ b/share/qtcreator/qml/qmlpuppet/commands/componentcompletedcommand.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef COMPONENTCOMPLETEDCOMMAND_H -#define COMPONENTCOMPLETEDCOMMAND_H +#pragma once #include <QMetaType> #include <QVector> #include <QDataStream> @@ -57,5 +56,3 @@ QDebug operator <<(QDebug debug, const ComponentCompletedCommand &command); } // namespace QmlDesigner Q_DECLARE_METATYPE(QmlDesigner::ComponentCompletedCommand) - -#endif // COMPONENTCOMPLETEDCOMMAND_H diff --git a/share/qtcreator/qml/qmlpuppet/commands/createinstancescommand.h b/share/qtcreator/qml/qmlpuppet/commands/createinstancescommand.h index 4125ae08ca..d8ec9ba9f3 100644 --- a/share/qtcreator/qml/qmlpuppet/commands/createinstancescommand.h +++ b/share/qtcreator/qml/qmlpuppet/commands/createinstancescommand.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef CREATEINSTANCESCOMMAND_H -#define CREATEINSTANCESCOMMAND_H +#pragma once #include <QMetaType> #include <QVector> @@ -55,5 +54,3 @@ QDebug operator <<(QDebug debug, const CreateInstancesCommand &command); } // namespace QmlDesigner Q_DECLARE_METATYPE(QmlDesigner::CreateInstancesCommand) - -#endif // CREATEINSTANCESCOMMAND_H diff --git a/share/qtcreator/qml/qmlpuppet/commands/createscenecommand.h b/share/qtcreator/qml/qmlpuppet/commands/createscenecommand.h index b11268f635..dc7130bd69 100644 --- a/share/qtcreator/qml/qmlpuppet/commands/createscenecommand.h +++ b/share/qtcreator/qml/qmlpuppet/commands/createscenecommand.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef CREATESCENECOMMAND_H -#define CREATESCENECOMMAND_H +#pragma once #include <qmetatype.h> #include <QUrl> @@ -81,5 +80,3 @@ QDebug operator <<(QDebug debug, const CreateSceneCommand &command); } Q_DECLARE_METATYPE(QmlDesigner::CreateSceneCommand) - -#endif // CREATESCENECOMMAND_H diff --git a/share/qtcreator/qml/qmlpuppet/commands/debugoutputcommand.h b/share/qtcreator/qml/qmlpuppet/commands/debugoutputcommand.h index e9ed4ff2f3..dbb386f23b 100644 --- a/share/qtcreator/qml/qmlpuppet/commands/debugoutputcommand.h +++ b/share/qtcreator/qml/qmlpuppet/commands/debugoutputcommand.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef QMLDESIGNER_DEBUGOUTPUTCOMMAND_H -#define QMLDESIGNER_DEBUGOUTPUTCOMMAND_H +#pragma once #include <QMetaType> #include <QString> @@ -68,5 +67,3 @@ QDebug operator <<(QDebug debug, const DebugOutputCommand &command); } // namespace QmlDesigner Q_DECLARE_METATYPE(QmlDesigner::DebugOutputCommand) - -#endif // QMLDESIGNER_DEBUGOUTPUTCOMMAND_H diff --git a/share/qtcreator/qml/qmlpuppet/commands/endpuppetcommand.h b/share/qtcreator/qml/qmlpuppet/commands/endpuppetcommand.h index 9648d80cea..7ecee7acf7 100644 --- a/share/qtcreator/qml/qmlpuppet/commands/endpuppetcommand.h +++ b/share/qtcreator/qml/qmlpuppet/commands/endpuppetcommand.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef QMLDESIGNER_ENDPUPPETCOMMAND_H -#define QMLDESIGNER_ENDPUPPETCOMMAND_H +#pragma once #include <qmetatype.h> @@ -44,5 +43,3 @@ QDebug operator <<(QDebug debug, const EndPuppetCommand &command); } // namespace QmlDesigner Q_DECLARE_METATYPE(QmlDesigner::EndPuppetCommand) - -#endif // QMLDESIGNER_ENDPUPPETCOMMAND_H diff --git a/share/qtcreator/qml/qmlpuppet/commands/informationchangedcommand.h b/share/qtcreator/qml/qmlpuppet/commands/informationchangedcommand.h index b4af444f07..a21fae75cb 100644 --- a/share/qtcreator/qml/qmlpuppet/commands/informationchangedcommand.h +++ b/share/qtcreator/qml/qmlpuppet/commands/informationchangedcommand.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef INFORMATIONCHANGEDCOMMAND_H -#define INFORMATIONCHANGEDCOMMAND_H +#pragma once #include <QMetaType> #include <QVector> @@ -59,5 +58,3 @@ QDebug operator <<(QDebug debug, const InformationChangedCommand &command); } // namespace QmlDesigner Q_DECLARE_METATYPE(QmlDesigner::InformationChangedCommand) - -#endif // INFORMATIONCHANGEDCOMMAND_H diff --git a/share/qtcreator/qml/qmlpuppet/commands/pixmapchangedcommand.h b/share/qtcreator/qml/qmlpuppet/commands/pixmapchangedcommand.h index 18fd7fec9e..23a246d431 100644 --- a/share/qtcreator/qml/qmlpuppet/commands/pixmapchangedcommand.h +++ b/share/qtcreator/qml/qmlpuppet/commands/pixmapchangedcommand.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef PIXMAPCHANGEDCOMMAND_H -#define PIXMAPCHANGEDCOMMAND_H +#pragma once #include <QMetaType> #include "imagecontainer.h" @@ -57,5 +56,3 @@ QDebug operator <<(QDebug debug, const PixmapChangedCommand &command); } // namespace QmlDesigner Q_DECLARE_METATYPE(QmlDesigner::PixmapChangedCommand) - -#endif // PIXMAPCHANGEDCOMMAND_H diff --git a/share/qtcreator/qml/qmlpuppet/commands/puppetalivecommand.h b/share/qtcreator/qml/qmlpuppet/commands/puppetalivecommand.h index 2f5c471f81..eeb013de6b 100644 --- a/share/qtcreator/qml/qmlpuppet/commands/puppetalivecommand.h +++ b/share/qtcreator/qml/qmlpuppet/commands/puppetalivecommand.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef PUPPETALIVECOMMAND_H -#define PUPPETALIVECOMMAND_H +#pragma once #include <QMetaType> #include <QDebug> @@ -48,5 +47,3 @@ QDebug operator <<(QDebug debug, const PuppetAliveCommand &command); } // namespace QmlDesigner Q_DECLARE_METATYPE(QmlDesigner::PuppetAliveCommand) - -#endif // PUPPETALIVECOMMAND_H diff --git a/share/qtcreator/qml/qmlpuppet/commands/removeinstancescommand.h b/share/qtcreator/qml/qmlpuppet/commands/removeinstancescommand.h index 992a23237c..a92132ff40 100644 --- a/share/qtcreator/qml/qmlpuppet/commands/removeinstancescommand.h +++ b/share/qtcreator/qml/qmlpuppet/commands/removeinstancescommand.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef REMOVEINSTANCESCOMMAND_H -#define REMOVEINSTANCESCOMMAND_H +#pragma once #include <QMetaType> #include <QVector> @@ -57,5 +56,3 @@ QDebug operator <<(QDebug debug, const RemoveInstancesCommand &command); } // namespace QmlDesigner Q_DECLARE_METATYPE(QmlDesigner::RemoveInstancesCommand) - -#endif // REMOVEINSTANCESCOMMAND_H diff --git a/share/qtcreator/qml/qmlpuppet/commands/removepropertiescommand.h b/share/qtcreator/qml/qmlpuppet/commands/removepropertiescommand.h index e950f392e9..911374c984 100644 --- a/share/qtcreator/qml/qmlpuppet/commands/removepropertiescommand.h +++ b/share/qtcreator/qml/qmlpuppet/commands/removepropertiescommand.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef REMOVEPROPERTIESCOMMAND_H -#define REMOVEPROPERTIESCOMMAND_H +#pragma once #include <QMetaType> #include <QVector> @@ -56,5 +55,3 @@ QDebug operator <<(QDebug debug, const RemovePropertiesCommand &command); } Q_DECLARE_METATYPE(QmlDesigner::RemovePropertiesCommand) - -#endif // REMOVEPROPERTIESCOMMAND_H diff --git a/share/qtcreator/qml/qmlpuppet/commands/removesharedmemorycommand.h b/share/qtcreator/qml/qmlpuppet/commands/removesharedmemorycommand.h index b43eb56b57..44ab7b5a00 100644 --- a/share/qtcreator/qml/qmlpuppet/commands/removesharedmemorycommand.h +++ b/share/qtcreator/qml/qmlpuppet/commands/removesharedmemorycommand.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef QMLDESIGNER_REMOVESHAREDMEMORYCOMMAND_H -#define QMLDESIGNER_REMOVESHAREDMEMORYCOMMAND_H +#pragma once #include <QMetaType> #include <QString> @@ -57,5 +56,3 @@ QDebug operator <<(QDebug debug, const RemoveSharedMemoryCommand &command); } // namespace QmlDesigner Q_DECLARE_METATYPE(QmlDesigner::RemoveSharedMemoryCommand) - -#endif // QMLDESIGNER_REMOVESHAREDMEMORYCOMMAND_H diff --git a/share/qtcreator/qml/qmlpuppet/commands/reparentinstancescommand.h b/share/qtcreator/qml/qmlpuppet/commands/reparentinstancescommand.h index b94c362397..62659e2424 100644 --- a/share/qtcreator/qml/qmlpuppet/commands/reparentinstancescommand.h +++ b/share/qtcreator/qml/qmlpuppet/commands/reparentinstancescommand.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef REPARENTINSTANCESCOMMAND_H -#define REPARENTINSTANCESCOMMAND_H +#pragma once #include <QMetaType> #include <QVector> @@ -56,5 +55,3 @@ QDebug operator <<(QDebug debug, const ReparentInstancesCommand &command); } // Q_DECLARE_METATYPE(QmlDesigner::ReparentInstancesCommand) - -#endif // REPARENTINSTANCESCOMMAND_H diff --git a/share/qtcreator/qml/qmlpuppet/commands/statepreviewimagechangedcommand.h b/share/qtcreator/qml/qmlpuppet/commands/statepreviewimagechangedcommand.h index 173aaf1fc2..a4d0f8f97b 100644 --- a/share/qtcreator/qml/qmlpuppet/commands/statepreviewimagechangedcommand.h +++ b/share/qtcreator/qml/qmlpuppet/commands/statepreviewimagechangedcommand.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef STATEPREVIEWIMAGECHANGEDCOMMAND_H -#define STATEPREVIEWIMAGECHANGEDCOMMAND_H +#pragma once #include <QMetaType> @@ -58,5 +57,3 @@ QDebug operator <<(QDebug debug, const StatePreviewImageChangedCommand &command) } // namespace QmlDesigner Q_DECLARE_METATYPE(QmlDesigner::StatePreviewImageChangedCommand) - -#endif // STATEPREVIEWIMAGECHANGEDCOMMAND_H diff --git a/share/qtcreator/qml/qmlpuppet/commands/synchronizecommand.h b/share/qtcreator/qml/qmlpuppet/commands/synchronizecommand.h index 3adc8e799b..6799ac5519 100644 --- a/share/qtcreator/qml/qmlpuppet/commands/synchronizecommand.h +++ b/share/qtcreator/qml/qmlpuppet/commands/synchronizecommand.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef SYNCHRONIZECOMMAND_H -#define SYNCHRONIZECOMMAND_H +#pragma once #include <QMetaType> #include <QVector> @@ -57,5 +56,3 @@ QDebug operator <<(QDebug debug, const SynchronizeCommand &command); } // namespace QmlDesigner Q_DECLARE_METATYPE(QmlDesigner::SynchronizeCommand) - -#endif // SYNCHRONIZECOMMAND_H diff --git a/share/qtcreator/qml/qmlpuppet/commands/tokencommand.h b/share/qtcreator/qml/qmlpuppet/commands/tokencommand.h index e4ff20b95d..5bde947908 100644 --- a/share/qtcreator/qml/qmlpuppet/commands/tokencommand.h +++ b/share/qtcreator/qml/qmlpuppet/commands/tokencommand.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef QMLDESIGNER_TOKENCOMMAND_H -#define QMLDESIGNER_TOKENCOMMAND_H +#pragma once #include <QMetaType> @@ -64,6 +63,3 @@ QDebug operator <<(QDebug debug, const TokenCommand &command); } // namespace QmlDesigner Q_DECLARE_METATYPE(QmlDesigner::TokenCommand) - - -#endif // QMLDESIGNER_TOKENCOMMAND_H diff --git a/share/qtcreator/qml/qmlpuppet/commands/valueschangedcommand.h b/share/qtcreator/qml/qmlpuppet/commands/valueschangedcommand.h index 97d0d00979..96050aee7f 100644 --- a/share/qtcreator/qml/qmlpuppet/commands/valueschangedcommand.h +++ b/share/qtcreator/qml/qmlpuppet/commands/valueschangedcommand.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef VALUESCHANGEDCOMMAND_H -#define VALUESCHANGEDCOMMAND_H +#pragma once #include <QMetaType> #include <QVector> @@ -63,6 +62,3 @@ QDebug operator <<(QDebug debug, const ValuesChangedCommand &instance); } // namespace QmlDesigner Q_DECLARE_METATYPE(QmlDesigner::ValuesChangedCommand) - - -#endif // VALUESCHANGEDCOMMAND_H diff --git a/share/qtcreator/qml/qmlpuppet/container/addimportcontainer.h b/share/qtcreator/qml/qmlpuppet/container/addimportcontainer.h index 6895104899..832b2afbb6 100644 --- a/share/qtcreator/qml/qmlpuppet/container/addimportcontainer.h +++ b/share/qtcreator/qml/qmlpuppet/container/addimportcontainer.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef ADDIMPORTCONTAINER_H -#define ADDIMPORTCONTAINER_H +#pragma once #include <QMetaType> #include <QUrl> @@ -62,5 +61,3 @@ QDebug operator <<(QDebug debug, const AddImportContainer &container); } // namespace QmlDesigner Q_DECLARE_METATYPE(QmlDesigner::AddImportContainer) - -#endif // ADDIMPORTCONTAINER_H diff --git a/share/qtcreator/qml/qmlpuppet/container/idcontainer.h b/share/qtcreator/qml/qmlpuppet/container/idcontainer.h index 1d682695c0..3e1e7c4088 100644 --- a/share/qtcreator/qml/qmlpuppet/container/idcontainer.h +++ b/share/qtcreator/qml/qmlpuppet/container/idcontainer.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef IDCONTAINER_H -#define IDCONTAINER_H +#pragma once #include <QDataStream> #include <qmetatype.h> @@ -57,5 +56,3 @@ QDebug operator <<(QDebug debug, const IdContainer &container); } // namespace QmlDesigner Q_DECLARE_METATYPE(QmlDesigner::IdContainer) - -#endif // IDCONTAINER_H diff --git a/share/qtcreator/qml/qmlpuppet/container/imagecontainer.h b/share/qtcreator/qml/qmlpuppet/container/imagecontainer.h index 7bc0ea5f17..b0bd3622a9 100644 --- a/share/qtcreator/qml/qmlpuppet/container/imagecontainer.h +++ b/share/qtcreator/qml/qmlpuppet/container/imagecontainer.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef IMAGECONTAINER_H -#define IMAGECONTAINER_H +#pragma once #include <QMetaType> #include <QImage> @@ -65,5 +64,3 @@ QDebug operator <<(QDebug debug, const ImageContainer &container); } // namespace QmlDesigner Q_DECLARE_METATYPE(QmlDesigner::ImageContainer) - -#endif // IMAGECONTAINER_H diff --git a/share/qtcreator/qml/qmlpuppet/container/informationcontainer.h b/share/qtcreator/qml/qmlpuppet/container/informationcontainer.h index 5340b00b6f..c624e4c5e4 100644 --- a/share/qtcreator/qml/qmlpuppet/container/informationcontainer.h +++ b/share/qtcreator/qml/qmlpuppet/container/informationcontainer.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef INFORMATIONCONTAINER_H -#define INFORMATIONCONTAINER_H +#pragma once #include <QDataStream> #include <QMetaType> @@ -74,5 +73,3 @@ QDebug operator <<(QDebug debug, const InformationContainer &container); } // namespace QmlDesigner Q_DECLARE_METATYPE(QmlDesigner::InformationContainer) - -#endif // INFORMATIONCONTAINER_H diff --git a/share/qtcreator/qml/qmlpuppet/container/instancecontainer.h b/share/qtcreator/qml/qmlpuppet/container/instancecontainer.h index 6ec57c6efc..f8b4d84680 100644 --- a/share/qtcreator/qml/qmlpuppet/container/instancecontainer.h +++ b/share/qtcreator/qml/qmlpuppet/container/instancecontainer.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef INSTANCECONTAINER_H -#define INSTANCECONTAINER_H +#pragma once #include <qmetatype.h> #include <QString> @@ -83,4 +82,3 @@ QDebug operator <<(QDebug debug, const InstanceContainer &command); } // namespace QmlDesigner Q_DECLARE_METATYPE(QmlDesigner::InstanceContainer) -#endif // INSTANCECONTAINER_H diff --git a/share/qtcreator/qml/qmlpuppet/container/propertyabstractcontainer.h b/share/qtcreator/qml/qmlpuppet/container/propertyabstractcontainer.h index 3889cb8319..df51c3306b 100644 --- a/share/qtcreator/qml/qmlpuppet/container/propertyabstractcontainer.h +++ b/share/qtcreator/qml/qmlpuppet/container/propertyabstractcontainer.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef PROPERTYABSTRACTCONTAINER_H -#define PROPERTYABSTRACTCONTAINER_H +#pragma once #include <QDataStream> #include <qmetatype.h> @@ -65,4 +64,3 @@ QDebug operator <<(QDebug debug, const PropertyAbstractContainer &container); } // namespace QmlDesigner Q_DECLARE_METATYPE(QmlDesigner::PropertyAbstractContainer) -#endif // PROPERTYABSTRACTCONTAINER_H diff --git a/share/qtcreator/qml/qmlpuppet/container/propertybindingcontainer.h b/share/qtcreator/qml/qmlpuppet/container/propertybindingcontainer.h index 84bf5f4d8c..fb4a245bdc 100644 --- a/share/qtcreator/qml/qmlpuppet/container/propertybindingcontainer.h +++ b/share/qtcreator/qml/qmlpuppet/container/propertybindingcontainer.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef PROPERTYBINDINGCONTAINER_H -#define PROPERTYBINDINGCONTAINER_H +#pragma once #include <QDataStream> #include <qmetatype.h> @@ -63,4 +62,3 @@ QDebug operator <<(QDebug debug, const PropertyBindingContainer &container); } // namespace QmlDesigner Q_DECLARE_METATYPE(QmlDesigner::PropertyBindingContainer) -#endif // PROPERTYBINDINGCONTAINER_H diff --git a/share/qtcreator/qml/qmlpuppet/container/propertyvaluecontainer.h b/share/qtcreator/qml/qmlpuppet/container/propertyvaluecontainer.h index e3f8bcf216..3423066bc1 100644 --- a/share/qtcreator/qml/qmlpuppet/container/propertyvaluecontainer.h +++ b/share/qtcreator/qml/qmlpuppet/container/propertyvaluecontainer.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef PROPERTYVALUECONTAINER_H -#define PROPERTYVALUECONTAINER_H +#pragma once #include <QDataStream> #include <QMetaType> @@ -68,5 +67,3 @@ QDebug operator <<(QDebug debug, const PropertyValueContainer &container); } // namespace QmlDesigner Q_DECLARE_METATYPE(QmlDesigner::PropertyValueContainer) - -#endif // PROPERTYVALUECONTAINER_H diff --git a/share/qtcreator/qml/qmlpuppet/container/reparentcontainer.h b/share/qtcreator/qml/qmlpuppet/container/reparentcontainer.h index 2751937485..76d57b577a 100644 --- a/share/qtcreator/qml/qmlpuppet/container/reparentcontainer.h +++ b/share/qtcreator/qml/qmlpuppet/container/reparentcontainer.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef REPARENTCONTAINER_H -#define REPARENTCONTAINER_H +#pragma once #include <qmetatype.h> #include <QString> @@ -65,5 +64,3 @@ QDataStream &operator>>(QDataStream &in, ReparentContainer &container); QDebug operator <<(QDebug debug, const ReparentContainer &container); } // namespace QmlDesigner - -#endif // REPARENTCONTAINER_H diff --git a/share/qtcreator/qml/qmlpuppet/container/sharedmemory.h b/share/qtcreator/qml/qmlpuppet/container/sharedmemory.h index 482d3d86af..9e6dc794e8 100644 --- a/share/qtcreator/qml/qmlpuppet/container/sharedmemory.h +++ b/share/qtcreator/qml/qmlpuppet/container/sharedmemory.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef QMLDESIGNER_SHAREDMEMORY_H -#define QMLDESIGNER_SHAREDMEMORY_H +#pragma once #include <QSharedMemory> #include <QSystemSemaphore> @@ -88,5 +87,3 @@ private: }; } // namespace QmlDesigner - -#endif // QMLDESIGNER_SHAREDMEMORY_H diff --git a/share/qtcreator/qml/qmlpuppet/container/sharedmemory_unix.cpp b/share/qtcreator/qml/qmlpuppet/container/sharedmemory_unix.cpp index 577374b8c5..11ea5721b9 100644 --- a/share/qtcreator/qml/qmlpuppet/container/sharedmemory_unix.cpp +++ b/share/qtcreator/qml/qmlpuppet/container/sharedmemory_unix.cpp @@ -295,7 +295,8 @@ void SharedMemory::setErrorString(const QString &function) m_error = QSharedMemory::OutOfResources; break; default: - m_errorString = QStringLiteral("%1: unknown error %2").arg(function).arg(strerror(errno)); + m_errorString = QStringLiteral("%1: unknown error %2") + .arg(function).arg(QString::fromLocal8Bit(strerror(errno))); m_error = QSharedMemory::UnknownError; } } diff --git a/share/qtcreator/qml/qmlpuppet/instances/nodeinstanceclientproxy.h b/share/qtcreator/qml/qmlpuppet/instances/nodeinstanceclientproxy.h index ba55f0cea3..2b75ca3a4b 100644 --- a/share/qtcreator/qml/qmlpuppet/instances/nodeinstanceclientproxy.h +++ b/share/qtcreator/qml/qmlpuppet/instances/nodeinstanceclientproxy.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef NODEINSTANCECLIENTPROXY_H -#define NODEINSTANCECLIENTPROXY_H +#pragma once #include "nodeinstanceclientinterface.h" @@ -123,5 +122,3 @@ private: }; } // namespace QmlDesigner - -#endif // NODEINSTANCECLIENTPROXY_H diff --git a/share/qtcreator/qml/qmlpuppet/interfaces/commondefines.h b/share/qtcreator/qml/qmlpuppet/interfaces/commondefines.h index 37e0b027e8..51010c9a53 100644 --- a/share/qtcreator/qml/qmlpuppet/interfaces/commondefines.h +++ b/share/qtcreator/qml/qmlpuppet/interfaces/commondefines.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef COMMONDEFINES_H -#define COMMONDEFINES_H +#pragma once #include <QMetaType> #include <QPair> @@ -57,5 +56,3 @@ enum InformationName }; } - -#endif // COMMONDEFINES_H diff --git a/share/qtcreator/qml/qmlpuppet/interfaces/nodeinstanceclientinterface.h b/share/qtcreator/qml/qmlpuppet/interfaces/nodeinstanceclientinterface.h index 34600fd174..43c50b510c 100644 --- a/share/qtcreator/qml/qmlpuppet/interfaces/nodeinstanceclientinterface.h +++ b/share/qtcreator/qml/qmlpuppet/interfaces/nodeinstanceclientinterface.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef NODEINSTANCECLIENTINTERFACE_H -#define NODEINSTANCECLIENTINTERFACE_H +#pragma once #include <QtGlobal> @@ -59,5 +58,3 @@ public: }; } - -#endif // NODEINSTANCECLIENTINTERFACE_H diff --git a/share/qtcreator/qml/qmlpuppet/interfaces/nodeinstanceglobal.h b/share/qtcreator/qml/qmlpuppet/interfaces/nodeinstanceglobal.h index ab06fdda33..c7ceef01b2 100644 --- a/share/qtcreator/qml/qmlpuppet/interfaces/nodeinstanceglobal.h +++ b/share/qtcreator/qml/qmlpuppet/interfaces/nodeinstanceglobal.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef NODEINSTANCEGLOBAL_H -#define NODEINSTANCEGLOBAL_H +#pragma once #include <QByteArray> #include <QList> @@ -36,5 +35,3 @@ typedef QList<PropertyName> PropertyNameList; typedef QByteArray TypeName; } - -#endif // NODEINSTANCEGLOBAL_H diff --git a/share/qtcreator/qml/qmlpuppet/interfaces/nodeinstanceserverinterface.h b/share/qtcreator/qml/qmlpuppet/interfaces/nodeinstanceserverinterface.h index 30b779ff7e..e3ac6cd111 100644 --- a/share/qtcreator/qml/qmlpuppet/interfaces/nodeinstanceserverinterface.h +++ b/share/qtcreator/qml/qmlpuppet/interfaces/nodeinstanceserverinterface.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef NODEINSTANCESERVERINTERFACE_H -#define NODEINSTANCESERVERINTERFACE_H +#pragma once #include <QObject> @@ -83,4 +82,3 @@ public: }; } -#endif // NODEINSTANCESERVERINTERFACE_H diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/anchorchangesnodeinstance.h b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/anchorchangesnodeinstance.h index 5b7a204067..a9072b6058 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/anchorchangesnodeinstance.h +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/anchorchangesnodeinstance.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef QMLDESIGNER_ANCHORCHANGESNODEINSTANCE_H -#define QMLDESIGNER_ANCHORCHANGESNODEINSTANCE_H +#pragma once #include "objectnodeinstance.h" @@ -64,5 +63,3 @@ protected: } // namespace Internal } // namespace QmlDesigner - -#endif // QMLDESIGNER_ANCHORCHANGESNODEINSTANCE_H diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/behaviornodeinstance.h b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/behaviornodeinstance.h index 6f040db877..b18f4882cb 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/behaviornodeinstance.h +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/behaviornodeinstance.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef BEHAVIORNODEINSTANCE_H -#define BEHAVIORNODEINSTANCE_H +#pragma once #include "objectnodeinstance.h" @@ -52,5 +51,3 @@ private: } // namespace Internal } // namespace QmlDesigner - -#endif // BEHAVIORNODEINSTANCE_H diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/childrenchangeeventfilter.h b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/childrenchangeeventfilter.h index 51df307dd0..659ccf58f3 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/childrenchangeeventfilter.h +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/childrenchangeeventfilter.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef CHILDRENCHANGEEVENTFILTER_H -#define CHILDRENCHANGEEVENTFILTER_H +#pragma once #include <QObject> @@ -48,5 +47,3 @@ protected: } // namespace Internal } // namespace QmlDesigner - -#endif // CHILDRENCHANGEEVENTFILTER_H diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/componentnodeinstance.h b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/componentnodeinstance.h index 02ec457fc8..24ae2dd5d2 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/componentnodeinstance.h +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/componentnodeinstance.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef COMPONENTNODEINSTANCE_H -#define COMPONENTNODEINSTANCE_H +#pragma once #include "objectnodeinstance.h" @@ -54,5 +53,3 @@ private: //function } // Internal } // QmlDesigner - -#endif // COMPONENTNODEINSTANCE_H diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/dummycontextobject.h b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/dummycontextobject.h index 4048d1ff4a..73320dfcf6 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/dummycontextobject.h +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/dummycontextobject.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef DUMMYCONTEXTOBJECT_H -#define DUMMYCONTEXTOBJECT_H +#pragma once #include <QObject> #include <QPointer> @@ -53,4 +52,3 @@ private: } // namespace QmlDesigner QML_DECLARE_TYPE(QmlDesigner::DummyContextObject) -#endif // DUMMYCONTEXTOBJECT_H diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/dummynodeinstance.h b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/dummynodeinstance.h index 2e35f841c6..6a1711399e 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/dummynodeinstance.h +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/dummynodeinstance.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef DUMMYNODEINSTANCE_H -#define DUMMYNODEINSTANCE_H +#pragma once #include <QWeakPointer> @@ -61,4 +60,3 @@ protected: } } -#endif // DUMMYNODEINSTANCE_H diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/layoutnodeinstance.h b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/layoutnodeinstance.h index 58d7ec9f90..f7d0d3e3a6 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/layoutnodeinstance.h +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/layoutnodeinstance.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef LAYOUTNODEINSTANCE_H -#define LAYOUTNODEINSTANCE_H +#pragma once #include "quickitemnodeinstance.h" @@ -54,5 +53,3 @@ protected: } // namespace Internal } // namespace QmlDesigner - -#endif // LAYOUTNODEINSTANCE_H diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/nodeinstanceserver.cpp b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/nodeinstanceserver.cpp index 8507d27eb0..7179596200 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/nodeinstanceserver.cpp +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/nodeinstanceserver.cpp @@ -821,7 +821,7 @@ void NodeInstanceServer::resetInstanceProperty(const PropertyAbstractContainer & } if (propertyContainer.isDynamic() && propertyContainer.instanceId() == 0 && engine()) - rootContext()->setContextProperty(name, QVariant()); + rootContext()->setContextProperty(QString::fromUtf8(name), QVariant()); } } @@ -839,12 +839,14 @@ void NodeInstanceServer::setInstancePropertyBinding(const PropertyBindingContain bool stateBindingWasUpdated = activeStateInstance().updateStateBinding(instance, name, expression); if (!stateBindingWasUpdated) { if (bindingContainer.isDynamic()) - Internal::QmlPrivateGate::createNewDynamicProperty(instance.internalInstance()->object(), engine(), name); + Internal::QmlPrivateGate::createNewDynamicProperty(instance.internalInstance()->object(), engine(), + QString::fromUtf8(name)); instance.setPropertyBinding(name, expression); } } else { if (bindingContainer.isDynamic()) - Internal::QmlPrivateGate::createNewDynamicProperty(instance.internalInstance()->object(), engine(), name); + Internal::QmlPrivateGate::createNewDynamicProperty(instance.internalInstance()->object(), engine(), + QString::fromUtf8(name)); instance.setPropertyBinding(name, expression); } } @@ -871,17 +873,17 @@ void NodeInstanceServer::setInstancePropertyVariant(const PropertyValueContainer bool stateValueWasUpdated = activeStateInstance().updateStateVariant(instance, name, value); if (!stateValueWasUpdated) { if (valueContainer.isDynamic()) - Internal::QmlPrivateGate::createNewDynamicProperty(instance.internalInstance()->object(), engine(), name); + Internal::QmlPrivateGate::createNewDynamicProperty(instance.internalInstance()->object(), engine(), QString::fromUtf8(name)); instance.setPropertyVariant(name, value); } } else { //base state if (valueContainer.isDynamic()) - Internal::QmlPrivateGate::createNewDynamicProperty(instance.internalInstance()->object(), engine(), name); + Internal::QmlPrivateGate::createNewDynamicProperty(instance.internalInstance()->object(), engine(), QString::fromUtf8(name)); instance.setPropertyVariant(name, value); } if (valueContainer.isDynamic() && valueContainer.instanceId() == 0 && engine()) - rootContext()->setContextProperty(name, Internal::QmlPrivateGate::fixResourcePaths(value)); + rootContext()->setContextProperty(QString::fromUtf8(name), Internal::QmlPrivateGate::fixResourcePaths(value)); } } diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/nodeinstanceserver.h b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/nodeinstanceserver.h index 00f882deab..6ac34eecf5 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/nodeinstanceserver.h +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/nodeinstanceserver.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef NODEINSTANCESERVER_H -#define NODEINSTANCESERVER_H +#pragma once #include <QUrl> #include <QVector> @@ -225,5 +224,3 @@ private: }; } - -#endif // NODEINSTANCESERVER_H diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/nodeinstancesignalspy.h b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/nodeinstancesignalspy.h index c5ebc58687..066c74f6a3 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/nodeinstancesignalspy.h +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/nodeinstancesignalspy.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef NODEINSTANCESIGNALSPY_H -#define NODEINSTANCESIGNALSPY_H +#pragma once #include <QObject> #include <QHash> @@ -63,5 +62,3 @@ private: } // namespace Internal } // namespace QmlDesigner - -#endif // NODEINSTANCESIGNALSPY_H diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/objectnodeinstance.cpp b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/objectnodeinstance.cpp index d0f60103ae..1695e6e55f 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/objectnodeinstance.cpp +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/objectnodeinstance.cpp @@ -301,7 +301,7 @@ static void removeObjectFromList(const QQmlProperty &property, QObject *objectTo void ObjectNodeInstance::removeFromOldProperty(QObject *object, QObject *oldParent, const PropertyName &oldParentProperty) { - QQmlProperty property(oldParent, oldParentProperty, context()); + QQmlProperty property(oldParent, QString::fromUtf8(oldParentProperty), context()); if (!property.isValid()) return; @@ -320,7 +320,7 @@ void ObjectNodeInstance::removeFromOldProperty(QObject *object, QObject *oldPare void ObjectNodeInstance::addToNewProperty(QObject *object, QObject *newParent, const PropertyName &newParentProperty) { - QQmlProperty property(newParent, newParentProperty, context()); + QQmlProperty property(newParent, QString::fromUtf8(newParentProperty), context()); if (object) object->setParent(newParent); @@ -400,7 +400,7 @@ void ObjectNodeInstance::setPropertyVariant(const PropertyName &name, const QVar if (ignoredProperties().contains(name)) return; - QQmlProperty property(object(), name, context()); + QQmlProperty property(object(), QString::fromUtf8(name), context()); if (!property.isValid()) return; @@ -482,7 +482,7 @@ void ObjectNodeInstance::resetProperty(const PropertyName &name) void ObjectNodeInstance::refreshProperty(const PropertyName &name) { - QQmlProperty property(object(), name, context()); + QQmlProperty property(object(), QString::fromUtf8(name), context()); if (!property.isValid()) return; @@ -523,7 +523,7 @@ QVariant ObjectNodeInstance::property(const PropertyName &name) const if (QmlPrivateGate::isPropertyBlackListed(name)) return QVariant(); - QQmlProperty property(object(), name, context()); + QQmlProperty property(object(), QString::fromUtf8(name), context()); if (property.property().isEnumType()) { QVariant value = property.read(); return property.property().enumerator().valueToKey(value.toInt()); @@ -555,10 +555,10 @@ QString ObjectNodeInstance::instanceType(const PropertyName &name) const if (QmlPrivateGate::isPropertyBlackListed(name)) return QLatin1String("undefined"); - QQmlProperty property(object(), name, context()); + QQmlProperty property(object(), QString::fromUtf8(name), context()); if (!property.isValid()) return QLatin1String("undefined"); - return property.propertyTypeName(); + return QString::fromUtf8(property.propertyTypeName()); } QList<ServerNodeInstance> ObjectNodeInstance::childItems() const diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/objectnodeinstance.h b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/objectnodeinstance.h index 200993a80f..cecc9c8ee3 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/objectnodeinstance.h +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/objectnodeinstance.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef OBJECTNODEINSTANCE_H -#define OBJECTNODEINSTANCE_H +#pragma once #include "nodeinstanceserver.h" #include "nodeinstancesignalspy.h" @@ -221,5 +220,3 @@ private: } // namespace Internal } // namespace QmlDesigner - -#endif // OBJECTNODEINSTANCE_H diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/positionernodeinstance.h b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/positionernodeinstance.h index a2ac190148..7575014ea8 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/positionernodeinstance.h +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/positionernodeinstance.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef POSITIONERNODEINSTANCE_H -#define POSITIONERNODEINSTANCE_H +#pragma once #include "quickitemnodeinstance.h" @@ -58,5 +57,3 @@ protected: } // namespace Internal } // namespace QmlDesigner - -#endif // POSITIONERNODEINSTANCE_H diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qmlpropertychangesnodeinstance.h b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qmlpropertychangesnodeinstance.h index 72fe51de62..4ea6c896ec 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qmlpropertychangesnodeinstance.h +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qmlpropertychangesnodeinstance.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef QMLPROPERTYCHANGESNODEINSTANCE_H -#define QMLPROPERTYCHANGESNODEINSTANCE_H +#pragma once #include "objectnodeinstance.h" @@ -60,5 +59,3 @@ protected: } // namespace QmlDesigner //QML_DECLARE_TYPE(QmlDesigner::Internal::QmlPropertyChangesObject) - -#endif // QMLPROPERTYCHANGESNODEINSTANCE_H diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qmlstatenodeinstance.h b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qmlstatenodeinstance.h index 12bbf25349..5c09bb7ab7 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qmlstatenodeinstance.h +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qmlstatenodeinstance.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef QMLSTATENODEINSTANCE_H -#define QMLSTATENODEINSTANCE_H +#pragma once #include "objectnodeinstance.h" @@ -57,5 +56,3 @@ protected: } // namespace Internal } // namespace QmlDesigner - -#endif // QMLSTATENODEINSTANCE_H diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qmltransitionnodeinstance.h b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qmltransitionnodeinstance.h index e297e5db35..dc1f01dec4 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qmltransitionnodeinstance.h +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qmltransitionnodeinstance.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef QMLTRANSITIONNODEINSTANCE_H -#define QMLTRANSITIONNODEINSTANCE_H +#pragma once #include "objectnodeinstance.h" @@ -48,4 +47,3 @@ private: }; } } -#endif // QMLTRANSITIONNODEINSTANCE_H diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5informationnodeinstanceserver.cpp b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5informationnodeinstanceserver.cpp index ae53e1f4d3..9e0461ba29 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5informationnodeinstanceserver.cpp +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5informationnodeinstanceserver.cpp @@ -152,10 +152,8 @@ void Qt5InformationNodeInstanceServer::collectItemChangesAndSendChangeCommands() foreach (const InstancePropertyPair& property, changedPropertyList()) { const ServerNodeInstance instance = property.first; - const QString propertyName = property.second; - if (instance.isValid()) { - if (propertyName.contains("anchors")) + if (property.second.contains("anchors")) informationChangedInstanceSet.insert(instance); propertyChangedList.append(property); diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5informationnodeinstanceserver.h b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5informationnodeinstanceserver.h index 2800806638..3f6ecdd94d 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5informationnodeinstanceserver.h +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5informationnodeinstanceserver.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef QMLDESIGNER_QT5INFORMATIONNODEINSTANCESERVER_H -#define QMLDESIGNER_QT5INFORMATIONNODEINSTANCESERVER_H +#pragma once #include "qt5nodeinstanceserver.h" #include "tokencommand.h" @@ -58,5 +57,3 @@ private: }; } // namespace QmlDesigner - -#endif // QMLDESIGNER_QT5INFORMATIONNODEINSTANCESERVER_H diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5nodeinstanceclientproxy.h b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5nodeinstanceclientproxy.h index 2a7a272d44..b8efccc7ec 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5nodeinstanceclientproxy.h +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5nodeinstanceclientproxy.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef QMLDESIGNER_QT5NODEINSTANCECLIENTPROXY_H -#define QMLDESIGNER_QT5NODEINSTANCECLIENTPROXY_H +#pragma once #include "nodeinstanceclientproxy.h" @@ -38,5 +37,3 @@ public: }; } // namespace QmlDesigner - -#endif // QMLDESIGNER_QT5NODEINSTANCECLIENTPROXY_H diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5nodeinstanceserver.h b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5nodeinstanceserver.h index 5dcbd1cd7d..d4aaa91ddf 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5nodeinstanceserver.h +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5nodeinstanceserver.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef QT5NODEINSTANCESERVER_H -#define QT5NODEINSTANCESERVER_H +#pragma once #include <QtGlobal> @@ -68,5 +67,3 @@ private: }; } // QmlDesigner - -#endif // QT5NODEINSTANCESERVER_H diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5previewnodeinstanceserver.h b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5previewnodeinstanceserver.h index 187617cc9f..c47681ec21 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5previewnodeinstanceserver.h +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5previewnodeinstanceserver.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef QMLDESIGNER_QT5PREVIEWNODEINSTANCESERVER_H -#define QMLDESIGNER_QT5PREVIEWNODEINSTANCESERVER_H +#pragma once #include "qt5nodeinstanceserver.h" @@ -51,5 +50,3 @@ private: }; } // namespace QmlDesigner - -#endif // QMLDESIGNER_QT5PREVIEWNODEINSTANCESERVER_H diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5rendernodeinstanceserver.h b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5rendernodeinstanceserver.h index 5f885f8b66..1a9fcf624e 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5rendernodeinstanceserver.h +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5rendernodeinstanceserver.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef QMLDESIGNER_QT5RENDERNODEINSTANCESERVER_H -#define QMLDESIGNER_QT5RENDERNODEINSTANCESERVER_H +#pragma once #include "qt5nodeinstanceserver.h" @@ -50,5 +49,3 @@ private: }; } // namespace QmlDesigner - -#endif // QMLDESIGNER_QT5RENDERNODEINSTANCESERVER_H diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5testnodeinstanceserver.cpp b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5testnodeinstanceserver.cpp index 44d361f8f8..ec90f0ce63 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5testnodeinstanceserver.cpp +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5testnodeinstanceserver.cpp @@ -276,10 +276,8 @@ void QmlDesigner::Qt5TestNodeInstanceServer::collectItemChangesAndSendChangeComm foreach (const InstancePropertyPair& property, changedPropertyList()) { const ServerNodeInstance instance = property.first; - const QString propertyName = property.second; - if (instance.isValid()) { - if (propertyName.contains("anchors")) + if (property.second.contains("anchors")) informationChangedInstanceSet.insert(instance); propertyChangedList.append(property); diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5testnodeinstanceserver.h b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5testnodeinstanceserver.h index 8a8aec7b8b..af30c423d6 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5testnodeinstanceserver.h +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5testnodeinstanceserver.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef QMLDESIGNER_QT5TESTNODEINSTANCESERVER_H -#define QMLDESIGNER_QT5TESTNODEINSTANCESERVER_H +#pragma once #include "qt5nodeinstanceserver.h" @@ -61,5 +60,3 @@ protected: }; } // namespace QmlDesigner - -#endif // QMLDESIGNER_QT5TESTNODEINSTANCESERVER_H diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/quickitemnodeinstance.cpp b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/quickitemnodeinstance.cpp index 2a3420a3da..0014def3b0 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/quickitemnodeinstance.cpp +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/quickitemnodeinstance.cpp @@ -690,7 +690,7 @@ void QuickItemNodeInstance::resetProperty(const PropertyName &name) if (name == "y") m_y = 0.0; - DesignerSupport::resetAnchor(quickItem(), name); + DesignerSupport::resetAnchor(quickItem(), QString::fromUtf8(name)); if (name == "anchors.fill") { resetHorizontal(); @@ -727,7 +727,7 @@ bool QuickItemNodeInstance::isAnchoredByChildren() const bool QuickItemNodeInstance::hasAnchor(const PropertyName &name) const { - return DesignerSupport::hasAnchor(quickItem(), name); + return DesignerSupport::hasAnchor(quickItem(), QString::fromUtf8(name)); } static bool isValidAnchorName(const PropertyName &name) @@ -747,10 +747,11 @@ static bool isValidAnchorName(const PropertyName &name) QPair<PropertyName, ServerNodeInstance> QuickItemNodeInstance::anchor(const PropertyName &name) const { - if (!isValidAnchorName(name) || !DesignerSupport::hasAnchor(quickItem(), name)) + if (!isValidAnchorName(name) || !DesignerSupport::hasAnchor(quickItem(), QString::fromUtf8(name))) return ObjectNodeInstance::anchor(name); - QPair<QString, QObject*> nameObjectPair = DesignerSupport::anchorLineTarget(quickItem(), name, context()); + QPair<QString, QObject*> nameObjectPair = + DesignerSupport::anchorLineTarget(quickItem(), QString::fromUtf8(name), context()); QObject *targetObject = nameObjectPair.second; PropertyName targetName = nameObjectPair.first.toUtf8(); diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/quickitemnodeinstance.h b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/quickitemnodeinstance.h index 8936927ab9..d655a9a103 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/quickitemnodeinstance.h +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/quickitemnodeinstance.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef QuickITEMNODEINSTANCE_H -#define QuickITEMNODEINSTANCE_H +#pragma once #include <QtGlobal> @@ -134,6 +133,3 @@ private: //variables } // namespace Internal } // namespace QmlDesigner - -#endif // QuickITEMNODEINSTANCE_H - diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/servernodeinstance.cpp b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/servernodeinstance.cpp index 898170ad93..58b17e2451 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/servernodeinstance.cpp +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/servernodeinstance.cpp @@ -205,7 +205,7 @@ ServerNodeInstance ServerNodeInstance::create(NodeInstanceServer *nodeInstanceSe if (object == 0) nodeInstanceServer->sendDebugOutput(DebugOutputCommand::ErrorType, QString("Component with path %1 could not be created.").arg(instanceContainer.componentPath()), instanceContainer.instanceId()); } else { - object = Internal::ObjectNodeInstance::createPrimitive(instanceContainer.type(), instanceContainer.majorNumber(), instanceContainer.minorNumber(), nodeInstanceServer->context()); + object = Internal::ObjectNodeInstance::createPrimitive(QString::fromUtf8(instanceContainer.type()), instanceContainer.majorNumber(), instanceContainer.minorNumber(), nodeInstanceServer->context()); if (object == 0) nodeInstanceServer->sendDebugOutput(DebugOutputCommand::ErrorType, QLatin1String("Item could not be created."), instanceContainer.instanceId()); } diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/servernodeinstance.h b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/servernodeinstance.h index 424cd6dbac..c0c3f87608 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/servernodeinstance.h +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/servernodeinstance.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef SERVERNODEINSTANCE_H -#define SERVERNODEINSTANCE_H +#pragma once #include <QSharedPointer> #include <QHash> @@ -214,5 +213,3 @@ QDebug operator <<(QDebug debug, const ServerNodeInstance &instance); } Q_DECLARE_METATYPE(QmlDesigner::ServerNodeInstance) - -#endif // SERVERNODEINSTANCE_H diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/qml2puppet.pri b/share/qtcreator/qml/qmlpuppet/qml2puppet/qml2puppet.pri index 1c50bc3770..954596d16e 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/qml2puppet.pri +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/qml2puppet.pri @@ -20,7 +20,6 @@ QT_BREAKPAD_ROOT_PATH = $$(QT_BREAKPAD_ROOT_PATH) SOURCES += $$PWD/qml2puppetmain.cpp RESOURCES += $$PWD/../qmlpuppet.qrc -DEFINES -= QT_NO_CAST_FROM_ASCII DISTFILES += Info.plist diff --git a/share/qtcreator/qml/qmlpuppet/qmlprivategate/designercustomobjectdata.h b/share/qtcreator/qml/qmlpuppet/qmlprivategate/designercustomobjectdata.h index e8601e42ef..c7030fe400 100644 --- a/share/qtcreator/qml/qmlpuppet/qmlprivategate/designercustomobjectdata.h +++ b/share/qtcreator/qml/qmlpuppet/qmlprivategate/designercustomobjectdata.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef DESIGNERCUSTOMOBJECTDATA_H -#define DESIGNERCUSTOMOBJECTDATA_H +#pragma once #include "nodeinstanceglobal.h" @@ -81,5 +80,3 @@ private: } // namespace QmlPrivateGate } // namespace Internal } // namespace QmlDesigner - -#endif // DESIGNERCUSTOMOBJECTDATA_H diff --git a/share/qtcreator/qml/qmlpuppet/qmlprivategate/metaobject.h b/share/qtcreator/qml/qmlpuppet/qmlprivategate/metaobject.h index 800091c777..fc61657c07 100644 --- a/share/qtcreator/qml/qmlpuppet/qmlprivategate/metaobject.h +++ b/share/qtcreator/qml/qmlpuppet/qmlprivategate/metaobject.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef NODEINSTANCEMETAOBJECT_H -#define NODEINSTANCEMETAOBJECT_H +#pragma once #include <QQmlContext> #include <QScopedPointer> @@ -94,5 +93,3 @@ private: } // namespace QmlPrivateGate } // namespace Internal } // namespace QmlDesigner - -#endif // NODEINSTANCEMETAOBJECT_H diff --git a/share/qtcreator/qml/qmlpuppet/qmlprivategate/qmlprivategate.h b/share/qtcreator/qml/qmlpuppet/qmlprivategate/qmlprivategate.h index 467659a2c2..bd17a68a1e 100644 --- a/share/qtcreator/qml/qmlpuppet/qmlprivategate/qmlprivategate.h +++ b/share/qtcreator/qml/qmlpuppet/qmlprivategate/qmlprivategate.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef QMLPRIVATEGATE_H -#define QMLPRIVATEGATE_H +#pragma once #include "nodeinstanceglobal.h" @@ -131,5 +130,3 @@ public: } // namespace QmlPrivateGate } // namespace Internal } // namespace QmlDesigner - -#endif // QMLPRIVATEGATE_H diff --git a/share/qtcreator/qml/qmlpuppet/qmlprivategate/qmlprivategate_56.cpp b/share/qtcreator/qml/qmlpuppet/qmlprivategate/qmlprivategate_56.cpp index b255fb77c8..8edf669365 100644 --- a/share/qtcreator/qml/qmlpuppet/qmlprivategate/qmlprivategate_56.cpp +++ b/share/qtcreator/qml/qmlpuppet/qmlprivategate/qmlprivategate_56.cpp @@ -94,7 +94,7 @@ QVariant fixResourcePaths(const QVariant &value) const QUrl url = value.toUrl(); if (url.scheme() == QLatin1String("qrc")) { const QString path = QLatin1String("qrc:") + url.path(); - QString qrcSearchPath = qgetenv("QMLDESIGNER_RC_PATHS"); + QString qrcSearchPath = QString::fromLocal8Bit(qgetenv("QMLDESIGNER_RC_PATHS")); if (!qrcSearchPath.isEmpty()) { const QStringList searchPaths = qrcSearchPath.split(QLatin1Char(';')); foreach (const QString &qrcPath, searchPaths) { @@ -115,7 +115,7 @@ QVariant fixResourcePaths(const QVariant &value) if (value.type() == QVariant::String) { const QString str = value.toString(); if (str.contains(QLatin1String("qrc:"))) { - QString qrcSearchPath = qgetenv("QMLDESIGNER_RC_PATHS"); + QString qrcSearchPath = QString::fromLocal8Bit(qgetenv("QMLDESIGNER_RC_PATHS")); if (!qrcSearchPath.isEmpty()) { const QStringList searchPaths = qrcSearchPath.split(QLatin1Char(';')); foreach (const QString &qrcPath, searchPaths) { @@ -168,7 +168,7 @@ QVariant getResetValue(QObject *object, const PropertyName &propertyName) static void setProperty(QObject *object, QQmlContext *context, const PropertyName &propertyName, const QVariant &value) { - QQmlProperty property(object, propertyName, context); + QQmlProperty property(object, QString::fromUtf8(propertyName), context); property.write(value); } diff --git a/share/qtcreator/qml/qmlpuppet/types/enumeration.h b/share/qtcreator/qml/qmlpuppet/types/enumeration.h index 537a391b9e..84028dd24a 100644 --- a/share/qtcreator/qml/qmlpuppet/types/enumeration.h +++ b/share/qtcreator/qml/qmlpuppet/types/enumeration.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef QMLDESIGNER_ENUMERATION_H -#define QMLDESIGNER_ENUMERATION_H +#pragma once #include <QByteArray> #include <QDataStream> @@ -69,5 +68,3 @@ QDebug operator <<(QDebug debug, const Enumeration &enumeration); } // namespace QmlDesigner Q_DECLARE_METATYPE(QmlDesigner::Enumeration) - -#endif // QMLDESIGNER_ENUMERATION_H diff --git a/share/qtcreator/styles/dark.xml b/share/qtcreator/styles/dark.xml index e8719c1079..4a605d3f02 100644 --- a/share/qtcreator/styles/dark.xml +++ b/share/qtcreator/styles/dark.xml @@ -15,6 +15,7 @@ <style name="Doxygen.Tag" foreground="#00a0a0"/> <style name="Field"/> <style name="Function"/> + <style name="Global"/> <style name="Keyword" foreground="#ffff55"/> <style name="PrimitiveType" foreground="#ffff55"/> <style name="Label" foreground="#ffff55"/> diff --git a/share/qtcreator/styles/inkpot.xml b/share/qtcreator/styles/inkpot.xml index 6253ec6774..65336e86bf 100644 --- a/share/qtcreator/styles/inkpot.xml +++ b/share/qtcreator/styles/inkpot.xml @@ -20,6 +20,7 @@ <style name="Doxygen.Tag" foreground="#4e5ab3"/> <style name="Field" bold="true"/> <style name="Function"/> + <style name="Global"/> <style name="Keyword" foreground="#808bed"/> <style name="PrimitiveType" foreground="#808bed"/> <style name="Label" foreground="#e76000"/> diff --git a/share/qtcreator/templates/wizards/qtquick1-extension/plugin.h b/share/qtcreator/templates/wizards/qtquick1-extension/plugin.h index d487a8339d..bb4976b12e 100644 --- a/share/qtcreator/templates/wizards/qtquick1-extension/plugin.h +++ b/share/qtcreator/templates/wizards/qtquick1-extension/plugin.h @@ -1,5 +1,4 @@ -#ifndef %ProjectName:h%_PLUGIN_H -#define %ProjectName:h%_PLUGIN_H +#pragma once #include <QDeclarativeExtensionPlugin> @@ -13,5 +12,3 @@ class %ProjectName:s%Plugin : public QDeclarativeExtensionPlugin public: void registerTypes(const char *uri); }; - -#endif // %ProjectName:h%_PLUGIN_H diff --git a/share/qtcreator/templates/wizards/qtquick2-extension/plugin.h b/share/qtcreator/templates/wizards/qtquick2-extension/plugin.h index 3b0bc2a355..da01f59d04 100644 --- a/share/qtcreator/templates/wizards/qtquick2-extension/plugin.h +++ b/share/qtcreator/templates/wizards/qtquick2-extension/plugin.h @@ -1,5 +1,4 @@ -#ifndef %ProjectName:h%_PLUGIN_H -#define %ProjectName:h%_PLUGIN_H +#pragma once #include <QQmlExtensionPlugin> @@ -11,5 +10,3 @@ class %ProjectName:s%Plugin : public QQmlExtensionPlugin public: void registerTypes(const char *uri); }; - -#endif // %ProjectName:h%_PLUGIN_H |