aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qmlprofiler
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2019-07-23 10:58:00 +0200
committerhjk <hjk@qt.io>2019-07-23 11:55:59 +0000
commit251287f0d35dd82e68dabed8214ef8af893aff91 (patch)
treea3ba843c1c23f4aea06bc01bf7ab0dd69d6fc741 /src/plugins/qmlprofiler
parent2b26eca80f9ebcdc2f1dc0d890a39a4fbc2d129c (diff)
Avoid warning on empty expressions
For some reason, Q_UNUSED includes already a semicolon, adding one on the user side creates an additional empty statement. Change-Id: I9c5e8fac381345a60792cb75e2938fd53958d3b0 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'src/plugins/qmlprofiler')
-rw-r--r--src/plugins/qmlprofiler/debugmessagesmodel.cpp2
-rw-r--r--src/plugins/qmlprofiler/flamegraphmodel.cpp2
-rw-r--r--src/plugins/qmlprofiler/memoryusagemodel.cpp4
-rw-r--r--src/plugins/qmlprofiler/qmlprofileranimationsmodel.cpp2
-rw-r--r--src/plugins/qmlprofiler/qmlprofilerbindingloopsrenderpass.cpp6
-rw-r--r--src/plugins/qmlprofiler/qmlprofilerrangemodel.cpp2
-rw-r--r--src/plugins/qmlprofiler/qmlprofilerstatewidget.cpp2
-rw-r--r--src/plugins/qmlprofiler/qmlprofilertool.cpp4
-rw-r--r--src/plugins/qmlprofiler/qmlprofilertraceclient.cpp2
-rw-r--r--src/plugins/qmlprofiler/qmlprofilertracefile.cpp4
-rw-r--r--src/plugins/qmlprofiler/tests/qmlprofilerclientmanager_test.cpp4
-rw-r--r--src/plugins/qmlprofiler/tests/qmlprofilerdetailsrewriter_test.cpp10
12 files changed, 22 insertions, 22 deletions
diff --git a/src/plugins/qmlprofiler/debugmessagesmodel.cpp b/src/plugins/qmlprofiler/debugmessagesmodel.cpp
index 1ec11ac8f7..1509c95c9d 100644
--- a/src/plugins/qmlprofiler/debugmessagesmodel.cpp
+++ b/src/plugins/qmlprofiler/debugmessagesmodel.cpp
@@ -95,7 +95,7 @@ int DebugMessagesModel::expandedRow(int index) const
int DebugMessagesModel::collapsedRow(int index) const
{
- Q_UNUSED(index);
+ Q_UNUSED(index)
return Constants::QML_MIN_LEVEL;
}
diff --git a/src/plugins/qmlprofiler/flamegraphmodel.cpp b/src/plugins/qmlprofiler/flamegraphmodel.cpp
index 7821ff8520..5673f2fbc3 100644
--- a/src/plugins/qmlprofiler/flamegraphmodel.cpp
+++ b/src/plugins/qmlprofiler/flamegraphmodel.cpp
@@ -300,7 +300,7 @@ int FlameGraphModel::rowCount(const QModelIndex &parent) const
int FlameGraphModel::columnCount(const QModelIndex &parent) const
{
- Q_UNUSED(parent);
+ Q_UNUSED(parent)
return 1;
}
diff --git a/src/plugins/qmlprofiler/memoryusagemodel.cpp b/src/plugins/qmlprofiler/memoryusagemodel.cpp
index 1fcfc4631f..86620ed6d0 100644
--- a/src/plugins/qmlprofiler/memoryusagemodel.cpp
+++ b/src/plugins/qmlprofiler/memoryusagemodel.cpp
@@ -45,7 +45,7 @@ MemoryUsageModel::MemoryUsageModel(QmlProfilerModelManager *manager,
qint64 MemoryUsageModel::rowMaxValue(int rowNumber) const
{
- Q_UNUSED(rowNumber);
+ Q_UNUSED(rowNumber)
return m_maxSize;
}
@@ -271,7 +271,7 @@ void MemoryUsageModel::clear()
bool MemoryUsageModel::handlesTypeId(int typeId) const
{
- Q_UNUSED(typeId);
+ Q_UNUSED(typeId)
// We don't want the memory ranges allocated by some QML/JS function to be highlighted when
// propagating a typeId selection to the timeline. The actual range should be highlighted.
return false;
diff --git a/src/plugins/qmlprofiler/qmlprofileranimationsmodel.cpp b/src/plugins/qmlprofiler/qmlprofileranimationsmodel.cpp
index 8fef692ed3..bec3496a15 100644
--- a/src/plugins/qmlprofiler/qmlprofileranimationsmodel.cpp
+++ b/src/plugins/qmlprofiler/qmlprofileranimationsmodel.cpp
@@ -57,7 +57,7 @@ void QmlProfilerAnimationsModel::clear()
void QmlProfilerAnimationsModel::loadEvent(const QmlEvent &event, const QmlEventType &type)
{
- Q_UNUSED(type);
+ Q_UNUSED(type)
AnimationThread lastThread = (AnimationThread)event.number<qint32>(2);
// initial estimation of the event duration: 1/framerate
diff --git a/src/plugins/qmlprofiler/qmlprofilerbindingloopsrenderpass.cpp b/src/plugins/qmlprofiler/qmlprofilerbindingloopsrenderpass.cpp
index 2ac1850735..f7eaab21a2 100644
--- a/src/plugins/qmlprofiler/qmlprofilerbindingloopsrenderpass.cpp
+++ b/src/plugins/qmlprofiler/qmlprofilerbindingloopsrenderpass.cpp
@@ -157,8 +157,8 @@ Timeline::TimelineRenderPass::State *QmlProfilerBindingLoopsRenderPass::update(
const Timeline::TimelineRenderState *parentState, State *oldState,
int indexFrom, int indexTo, bool stateChanged, float spacing) const
{
- Q_UNUSED(stateChanged);
- Q_UNUSED(spacing);
+ Q_UNUSED(stateChanged)
+ Q_UNUSED(spacing)
auto model = qobject_cast<const QmlProfilerRangeModel *>(renderer->model());
@@ -219,7 +219,7 @@ Point2DWithOffset *BindlingLoopsGeometry::vertexData()
Q_ASSERT(attributes[1].position == 1);
Q_ASSERT(attributes[1].tupleSize == 2);
Q_ASSERT(attributes[1].type == GL_FLOAT);
- Q_UNUSED(attributes);
+ Q_UNUSED(attributes)
return static_cast<Point2DWithOffset *>(geometry->vertexData());
}
diff --git a/src/plugins/qmlprofiler/qmlprofilerrangemodel.cpp b/src/plugins/qmlprofiler/qmlprofilerrangemodel.cpp
index 6c099feec3..50c461ef1c 100644
--- a/src/plugins/qmlprofiler/qmlprofilerrangemodel.cpp
+++ b/src/plugins/qmlprofiler/qmlprofilerrangemodel.cpp
@@ -65,7 +65,7 @@ bool QmlProfilerRangeModel::supportsBindingLoops() const
void QmlProfilerRangeModel::loadEvent(const QmlEvent &event, const QmlEventType &type)
{
- Q_UNUSED(type);
+ Q_UNUSED(type)
// store starttime-based instance
if (event.rangeStage() == RangeStart) {
int index = insertStart(event.timestamp(), event.typeIndex());
diff --git a/src/plugins/qmlprofiler/qmlprofilerstatewidget.cpp b/src/plugins/qmlprofiler/qmlprofilerstatewidget.cpp
index 859f26bada..ff73b9dd41 100644
--- a/src/plugins/qmlprofiler/qmlprofilerstatewidget.cpp
+++ b/src/plugins/qmlprofiler/qmlprofilerstatewidget.cpp
@@ -45,7 +45,7 @@ namespace Internal {
class QmlProfilerStateWidget::QmlProfilerStateWidgetPrivate
{
public:
- QmlProfilerStateWidgetPrivate(QmlProfilerStateWidget *qq) : text(nullptr) { Q_UNUSED(qq); }
+ QmlProfilerStateWidgetPrivate(QmlProfilerStateWidget *qq) : text(nullptr) { Q_UNUSED(qq) }
QLabel *text;
diff --git a/src/plugins/qmlprofiler/qmlprofilertool.cpp b/src/plugins/qmlprofiler/qmlprofilertool.cpp
index ba5228f7c1..984446c3f9 100644
--- a/src/plugins/qmlprofiler/qmlprofilertool.cpp
+++ b/src/plugins/qmlprofiler/qmlprofilertool.cpp
@@ -246,7 +246,7 @@ QmlProfilerTool::QmlProfilerTool()
if (EditorManager *editorManager = EditorManager::instance()) {
connect(editorManager, &EditorManager::editorCreated,
model, [this, model](Core::IEditor *editor, const QString &fileName) {
- Q_UNUSED(editor);
+ Q_UNUSED(editor)
model->createMarks(d->m_viewContainer, fileName);
});
}
@@ -721,7 +721,7 @@ void QmlProfilerTool::updateFeatures(quint64 features)
template<>
void QmlProfilerTool::updateFeatures<MaximumProfileFeature>(quint64 features)
{
- Q_UNUSED(features);
+ Q_UNUSED(features)
return;
}
diff --git a/src/plugins/qmlprofiler/qmlprofilertraceclient.cpp b/src/plugins/qmlprofiler/qmlprofilertraceclient.cpp
index a8f82e72fc..054cc31eae 100644
--- a/src/plugins/qmlprofiler/qmlprofilertraceclient.cpp
+++ b/src/plugins/qmlprofiler/qmlprofilertraceclient.cpp
@@ -253,7 +253,7 @@ QmlProfilerTraceClient::QmlProfilerTraceClient(QmlDebug::QmlDebugConnection *cli
});
connect(this, &QmlProfilerTraceClient::traceFinished,
d->engineControl.get(), [this](qint64 timestamp, const QList<int> &engineIds) {
- Q_UNUSED(timestamp);
+ Q_UNUSED(timestamp)
// The engines might not be blocked because the trace can get finished before engine control
// sees them.
for (int blocked : d->engineControl->blockedEngines()) {
diff --git a/src/plugins/qmlprofiler/qmlprofilertracefile.cpp b/src/plugins/qmlprofiler/qmlprofilertracefile.cpp
index 075c518e77..c994c37719 100644
--- a/src/plugins/qmlprofiler/qmlprofilertracefile.cpp
+++ b/src/plugins/qmlprofiler/qmlprofilertracefile.cpp
@@ -123,7 +123,7 @@ QmlProfilerTraceFile::QmlProfilerTraceFile(QObject *parent) : Timeline::Timeline
qRegisterMetaType<QVector<QmlEventType> >(),
qRegisterMetaType<QVector<QmlNote> >()
};
- Q_UNUSED(meta);
+ Q_UNUSED(meta)
}
void QmlProfilerTraceFile::load(QIODevice *device)
@@ -834,7 +834,7 @@ void QmlProfilerTraceFile::saveQzt(QIODevice *device)
qint64 lastProgressTimestamp = traceStart();
modelManager()->replayQmlEvents([&](const QmlEvent &event, const QmlEventType &type) {
- Q_UNUSED(type);
+ Q_UNUSED(type)
bufferStream << event;
// 32MB buffer should be plenty for efficient compression
if (buffer.data().length() > (1 << 25)) {
diff --git a/src/plugins/qmlprofiler/tests/qmlprofilerclientmanager_test.cpp b/src/plugins/qmlprofiler/tests/qmlprofilerclientmanager_test.cpp
index 70b815776b..a4f2cafaa9 100644
--- a/src/plugins/qmlprofiler/tests/qmlprofilerclientmanager_test.cpp
+++ b/src/plugins/qmlprofiler/tests/qmlprofilerclientmanager_test.cpp
@@ -123,7 +123,7 @@ void QmlProfilerClientManagerTest::testConnectionFailure()
QByteArray fatalAsserts = qgetenv("QTC_FATAL_ASSERTS");
qunsetenv("QTC_FATAL_ASSERTS");
MessageHandler handler(&softAssertMessageHandler);
- Q_UNUSED(handler);
+ Q_UNUSED(handler)
QFETCH(QmlProfilerModelManager *, modelManager);
QFETCH(QmlProfilerStateManager *, stateManager);
@@ -342,7 +342,7 @@ void invalidHelloMessageHandler(QtMsgType type, const QMessageLogContext &contex
void QmlProfilerClientManagerTest::testInvalidData()
{
MessageHandler handler(&invalidHelloMessageHandler);
- Q_UNUSED(handler);
+ Q_UNUSED(handler)
QSignalSpy openedSpy(&clientManager, SIGNAL(connectionOpened()));
QSignalSpy closedSpy(&clientManager, SIGNAL(connectionClosed()));
diff --git a/src/plugins/qmlprofiler/tests/qmlprofilerdetailsrewriter_test.cpp b/src/plugins/qmlprofiler/tests/qmlprofilerdetailsrewriter_test.cpp
index 55787e918b..e189656a79 100644
--- a/src/plugins/qmlprofiler/tests/qmlprofilerdetailsrewriter_test.cpp
+++ b/src/plugins/qmlprofiler/tests/qmlprofilerdetailsrewriter_test.cpp
@@ -89,7 +89,7 @@ QmlProfilerDetailsRewriterTest::QmlProfilerDetailsRewriterTest(QObject *parent)
void QmlProfilerDetailsRewriterTest::testMissingModelManager()
{
DummyBuildConfigurationFactory factory;
- Q_UNUSED(factory);
+ Q_UNUSED(factory)
seedRewriter();
delete m_modelManager;
@@ -99,8 +99,8 @@ void QmlProfilerDetailsRewriterTest::testMissingModelManager()
QVERIFY(!m_rewriterDone);
auto rewriteConnection = connect(&m_rewriter, &QmlProfilerDetailsRewriter::rewriteDetailsString,
this, [&](int typeId, const QString &string) {
- Q_UNUSED(typeId);
- Q_UNUSED(string);
+ Q_UNUSED(typeId)
+ Q_UNUSED(string)
QFAIL("found nonexisting file in nonexisting model manager");
});
m_rewriter.requestDetailsForLocation(44, QmlEventLocation("Test.qml", 12, 12));
@@ -113,7 +113,7 @@ void QmlProfilerDetailsRewriterTest::testMissingModelManager()
void QmlProfilerDetailsRewriterTest::testRequestDetailsForLocation()
{
DummyBuildConfigurationFactory factory;
- Q_UNUSED(factory);
+ Q_UNUSED(factory)
seedRewriter();
QVERIFY(!m_rewriterDone);
@@ -164,7 +164,7 @@ void QmlProfilerDetailsRewriterTest::testRequestDetailsForLocation()
void QmlProfilerDetailsRewriterTest::testGetLocalFile()
{
DummyBuildConfigurationFactory factory;
- Q_UNUSED(factory);
+ Q_UNUSED(factory)
seedRewriter();
QCOMPARE(m_rewriter.getLocalFile("notthere.qml"), QString());