From c3bfcc9b864bb260f225748fd9c9a9d3ab203a3c Mon Sep 17 00:00:00 2001 From: hjk Date: Wed, 5 Jun 2024 18:22:41 +0200 Subject: [PATCH] QmlPuppet: Fix a few more deprecation warnings Change-Id: I4debdccaf6f6c7fcc228eadea6231b58fa8da9d0 Reviewed-by: Knud Dollereder --- .../instances/nodeinstanceclientproxy.cpp | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/tools/qml2puppet/instances/nodeinstanceclientproxy.cpp b/src/tools/qml2puppet/instances/nodeinstanceclientproxy.cpp index 6ba2fa7fcaa..de07782d1cf 100644 --- a/src/tools/qml2puppet/instances/nodeinstanceclientproxy.cpp +++ b/src/tools/qml2puppet/instances/nodeinstanceclientproxy.cpp @@ -131,17 +131,17 @@ void NodeInstanceClientProxy::initializeCapturedStream(const QString &fileName) bool compareCommands(const QVariant &command, const QVariant &controlCommand) { - static const int informationChangedCommandType = QMetaType::type("InformationChangedCommand"); - static const int valuesChangedCommandType = QMetaType::type("ValuesChangedCommand"); - static const int valuesModifiedCommandType = QMetaType::type("ValuesModifiedCommand"); - static const int pixmapChangedCommandType = QMetaType::type("PixmapChangedCommand"); - static const int childrenChangedCommandType = QMetaType::type("ChildrenChangedCommand"); - static const int statePreviewImageChangedCommandType = QMetaType::type("StatePreviewImageChangedCommand"); - static const int componentCompletedCommandType = QMetaType::type("ComponentCompletedCommand"); - static const int synchronizeCommandType = QMetaType::type("SynchronizeCommand"); - static const int tokenCommandType = QMetaType::type("TokenCommand"); - static const int debugOutputCommandType = QMetaType::type("DebugOutputCommand"); - static const int changeSelectionCommandType = QMetaType::type("ChangeSelectionCommand"); + static const int informationChangedCommandType = QMetaType::fromName("InformationChangedCommand").id(); + static const int valuesChangedCommandType = QMetaType::fromName("ValuesChangedCommand").id(); + static const int valuesModifiedCommandType = QMetaType::fromName("ValuesModifiedCommand").id(); + static const int pixmapChangedCommandType = QMetaType::fromName("PixmapChangedCommand").id(); + static const int childrenChangedCommandType = QMetaType::fromName("ChildrenChangedCommand").id(); + static const int statePreviewImageChangedCommandType = QMetaType::fromName("StatePreviewImageChangedCommand").id(); + static const int componentCompletedCommandType = QMetaType::fromName("ComponentCompletedCommand").id(); + static const int synchronizeCommandType = QMetaType::fromName("SynchronizeCommand").id(); + static const int tokenCommandType = QMetaType::fromName("TokenCommand").id(); + static const int debugOutputCommandType = QMetaType::fromName("DebugOutputCommand").id(); + static const int changeSelectionCommandType = QMetaType::fromName("ChangeSelectionCommand").id(); if (command.typeId() == controlCommand.typeId()) { if (command.typeId() == informationChangedCommandType) @@ -186,8 +186,8 @@ void NodeInstanceClientProxy::writeCommand(const QVariant &command) } } else if (m_outputIoDevice) { #ifdef NANOTRACE_DESIGNSTUDIO_ENABLED - if (command.typeId() != QMetaType::type("PuppetAliveCommand")) { - if (command.typeId() == QMetaType::type("SyncNanotraceCommand")) { + if (command.typeId() != QMetaType::fromName("PuppetAliveCommand").id()) { + if (command.typeId() == QMetaType::fromName("SyncNanotraceCommand").id()) { SyncNanotraceCommand cmd = command.value(); NANOTRACE_INSTANT_ARGS("Sync", "writeCommand", {"name", cmd.name().toStdString()},