diff options
author | Alessandro Portale <alessandro.portale@qt.io> | 2018-11-24 12:14:44 +0100 |
---|---|---|
committer | Alessandro Portale <alessandro.portale@qt.io> | 2018-12-02 14:27:29 +0000 |
commit | d1df55d128cd544c9b4035cad4b71aa521e93201 (patch) | |
tree | 6294d1402dfa8c70c65aed0d1ab08baa9d374451 /src/plugins/qmlprofiler | |
parent | 383f0b9fcc6f2e6faad002d01560a81df0ca1813 (diff) |
QmlProfiler: Modernize
modernize-*
Change-Id: Ibdf9c0ae91bf8a622facc7f323112b550f532f15
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/plugins/qmlprofiler')
42 files changed, 112 insertions, 131 deletions
diff --git a/src/plugins/qmlprofiler/flamegraphmodel.cpp b/src/plugins/qmlprofiler/flamegraphmodel.cpp index 952631b577d..7821ff85201 100644 --- a/src/plugins/qmlprofiler/flamegraphmodel.cpp +++ b/src/plugins/qmlprofiler/flamegraphmodel.cpp @@ -262,7 +262,7 @@ FlameGraphData *FlameGraphModel::pushChild(FlameGraphData *parent, const QmlEven } } - FlameGraphData *child = new FlameGraphData(parent, data.typeIndex()); + auto child = new FlameGraphData(parent, data.typeIndex()); parent->children.append(child); return child; } @@ -270,7 +270,7 @@ FlameGraphData *FlameGraphModel::pushChild(FlameGraphData *parent, const QmlEven QModelIndex FlameGraphModel::index(int row, int column, const QModelIndex &parent) const { if (parent.isValid()) { - FlameGraphData *parentData = static_cast<FlameGraphData *>(parent.internalPointer()); + auto parentData = static_cast<const FlameGraphData *>(parent.internalPointer()); return createIndex(row, column, parentData->children[row]); } else { return createIndex(row, column, row >= 0 ? m_stackBottom.children[row] : nullptr); @@ -280,7 +280,7 @@ QModelIndex FlameGraphModel::index(int row, int column, const QModelIndex &paren QModelIndex FlameGraphModel::parent(const QModelIndex &child) const { if (child.isValid()) { - FlameGraphData *childData = static_cast<FlameGraphData *>(child.internalPointer()); + auto childData = static_cast<const FlameGraphData *>(child.internalPointer()); return childData->parent == &m_stackBottom ? QModelIndex() : createIndex(0, 0, childData->parent); } else { @@ -291,7 +291,7 @@ QModelIndex FlameGraphModel::parent(const QModelIndex &child) const int FlameGraphModel::rowCount(const QModelIndex &parent) const { if (parent.isValid()) { - FlameGraphData *parentData = static_cast<FlameGraphData *>(parent.internalPointer()); + auto parentData = static_cast<const FlameGraphData *>(parent.internalPointer()); return parentData->children.count(); } else { return m_stackBottom.children.count(); @@ -306,7 +306,7 @@ int FlameGraphModel::columnCount(const QModelIndex &parent) const QVariant FlameGraphModel::data(const QModelIndex &index, int role) const { - FlameGraphData *data = static_cast<FlameGraphData *>(index.internalPointer()); + auto data = static_cast<const FlameGraphData *>(index.internalPointer()); return lookup(data ? *data : m_stackBottom, role); } diff --git a/src/plugins/qmlprofiler/flamegraphview.cpp b/src/plugins/qmlprofiler/flamegraphview.cpp index 5c192d77f2d..23e60a32b64 100644 --- a/src/plugins/qmlprofiler/flamegraphview.cpp +++ b/src/plugins/qmlprofiler/flamegraphview.cpp @@ -85,13 +85,12 @@ void FlameGraphView::onVisibleFeaturesChanged(quint64 features) void FlameGraphView::contextMenuEvent(QContextMenuEvent *ev) { QMenu menu; - QAction *getGlobalStatsAction = nullptr; QPoint position = ev->globalPos(); menu.addActions(QmlProfilerTool::profilerContextMenuActions()); menu.addSeparator(); - getGlobalStatsAction = menu.addAction(tr("Show Full Range")); + QAction *getGlobalStatsAction = menu.addAction(tr("Show Full Range")); if (!m_model->modelManager()->isRestrictedToRange()) getGlobalStatsAction->setEnabled(false); diff --git a/src/plugins/qmlprofiler/memoryusagemodel.h b/src/plugins/qmlprofiler/memoryusagemodel.h index f3abd351879..6eeff3d9ac5 100644 --- a/src/plugins/qmlprofiler/memoryusagemodel.h +++ b/src/plugins/qmlprofiler/memoryusagemodel.h @@ -73,11 +73,11 @@ public: private: struct RangeStackFrame { - RangeStackFrame() : originTypeIndex(-1), startTime(-1) {} + RangeStackFrame() = default; RangeStackFrame(int originTypeIndex, qint64 startTime) : originTypeIndex(originTypeIndex), startTime(startTime) {} - int originTypeIndex; - qint64 startTime; + int originTypeIndex = -1; + qint64 startTime = -1; }; enum EventContinuation { diff --git a/src/plugins/qmlprofiler/pixmapcachemodel.cpp b/src/plugins/qmlprofiler/pixmapcachemodel.cpp index 81109a6153d..3efe0a7d202 100644 --- a/src/plugins/qmlprofiler/pixmapcachemodel.cpp +++ b/src/plugins/qmlprofiler/pixmapcachemodel.cpp @@ -166,7 +166,7 @@ QVariantMap PixmapCacheModel::details(int index) const void PixmapCacheModel::loadEvent(const QmlEvent &event, const QmlEventType &type) { Item newEvent; - const PixmapEventType pixmapType = static_cast<PixmapEventType>(type.detailType()); + const auto pixmapType = static_cast<PixmapEventType>(type.detailType()); newEvent.pixmapEventType = pixmapType; qint64 pixmapStartTime = event.timestamp(); @@ -443,13 +443,11 @@ void PixmapCacheModel::computeMaxCacheSize() void PixmapCacheModel::resizeUnfinishedLoads() { // all the unfinished "load start" events continue till the end of the trace - for (auto pixmap = m_pixmaps.begin(), pixmapsEnd = m_pixmaps.end(); - pixmap != pixmapsEnd; ++pixmap) { - for (auto size = pixmap->sizes.begin(), sizesEnd = pixmap->sizes.end(); size != sizesEnd; - ++size) { - if (size->loadState == Loading) { - insertEnd(size->started, modelManager()->traceEnd() - startTime(size->started)); - size->loadState = Error; + for (auto &pixmap : m_pixmaps) { + for (auto &size : pixmap.sizes) { + if (size.loadState == Loading) { + insertEnd(size.started, modelManager()->traceEnd() - startTime(size.started)); + size.loadState = Error; } } } diff --git a/src/plugins/qmlprofiler/pixmapcachemodel.h b/src/plugins/qmlprofiler/pixmapcachemodel.h index ed6cd577e8e..a1216aff824 100644 --- a/src/plugins/qmlprofiler/pixmapcachemodel.h +++ b/src/plugins/qmlprofiler/pixmapcachemodel.h @@ -59,16 +59,16 @@ public: struct PixmapState { PixmapState(int width, int height, CacheState cache = Uncached) : - size(width, height), started(-1), loadState(Initial), cacheState(cache) {} - PixmapState(CacheState cache = Uncached) : started(-1), loadState(Initial), cacheState(cache) {} + size(width, height), cacheState(cache) {} + PixmapState(CacheState cache = Uncached) : cacheState(cache) {} QSize size; - int started; - LoadState loadState; + int started = -1; + LoadState loadState = Initial; CacheState cacheState; }; struct Pixmap { - Pixmap() {} + Pixmap() = default; Pixmap(const QString &url) : url(url), sizes(1) {} QString url; QVector<PixmapState> sizes; diff --git a/src/plugins/qmlprofiler/qmlevent.h b/src/plugins/qmlprofiler/qmlevent.h index 3f999d419e9..dc1b85116dd 100644 --- a/src/plugins/qmlprofiler/qmlevent.h +++ b/src/plugins/qmlprofiler/qmlevent.h @@ -41,7 +41,7 @@ namespace QmlProfiler { struct QmlEvent : public Timeline::TraceEvent { static const qint32 staticClassId = 0x716d6c65; // 'qmle'; - QmlEvent() : TraceEvent(staticClassId), m_dataType(Inline8Bit), m_dataLength(0) {} + QmlEvent() : TraceEvent(staticClassId) {} template<typename Number> QmlEvent(qint64 timestamp, int typeIndex, std::initializer_list<Number> list) @@ -216,8 +216,8 @@ private: External64Bit = Inline64Bit | External }; - Type m_dataType; - quint16 m_dataLength; + Type m_dataType = Inline8Bit; + quint16 m_dataLength = 0; static const int s_internalDataLength = 8; union { @@ -250,7 +250,7 @@ private: typename std::enable_if<(sizeof(Number) > 1), bool>::type squeeze(const Container &numbers) { - typedef typename QIntegerForSize<sizeof(Number) / 2>::Signed Small; + using Small = typename QIntegerForSize<sizeof(Number) / 2>::Signed; foreach (Number item, numbers) { if (!squeezable<Number, Small>(item)) return false; diff --git a/src/plugins/qmlprofiler/qmleventlocation.h b/src/plugins/qmlprofiler/qmleventlocation.h index 86e5768d977..b29440987cc 100644 --- a/src/plugins/qmlprofiler/qmleventlocation.h +++ b/src/plugins/qmlprofiler/qmleventlocation.h @@ -35,7 +35,7 @@ namespace QmlProfiler { class QMLPROFILER_EXPORT QmlEventLocation { public: - QmlEventLocation() : m_line(-1),m_column(-1) {} + QmlEventLocation() = default; QmlEventLocation(const QString &file, int lineNumber, int columnNumber) : m_filename(file), m_line(lineNumber), m_column(columnNumber) {} @@ -60,8 +60,8 @@ private: friend QDataStream &operator<<(QDataStream &stream, const QmlEventLocation &location); QString m_filename; - int m_line; - int m_column; + int m_line = -1; + int m_column = -1; }; inline bool operator==(const QmlEventLocation &location1, const QmlEventLocation &location2) diff --git a/src/plugins/qmlprofiler/qmleventtype.cpp b/src/plugins/qmlprofiler/qmleventtype.cpp index 88a3d6dd47c..67daa5a47a1 100644 --- a/src/plugins/qmlprofiler/qmleventtype.cpp +++ b/src/plugins/qmlprofiler/qmleventtype.cpp @@ -78,7 +78,7 @@ QDataStream &operator<<(QDataStream &stream, const QmlEventType &type) QmlEventType::QmlEventType(Message message, RangeType rangeType, int detailType, const QmlEventLocation &location, const QString &data, - const QString displayName) : + const QString &displayName) : TraceEventType(staticClassId, qmlFeatureFromType(message, rangeType, detailType)), m_data(data), m_location(location), m_message(message), m_rangeType(rangeType), m_detailType(detailType) diff --git a/src/plugins/qmlprofiler/qmleventtype.h b/src/plugins/qmlprofiler/qmleventtype.h index 1e038e634eb..ee87dc94d2e 100644 --- a/src/plugins/qmlprofiler/qmleventtype.h +++ b/src/plugins/qmlprofiler/qmleventtype.h @@ -41,7 +41,7 @@ public: QmlEventType(Message message = MaximumMessage, RangeType rangeType = MaximumRangeType, int detailType = -1, const QmlEventLocation &location = QmlEventLocation(), - const QString &data = QString(), const QString displayName = QString()); + const QString &data = QString(), const QString &displayName = QString()); void setData(const QString &data) { m_data = data; } void setLocation(const QmlEventLocation &location) { m_location = location; } diff --git a/src/plugins/qmlprofiler/qmlprofilerattachdialog.cpp b/src/plugins/qmlprofiler/qmlprofilerattachdialog.cpp index 62f5e7fe424..392bf159277 100644 --- a/src/plugins/qmlprofiler/qmlprofilerattachdialog.cpp +++ b/src/plugins/qmlprofiler/qmlprofilerattachdialog.cpp @@ -64,11 +64,11 @@ QmlProfilerAttachDialog::QmlProfilerAttachDialog(QWidget *parent) : d->portSpinBox->setMaximum(65535); d->portSpinBox->setValue(3768); - QDialogButtonBox *buttonBox = new QDialogButtonBox(this); + auto buttonBox = new QDialogButtonBox(this); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok); buttonBox->button(QDialogButtonBox::Ok)->setDefault(true); - QLabel *hint = new QLabel(this); + auto hint = new QLabel(this); hint->setWordWrap(true); hint->setTextFormat(Qt::RichText); hint->setText(tr("Select an externally started QML-debug enabled application.<p>" @@ -76,11 +76,11 @@ QmlProfilerAttachDialog::QmlProfilerAttachDialog(QWidget *parent) : + "<p><tt>-qmljsdebugger=port:<port>,block,<br>" " services:CanvasFrameRate,EngineControl,DebugMessages</tt>"); - QFormLayout *formLayout = new QFormLayout(); + auto formLayout = new QFormLayout; formLayout->addRow(tr("Kit:"), d->kitChooser); formLayout->addRow(tr("&Port:"), d->portSpinBox); - QVBoxLayout *verticalLayout = new QVBoxLayout(this); + auto verticalLayout = new QVBoxLayout(this); verticalLayout->addWidget(hint); verticalLayout->addLayout(formLayout); verticalLayout->addWidget(buttonBox); diff --git a/src/plugins/qmlprofiler/qmlprofilerbindingloopsrenderpass.cpp b/src/plugins/qmlprofiler/qmlprofilerbindingloopsrenderpass.cpp index 767696613bd..2ac18507353 100644 --- a/src/plugins/qmlprofiler/qmlprofilerbindingloopsrenderpass.cpp +++ b/src/plugins/qmlprofiler/qmlprofilerbindingloopsrenderpass.cpp @@ -33,15 +33,15 @@ namespace Internal { class BindingLoopMaterial : public QSGMaterial { public: - QSGMaterialType *type() const; - QSGMaterialShader *createShader() const; + QSGMaterialType *type() const override; + QSGMaterialShader *createShader() const override; BindingLoopMaterial(); }; class BindingLoopsRenderPassState : public Timeline::TimelineRenderPass::State { public: BindingLoopsRenderPassState(const QmlProfilerRangeModel *model); - ~BindingLoopsRenderPassState(); + ~BindingLoopsRenderPassState() override; BindingLoopMaterial *material() { return &m_material; } void updateIndexes(int from, int to); @@ -50,8 +50,8 @@ public: int indexTo() const { return m_indexTo; } QSGNode *expandedRow(int row) const { return m_expandedRows[row]; } - const QVector<QSGNode *> &expandedRows() const { return m_expandedRows; } - QSGNode *collapsedOverlay() const { return m_collapsedOverlay; } + const QVector<QSGNode *> &expandedRows() const override { return m_expandedRows; } + QSGNode *collapsedOverlay() const override { return m_collapsedOverlay; } private: QVector<QSGNode *> m_expandedRows; @@ -70,12 +70,11 @@ struct BindlingLoopsGeometry { static const QSGGeometry::AttributeSet &point2DWithOffset(); static const int maxEventsPerNode = 0xffff / 18; - BindlingLoopsGeometry() : allocatedVertices(0), usedVertices(0), currentY(-1), node(nullptr) {} - uint allocatedVertices; - uint usedVertices; - float currentY; + uint allocatedVertices = 0; + uint usedVertices = 0; + float currentY = -1; - QSGGeometryNode *node; + QSGGeometryNode *node = nullptr; Point2DWithOffset *vertexData(); void allocate(QSGMaterial *material); @@ -90,9 +89,7 @@ const QmlProfilerBindingLoopsRenderPass *QmlProfilerBindingLoopsRenderPass::inst return &pass; } -QmlProfilerBindingLoopsRenderPass::QmlProfilerBindingLoopsRenderPass() -{ -} +QmlProfilerBindingLoopsRenderPass::QmlProfilerBindingLoopsRenderPass() = default; static inline bool eventOutsideRange(const QmlProfilerRangeModel *model, const Timeline::TimelineRenderState *parentState, int i) @@ -163,8 +160,7 @@ Timeline::TimelineRenderPass::State *QmlProfilerBindingLoopsRenderPass::update( Q_UNUSED(stateChanged); Q_UNUSED(spacing); - const QmlProfilerRangeModel *model = qobject_cast<const QmlProfilerRangeModel *>( - renderer->model()); + auto model = qobject_cast<const QmlProfilerRangeModel *>(renderer->model()); if (!model || indexFrom < 0 || indexTo > model->count() || indexFrom >= indexTo) return oldState; @@ -229,8 +225,7 @@ Point2DWithOffset *BindlingLoopsGeometry::vertexData() void BindlingLoopsGeometry::allocate(QSGMaterial *material) { - QSGGeometry *geometry = new QSGGeometry(BindlingLoopsGeometry::point2DWithOffset(), - usedVertices); + auto geometry = new QSGGeometry(BindlingLoopsGeometry::point2DWithOffset(), usedVertices); Q_ASSERT(geometry->vertexData()); geometry->setIndexDataPattern(QSGGeometry::StaticPattern); geometry->setVertexDataPattern(QSGGeometry::StaticPattern); @@ -367,7 +362,7 @@ BindingLoopsRenderPassState::BindingLoopsRenderPassState(const QmlProfilerRangeM m_collapsedOverlay->setFlag(QSGNode::OwnedByParent, false); m_expandedRows.reserve(model->expandedRowCount()); for (int i = 0; i < model->expandedRowCount(); ++i) { - QSGNode *node = new QSGNode; + auto node = new QSGNode; node->setFlag(QSGNode::OwnedByParent, false); m_expandedRows << node; } diff --git a/src/plugins/qmlprofiler/qmlprofilermodelmanager.cpp b/src/plugins/qmlprofiler/qmlprofilermodelmanager.cpp index faf6490388b..e14a696ebab 100644 --- a/src/plugins/qmlprofiler/qmlprofilermodelmanager.cpp +++ b/src/plugins/qmlprofiler/qmlprofilermodelmanager.cpp @@ -478,7 +478,7 @@ int QmlProfilerEventTypeStorage::append(Timeline::TraceEventType &&type) m_types.push_back(std::move(type.asRvalueRef<QmlEventType>())); } else { QTC_CHECK(false); - m_types.push_back(QmlEventType()); + m_types.emplace_back(); } QTC_ASSERT(index <= static_cast<size_t>(std::numeric_limits<int>::max()), return std::numeric_limits<int>::max()); diff --git a/src/plugins/qmlprofiler/qmlprofilermodelmanager.h b/src/plugins/qmlprofiler/qmlprofilermodelmanager.h index 3dd38c66e20..a771a3ae604 100644 --- a/src/plugins/qmlprofiler/qmlprofilermodelmanager.h +++ b/src/plugins/qmlprofiler/qmlprofilermodelmanager.h @@ -49,8 +49,8 @@ class QMLPROFILER_EXPORT QmlProfilerModelManager : public Timeline::TimelineTrac { Q_OBJECT public: - typedef std::function<void(const QmlEvent &, const QmlEventType &)> QmlEventLoader; - typedef std::function<QmlEventLoader(QmlEventLoader)> QmlEventFilter; + using QmlEventLoader = std::function<void (const QmlEvent &, const QmlEventType &)>; + using QmlEventFilter = std::function<QmlEventLoader (QmlEventLoader)>; explicit QmlProfilerModelManager(QObject *parent = nullptr); ~QmlProfilerModelManager() override; diff --git a/src/plugins/qmlprofiler/qmlprofileroptionspage.h b/src/plugins/qmlprofiler/qmlprofileroptionspage.h index 62aeb68242a..f3497e398c5 100644 --- a/src/plugins/qmlprofiler/qmlprofileroptionspage.h +++ b/src/plugins/qmlprofiler/qmlprofileroptionspage.h @@ -37,9 +37,9 @@ class QmlProfilerOptionsPage : public Core::IOptionsPage public: QmlProfilerOptionsPage(); - QWidget *widget(); - void apply(); - void finish(); + QWidget *widget() override; + void apply() override; + void finish() override; private: QPointer<QWidget> m_widget; diff --git a/src/plugins/qmlprofiler/qmlprofilerplugin.cpp b/src/plugins/qmlprofiler/qmlprofilerplugin.cpp index 62dcdc9f6b6..e1bca5391d2 100644 --- a/src/plugins/qmlprofiler/qmlprofilerplugin.cpp +++ b/src/plugins/qmlprofiler/qmlprofilerplugin.cpp @@ -115,7 +115,7 @@ void QmlProfilerPlugin::extensionsInitialized() RunControl::registerWorkerCreator(ProjectExplorer::Constants::QML_PROFILER_RUN_MODE, [this](RunControl *runControl) { - QmlProfilerRunner *runner = new QmlProfilerRunner(runControl); + auto runner = new QmlProfilerRunner(runControl); connect(runner, &QmlProfilerRunner::starting, &d->m_profilerTool, &QmlProfilerTool::finalizeRunControl); return runner; diff --git a/src/plugins/qmlprofiler/qmlprofilerrangemodel.cpp b/src/plugins/qmlprofiler/qmlprofilerrangemodel.cpp index 01cc4091342..6c099feec3b 100644 --- a/src/plugins/qmlprofiler/qmlprofilerrangemodel.cpp +++ b/src/plugins/qmlprofiler/qmlprofilerrangemodel.cpp @@ -155,7 +155,7 @@ void QmlProfilerRangeModel::computeExpandedLevels() void QmlProfilerRangeModel::findBindingLoops() { - typedef QPair<int, int> CallStackEntry; + using CallStackEntry = QPair<int, int>; QStack<CallStackEntry> callStack; for (int i = 0; i < count(); ++i) { diff --git a/src/plugins/qmlprofiler/qmlprofilerrangemodel.h b/src/plugins/qmlprofiler/qmlprofilerrangemodel.h index 161c439fe4e..91bc674e40c 100644 --- a/src/plugins/qmlprofiler/qmlprofilerrangemodel.h +++ b/src/plugins/qmlprofiler/qmlprofilerrangemodel.h @@ -45,15 +45,10 @@ class QmlProfilerRangeModel : public QmlProfilerTimelineModel public: struct Item { - Item() : - displayRowExpanded(1), - displayRowCollapsed(Constants::QML_MIN_LEVEL), - bindingLoopHead(-1) {} - // not-expanded, per type - int displayRowExpanded; - int displayRowCollapsed; - int bindingLoopHead; + int displayRowExpanded = 1; + int displayRowCollapsed = Constants::QML_MIN_LEVEL; + int bindingLoopHead = -1; }; QmlProfilerRangeModel(QmlProfilerModelManager *manager, RangeType range, diff --git a/src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp b/src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp index 4565e3e8e29..e1e476df363 100644 --- a/src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp +++ b/src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp @@ -231,7 +231,7 @@ LocalQmlProfilerSupport::LocalQmlProfilerSupport(QmlProfilerTool *profilerTool, { setId("LocalQmlProfilerSupport"); - QmlProfilerRunner *profiler = new QmlProfilerRunner(runControl); + auto profiler = new QmlProfilerRunner(runControl); profiler->setServerUrl(serverUrl); connect(profiler, &QmlProfilerRunner::starting, profilerTool, &QmlProfilerTool::finalizeRunControl); diff --git a/src/plugins/qmlprofiler/qmlprofilerstatemanager.cpp b/src/plugins/qmlprofiler/qmlprofilerstatemanager.cpp index 0cecb96e0c3..30d40e1f952 100644 --- a/src/plugins/qmlprofiler/qmlprofilerstatemanager.cpp +++ b/src/plugins/qmlprofiler/qmlprofilerstatemanager.cpp @@ -51,7 +51,7 @@ public: : q(qq), m_currentState(Idle), m_clientRecording(true), m_serverRecording(false), m_requestedFeatures(0), m_recordedFeatures(0) {} - ~QmlProfilerStateManagerPrivate() {} + ~QmlProfilerStateManagerPrivate() = default; QmlProfilerStateManager *q; diff --git a/src/plugins/qmlprofiler/qmlprofilerstatewidget.cpp b/src/plugins/qmlprofiler/qmlprofilerstatewidget.cpp index f684ef92317..859f26bada2 100644 --- a/src/plugins/qmlprofiler/qmlprofilerstatewidget.cpp +++ b/src/plugins/qmlprofiler/qmlprofilerstatewidget.cpp @@ -62,7 +62,7 @@ QmlProfilerStateWidget::QmlProfilerStateWidget(QmlProfilerStateManager *stateMan setFrameStyle(QFrame::StyledPanel); // UI elements - QVBoxLayout *layout = new QVBoxLayout(this); + auto layout = new QVBoxLayout(this); resize(200,70); d->text = new QLabel(this); diff --git a/src/plugins/qmlprofiler/qmlprofilerstatewidget.h b/src/plugins/qmlprofiler/qmlprofilerstatewidget.h index 83583947268..26d463895b8 100644 --- a/src/plugins/qmlprofiler/qmlprofilerstatewidget.h +++ b/src/plugins/qmlprofiler/qmlprofilerstatewidget.h @@ -40,7 +40,7 @@ public: explicit QmlProfilerStateWidget(QmlProfilerStateManager *stateManager, QmlProfilerModelManager *modelManager, QWidget *parent = nullptr); - ~QmlProfilerStateWidget(); + ~QmlProfilerStateWidget() override; private: void showText(const QString &text); diff --git a/src/plugins/qmlprofiler/qmlprofilerstatisticsview.cpp b/src/plugins/qmlprofiler/qmlprofilerstatisticsview.cpp index 47ed7ad5b19..4bbf8d2c440 100644 --- a/src/plugins/qmlprofiler/qmlprofilerstatisticsview.cpp +++ b/src/plugins/qmlprofiler/qmlprofilerstatisticsview.cpp @@ -70,7 +70,7 @@ QmlProfilerStatisticsView::QmlProfilerStatisticsView(QmlProfilerModelManager *pr setObjectName(QLatin1String("QmlProfiler.Statistics.Dock")); setWindowTitle(tr("Statistics")); - QmlProfilerStatisticsModel *model = new QmlProfilerStatisticsModel(profilerModelManager); + auto model = new QmlProfilerStatisticsModel(profilerModelManager); m_mainView.reset(new QmlProfilerStatisticsMainView(model)); connect(m_mainView.get(), &QmlProfilerStatisticsMainView::gotoSourceLocation, this, &QmlProfilerStatisticsView::gotoSourceLocation); @@ -99,13 +99,13 @@ QmlProfilerStatisticsView::QmlProfilerStatisticsView(QmlProfilerModelManager *pr m_callersView.get(), &QmlProfilerStatisticsRelativesView::displayType); // widget arrangement - QVBoxLayout *groupLayout = new QVBoxLayout; + auto groupLayout = new QVBoxLayout; groupLayout->setContentsMargins(0,0,0,0); groupLayout->setSpacing(0); - Core::MiniSplitter *splitterVertical = new Core::MiniSplitter; + auto splitterVertical = new Core::MiniSplitter; splitterVertical->addWidget(m_mainView.get()); - Core::MiniSplitter *splitterHorizontal = new Core::MiniSplitter; + auto splitterHorizontal = new Core::MiniSplitter; splitterHorizontal->addWidget(m_callersView.get()); splitterHorizontal->addWidget(m_calleesView.get()); splitterHorizontal->setOrientation(Qt::Horizontal); @@ -226,9 +226,7 @@ QmlProfilerStatisticsMainView::QmlProfilerStatisticsMainView(QmlProfilerStatisti resizeColumnToContents(MainType); } -QmlProfilerStatisticsMainView::~QmlProfilerStatisticsMainView() -{ -} +QmlProfilerStatisticsMainView::~QmlProfilerStatisticsMainView() = default; void QmlProfilerStatisticsMainView::setShowExtendedStatistics(bool show) { @@ -274,7 +272,7 @@ void QmlProfilerStatisticsMainView::jumpToItem(int typeIndex) { displayTypeIndex(typeIndex); - QSortFilterProxyModel *sortModel = qobject_cast<QSortFilterProxyModel *>(model()); + auto sortModel = qobject_cast<const QSortFilterProxyModel *>(model()); QTC_ASSERT(sortModel, return); QAbstractItemModel *sourceModel = sortModel->sourceModel(); @@ -294,7 +292,7 @@ void QmlProfilerStatisticsMainView::displayTypeIndex(int typeIndex) if (typeIndex < 0) { setCurrentIndex(QModelIndex()); } else { - QSortFilterProxyModel *sortModel = qobject_cast<QSortFilterProxyModel *>(model()); + auto sortModel = qobject_cast<const QSortFilterProxyModel *>(model()); QTC_ASSERT(sortModel, return); QAbstractItemModel *sourceModel = sortModel->sourceModel(); @@ -392,9 +390,7 @@ QmlProfilerStatisticsRelativesView::QmlProfilerStatisticsRelativesView( }); } -QmlProfilerStatisticsRelativesView::~QmlProfilerStatisticsRelativesView() -{ -} +QmlProfilerStatisticsRelativesView::~QmlProfilerStatisticsRelativesView() = default; void QmlProfilerStatisticsRelativesView::displayType(int typeIndex) { diff --git a/src/plugins/qmlprofiler/qmlprofilerstatisticsview.h b/src/plugins/qmlprofiler/qmlprofilerstatisticsview.h index 6df2661b60e..dac73d47bd2 100644 --- a/src/plugins/qmlprofiler/qmlprofilerstatisticsview.h +++ b/src/plugins/qmlprofiler/qmlprofilerstatisticsview.h @@ -75,7 +75,7 @@ class QmlProfilerStatisticsMainView : public Utils::TreeView Q_OBJECT public: explicit QmlProfilerStatisticsMainView(QmlProfilerStatisticsModel *model); - ~QmlProfilerStatisticsMainView(); + ~QmlProfilerStatisticsMainView() override; QModelIndex selectedModelIndex() const; void copyTableToClipboard() const; @@ -110,7 +110,7 @@ class QmlProfilerStatisticsRelativesView : public Utils::TreeView Q_OBJECT public: explicit QmlProfilerStatisticsRelativesView(QmlProfilerStatisticsRelativesModel *model); - ~QmlProfilerStatisticsRelativesView(); + ~QmlProfilerStatisticsRelativesView() override; void displayType(int typeIndex); void jumpToItem(int typeIndex); diff --git a/src/plugins/qmlprofiler/qmlprofilertextmark.cpp b/src/plugins/qmlprofiler/qmlprofilertextmark.cpp index 21173734505..83a49514397 100644 --- a/src/plugins/qmlprofiler/qmlprofilertextmark.cpp +++ b/src/plugins/qmlprofiler/qmlprofilertextmark.cpp @@ -106,15 +106,15 @@ void QmlProfilerTextMarkModel::createMarks(QmlProfilerViewManager *viewManager, }); int lineNumber = -1; - for (auto it = ids.begin(), end = ids.end(); it != end; ++it) { - if (it->lineNumber == lineNumber) { - m_marks.last()->addTypeId(it->typeId); + for (const auto &id : ids) { + if (id.lineNumber == lineNumber) { + m_marks.last()->addTypeId(id.typeId); } else { - lineNumber = it->lineNumber; + lineNumber = id.lineNumber; m_marks << new QmlProfilerTextMark(viewManager, - it->typeId, + id.typeId, FileName::fromString(fileName), - it->lineNumber); + id.lineNumber); } } } @@ -133,7 +133,7 @@ void QmlProfilerTextMarkModel::hideTextMarks() bool QmlProfilerTextMark::addToolTipContent(QLayout *target) const { - QGridLayout *layout = new QGridLayout; + auto layout = new QGridLayout; layout->setHorizontalSpacing(10); for (int row = 0, rowEnd = m_typeIds.length(); row != rowEnd; ++row) { const QStringList typeDetails = m_viewManager->statisticsView()->details(m_typeIds[row]); diff --git a/src/plugins/qmlprofiler/qmlprofilertool.cpp b/src/plugins/qmlprofiler/qmlprofilertool.cpp index 220d959d030..120dd20a904 100644 --- a/src/plugins/qmlprofiler/qmlprofilertool.cpp +++ b/src/plugins/qmlprofiler/qmlprofilertool.cpp @@ -304,7 +304,7 @@ void QmlProfilerTool::finalizeRunControl(QmlProfilerRunner *runWorker) auto aspect = static_cast<QmlProfilerRunConfigurationAspect *>( runConfiguration->aspect(Constants::SETTINGS)); if (aspect) { - if (QmlProfilerSettings *settings = static_cast<QmlProfilerSettings *>(aspect->currentSettings())) { + if (auto settings = static_cast<const QmlProfilerSettings *>(aspect->currentSettings())) { d->m_profilerConnections->setFlushInterval(settings->flushEnabled() ? settings->flushInterval() : 0); d->m_profilerModelManager->setAggregateTraces(settings->aggregateTraces()); @@ -345,7 +345,7 @@ void QmlProfilerTool::finalizeRunControl(QmlProfilerRunner *runWorker) connect(d->m_profilerConnections, &QmlProfilerClientManager::connectionFailed, runWorker, [this, runWorker]() { - QMessageBox *infoBox = new QMessageBox(ICore::mainWindow()); + auto infoBox = new QMessageBox(ICore::mainWindow()); infoBox->setIcon(QMessageBox::Critical); infoBox->setWindowTitle(Core::Constants::IDE_DISPLAY_NAME); @@ -513,7 +513,7 @@ ProjectExplorer::RunControl *QmlProfilerTool::attachToWaitingApplication() Id kitId; int port; - Kit *kit = 0; + Kit *kit = nullptr; { QSettings *settings = ICore::settings(); @@ -573,7 +573,7 @@ void QmlProfilerTool::logError(const QString &msg) void QmlProfilerTool::showErrorDialog(const QString &error) { - QMessageBox *errorDialog = new QMessageBox(ICore::mainWindow()); + auto errorDialog = new QMessageBox(ICore::mainWindow()); errorDialog->setIcon(QMessageBox::Warning); errorDialog->setWindowTitle(tr("QML Profiler")); errorDialog->setText(error); @@ -780,7 +780,7 @@ QList <QAction *> QmlProfilerTool::profilerContextMenuActions() void QmlProfilerTool::showNonmodalWarning(const QString &warningMsg) { - QMessageBox *noExecWarning = new QMessageBox(ICore::mainWindow()); + auto noExecWarning = new QMessageBox(ICore::mainWindow()); noExecWarning->setIcon(QMessageBox::Warning); noExecWarning->setWindowTitle(tr("QML Profiler")); noExecWarning->setText(warningMsg); diff --git a/src/plugins/qmlprofiler/qmlprofilertraceview.cpp b/src/plugins/qmlprofiler/qmlprofilertraceview.cpp index 50f6030d0f2..fc840caf806 100644 --- a/src/plugins/qmlprofiler/qmlprofilertraceview.cpp +++ b/src/plugins/qmlprofiler/qmlprofilertraceview.cpp @@ -70,8 +70,6 @@ #include <QRegExp> #include <QTextCursor> -#include <math.h> - namespace QmlProfiler { namespace Internal { @@ -120,7 +118,7 @@ QmlProfilerTraceView::QmlProfilerTraceView(QWidget *parent, QmlProfilerViewManag } }); - QVBoxLayout *groupLayout = new QVBoxLayout; + auto groupLayout = new QVBoxLayout; groupLayout->setContentsMargins(0, 0, 0, 0); groupLayout->setSpacing(0); @@ -136,7 +134,7 @@ QmlProfilerTraceView::QmlProfilerTraceView(QWidget *parent, QmlProfilerViewManag d->m_mainView->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); setFocusProxy(d->m_mainView); - Aggregation::Aggregate *agg = new Aggregation::Aggregate; + auto agg = new Aggregation::Aggregate; agg->add(d->m_mainView); agg->add(new TraceViewFindSupport(this, modelManager)); diff --git a/src/plugins/qmlprofiler/qmlprofilerviewmanager.h b/src/plugins/qmlprofiler/qmlprofilerviewmanager.h index e106afb4cce..f03f3032ff3 100644 --- a/src/plugins/qmlprofiler/qmlprofilerviewmanager.h +++ b/src/plugins/qmlprofiler/qmlprofilerviewmanager.h @@ -46,7 +46,7 @@ public: QmlProfilerViewManager(QObject *parent, QmlProfilerModelManager *modelManager, QmlProfilerStateManager *profilerState); - ~QmlProfilerViewManager(); + ~QmlProfilerViewManager() override; QmlProfilerTraceView *traceView() const { return m_traceView; } QmlProfilerStatisticsView *statisticsView() const { return m_statisticsView; } diff --git a/src/plugins/qmlprofiler/tests/debugmessagesmodel_test.h b/src/plugins/qmlprofiler/tests/debugmessagesmodel_test.h index 23dcf277d48..9d6973f886c 100644 --- a/src/plugins/qmlprofiler/tests/debugmessagesmodel_test.h +++ b/src/plugins/qmlprofiler/tests/debugmessagesmodel_test.h @@ -36,7 +36,7 @@ class DebugMessagesModelTest : public QObject { Q_OBJECT public: - DebugMessagesModelTest(QObject *parent = 0); + DebugMessagesModelTest(QObject *parent = nullptr); private slots: void initTestCase(); diff --git a/src/plugins/qmlprofiler/tests/fakedebugserver.cpp b/src/plugins/qmlprofiler/tests/fakedebugserver.cpp index 88f5825fecb..91cb9f3c6c6 100644 --- a/src/plugins/qmlprofiler/tests/fakedebugserver.cpp +++ b/src/plugins/qmlprofiler/tests/fakedebugserver.cpp @@ -31,7 +31,7 @@ namespace Internal { void fakeDebugServer(QIODevice *socket) { - QmlDebug::QPacketProtocol *protocol = new QmlDebug::QPacketProtocol(socket, socket); + auto protocol = new QmlDebug::QPacketProtocol(socket, socket); QObject::connect(protocol, &QmlDebug::QPacketProtocol::readyRead, [protocol]() { QmlDebug::QPacket packet(QDataStream::Qt_4_7); const int messageId = 0; diff --git a/src/plugins/qmlprofiler/tests/flamegraphmodel_test.cpp b/src/plugins/qmlprofiler/tests/flamegraphmodel_test.cpp index 9e388196c8e..7c580da97eb 100644 --- a/src/plugins/qmlprofiler/tests/flamegraphmodel_test.cpp +++ b/src/plugins/qmlprofiler/tests/flamegraphmodel_test.cpp @@ -41,7 +41,7 @@ int FlameGraphModelTest::generateData(QmlProfilerModelManager *manager, Timeline::TimelineModelAggregator *aggregator) { // Notes only work with timeline models - QmlProfilerRangeModel *rangeModel = new QmlProfilerRangeModel(manager, Javascript, aggregator); + auto rangeModel = new QmlProfilerRangeModel(manager, Javascript, aggregator); int rangeModelId = rangeModel->modelId(); manager->notesModel()->addTimelineModel(rangeModel); diff --git a/src/plugins/qmlprofiler/tests/inputeventsmodel_test.h b/src/plugins/qmlprofiler/tests/inputeventsmodel_test.h index f8966eb0f2a..820980bad8c 100644 --- a/src/plugins/qmlprofiler/tests/inputeventsmodel_test.h +++ b/src/plugins/qmlprofiler/tests/inputeventsmodel_test.h @@ -36,7 +36,7 @@ class InputEventsModelTest : public QObject { Q_OBJECT public: - InputEventsModelTest(QObject *parent = 0); + InputEventsModelTest(QObject *parent = nullptr); private slots: void initTestCase(); diff --git a/src/plugins/qmlprofiler/tests/localqmlprofilerrunner_test.h b/src/plugins/qmlprofiler/tests/localqmlprofilerrunner_test.h index 796f2ce3c4b..53ef39e8ff1 100644 --- a/src/plugins/qmlprofiler/tests/localqmlprofilerrunner_test.h +++ b/src/plugins/qmlprofiler/tests/localqmlprofilerrunner_test.h @@ -37,7 +37,7 @@ class LocalQmlProfilerRunnerTest : public QObject { Q_OBJECT public: - LocalQmlProfilerRunnerTest(QObject *parent = 0); + LocalQmlProfilerRunnerTest(QObject *parent = nullptr); private slots: void testRunner(); diff --git a/src/plugins/qmlprofiler/tests/pixmapcachemodel_test.h b/src/plugins/qmlprofiler/tests/pixmapcachemodel_test.h index f4f5819f350..f36c6f0fca9 100644 --- a/src/plugins/qmlprofiler/tests/pixmapcachemodel_test.h +++ b/src/plugins/qmlprofiler/tests/pixmapcachemodel_test.h @@ -36,7 +36,7 @@ class PixmapCacheModelTest : public QObject { Q_OBJECT public: - PixmapCacheModelTest(QObject *parent = 0); + PixmapCacheModelTest(QObject *parent = nullptr); private slots: void initTestCase(); diff --git a/src/plugins/qmlprofiler/tests/qmlevent_test.h b/src/plugins/qmlprofiler/tests/qmlevent_test.h index 3108d132b92..555e854aced 100644 --- a/src/plugins/qmlprofiler/tests/qmlevent_test.h +++ b/src/plugins/qmlprofiler/tests/qmlevent_test.h @@ -34,7 +34,7 @@ class QmlEventTest : public QObject { Q_OBJECT public: - explicit QmlEventTest(QObject *parent = 0); + explicit QmlEventTest(QObject *parent = nullptr); private slots: void testCtors(); diff --git a/src/plugins/qmlprofiler/tests/qmleventlocation_test.h b/src/plugins/qmlprofiler/tests/qmleventlocation_test.h index 5b86fcb3c20..fea73a58ae8 100644 --- a/src/plugins/qmlprofiler/tests/qmleventlocation_test.h +++ b/src/plugins/qmlprofiler/tests/qmleventlocation_test.h @@ -33,7 +33,7 @@ class QmlEventLocationTest : public QObject { Q_OBJECT public: - explicit QmlEventLocationTest(QObject *parent = 0); + explicit QmlEventLocationTest(QObject *parent = nullptr); private slots: void testCtor(); diff --git a/src/plugins/qmlprofiler/tests/qmleventtype_test.h b/src/plugins/qmlprofiler/tests/qmleventtype_test.h index f616eb05de9..47adbef9596 100644 --- a/src/plugins/qmlprofiler/tests/qmleventtype_test.h +++ b/src/plugins/qmlprofiler/tests/qmleventtype_test.h @@ -33,7 +33,7 @@ class QmlEventTypeTest : public QObject { Q_OBJECT public: - explicit QmlEventTypeTest(QObject *parent = 0); + explicit QmlEventTypeTest(QObject *parent = nullptr); private slots: void testAccessors(); diff --git a/src/plugins/qmlprofiler/tests/qmlnote_test.h b/src/plugins/qmlprofiler/tests/qmlnote_test.h index 57091af5698..0842e6f423b 100644 --- a/src/plugins/qmlprofiler/tests/qmlnote_test.h +++ b/src/plugins/qmlprofiler/tests/qmlnote_test.h @@ -35,7 +35,7 @@ class QmlNoteTest : public QObject { Q_OBJECT public: - explicit QmlNoteTest(QObject *parent = 0); + explicit QmlNoteTest(QObject *parent = nullptr); private slots: void testAccessors(); diff --git a/src/plugins/qmlprofiler/tests/qmlprofileranimationsmodel_test.h b/src/plugins/qmlprofiler/tests/qmlprofileranimationsmodel_test.h index c6b8927d742..2d6a1d744b4 100644 --- a/src/plugins/qmlprofiler/tests/qmlprofileranimationsmodel_test.h +++ b/src/plugins/qmlprofiler/tests/qmlprofileranimationsmodel_test.h @@ -36,7 +36,7 @@ class QmlProfilerAnimationsModelTest : public QObject { Q_OBJECT public: - explicit QmlProfilerAnimationsModelTest(QObject *parent = 0); + explicit QmlProfilerAnimationsModelTest(QObject *parent = nullptr); private slots: void initTestCase(); diff --git a/src/plugins/qmlprofiler/tests/qmlprofilerbindingloopsrenderpass_test.cpp b/src/plugins/qmlprofiler/tests/qmlprofilerbindingloopsrenderpass_test.cpp index 1047eff430e..0ff9af14b3d 100644 --- a/src/plugins/qmlprofiler/tests/qmlprofilerbindingloopsrenderpass_test.cpp +++ b/src/plugins/qmlprofiler/tests/qmlprofilerbindingloopsrenderpass_test.cpp @@ -78,7 +78,7 @@ void QmlProfilerBindingLoopsRenderPassTest::testInstance() const QmlProfilerBindingLoopsRenderPass *inst = QmlProfilerBindingLoopsRenderPass::instance(); const QmlProfilerBindingLoopsRenderPass *inst2 = QmlProfilerBindingLoopsRenderPass::instance(); QCOMPARE(inst, inst2); - QVERIFY(inst != 0); + QVERIFY(inst != nullptr); } void QmlProfilerBindingLoopsRenderPassTest::testUpdate() @@ -86,43 +86,43 @@ void QmlProfilerBindingLoopsRenderPassTest::testUpdate() const QmlProfilerBindingLoopsRenderPass *inst = QmlProfilerBindingLoopsRenderPass::instance(); Timeline::TimelineAbstractRenderer renderer; Timeline::TimelineRenderState parentState(0, 8, 1, 1); - Timeline::TimelineRenderPass::State *nullState = 0; - QSGNode *nullNode = 0; + Timeline::TimelineRenderPass::State *nullState = nullptr; + QSGNode *nullNode = nullptr; Timeline::TimelineRenderPass::State *result = - inst->update(&renderer, &parentState, 0, 0, 0, true, 1); + inst->update(&renderer, &parentState, nullptr, 0, 0, true, 1); QCOMPARE(result, nullState); QmlProfilerModelManager manager; Timeline::TimelineModelAggregator aggregator; DummyModel model(&manager, &aggregator); renderer.setModel(&model); - result = inst->update(&renderer, &parentState, 0, 0, 0, true, 1); + result = inst->update(&renderer, &parentState, nullptr, 0, 0, true, 1); QCOMPARE(result, nullState); model.loadData(); - result = inst->update(&renderer, &parentState, 0, 0, 0, true, 1); + result = inst->update(&renderer, &parentState, nullptr, 0, 0, true, 1); QCOMPARE(result, nullState); - result = inst->update(&renderer, &parentState, 0, 2, 9, true, 1); + result = inst->update(&renderer, &parentState, nullptr, 2, 9, true, 1); QVERIFY(result != nullState); QCOMPARE(result->expandedOverlay(), nullNode); QVERIFY(result->collapsedOverlay() != nullNode); QCOMPARE(result->expandedRows().count(), 2); // all the loops are in one row QCOMPARE(result->collapsedRows().count(), 0); // it's an overlay QCOMPARE(result->expandedRows()[1]->childCount(), 1); - QSGGeometryNode *node = static_cast<QSGGeometryNode *>(result->expandedRows()[1]->firstChild()); + auto node = static_cast<const QSGGeometryNode *>(result->expandedRows()[1]->firstChild()); QSGMaterial *material1 = node->material(); - QVERIFY(material1 != 0); + QVERIFY(material1 != nullptr); QCOMPARE(node->geometry()->vertexCount(), 7 * 4); node = static_cast<QSGGeometryNode *>(result->collapsedOverlay()->firstChild()); QSGMaterial *material2 = node->material(); QCOMPARE(node->geometry()->vertexCount(), 7 * 18); - QVERIFY(material2 != 0); + QVERIFY(material2 != nullptr); QCOMPARE(material1->type(), material2->type()); QSGMaterialShader *shader1 = material1->createShader(); - QVERIFY(shader1 != 0); + QVERIFY(shader1 != nullptr); QSGMaterialShader *shader2 = material2->createShader(); - QVERIFY(shader2 != 0); + QVERIFY(shader2 != nullptr); QCOMPARE(shader1->attributeNames(), shader2->attributeNames()); delete shader1; diff --git a/src/plugins/qmlprofiler/tests/qmlprofilerbindingloopsrenderpass_test.h b/src/plugins/qmlprofiler/tests/qmlprofilerbindingloopsrenderpass_test.h index 6dcdf9d00fd..a34c1470b5b 100644 --- a/src/plugins/qmlprofiler/tests/qmlprofilerbindingloopsrenderpass_test.h +++ b/src/plugins/qmlprofiler/tests/qmlprofilerbindingloopsrenderpass_test.h @@ -34,7 +34,7 @@ class QmlProfilerBindingLoopsRenderPassTest : public QObject { Q_OBJECT public: - explicit QmlProfilerBindingLoopsRenderPassTest(QObject *parent = 0); + explicit QmlProfilerBindingLoopsRenderPassTest(QObject *parent = nullptr); private slots: void testInstance(); diff --git a/src/plugins/qmlprofiler/tests/qmlprofilerclientmanager_test.h b/src/plugins/qmlprofiler/tests/qmlprofilerclientmanager_test.h index 22c4cf32e13..d1bc71d41cb 100644 --- a/src/plugins/qmlprofiler/tests/qmlprofilerclientmanager_test.h +++ b/src/plugins/qmlprofiler/tests/qmlprofilerclientmanager_test.h @@ -37,7 +37,7 @@ class QmlProfilerClientManagerTest : public QObject { Q_OBJECT public: - explicit QmlProfilerClientManagerTest(QObject *parent = 0); + explicit QmlProfilerClientManagerTest(QObject *parent = nullptr); private slots: void testConnectionFailure_data(); diff --git a/src/plugins/qmlprofiler/tests/qmlprofilerconfigwidget_test.h b/src/plugins/qmlprofiler/tests/qmlprofilerconfigwidget_test.h index 3e39f4beb22..d669d1c8992 100644 --- a/src/plugins/qmlprofiler/tests/qmlprofilerconfigwidget_test.h +++ b/src/plugins/qmlprofiler/tests/qmlprofilerconfigwidget_test.h @@ -36,7 +36,7 @@ class QmlProfilerConfigWidgetTest : public QObject { Q_OBJECT public: - explicit QmlProfilerConfigWidgetTest(QObject *parent = 0); + explicit QmlProfilerConfigWidgetTest(QObject *parent = nullptr); private slots: void testUpdateFromSettings(); |