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 {
static const auto category = FormEditorTracing::category;
using FormEditorTracing::category;
AbstractCustomTool::AbstractCustomTool()
: AbstractFormEditorTool(nullptr)

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -36,7 +36,7 @@ namespace QmlDesigner {
using NanotraceHR::keyValue;
static const auto category = FormEditorTracing::category;
using FormEditorTracing::category;
FormEditorScene *FormEditorItem::scene() const {
return qobject_cast<FormEditorScene*>(QGraphicsItem::scene());

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -11,7 +11,7 @@
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
ChooseFromPropertyListFilter::ChooseFromPropertyListFilter(const NodeMetaInfo &insertInfo,

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -11,7 +11,7 @@
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)
{

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

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