QmlDesigner: Remove tracing category function pointer

Change-Id: I340ea2e0e413471b8d1f2f9c3c4c1bb9b42966da
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Marco Bubke
2025-06-18 00:02:29 +02:00
parent 413722895a
commit e938d3ddc1
111 changed files with 165 additions and 156 deletions

View File

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

View File

@@ -19,7 +19,7 @@
namespace QmlDesigner { namespace QmlDesigner {
static const auto category = FormEditorTracing::category; using 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 const auto category = FormEditorTracing::category; using 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 const auto category = FormEditorTracing::category; using 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 const auto category = FormEditorTracing::category; using 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 const auto category = FormEditorTracing::category; using 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 const auto category = FormEditorTracing::category; using 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 const auto category = FormEditorTracing::category; using 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 const auto category = FormEditorTracing::category; using 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 const auto category = FormEditorTracing::category; using 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 const auto category = FormEditorTracing::category; using 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 const auto category = FormEditorTracing::category; using FormEditorTracing::category;
FormEditorScene *FormEditorItem::scene() const { FormEditorScene *FormEditorItem::scene() const {
return qobject_cast<FormEditorScene*>(QGraphicsItem::scene()); return qobject_cast<FormEditorScene*>(QGraphicsItem::scene());

View File

@@ -33,7 +33,7 @@ namespace QmlDesigner {
using NanotraceHR::keyValue; using NanotraceHR::keyValue;
static const auto category = FormEditorTracing::category; using 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 const auto category = FormEditorTracing::category; using 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"};
const auto category = FormEditorTracing::category; using 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"};
const auto category = FormEditorTracing::category; using FormEditorTracing::category;
} }
FormEditorWidget::FormEditorWidget(FormEditorView *view) FormEditorWidget::FormEditorWidget(FormEditorView *view)

View File

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

View File

@@ -9,7 +9,7 @@
namespace QmlDesigner { namespace QmlDesigner {
static const auto category = FormEditorTracing::category; using 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 const auto category = FormEditorTracing::category; using 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 const auto category = FormEditorTracing::category; using 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 const auto category = FormEditorTracing::category; using 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 const auto category = FormEditorTracing::category; using FormEditorTracing::category;
class ResizeControllerData class ResizeControllerData
{ {

View File

@@ -9,7 +9,7 @@
namespace QmlDesigner { namespace QmlDesigner {
static const auto category = FormEditorTracing::category; using 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 const auto category = FormEditorTracing::category; using 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 const auto category = FormEditorTracing::category; using 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 const auto category = FormEditorTracing::category; using 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 const auto category = FormEditorTracing::category; using FormEditorTracing::category;
class RotationControllerData class RotationControllerData
{ {

View File

@@ -9,7 +9,7 @@
namespace QmlDesigner { namespace QmlDesigner {
static const auto category = FormEditorTracing::category; using 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 const auto category = FormEditorTracing::category; using 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 const auto category = FormEditorTracing::category; using 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 const auto category = FormEditorTracing::category; using 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 const auto category = FormEditorTracing::category; using 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 const auto category = FormEditorTracing::category; using 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 const auto category = FormEditorTracing::category; using 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 const auto category = FormEditorTracing::category; using 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 const auto category = FormEditorTracing::category; using 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 const auto category = FormEditorTracing::category; using 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 const auto category = FormEditorTracing::category; using 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 const auto category = FormEditorTracing::category; using 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 const auto category = FormEditorTracing::category; using 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 const auto category = FormEditorTracing::category; using 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 const auto category = FormEditorTracing::category; using FormEditorTracing::category;
ToolBox::ToolBox(QWidget *parentWidget) ToolBox::ToolBox(QWidget *parentWidget)
: Utils::StyledBar(parentWidget) : Utils::StyledBar(parentWidget)

View File

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

View File

@@ -16,7 +16,7 @@
namespace QmlDesigner { namespace QmlDesigner {
static const auto category = ItemLibraryTracing::category; using 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 const auto category = ItemLibraryTracing::category; using 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 const auto category = ItemLibraryTracing::category; using 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 const auto category = ItemLibraryTracing::category; using 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 const auto category = ItemLibraryTracing::category; using ItemLibraryTracing::category;
namespace Internal { namespace Internal {

View File

@@ -7,7 +7,7 @@
namespace QmlDesigner { namespace QmlDesigner {
static const auto category = ItemLibraryTracing::category; using 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 const auto category = ItemLibraryTracing::category; using 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 const auto category = ItemLibraryTracing::category; using 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 const auto category = ItemLibraryTracing::category; using 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 const auto category = ItemLibraryTracing::category; using 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 const auto category = ItemLibraryTracing::category; using ItemLibraryTracing::category;
static QString propertyEditorResourcesPath() static QString propertyEditorResourcesPath()
{ {

View File

@@ -11,7 +11,7 @@
namespace QmlDesigner { namespace QmlDesigner {
static const auto category = NavigatorTracing::category; using 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 const auto category = NavigatorTracing::category; using 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 const auto category = NavigatorTracing::category; using NavigatorTracing::category;
int NameItemDelegate::iconOffset = 0; int NameItemDelegate::iconOffset = 0;

View File

@@ -17,7 +17,7 @@
namespace QmlDesigner { namespace QmlDesigner {
static const auto category = NavigatorTracing::category; using 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 const auto category = NavigatorTracing::category; using 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 {
const auto category = NavigatorTracing::category; using 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

@@ -43,7 +43,7 @@
#include <QPixmap> #include <QPixmap>
#include <QTimer> #include <QTimer>
static auto category = QmlDesigner::NavigatorTracing::category; using QmlDesigner::NavigatorTracing::category;
inline static void setScenePos(const QmlDesigner::ModelNode &modelNode, const QPointF &pos) inline static void setScenePos(const QmlDesigner::ModelNode &modelNode, const QPointF &pos)
{ {

View File

@@ -30,7 +30,7 @@ using namespace Core;
namespace QmlDesigner { namespace QmlDesigner {
static const auto category = NavigatorTracing::category; using 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 const auto category = NavigatorTracing::category; using 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 const auto category = PropertyEditorTracing::category; using 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 const auto category = PropertyEditorTracing::category; using PropertyEditorTracing::category;
ColorPaletteBackend::ColorPaletteBackend() ColorPaletteBackend::ColorPaletteBackend()
: m_currentPalette() : m_currentPalette()

View File

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

View File

@@ -7,7 +7,7 @@
namespace QmlDesigner { namespace QmlDesigner {
static const auto category = PropertyEditorTracing::category; using 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 const auto category = PropertyEditorTracing::category; using 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

@@ -20,7 +20,7 @@
static QString s_lastBrowserPath; static QString s_lastBrowserPath;
static auto category = QmlDesigner::PropertyEditorTracing::category; using QmlDesigner::PropertyEditorTracing::category;
FileResourcesModel::FileResourcesModel(QObject *parent) FileResourcesModel::FileResourcesModel(QObject *parent)
: QObject(parent) : QObject(parent)

View File

@@ -33,7 +33,7 @@ using namespace Qt::Literals::StringLiterals;
namespace { namespace {
auto category = QmlDesigner::PropertyEditorTracing::category; using QmlDesigner::PropertyEditorTracing::category;
QStringList makeFontFilesFilterList() QStringList makeFontFilesFilterList()
{ {

View File

@@ -24,7 +24,7 @@
namespace { namespace {
auto category = QmlDesigner::PropertyEditorTracing::category; using QmlDesigner::PropertyEditorTracing::category;
constexpr auto widthBinding = [](const QStringView nodeName) -> QString { constexpr auto widthBinding = [](const QStringView nodeName) -> QString {
return QString("%1.width").arg(nodeName); return QString("%1.width").arg(nodeName);

View File

@@ -17,7 +17,7 @@
namespace { namespace {
auto category = QmlDesigner::PropertyEditorTracing::category; using QmlDesigner::PropertyEditorTracing::category;
const char settingsKey[] = "GradientPresetCustomList"; const char settingsKey[] = "GradientPresetCustomList";
const char settingsFileName[] = "GradientPresets.ini"; const char settingsFileName[] = "GradientPresets.ini";

View File

@@ -10,7 +10,7 @@
#include <QDebug> #include <QDebug>
#include <QFile> #include <QFile>
static auto category = QmlDesigner::PropertyEditorTracing::category; using QmlDesigner::PropertyEditorTracing::category;
GradientPresetDefaultListModel::GradientPresetDefaultListModel(QObject *parent) GradientPresetDefaultListModel::GradientPresetDefaultListModel(QObject *parent)
: GradientPresetListModel(parent) : GradientPresetListModel(parent)

View File

@@ -15,7 +15,7 @@
#include <algorithm> #include <algorithm>
static auto category = QmlDesigner::PropertyEditorTracing::category; using QmlDesigner::PropertyEditorTracing::category;
GradientPresetItem::GradientPresetItem() GradientPresetItem::GradientPresetItem()
: m_gradientVal(QGradient()) : m_gradientVal(QGradient())

View File

@@ -9,7 +9,7 @@
#include <QByteArray> #include <QByteArray>
#include <QDebug> #include <QDebug>
static auto category = QmlDesigner::PropertyEditorTracing::category; using QmlDesigner::PropertyEditorTracing::category;
GradientPresetListModel::GradientPresetListModel(QObject *parent) GradientPresetListModel::GradientPresetListModel(QObject *parent)
: QAbstractListModel(parent) : QAbstractListModel(parent)

View File

@@ -7,7 +7,7 @@
#include <abstractview.h> #include <abstractview.h>
#include <QTimer> #include <QTimer>
static auto category = QmlDesigner::PropertyEditorTracing::category; using QmlDesigner::PropertyEditorTracing::category;
constexpr QByteArrayView instanceImageRequestId = "PropertyEditor.InstanceImage_"; constexpr QByteArrayView instanceImageRequestId = "PropertyEditor.InstanceImage_";

View File

@@ -17,7 +17,7 @@
using namespace QmlDesigner; using namespace QmlDesigner;
static auto category = QmlDesigner::PropertyEditorTracing::category; using QmlDesigner::PropertyEditorTracing::category;
ItemFilterModel::ItemFilterModel(QObject *parent) ItemFilterModel::ItemFilterModel(QObject *parent)
: QAbstractListModel(parent) : QAbstractListModel(parent)

View File

@@ -5,7 +5,7 @@
#include "propertyeditortracing.h" #include "propertyeditortracing.h"
static auto category = QmlDesigner::PropertyEditorTracing::category; using QmlDesigner::PropertyEditorTracing::category;
ListValidator::ListValidator(QObject *parent) ListValidator::ListValidator(QObject *parent)
: QValidator{parent} : QValidator{parent}

View File

@@ -40,7 +40,7 @@
namespace QmlDesigner { namespace QmlDesigner {
using namespace Qt::StringLiterals; using namespace Qt::StringLiterals;
static auto category = QmlDesigner::PropertyEditorTracing::category; using QmlDesigner::PropertyEditorTracing::category;
static Q_LOGGING_CATEGORY(urlSpecifics, "qtc.propertyeditor.specifics", QtWarningMsg) static Q_LOGGING_CATEGORY(urlSpecifics, "qtc.propertyeditor.specifics", QtWarningMsg)

View File

@@ -33,7 +33,7 @@
namespace QmlDesigner { namespace QmlDesigner {
static auto category = QmlDesigner::PropertyEditorTracing::category; using QmlDesigner::PropertyEditorTracing::category;
PropertyEditorDynamicPropertiesProxyModel::PropertyEditorDynamicPropertiesProxyModel(QObject *parent) PropertyEditorDynamicPropertiesProxyModel::PropertyEditorDynamicPropertiesProxyModel(QObject *parent)
: DynamicPropertiesProxyModel(parent) : DynamicPropertiesProxyModel(parent)

View File

@@ -52,7 +52,7 @@
#include <tuple> #include <tuple>
static auto category = QmlDesigner::PropertyEditorTracing::category; using QmlDesigner::PropertyEditorTracing::category;
static Q_LOGGING_CATEGORY(propertyEditorBenchmark, "qtc.propertyeditor.load", QtWarningMsg) static Q_LOGGING_CATEGORY(propertyEditorBenchmark, "qtc.propertyeditor.load", QtWarningMsg)

View File

@@ -11,7 +11,7 @@
namespace QmlDesigner { namespace QmlDesigner {
static auto category = QmlDesigner::PropertyEditorTracing::category; using QmlDesigner::PropertyEditorTracing::category;
PropertyEditorTransaction::PropertyEditorTransaction(QmlDesigner::PropertyEditorView *propertyEditor) : QObject(propertyEditor), m_propertyEditor(propertyEditor), m_timerId(-1) PropertyEditorTransaction::PropertyEditorTransaction(QmlDesigner::PropertyEditorView *propertyEditor) : QObject(propertyEditor), m_propertyEditor(propertyEditor), m_timerId(-1)
{ {

View File

@@ -9,7 +9,7 @@ namespace QmlDesigner {
namespace PropertyEditorUtils { namespace PropertyEditorUtils {
static auto category = QmlDesigner::PropertyEditorTracing::category; using QmlDesigner::PropertyEditorTracing::category;
#ifndef QDS_USE_PROJECTSTORAGE #ifndef QDS_USE_PROJECTSTORAGE

View File

@@ -30,7 +30,7 @@
namespace QmlDesigner { namespace QmlDesigner {
static auto category = QmlDesigner::PropertyEditorTracing::category; using QmlDesigner::PropertyEditorTracing::category;
PropertyEditorValue::PropertyEditorValue(QObject *parent) PropertyEditorValue::PropertyEditorValue(QObject *parent)
: QObject(parent), : QObject(parent),

View File

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

View File

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

View File

@@ -9,7 +9,7 @@
#include <QRegularExpression> #include <QRegularExpression>
static auto category = QmlDesigner::PropertyEditorTracing::category; using QmlDesigner::PropertyEditorTracing::category;
PropertyNameValidator::PropertyNameValidator(QObject *parent) PropertyNameValidator::PropertyNameValidator(QObject *parent)
: QValidator(parent) : QValidator(parent)

View File

@@ -25,7 +25,7 @@ class NodeState;
namespace { namespace {
static auto category = QmlDesigner::PropertyEditorTracing::category; using QmlDesigner::PropertyEditorTracing::category;
const Utils::SmallString auxDataString("anchors_"); const Utils::SmallString auxDataString("anchors_");

View File

@@ -16,7 +16,7 @@
namespace QmlDesigner { namespace QmlDesigner {
static auto category = QmlDesigner::PropertyEditorTracing::category; using QmlDesigner::PropertyEditorTracing::category;
using namespace Qt::StringLiterals; using namespace Qt::StringLiterals;

View File

@@ -18,7 +18,7 @@
namespace QmlDesigner { namespace QmlDesigner {
static auto category = QmlDesigner::PropertyEditorTracing::category; using QmlDesigner::PropertyEditorTracing::category;
QmlModelNodeProxy::QmlModelNodeProxy(QObject *parent) : QmlModelNodeProxy::QmlModelNodeProxy(QObject *parent) :
QObject(parent) QObject(parent)

View File

@@ -15,7 +15,7 @@
namespace QmlDesigner { namespace QmlDesigner {
static auto category = QmlDesigner::PropertyEditorTracing::category; using QmlDesigner::PropertyEditorTracing::category;
using namespace Qt::StringLiterals; using namespace Qt::StringLiterals;

View File

@@ -39,7 +39,7 @@
namespace QmlDesigner { namespace QmlDesigner {
static auto category = QmlDesigner::PropertyEditorTracing::category; using QmlDesigner::PropertyEditorTracing::category;
Quick2PropertyEditorView::Quick2PropertyEditorView(AsynchronousImageCache &imageCache) Quick2PropertyEditorView::Quick2PropertyEditorView(AsynchronousImageCache &imageCache)
: QQuickWidget() : QQuickWidget()

View File

@@ -11,7 +11,7 @@
#include <QtWidgets/qtwidgetsglobal.h> #include <QtWidgets/qtwidgetsglobal.h>
#include <qtooltip.h> #include <qtooltip.h>
static auto category = QmlDesigner::PropertyEditorTracing::category; using QmlDesigner::PropertyEditorTracing::category;
Tooltip::Tooltip(QObject *parent) Tooltip::Tooltip(QObject *parent)
: QObject(parent) : QObject(parent)

View File

@@ -39,7 +39,7 @@ namespace {
using NanotraceHR::keyValue; using NanotraceHR::keyValue;
using Storage::ModuleKind; using Storage::ModuleKind;
const auto category = ModelTracing::category; using 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 const auto category = ModelTracing::category; using ModelTracing::category;
/*! /*!
\class QmlDesigner::ModelNode \class QmlDesigner::ModelNode

View File

@@ -12,7 +12,7 @@ using NanotraceHR::keyValue;
namespace { namespace {
auto category = ProjectStorageTracing::projectStorageCategory; using ProjectStorageTracing::projectStorageCategory;
} // namespace } // namespace
@@ -20,7 +20,7 @@ TypeHasInvalidSourceId::TypeHasInvalidSourceId(const Sqlite::source_location &lo
: ProjectStorageError{location} : ProjectStorageError{location}
{ {
category().threadEvent("TypeHasInvalidSourceId"); projectStorageCategory().threadEvent("TypeHasInvalidSourceId");
} }
const char *TypeHasInvalidSourceId::what() const noexcept const char *TypeHasInvalidSourceId::what() const noexcept
@@ -32,7 +32,7 @@ ModuleDoesNotExists::ModuleDoesNotExists(const Sqlite::source_location &location
: ProjectStorageError{location} : ProjectStorageError{location}
{ {
category().threadEvent("ModuleDoesNotExists"); projectStorageCategory().threadEvent("ModuleDoesNotExists");
} }
const char *ModuleDoesNotExists::what() const noexcept const char *ModuleDoesNotExists::what() const noexcept
@@ -44,7 +44,7 @@ ModuleAlreadyExists::ModuleAlreadyExists(const Sqlite::source_location &location
: ProjectStorageError{location} : ProjectStorageError{location}
{ {
category().threadEvent("ModuleAlreadyExists"); projectStorageCategory().threadEvent("ModuleAlreadyExists");
} }
const char *ModuleAlreadyExists::what() const noexcept const char *ModuleAlreadyExists::what() const noexcept
@@ -61,16 +61,16 @@ TypeNameDoesNotExists::TypeNameDoesNotExists(std::string_view typeName,
{"type: ", typeName, ", source id: ", Utils::SmallString::number(sourceId.internalId())}), {"type: ", typeName, ", source id: ", Utils::SmallString::number(sourceId.internalId())}),
location} location}
{ {
category().threadEvent("TypeNameDoesNotExists", projectStorageCategory().threadEvent("TypeNameDoesNotExists",
keyValue("type name", typeName), keyValue("type name", typeName),
keyValue("source id", sourceId)); keyValue("source id", sourceId));
} }
PrototypeChainCycle::PrototypeChainCycle(const Sqlite::source_location &location) PrototypeChainCycle::PrototypeChainCycle(const Sqlite::source_location &location)
: ProjectStorageError{location} : ProjectStorageError{location}
{ {
category().threadEvent("PrototypeChainCycle"); projectStorageCategory().threadEvent("PrototypeChainCycle");
} }
const char *PrototypeChainCycle::what() const noexcept const char *PrototypeChainCycle::what() const noexcept
@@ -82,7 +82,7 @@ AliasChainCycle::AliasChainCycle(const Sqlite::source_location &location)
: ProjectStorageError{location} : ProjectStorageError{location}
{ {
category().threadEvent("AliasChainCycle"); projectStorageCategory().threadEvent("AliasChainCycle");
} }
const char *AliasChainCycle::what() const noexcept const char *AliasChainCycle::what() const noexcept
@@ -94,7 +94,7 @@ CannotParseQmlTypesFile::CannotParseQmlTypesFile(const Sqlite::source_location &
: ProjectStorageError{location} : ProjectStorageError{location}
{ {
category().threadEvent("CannotParseQmlTypesFile"); projectStorageCategory().threadEvent("CannotParseQmlTypesFile");
} }
const char *CannotParseQmlTypesFile::what() const noexcept const char *CannotParseQmlTypesFile::what() const noexcept
@@ -106,7 +106,7 @@ CannotParseQmlDocumentFile::CannotParseQmlDocumentFile(const Sqlite::source_loca
: ProjectStorageError{location} : ProjectStorageError{location}
{ {
category().threadEvent("CannotParseQmlDocumentFile"); projectStorageCategory().threadEvent("CannotParseQmlDocumentFile");
} }
const char *CannotParseQmlDocumentFile::what() const noexcept const char *CannotParseQmlDocumentFile::what() const noexcept
@@ -119,7 +119,7 @@ DirectoryInfoHasInvalidProjectSourceId::DirectoryInfoHasInvalidProjectSourceId(
: ProjectStorageError{location} : ProjectStorageError{location}
{ {
category().threadEvent("DirectoryInfoHasInvalidProjectSourceId"); projectStorageCategory().threadEvent("DirectoryInfoHasInvalidProjectSourceId");
} }
const char *DirectoryInfoHasInvalidProjectSourceId::what() const noexcept const char *DirectoryInfoHasInvalidProjectSourceId::what() const noexcept
@@ -131,7 +131,7 @@ DirectoryInfoHasInvalidSourceId::DirectoryInfoHasInvalidSourceId(const Sqlite::s
: ProjectStorageError{location} : ProjectStorageError{location}
{ {
category().threadEvent("DirectoryInfoHasInvalidSourceId"); projectStorageCategory().threadEvent("DirectoryInfoHasInvalidSourceId");
} }
const char *DirectoryInfoHasInvalidSourceId::what() const noexcept const char *DirectoryInfoHasInvalidSourceId::what() const noexcept
@@ -143,7 +143,7 @@ DirectoryInfoHasInvalidModuleId::DirectoryInfoHasInvalidModuleId(const Sqlite::s
: ProjectStorageError{location} : ProjectStorageError{location}
{ {
category().threadEvent("DirectoryInfoHasInvalidModuleId"); projectStorageCategory().threadEvent("DirectoryInfoHasInvalidModuleId");
} }
const char *DirectoryInfoHasInvalidModuleId::what() const noexcept const char *DirectoryInfoHasInvalidModuleId::what() const noexcept
@@ -155,7 +155,7 @@ FileStatusHasInvalidSourceId::FileStatusHasInvalidSourceId(const Sqlite::source_
: ProjectStorageError{location} : ProjectStorageError{location}
{ {
category().threadEvent("FileStatusHasInvalidSourceId"); projectStorageCategory().threadEvent("FileStatusHasInvalidSourceId");
} }
const char *FileStatusHasInvalidSourceId::what() const noexcept const char *FileStatusHasInvalidSourceId::what() const noexcept
@@ -188,13 +188,14 @@ ExportedTypeCannotBeInserted::ExportedTypeCannotBeInserted(std::string_view erro
const Sqlite::source_location &location) const Sqlite::source_location &location)
: ProjectStorageErrorWithMessage{"ExportedTypeCannotBeInserted"sv, errorMessage, location} : ProjectStorageErrorWithMessage{"ExportedTypeCannotBeInserted"sv, errorMessage, location}
{ {
category().threadEvent("ExportedTypeCannotBeInserted", keyValue("error message", errorMessage)); projectStorageCategory().threadEvent("ExportedTypeCannotBeInserted",
keyValue("error message", errorMessage));
} }
TypeAnnotationHasInvalidSourceId::TypeAnnotationHasInvalidSourceId(const Sqlite::source_location &location) TypeAnnotationHasInvalidSourceId::TypeAnnotationHasInvalidSourceId(const Sqlite::source_location &location)
: ProjectStorageError{location} : ProjectStorageError{location}
{ {
category().threadEvent("TypeAnnotationHasInvalidSourceId"); projectStorageCategory().threadEvent("TypeAnnotationHasInvalidSourceId");
} }
const char *TypeAnnotationHasInvalidSourceId::what() const noexcept const char *TypeAnnotationHasInvalidSourceId::what() const noexcept

View File

@@ -28,8 +28,8 @@
#include <functional> #include <functional>
namespace QmlDesigner { namespace QmlDesigner {
constexpr auto category = ProjectStorageTracing::projectStorageUpdaterCategory;
using NanotraceHR::keyValue; using NanotraceHR::keyValue;
using ProjectStorageTracing::projectStorageUpdaterCategory;
using Tracer = NanotraceHR::Tracer<ProjectStorageTracing::Category>; using Tracer = NanotraceHR::Tracer<ProjectStorageTracing::Category>;
template<typename String> template<typename String>
@@ -205,7 +205,7 @@ void addModuleExportedImport(Storage::Synchronization::ModuleExportedImports &im
std::string_view exportedModuleName) std::string_view exportedModuleName)
{ {
NanotraceHR::Tracer tracer{"add module exported imports", NanotraceHR::Tracer tracer{"add module exported imports",
category(), projectStorageUpdaterCategory(),
keyValue("module id", moduleId), keyValue("module id", moduleId),
keyValue("exported module id", exportedModuleId), keyValue("exported module id", exportedModuleId),
keyValue("version", version), keyValue("version", version),
@@ -231,7 +231,7 @@ void addModuleExportedImports(Storage::Synchronization::ModuleExportedImports &i
ProjectStorageInterface &projectStorage) ProjectStorageInterface &projectStorage)
{ {
NanotraceHR::Tracer tracer{"add module exported imports", NanotraceHR::Tracer tracer{"add module exported imports",
category(), projectStorageUpdaterCategory(),
keyValue("cpp module id", cppModuleId), keyValue("cpp module id", cppModuleId),
keyValue("module id", moduleId)}; keyValue("module id", moduleId)};
@@ -294,7 +294,7 @@ void ProjectStorageUpdater::update(Update update)
const Utils::PathString projectDirectory = update.projectDirectory; const Utils::PathString projectDirectory = update.projectDirectory;
NanotraceHR::Tracer tracer{"update", NanotraceHR::Tracer tracer{"update",
category(), projectStorageUpdaterCategory(),
keyValue("Qt directories", qtDirectories), keyValue("Qt directories", qtDirectories),
keyValue("project directory", projectDirectory)}; keyValue("project directory", projectDirectory)};
@@ -516,7 +516,7 @@ void ProjectStorageUpdater::updateDirectories(const QStringList &directories,
NotUpdatedSourceIds &notUpdatedSourceIds, NotUpdatedSourceIds &notUpdatedSourceIds,
WatchedSourceIds &watchedSourceIds) WatchedSourceIds &watchedSourceIds)
{ {
NanotraceHR::Tracer tracer{"update directories", category()}; NanotraceHR::Tracer tracer{"update directories", projectStorageUpdaterCategory()};
for (const QString &directory : directories) for (const QString &directory : directories)
updateDirectory( updateDirectory(
@@ -624,7 +624,7 @@ void ProjectStorageUpdater::annotationDirectoryChanged(
Storage::Synchronization::SynchronizationPackage &package) Storage::Synchronization::SynchronizationPackage &package)
{ {
NanotraceHR::Tracer tracer{"annotation directory changed", NanotraceHR::Tracer tracer{"annotation directory changed",
category(), projectStorageUpdaterCategory(),
keyValue("directory path", directoryPath), keyValue("directory path", directoryPath),
keyValue("directory id", directoryId)}; keyValue("directory id", directoryId)};
@@ -640,7 +640,7 @@ void ProjectStorageUpdater::updatePropertyEditorFiles(
Storage::Synchronization::SynchronizationPackage &package) Storage::Synchronization::SynchronizationPackage &package)
{ {
NanotraceHR::Tracer tracer{"update property editor files", NanotraceHR::Tracer tracer{"update property editor files",
category(), projectStorageUpdaterCategory(),
keyValue("directory path", directoryPath), keyValue("directory path", directoryPath),
keyValue("directory id", directoryId)}; keyValue("directory id", directoryId)};
@@ -676,7 +676,9 @@ void ProjectStorageUpdater::updateDirectory(const Utils::PathString &directoryPa
WatchedSourceIds &watchedSourceIds, WatchedSourceIds &watchedSourceIds,
IsInsideProject isInsideProject) IsInsideProject isInsideProject)
{ {
NanotraceHR::Tracer tracer{"update directory", category(), keyValue("directory", directoryPath)}; NanotraceHR::Tracer tracer{"update directory",
projectStorageUpdaterCategory(),
keyValue("directory", directoryPath)};
SourcePath qmldirPath{directoryPath + "/qmldir"}; SourcePath qmldirPath{directoryPath + "/qmldir"};
SourceId qmldirSourceId = m_pathCache.sourceId(qmldirPath); SourceId qmldirSourceId = m_pathCache.sourceId(qmldirPath);
@@ -764,7 +766,7 @@ void ProjectStorageUpdater::updatePropertyEditorPaths(
NotUpdatedSourceIds &notUpdatedSourceIds) NotUpdatedSourceIds &notUpdatedSourceIds)
{ {
NanotraceHR::Tracer tracer{"update property editor paths", NanotraceHR::Tracer tracer{"update property editor paths",
category(), projectStorageUpdaterCategory(),
keyValue("property editor resources path", propertyEditorResourcesPath)}; keyValue("property editor resources path", propertyEditorResourcesPath)};
if (propertyEditorResourcesPath.isEmpty()) if (propertyEditorResourcesPath.isEmpty())
@@ -808,7 +810,7 @@ void ProjectStorageUpdater::updateTypeAnnotations(const QStringList &directoryPa
Storage::Synchronization::SynchronizationPackage &package, Storage::Synchronization::SynchronizationPackage &package,
NotUpdatedSourceIds &notUpdatedSourceIds) NotUpdatedSourceIds &notUpdatedSourceIds)
{ {
NanotraceHR::Tracer tracer("update type annotations", category()); NanotraceHR::Tracer tracer("update type annotations", projectStorageUpdaterCategory());
std::map<DirectoryPathId, SmallSourceIds<16>> updatedSourceIdsDictonary; std::map<DirectoryPathId, SmallSourceIds<16>> updatedSourceIdsDictonary;
@@ -828,7 +830,7 @@ void ProjectStorageUpdater::updateTypeAnnotations(
std::map<DirectoryPathId, SmallSourceIds<16>> &updatedSourceIdsDictonary) std::map<DirectoryPathId, SmallSourceIds<16>> &updatedSourceIdsDictonary)
{ {
NanotraceHR::Tracer tracer("update type annotation directory", NanotraceHR::Tracer tracer("update type annotation directory",
category(), projectStorageUpdaterCategory(),
keyValue("path", rootDirectoryPath)); keyValue("path", rootDirectoryPath));
if (rootDirectoryPath.isEmpty()) if (rootDirectoryPath.isEmpty())
@@ -902,7 +904,7 @@ void ProjectStorageUpdater::updateTypeAnnotation(const QString &directoryPath,
Storage::Synchronization::SynchronizationPackage &package) Storage::Synchronization::SynchronizationPackage &package)
{ {
NanotraceHR::Tracer tracer{"update type annotation path", NanotraceHR::Tracer tracer{"update type annotation path",
category(), projectStorageUpdaterCategory(),
keyValue("path", filePath), keyValue("path", filePath),
keyValue("directory path", directoryPath)}; keyValue("directory path", directoryPath)};
@@ -925,7 +927,7 @@ void ProjectStorageUpdater::updatePropertyEditorPath(
long long pathOffset) long long pathOffset)
{ {
NanotraceHR::Tracer tracer{"update property editor path", NanotraceHR::Tracer tracer{"update property editor path",
category(), projectStorageUpdaterCategory(),
keyValue("directory path", directoryPath), keyValue("directory path", directoryPath),
keyValue("directory id", directoryId)}; keyValue("directory id", directoryId)};
@@ -945,7 +947,7 @@ void ProjectStorageUpdater::updatePropertyEditorFilePath(
long long pathOffset) long long pathOffset)
{ {
NanotraceHR::Tracer tracer{"update property editor file path", NanotraceHR::Tracer tracer{"update property editor file path",
category(), projectStorageUpdaterCategory(),
keyValue("directory path", path), keyValue("directory path", path),
keyValue("directory id", directoryId)}; keyValue("directory id", directoryId)};
@@ -1036,7 +1038,7 @@ void appendProjectChunkSourceIds(ProjectChunkSourceIds &ids,
void ProjectStorageUpdater::pathsWithIdsChanged(const std::vector<IdPaths> &changedIdPaths) void ProjectStorageUpdater::pathsWithIdsChanged(const std::vector<IdPaths> &changedIdPaths)
{ {
NanotraceHR::Tracer tracer{"paths with ids changed", NanotraceHR::Tracer tracer{"paths with ids changed",
category(), projectStorageUpdaterCategory(),
keyValue("id paths", changedIdPaths)}; keyValue("id paths", changedIdPaths)};
try { try {
@@ -1163,13 +1165,15 @@ void ProjectStorageUpdater::parseTypeInfos(const QStringList &typeInfos,
IsInsideProject isInsideProject) IsInsideProject isInsideProject)
{ {
NanotraceHR::Tracer tracer{"parse type infos", NanotraceHR::Tracer tracer{"parse type infos",
category(), projectStorageUpdaterCategory(),
keyValue("directory id", directoryId), keyValue("directory id", directoryId),
keyValue("directory path", directoryPath), keyValue("directory path", directoryPath),
keyValue("module id", moduleId)}; keyValue("module id", moduleId)};
for (const QString &typeInfo : typeInfos) { for (const QString &typeInfo : typeInfos) {
NanotraceHR::Tracer tracer{"parse type info", category(), keyValue("type info", typeInfo)}; NanotraceHR::Tracer tracer{"parse type info",
projectStorageUpdaterCategory(),
keyValue("type info", typeInfo)};
Utils::PathString qmltypesFileName = typeInfo; Utils::PathString qmltypesFileName = typeInfo;
SourceId sourceId = m_pathCache.sourceId(directoryId, qmltypesFileName); SourceId sourceId = m_pathCache.sourceId(directoryId, qmltypesFileName);
@@ -1212,7 +1216,7 @@ void ProjectStorageUpdater::parseDirectoryInfos(
WatchedSourceIds &watchedSourceIds, WatchedSourceIds &watchedSourceIds,
IsInsideProject isInsideProject) IsInsideProject isInsideProject)
{ {
NanotraceHR::Tracer tracer{"parse project datas", category()}; NanotraceHR::Tracer tracer{"parse project datas", projectStorageUpdaterCategory()};
for (const Storage::Synchronization::DirectoryInfo &directoryInfo : directoryInfos) { for (const Storage::Synchronization::DirectoryInfo &directoryInfo : directoryInfos) {
switch (directoryInfo.fileType) { switch (directoryInfo.fileType) {
@@ -1241,7 +1245,9 @@ auto ProjectStorageUpdater::parseTypeInfo(const Storage::Synchronization::Direct
NotUpdatedSourceIds &notUpdatedSourceIds, NotUpdatedSourceIds &notUpdatedSourceIds,
IsInsideProject isInsideProject) -> FileState IsInsideProject isInsideProject) -> FileState
{ {
NanotraceHR::Tracer tracer{"parse type info", category(), keyValue("qmltypes path", qmltypesPath)}; NanotraceHR::Tracer tracer{"parse type info",
projectStorageUpdaterCategory(),
keyValue("qmltypes path", qmltypesPath)};
auto state = fileState(directoryInfo.sourceId, package, notUpdatedSourceIds); auto state = fileState(directoryInfo.sourceId, package, notUpdatedSourceIds);
switch (state) { switch (state) {
@@ -1287,7 +1293,7 @@ void ProjectStorageUpdater::parseQmlComponent(Utils::SmallStringView relativeFil
IsInsideProject isInsideProject) IsInsideProject isInsideProject)
{ {
NanotraceHR::Tracer tracer{"parse qml component", NanotraceHR::Tracer tracer{"parse qml component",
category(), projectStorageUpdaterCategory(),
keyValue("relative file path", relativeFilePath), keyValue("relative file path", relativeFilePath),
keyValue("directory path", directoryPath), keyValue("directory path", directoryPath),
keyValue("exported types", exportedTypes), keyValue("exported types", exportedTypes),
@@ -1363,7 +1369,9 @@ void ProjectStorageUpdater::parseQmlComponent(SourceId sourceId,
NotUpdatedSourceIds &notUpdatedSourceIds, NotUpdatedSourceIds &notUpdatedSourceIds,
IsInsideProject isInsideProject) IsInsideProject isInsideProject)
{ {
NanotraceHR::Tracer tracer{"parse qml component", category(), keyValue("source id", sourceId)}; NanotraceHR::Tracer tracer{"parse qml component",
projectStorageUpdaterCategory(),
keyValue("source id", sourceId)};
auto state = fileState(sourceId, package, notUpdatedSourceIds); auto state = fileState(sourceId, package, notUpdatedSourceIds);
if (isUnchanged(state)) if (isUnchanged(state))
@@ -1460,7 +1468,7 @@ void ProjectStorageUpdater::parseQmlComponents(Components components,
IsInsideProject isInsideProject) IsInsideProject isInsideProject)
{ {
NanotraceHR::Tracer tracer{"parse qml components", NanotraceHR::Tracer tracer{"parse qml components",
category(), projectStorageUpdaterCategory(),
keyValue("directory id", directoryId), keyValue("directory id", directoryId),
keyValue("qmldir state", qmldirState)}; keyValue("qmldir state", qmldirState)};
@@ -1494,7 +1502,7 @@ ProjectStorageUpdater::FileState ProjectStorageUpdater::fileState(
NotUpdatedSourceIds &notUpdatedSourceIds) const NotUpdatedSourceIds &notUpdatedSourceIds) const
{ {
NanotraceHR::Tracer tracer{"update property editor paths", NanotraceHR::Tracer tracer{"update property editor paths",
category(), projectStorageUpdaterCategory(),
keyValue("source id", sourceId)}; keyValue("source id", sourceId)};
auto currentFileStatus = m_fileStatusCache.find(sourceId); auto currentFileStatus = m_fileStatusCache.find(sourceId);

View File

@@ -23,7 +23,7 @@ namespace QmlDesigner {
#ifdef QDS_BUILD_QMLPARSER #ifdef QDS_BUILD_QMLPARSER
constexpr auto category = ProjectStorageTracing::projectStorageUpdaterCategory; using ProjectStorageTracing::projectStorageUpdaterCategory;
using NanotraceHR::keyValue; using NanotraceHR::keyValue;
using Storage::IsInsideProject; using Storage::IsInsideProject;
using Tracer = NanotraceHR::Tracer<ProjectStorageTracing::Category>; using Tracer = NanotraceHR::Tracer<ProjectStorageTracing::Category>;
@@ -97,7 +97,7 @@ QualifiedImports createQualifiedImports(const QList<QmlDom::Import> &qmlImports,
ProjectStorageType &storage) ProjectStorageType &storage)
{ {
NanotraceHR::Tracer tracer{"create qualified imports", NanotraceHR::Tracer tracer{"create qualified imports",
category(), projectStorageUpdaterCategory(),
keyValue("sourceId", sourceId), keyValue("sourceId", sourceId),
keyValue("directoryPath", directoryPath)}; keyValue("directoryPath", directoryPath)};
@@ -331,7 +331,7 @@ Storage::Synchronization::Type QmlDocumentParser::parse(const QString &sourceCon
IsInsideProject isInsideProject) IsInsideProject isInsideProject)
{ {
NanotraceHR::Tracer tracer{"qml document parser parse", NanotraceHR::Tracer tracer{"qml document parser parse",
category(), projectStorageUpdaterCategory(),
keyValue("sourceId", sourceId), keyValue("sourceId", sourceId),
keyValue("directoryPath", directoryPath)}; keyValue("directoryPath", directoryPath)};

View File

@@ -25,7 +25,7 @@ namespace QmlDesigner {
#ifdef QDS_BUILD_QMLPARSER #ifdef QDS_BUILD_QMLPARSER
constexpr auto category = ProjectStorageTracing::projectStorageUpdaterCategory; using ProjectStorageTracing::projectStorageUpdaterCategory;
using NanotraceHR::keyValue; using NanotraceHR::keyValue;
using Storage::IsInsideProject; using Storage::IsInsideProject;
using Tracer = NanotraceHR::Tracer<ProjectStorageTracing::Category>; using Tracer = NanotraceHR::Tracer<ProjectStorageTracing::Category>;
@@ -40,7 +40,7 @@ using Storage::TypeNameString;
ComponentWithoutNamespaces createComponentNameWithoutNamespaces(const QList<QQmlJSExportedScope> &objects) ComponentWithoutNamespaces createComponentNameWithoutNamespaces(const QList<QQmlJSExportedScope> &objects)
{ {
NanotraceHR::Tracer tracer{"parse qmltypes file", category()}; NanotraceHR::Tracer tracer{"parse qmltypes file", projectStorageUpdaterCategory()};
ComponentWithoutNamespaces componentWithoutNamespaces; ComponentWithoutNamespaces componentWithoutNamespaces;
@@ -83,7 +83,7 @@ void addImports(Storage::Imports &imports,
{ {
NanotraceHR::Tracer tracer{ NanotraceHR::Tracer tracer{
"add imports", "add imports",
category(), projectStorageUpdaterCategory(),
keyValue("source id", sourceId), keyValue("source id", sourceId),
keyValue("module id", cppModuleId), keyValue("module id", cppModuleId),
}; };
@@ -467,7 +467,7 @@ void addType(Storage::Synchronization::Types &types,
Internal::LastModule &lastQmlModule) Internal::LastModule &lastQmlModule)
{ {
NanotraceHR::Tracer tracer{"add type", NanotraceHR::Tracer tracer{"add type",
category(), projectStorageUpdaterCategory(),
keyValue("source id", sourceId), keyValue("source id", sourceId),
keyValue("module id", cppModuleId)}; keyValue("module id", cppModuleId)};
@@ -507,7 +507,7 @@ void addTypes(Storage::Synchronization::Types &types,
IsInsideProject isInsideProject, IsInsideProject isInsideProject,
Internal::LastModule &lastQmlModule) Internal::LastModule &lastQmlModule)
{ {
NanotraceHR::Tracer tracer{"add types", category()}; NanotraceHR::Tracer tracer{"add types", projectStorageUpdaterCategory()};
types.reserve(Utils::usize(objects) + types.size()); types.reserve(Utils::usize(objects) + types.size());
@@ -531,7 +531,7 @@ void QmlTypesParser::parse(const QString &sourceContent,
const Storage::Synchronization::DirectoryInfo &directoryInfo, const Storage::Synchronization::DirectoryInfo &directoryInfo,
IsInsideProject isInsideProject) IsInsideProject isInsideProject)
{ {
NanotraceHR::Tracer tracer{"qmltypes parser parse", category()}; NanotraceHR::Tracer tracer{"qmltypes parser parse", projectStorageUpdaterCategory()};
lastQmlModule.name.clear(); lastQmlModule.name.clear();
lastQmlModule.id = ModuleId{}; lastQmlModule.id = ModuleId{};

View File

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

Some files were not shown because too many files have changed in this diff Show More