QmlDesigner: Make category function pointer const

Otherwise MSVC unlike GCC or CLang cannot remove the function call for a
disabled category.

Change-Id: I2cbf9173d7d99988ff761dbeb1fbf48923b15a6b
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Marco Bubke
2025-06-01 13:30:59 +02:00
parent 41895d9fa7
commit cdc0a2c9b4
84 changed files with 84 additions and 84 deletions

View File

@@ -7,7 +7,7 @@
namespace QmlDesigner { namespace QmlDesigner {
static auto category = FormEditorTracing::category; static const auto category = FormEditorTracing::category;
AbstractCustomTool::AbstractCustomTool() AbstractCustomTool::AbstractCustomTool()
: AbstractFormEditorTool(nullptr) : AbstractFormEditorTool(nullptr)

View File

@@ -19,7 +19,7 @@
namespace QmlDesigner { namespace QmlDesigner {
static auto category = FormEditorTracing::category; static const auto category = FormEditorTracing::category;
AbstractFormEditorTool::AbstractFormEditorTool(FormEditorView *editorView) : m_view(editorView) AbstractFormEditorTool::AbstractFormEditorTool(FormEditorView *editorView) : m_view(editorView)
{ {

View File

@@ -12,7 +12,7 @@
namespace QmlDesigner { namespace QmlDesigner {
static auto category = FormEditorTracing::category; static const auto category = FormEditorTracing::category;
AnchorIndicator::AnchorIndicator(LayerItem *layerItem) AnchorIndicator::AnchorIndicator(LayerItem *layerItem)
: m_layerItem(layerItem) : m_layerItem(layerItem)

View File

@@ -13,7 +13,7 @@ const int AngleDegree = 16;
namespace QmlDesigner { namespace QmlDesigner {
static auto category = FormEditorTracing::category; static const auto category = FormEditorTracing::category;
AnchorIndicatorGraphicsItem::AnchorIndicatorGraphicsItem(QGraphicsItem *parent) : AnchorIndicatorGraphicsItem::AnchorIndicatorGraphicsItem(QGraphicsItem *parent) :
QGraphicsObject(parent) QGraphicsObject(parent)

View File

@@ -16,7 +16,7 @@
namespace QmlDesigner { namespace QmlDesigner {
static auto category = FormEditorTracing::category; static const auto category = FormEditorTracing::category;
BackgroundAction::BackgroundAction(QObject *parent) : BackgroundAction::BackgroundAction(QObject *parent) :
QWidgetAction(parent) QWidgetAction(parent)

View File

@@ -10,7 +10,7 @@
namespace QmlDesigner { namespace QmlDesigner {
static auto category = FormEditorTracing::category; static const auto category = FormEditorTracing::category;
BindingIndicator::BindingIndicator(LayerItem *layerItem) BindingIndicator::BindingIndicator(LayerItem *layerItem)
: m_layerItem(layerItem) : m_layerItem(layerItem)

View File

@@ -8,7 +8,7 @@
namespace QmlDesigner { namespace QmlDesigner {
static auto category = FormEditorTracing::category; static const auto category = FormEditorTracing::category;
BindingIndicatorGraphicsItem::BindingIndicatorGraphicsItem(QGraphicsItem *parent) : BindingIndicatorGraphicsItem::BindingIndicatorGraphicsItem(QGraphicsItem *parent) :
QGraphicsObject(parent) QGraphicsObject(parent)

View File

@@ -12,7 +12,7 @@
namespace QmlDesigner { namespace QmlDesigner {
static auto category = FormEditorTracing::category; static const auto category = FormEditorTracing::category;
ControlElement::ControlElement(LayerItem *layerItem) ControlElement::ControlElement(LayerItem *layerItem)
: m_controlShape(new QGraphicsRectItem(layerItem)) : m_controlShape(new QGraphicsRectItem(layerItem))

View File

@@ -30,7 +30,7 @@ static Q_LOGGING_CATEGORY(dragToolInfo, "qtc.qmldesigner.formeditor", QtWarningM
namespace QmlDesigner { namespace QmlDesigner {
static auto category = FormEditorTracing::category; static const auto category = FormEditorTracing::category;
DragTool::DragTool(FormEditorView *editorView) DragTool::DragTool(FormEditorView *editorView)
: AbstractFormEditorTool(editorView), : AbstractFormEditorTool(editorView),

View File

@@ -24,7 +24,7 @@
namespace QmlDesigner { namespace QmlDesigner {
const int penWidth = 2; const int penWidth = 2;
static auto category = FormEditorTracing::category; static const auto category = FormEditorTracing::category;
FormEditorAnnotationIcon::FormEditorAnnotationIcon(const ModelNode &modelNode, QGraphicsItem *parent) FormEditorAnnotationIcon::FormEditorAnnotationIcon(const ModelNode &modelNode, QGraphicsItem *parent)
: QGraphicsObject(parent) : QGraphicsObject(parent)

View File

@@ -23,7 +23,7 @@
namespace QmlDesigner { namespace QmlDesigner {
static auto category = FormEditorTracing::category; static const auto category = FormEditorTracing::category;
FormEditorGraphicsView::FormEditorGraphicsView(QWidget *parent) FormEditorGraphicsView::FormEditorGraphicsView(QWidget *parent)
: QGraphicsView(parent) : QGraphicsView(parent)

View File

@@ -36,7 +36,7 @@ namespace QmlDesigner {
using NanotraceHR::keyValue; using NanotraceHR::keyValue;
static auto category = FormEditorTracing::category; static const auto category = FormEditorTracing::category;
const int flowBlockSize = 200; const int flowBlockSize = 200;
const int blockRadius = 18; const int blockRadius = 18;

View File

@@ -33,7 +33,7 @@ namespace QmlDesigner {
using NanotraceHR::keyValue; using NanotraceHR::keyValue;
static auto category = FormEditorTracing::category; static const auto category = FormEditorTracing::category;
FormEditorScene::FormEditorScene(FormEditorWidget *view, FormEditorView *editorView) FormEditorScene::FormEditorScene(FormEditorWidget *view, FormEditorView *editorView)
: QGraphicsScene() : QGraphicsScene()

View File

@@ -15,7 +15,7 @@
namespace QmlDesigner { namespace QmlDesigner {
static auto category = FormEditorTracing::category; static const auto category = FormEditorTracing::category;
const int toolButtonSize = 14; const int toolButtonSize = 14;

View File

@@ -49,7 +49,7 @@ using NanotraceHR::keyValue;
namespace { namespace {
constexpr AuxiliaryDataKeyView autoSizeProperty{AuxiliaryDataType::Temporary, "autoSize"}; constexpr AuxiliaryDataKeyView autoSizeProperty{AuxiliaryDataType::Temporary, "autoSize"};
auto category = FormEditorTracing::category; const auto category = FormEditorTracing::category;
} }
FormEditorView::FormEditorView(ExternalDependenciesInterface &externalDependencies) FormEditorView::FormEditorView(ExternalDependenciesInterface &externalDependencies)

View File

@@ -51,7 +51,7 @@ namespace {
constexpr AuxiliaryDataKeyView formeditorZoomProperty{AuxiliaryDataType::NodeInstancePropertyOverwrite, constexpr AuxiliaryDataKeyView formeditorZoomProperty{AuxiliaryDataType::NodeInstancePropertyOverwrite,
"formeditorZoom"}; "formeditorZoom"};
auto category = FormEditorTracing::category; const auto category = FormEditorTracing::category;
} }
FormEditorWidget::FormEditorWidget(FormEditorView *view) FormEditorWidget::FormEditorWidget(FormEditorView *view)

View File

@@ -12,7 +12,7 @@
namespace QmlDesigner { namespace QmlDesigner {
static auto category = FormEditorTracing::category; static const auto category = FormEditorTracing::category;
LayerItem::LayerItem(FormEditorScene* scene) LayerItem::LayerItem(FormEditorScene* scene)
{ {

View File

@@ -9,7 +9,7 @@
namespace QmlDesigner { namespace QmlDesigner {
static auto category = FormEditorTracing::category; static const auto category = FormEditorTracing::category;
LineEditAction::LineEditAction(const QString &placeHolderText, QObject *parent) : LineEditAction::LineEditAction(const QString &placeHolderText, QObject *parent) :
QWidgetAction(parent), QWidgetAction(parent),

View File

@@ -25,7 +25,7 @@ static Q_LOGGING_CATEGORY(moveManipulatorInfo, "qtc.qmldesigner.formeditor", QtW
namespace QmlDesigner { namespace QmlDesigner {
static auto category = FormEditorTracing::category; static const auto category = FormEditorTracing::category;
MoveManipulator::MoveManipulator(LayerItem *layerItem, FormEditorView *view) MoveManipulator::MoveManipulator(LayerItem *layerItem, FormEditorView *view)
: m_layerItem(layerItem), : m_layerItem(layerItem),

View File

@@ -20,7 +20,7 @@
namespace QmlDesigner { namespace QmlDesigner {
static auto category = FormEditorTracing::category; static const auto category = FormEditorTracing::category;
MoveTool::MoveTool(FormEditorView *editorView) MoveTool::MoveTool(FormEditorView *editorView)
: AbstractFormEditorTool(editorView) : AbstractFormEditorTool(editorView)

View File

@@ -10,7 +10,7 @@
namespace QmlDesigner { namespace QmlDesigner {
static auto category = FormEditorTracing::category; static const auto category = FormEditorTracing::category;
double sum(const QList<double> & list) double sum(const QList<double> & list)
{ {

View File

@@ -13,7 +13,7 @@
namespace QmlDesigner { namespace QmlDesigner {
static auto category = FormEditorTracing::category; static const auto category = FormEditorTracing::category;
class ResizeControllerData class ResizeControllerData
{ {

View File

@@ -9,7 +9,7 @@
namespace QmlDesigner { namespace QmlDesigner {
static auto category = FormEditorTracing::category; static const auto category = FormEditorTracing::category;
ResizeHandleItem::ResizeHandleItem(QGraphicsItem *parent, const ResizeController &resizeController) ResizeHandleItem::ResizeHandleItem(QGraphicsItem *parent, const ResizeController &resizeController)
: QGraphicsItem(parent), : QGraphicsItem(parent),

View File

@@ -8,7 +8,7 @@
namespace QmlDesigner { namespace QmlDesigner {
static auto category = FormEditorTracing::category; static const auto category = FormEditorTracing::category;
ResizeIndicator::ResizeIndicator(LayerItem *layerItem) ResizeIndicator::ResizeIndicator(LayerItem *layerItem)
: m_layerItem(layerItem) : m_layerItem(layerItem)

View File

@@ -16,7 +16,7 @@
namespace QmlDesigner { namespace QmlDesigner {
static auto category = FormEditorTracing::category; static const auto category = FormEditorTracing::category;
ResizeManipulator::ResizeManipulator(LayerItem *layerItem, FormEditorView *view) ResizeManipulator::ResizeManipulator(LayerItem *layerItem, FormEditorView *view)
: m_view(view), : m_view(view),

View File

@@ -16,7 +16,7 @@
namespace QmlDesigner { namespace QmlDesigner {
static auto category = FormEditorTracing::category; static const auto category = FormEditorTracing::category;
ResizeTool::ResizeTool(FormEditorView *editorView) ResizeTool::ResizeTool(FormEditorView *editorView)
: AbstractFormEditorTool(editorView) : AbstractFormEditorTool(editorView)

View File

@@ -16,7 +16,7 @@
namespace QmlDesigner { namespace QmlDesigner {
static auto category = FormEditorTracing::category; static const auto category = FormEditorTracing::category;
class RotationControllerData class RotationControllerData
{ {

View File

@@ -9,7 +9,7 @@
namespace QmlDesigner { namespace QmlDesigner {
static auto category = FormEditorTracing::category; static const auto category = FormEditorTracing::category;
RotationHandleItem::RotationHandleItem(QGraphicsItem *parent, const RotationController &rotationController) RotationHandleItem::RotationHandleItem(QGraphicsItem *parent, const RotationController &rotationController)
: QGraphicsItem(parent) : QGraphicsItem(parent)

View File

@@ -12,7 +12,7 @@
namespace QmlDesigner { namespace QmlDesigner {
static auto category = FormEditorTracing::category; static const auto category = FormEditorTracing::category;
RotationIndicator::RotationIndicator(LayerItem *layerItem) RotationIndicator::RotationIndicator(LayerItem *layerItem)
: m_layerItem(layerItem) : m_layerItem(layerItem)

View File

@@ -18,7 +18,7 @@
namespace QmlDesigner { namespace QmlDesigner {
static auto category = FormEditorTracing::category; static const auto category = FormEditorTracing::category;
RotationManipulator::RotationManipulator(LayerItem *layerItem, FormEditorView *view) RotationManipulator::RotationManipulator(LayerItem *layerItem, FormEditorView *view)
: m_view(view) : m_view(view)

View File

@@ -16,7 +16,7 @@
namespace QmlDesigner { namespace QmlDesigner {
static auto category = FormEditorTracing::category; static const auto category = FormEditorTracing::category;
RotationTool::RotationTool(FormEditorView *editorView) RotationTool::RotationTool(FormEditorView *editorView)
: AbstractFormEditorTool(editorView) : AbstractFormEditorTool(editorView)

View File

@@ -10,7 +10,7 @@
namespace QmlDesigner { namespace QmlDesigner {
static auto category = FormEditorTracing::category; static const auto category = FormEditorTracing::category;
RubberBandSelectionManipulator::RubberBandSelectionManipulator(LayerItem *layerItem, FormEditorView *editorView) RubberBandSelectionManipulator::RubberBandSelectionManipulator(LayerItem *layerItem, FormEditorView *editorView)
: m_selectionRectangleElement(layerItem), : m_selectionRectangleElement(layerItem),

View File

@@ -8,7 +8,7 @@
namespace QmlDesigner { namespace QmlDesigner {
static auto category = FormEditorTracing::category; static const auto category = FormEditorTracing::category;
ScaleItem::ScaleItem(LayerItem *layerItem, ScaleIndicator *indicator) ScaleItem::ScaleItem(LayerItem *layerItem, ScaleIndicator *indicator)
: QGraphicsRectItem(layerItem), : QGraphicsRectItem(layerItem),

View File

@@ -6,7 +6,7 @@
namespace QmlDesigner { namespace QmlDesigner {
static auto category = FormEditorTracing::category; static const auto category = FormEditorTracing::category;
ScaleManipulator::ScaleManipulator(LayerItem *layerItem, FormEditorItem *formEditorItem) ScaleManipulator::ScaleManipulator(LayerItem *layerItem, FormEditorItem *formEditorItem)
: m_layerItem(layerItem), : m_layerItem(layerItem),

View File

@@ -14,7 +14,7 @@
namespace QmlDesigner { namespace QmlDesigner {
static auto category = FormEditorTracing::category; static const auto category = FormEditorTracing::category;
SeekerSlider::SeekerSlider(QWidget *parent) SeekerSlider::SeekerSlider(QWidget *parent)
: QSlider(parent) : QSlider(parent)

View File

@@ -22,7 +22,7 @@
namespace QmlDesigner { namespace QmlDesigner {
static auto category = FormEditorTracing::category; static const auto category = FormEditorTracing::category;
SelectionIndicator::SelectionIndicator(LayerItem *layerItem) SelectionIndicator::SelectionIndicator(LayerItem *layerItem)
: m_layerItem(layerItem) : m_layerItem(layerItem)

View File

@@ -11,7 +11,7 @@
namespace QmlDesigner { namespace QmlDesigner {
static auto category = FormEditorTracing::category; static const auto category = FormEditorTracing::category;
SelectionRectangle::SelectionRectangle(LayerItem *layerItem) SelectionRectangle::SelectionRectangle(LayerItem *layerItem)
: m_controlShape(new QGraphicsRectItem(layerItem)), : m_controlShape(new QGraphicsRectItem(layerItem)),

View File

@@ -20,7 +20,7 @@
namespace QmlDesigner { namespace QmlDesigner {
static auto category = FormEditorTracing::category; static const auto category = FormEditorTracing::category;
const int s_startDragDistance = 20; const int s_startDragDistance = 20;
const int s_startDragTime = 50; const int s_startDragTime = 50;

View File

@@ -11,7 +11,7 @@
namespace QmlDesigner { namespace QmlDesigner {
static auto category = FormEditorTracing::category; static const auto category = FormEditorTracing::category;
SingleSelectionManipulator::SingleSelectionManipulator(FormEditorView *editorView) SingleSelectionManipulator::SingleSelectionManipulator(FormEditorView *editorView)
: m_editorView(editorView), : m_editorView(editorView),

View File

@@ -16,7 +16,7 @@
namespace QmlDesigner { namespace QmlDesigner {
static auto category = FormEditorTracing::category; static const auto category = FormEditorTracing::category;
Snapper::Snapper() Snapper::Snapper()
: m_containerFormEditorItem(nullptr), : m_containerFormEditorItem(nullptr),

View File

@@ -10,7 +10,7 @@
#include <QtDebug> #include <QtDebug>
namespace QmlDesigner { namespace QmlDesigner {
static auto category = FormEditorTracing::category; static const auto category = FormEditorTracing::category;
SnappingLineCreator::SnappingLineCreator(FormEditorItem *formEditorItem) SnappingLineCreator::SnappingLineCreator(FormEditorItem *formEditorItem)
: m_formEditorItem(formEditorItem), : m_formEditorItem(formEditorItem),

View File

@@ -15,7 +15,7 @@
namespace QmlDesigner { namespace QmlDesigner {
static auto category = FormEditorTracing::category; static const auto category = FormEditorTracing::category;
ToolBox::ToolBox(QWidget *parentWidget) ToolBox::ToolBox(QWidget *parentWidget)
: Utils::StyledBar(parentWidget) : Utils::StyledBar(parentWidget)

View File

@@ -36,7 +36,7 @@
namespace QmlDesigner { namespace QmlDesigner {
static auto category = FormEditorTracing::category; static const auto category = FormEditorTracing::category;
static bool isTransitionSource(const ModelNode &node) static bool isTransitionSource(const ModelNode &node)
{ {

View File

@@ -12,7 +12,7 @@
namespace QmlDesigner { namespace QmlDesigner {
static auto category = FormEditorTracing::category; static const auto category = FormEditorTracing::category;
View3DTool::View3DTool() View3DTool::View3DTool()
: QObject(), AbstractCustomTool() : QObject(), AbstractCustomTool()

View File

@@ -16,7 +16,7 @@
namespace QmlDesigner { namespace QmlDesigner {
static auto category = ItemLibraryTracing::category; static const auto category = ItemLibraryTracing::category;
ItemLibraryAddImportModel::ItemLibraryAddImportModel(QObject *parent) ItemLibraryAddImportModel::ItemLibraryAddImportModel(QObject *parent)
: QAbstractListModel(parent) : QAbstractListModel(parent)

View File

@@ -16,7 +16,7 @@
namespace QmlDesigner { namespace QmlDesigner {
static auto category = ItemLibraryTracing::category; static const auto category = ItemLibraryTracing::category;
ItemLibraryCategoriesModel::ItemLibraryCategoriesModel(QObject *parent) : ItemLibraryCategoriesModel::ItemLibraryCategoriesModel(QObject *parent) :
QAbstractListModel(parent) QAbstractListModel(parent)

View File

@@ -11,7 +11,7 @@
namespace QmlDesigner { namespace QmlDesigner {
static auto category = ItemLibraryTracing::category; static const auto category = ItemLibraryTracing::category;
ItemLibraryCategory::ItemLibraryCategory(const QString &groupName, QObject *parent) ItemLibraryCategory::ItemLibraryCategory(const QString &groupName, QObject *parent)
: QObject(parent), : QObject(parent),

View File

@@ -15,7 +15,7 @@
namespace QmlDesigner { namespace QmlDesigner {
static auto category = ItemLibraryTracing::category; static const auto category = ItemLibraryTracing::category;
QQuickImageResponse *ItemLibraryIconImageProvider::requestImageResponse(const QString &id, QQuickImageResponse *ItemLibraryIconImageProvider::requestImageResponse(const QString &id,
const QSize &) const QSize &)

View File

@@ -9,7 +9,7 @@
namespace QmlDesigner { namespace QmlDesigner {
static auto category = ItemLibraryTracing::category; static const auto category = ItemLibraryTracing::category;
namespace Internal { namespace Internal {

View File

@@ -7,7 +7,7 @@
namespace QmlDesigner { namespace QmlDesigner {
static auto category = ItemLibraryTracing::category; static const auto category = ItemLibraryTracing::category;
ItemLibraryImport::ItemLibraryImport(const Import &import, QObject *parent, SectionType sectionType) ItemLibraryImport::ItemLibraryImport(const Import &import, QObject *parent, SectionType sectionType)
: QObject(parent), : QObject(parent),

View File

@@ -8,7 +8,7 @@
namespace QmlDesigner { namespace QmlDesigner {
static auto category = ItemLibraryTracing::category; static const auto category = ItemLibraryTracing::category;
ItemLibraryItem::ItemLibraryItem(const ItemLibraryEntry &itemLibraryEntry, bool isUsable, QObject *parent) ItemLibraryItem::ItemLibraryItem(const ItemLibraryEntry &itemLibraryEntry, bool isUsable, QObject *parent)
: QObject(parent) : QObject(parent)

View File

@@ -11,7 +11,7 @@
namespace QmlDesigner { namespace QmlDesigner {
static auto category = ItemLibraryTracing::category; static const auto category = ItemLibraryTracing::category;
ItemLibraryItemsModel::ItemLibraryItemsModel(QObject *parent) : ItemLibraryItemsModel::ItemLibraryItemsModel(QObject *parent) :
QAbstractListModel(parent) QAbstractListModel(parent)

View File

@@ -30,7 +30,7 @@
namespace QmlDesigner { namespace QmlDesigner {
static auto category = ItemLibraryTracing::category; static const auto category = ItemLibraryTracing::category;
// sectionName can be an import url or a category name // sectionName can be an import url or a category name
void ItemLibraryModel::saveExpandedState(bool expanded, const QString &sectionName) void ItemLibraryModel::saveExpandedState(bool expanded, const QString &sectionName)

View File

@@ -26,7 +26,7 @@
namespace QmlDesigner { namespace QmlDesigner {
static auto category = ItemLibraryTracing::category; static const auto category = ItemLibraryTracing::category;
ItemLibraryView::ItemLibraryView(AsynchronousImageCache &imageCache, ItemLibraryView::ItemLibraryView(AsynchronousImageCache &imageCache,
ExternalDependenciesInterface &externalDependencies) ExternalDependenciesInterface &externalDependencies)

View File

@@ -66,7 +66,7 @@
namespace QmlDesigner { namespace QmlDesigner {
static auto category = ItemLibraryTracing::category; static const auto category = ItemLibraryTracing::category;
static QString propertyEditorResourcesPath() static QString propertyEditorResourcesPath()
{ {

View File

@@ -11,7 +11,7 @@
namespace QmlDesigner { namespace QmlDesigner {
static auto category = NavigatorTracing::category; static const auto category = NavigatorTracing::category;
// This will filter and return possible properties that the given type can be bound to // This will filter and return possible properties that the given type can be bound to
ChooseFromPropertyListFilter::ChooseFromPropertyListFilter(const NodeMetaInfo &insertInfo, ChooseFromPropertyListFilter::ChooseFromPropertyListFilter(const NodeMetaInfo &insertInfo,

View File

@@ -23,7 +23,7 @@
namespace QmlDesigner { namespace QmlDesigner {
static auto category = NavigatorTracing::category; static const auto category = NavigatorTracing::category;
IconCheckboxItemDelegate::IconCheckboxItemDelegate(QObject *parent, const QIcon &icon) IconCheckboxItemDelegate::IconCheckboxItemDelegate(QObject *parent, const QIcon &icon)
: QStyledItemDelegate(parent), : QStyledItemDelegate(parent),

View File

@@ -31,7 +31,7 @@
namespace QmlDesigner { namespace QmlDesigner {
static auto category = NavigatorTracing::category; static const auto category = NavigatorTracing::category;
int NameItemDelegate::iconOffset = 0; int NameItemDelegate::iconOffset = 0;

View File

@@ -17,7 +17,7 @@
namespace QmlDesigner { namespace QmlDesigner {
static auto category = NavigatorTracing::category; static const auto category = NavigatorTracing::category;
LineEdit::LineEdit(QWidget *parent) LineEdit::LineEdit(QWidget *parent)
: QLineEdit(parent) : QLineEdit(parent)

View File

@@ -57,7 +57,7 @@
namespace QmlDesigner { namespace QmlDesigner {
static auto category = NavigatorTracing::category; static const auto category = NavigatorTracing::category;
static QList<ModelNode> modelNodesFromMimeData(const QMimeData *mimeData, AbstractView *view) static QList<ModelNode> modelNodesFromMimeData(const QMimeData *mimeData, AbstractView *view)
{ {

View File

@@ -33,7 +33,7 @@ namespace QmlDesigner {
namespace { namespace {
auto category = NavigatorTracing::category; const auto category = NavigatorTracing::category;
// This style basically allows us to span the entire row // This style basically allows us to span the entire row
// including the arrow indicators which would otherwise not be // including the arrow indicators which would otherwise not be

View File

@@ -30,7 +30,7 @@ using namespace Core;
namespace QmlDesigner { namespace QmlDesigner {
static auto category = NavigatorTracing::category; static const auto category = NavigatorTracing::category;
NavigatorWidget::NavigatorWidget(NavigatorView *view) NavigatorWidget::NavigatorWidget(NavigatorView *view)
: m_treeView(new NavigatorTreeView) : m_treeView(new NavigatorTreeView)

View File

@@ -12,7 +12,7 @@
namespace QmlDesigner { namespace QmlDesigner {
static auto category = NavigatorTracing::category; static const auto category = NavigatorTracing::category;
PreviewToolTip::PreviewToolTip(QWidget *parent) PreviewToolTip::PreviewToolTip(QWidget *parent)
: QWidget(parent) : QWidget(parent)

View File

@@ -25,7 +25,7 @@ using namespace Utils;
namespace QmlDesigner { namespace QmlDesigner {
static auto category = PropertyEditorTracing::category; static const auto category = PropertyEditorTracing::category;
AlignDistribute::AlignDistribute(QObject *parent) AlignDistribute::AlignDistribute(QObject *parent)
: QObject(parent) : QObject(parent)

View File

@@ -23,7 +23,7 @@ namespace QmlDesigner {
QPointer<ColorPaletteBackend> ColorPaletteBackend::m_instance = nullptr; QPointer<ColorPaletteBackend> ColorPaletteBackend::m_instance = nullptr;
static auto category = PropertyEditorTracing::category; static const auto category = PropertyEditorTracing::category;
ColorPaletteBackend::ColorPaletteBackend() ColorPaletteBackend::ColorPaletteBackend()
: m_currentPalette() : m_currentPalette()

View File

@@ -12,7 +12,7 @@
namespace QmlDesigner { namespace QmlDesigner {
static auto category = PropertyEditorTracing::category; static const auto category = PropertyEditorTracing::category;
/*! /*!
* \internal * \internal

View File

@@ -7,7 +7,7 @@
namespace QmlDesigner { namespace QmlDesigner {
static auto category = PropertyEditorTracing::category; static const auto category = PropertyEditorTracing::category;
DesignerPropertyMap::DesignerPropertyMap(QObject *parent) : QQmlPropertyMap(parent) DesignerPropertyMap::DesignerPropertyMap(QObject *parent) : QQmlPropertyMap(parent)
{ {

View File

@@ -46,7 +46,7 @@
namespace QmlDesigner { namespace QmlDesigner {
static auto category = PropertyEditorTracing::category; static const auto category = PropertyEditorTracing::category;
static const int propertyNameRole = Qt::UserRole + 1; static const int propertyNameRole = Qt::UserRole + 1;
static const int propertyTypeRole = Qt::UserRole + 2; static const int propertyTypeRole = Qt::UserRole + 2;

View File

@@ -51,7 +51,7 @@ enum {
namespace QmlDesigner { namespace QmlDesigner {
static auto category = PropertyEditorTracing::category; static const auto category = PropertyEditorTracing::category;
constexpr QStringView quick3dImport{u"QtQuick3D"}; constexpr QStringView quick3dImport{u"QtQuick3D"};

View File

@@ -10,7 +10,7 @@
namespace QmlDesigner { namespace QmlDesigner {
static auto category = PropertyEditorTracing::category; static const auto category = PropertyEditorTracing::category;
PropertyEditorWidget::PropertyEditorWidget(QWidget *parent) : QStackedWidget(parent) PropertyEditorWidget::PropertyEditorWidget(QWidget *parent) : QStackedWidget(parent)
{ {

View File

@@ -39,7 +39,7 @@ namespace {
using NanotraceHR::keyValue; using NanotraceHR::keyValue;
using Storage::ModuleKind; using Storage::ModuleKind;
auto category = ModelTracing::category; const auto category = ModelTracing::category;
struct TypeDescription struct TypeDescription
{ {

View File

@@ -22,7 +22,7 @@ namespace QmlDesigner {
using namespace QmlDesigner::Internal; using namespace QmlDesigner::Internal;
using NanotraceHR::keyValue; using NanotraceHR::keyValue;
static auto category = ModelTracing::category; static const auto category = ModelTracing::category;
/*! /*!
\class QmlDesigner::ModelNode \class QmlDesigner::ModelNode

View File

@@ -5,7 +5,7 @@
namespace QmlDesigner { namespace QmlDesigner {
static auto category = ModelTracing::category; static const auto category = ModelTracing::category;
AnchorLine::AnchorLine() AnchorLine::AnchorLine()
: m_qmlItemNode(QmlItemNode()) : m_qmlItemNode(QmlItemNode())

View File

@@ -16,7 +16,7 @@ namespace QmlDesigner {
using NanotraceHR::keyValue; using NanotraceHR::keyValue;
static auto category = ModelTracing::category; static const auto category = ModelTracing::category;
bool Qml3DNode::isValid(SL sl) const bool Qml3DNode::isValid(SL sl) const
{ {

View File

@@ -11,7 +11,7 @@ namespace QmlDesigner {
using NanotraceHR::keyValue; using NanotraceHR::keyValue;
static auto category = ModelTracing::category; static const auto category = ModelTracing::category;
static PropertyName lineTypeToString(AnchorLineType lineType) static PropertyName lineTypeToString(AnchorLineType lineType)
{ {

View File

@@ -13,7 +13,7 @@ namespace QmlDesigner {
using NanotraceHR::keyValue; using NanotraceHR::keyValue;
static auto category = ModelTracing::category; static const auto category = ModelTracing::category;
ModelNode QmlModelStateOperation::target(SL sl) const ModelNode QmlModelStateOperation::target(SL sl) const
{ {

View File

@@ -11,7 +11,7 @@ namespace QmlDesigner {
using NanotraceHR::keyValue; using NanotraceHR::keyValue;
static auto category = ModelTracing::category; static const auto category = ModelTracing::category;
bool QmlConnections::isValid(SL sl) const bool QmlConnections::isValid(SL sl) const
{ {

View File

@@ -30,7 +30,7 @@ namespace QmlDesigner {
using NanotraceHR::keyValue; using NanotraceHR::keyValue;
static auto category = ModelTracing::category; static const auto category = ModelTracing::category;
bool QmlItemNode::isItemOrWindow(const ModelNode &modelNode, SL sl) bool QmlItemNode::isItemOrWindow(const ModelNode &modelNode, SL sl)
{ {

View File

@@ -8,7 +8,7 @@ namespace QmlDesigner {
using NanotraceHR::keyValue; using NanotraceHR::keyValue;
static auto category = ModelTracing::category; static const auto category = ModelTracing::category;
AbstractView *QmlModelNodeFacade::view() const AbstractView *QmlModelNodeFacade::view() const
{ {

View File

@@ -31,7 +31,7 @@ namespace QmlDesigner {
using NanotraceHR::keyValue; using NanotraceHR::keyValue;
static auto category = ModelTracing::category; static const auto category = ModelTracing::category;
void QmlObjectNode::setVariantProperty(PropertyNameView name, const QVariant &value, SL sl) void QmlObjectNode::setVariantProperty(PropertyNameView name, const QVariant &value, SL sl)
{ {

View File

@@ -17,7 +17,7 @@ namespace QmlDesigner {
using NanotraceHR::keyValue; using NanotraceHR::keyValue;
static auto category = ModelTracing::category; static const auto category = ModelTracing::category;
QmlPropertyChanges QmlModelState::propertyChanges(const ModelNode &node, SL sl) QmlPropertyChanges QmlModelState::propertyChanges(const ModelNode &node, SL sl)
{ {

View File

@@ -19,7 +19,7 @@ namespace QmlDesigner {
using NanotraceHR::keyValue; using NanotraceHR::keyValue;
static auto category = ModelTracing::category; static const auto category = ModelTracing::category;
bool QmlTimeline::isValid(SL sl) const bool QmlTimeline::isValid(SL sl) const
{ {

View File

@@ -20,7 +20,7 @@ namespace QmlDesigner {
using NanotraceHR::keyValue; using NanotraceHR::keyValue;
static auto category = ModelTracing::category; static const auto category = ModelTracing::category;
bool QmlTimelineKeyframeGroup::isValid(SL sl) const bool QmlTimelineKeyframeGroup::isValid(SL sl) const
{ {

View File

@@ -31,7 +31,7 @@ namespace QmlDesigner {
using NanotraceHR::keyValue; using NanotraceHR::keyValue;
static auto category = ModelTracing::category; static const auto category = ModelTracing::category;
static char imagePlaceHolder[] = "qrc:/qtquickplugin/images/template_image.png"; static char imagePlaceHolder[] = "qrc:/qtquickplugin/images/template_image.png";