aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/perfprofiler
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/perfprofiler
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/perfprofiler')
-rw-r--r--src/plugins/perfprofiler/perfconfigwidget.cpp4
-rw-r--r--src/plugins/perfprofiler/perfprofilerflamegraphmodel.cpp4
-rw-r--r--src/plugins/perfprofiler/perfprofilerstatisticsmodel.cpp8
-rw-r--r--src/plugins/perfprofiler/perfprofilerstatisticsview.cpp2
-rw-r--r--src/plugins/perfprofiler/perfprofilertracefile.cpp2
-rw-r--r--src/plugins/perfprofiler/perftimelinemodelmanager.cpp2
-rw-r--r--src/plugins/perfprofiler/perftimelineresourcesrenderpass.cpp4
7 files changed, 13 insertions, 13 deletions
diff --git a/src/plugins/perfprofiler/perfconfigwidget.cpp b/src/plugins/perfprofiler/perfconfigwidget.cpp
index b7c72065d0..bdf2a0540e 100644
--- a/src/plugins/perfprofiler/perfconfigwidget.cpp
+++ b/src/plugins/perfprofiler/perfconfigwidget.cpp
@@ -246,7 +246,7 @@ void PerfConfigWidget::handleProcessError(QProcess::ProcessError error)
QWidget *SettingsDelegate::createEditor(QWidget *parent, const QStyleOptionViewItem &option,
const QModelIndex &index) const
{
- Q_UNUSED(option);
+ Q_UNUSED(option)
const int row = index.row();
const int column = index.column();
const PerfConfigEventsModel *model = qobject_cast<const PerfConfigEventsModel *>(index.model());
@@ -406,7 +406,7 @@ void SettingsDelegate::setModelData(QWidget *editor, QAbstractItemModel *model,
void SettingsDelegate::updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option,
const QModelIndex &index) const
{
- Q_UNUSED(index);
+ Q_UNUSED(index)
editor->setGeometry(option.rect);
}
diff --git a/src/plugins/perfprofiler/perfprofilerflamegraphmodel.cpp b/src/plugins/perfprofiler/perfprofilerflamegraphmodel.cpp
index 79ebb32ba1..d9f4cc3052 100644
--- a/src/plugins/perfprofiler/perfprofilerflamegraphmodel.cpp
+++ b/src/plugins/perfprofiler/perfprofilerflamegraphmodel.cpp
@@ -149,7 +149,7 @@ int PerfProfilerFlameGraphModel::rowCount(const QModelIndex &parent) const
int PerfProfilerFlameGraphModel::columnCount(const QModelIndex &parent) const
{
- Q_UNUSED(parent);
+ Q_UNUSED(parent)
return 1;
}
@@ -227,7 +227,7 @@ void PerfProfilerFlameGraphData::updateTraceData(const PerfEvent &event, const P
PerfProfilerFlameGraphModel::Data *data,
int numSamples)
{
- Q_UNUSED(type);
+ Q_UNUSED(type)
for (int i = 0, end = event.numAttributes(); i < end; ++i) {
const PerfEventType::Attribute &attribute = manager->attribute(event.attributeId(i));
if (attribute.type != PerfEventType::TypeTracepoint)
diff --git a/src/plugins/perfprofiler/perfprofilerstatisticsmodel.cpp b/src/plugins/perfprofiler/perfprofilerstatisticsmodel.cpp
index f33b570a25..134f88be98 100644
--- a/src/plugins/perfprofiler/perfprofilerstatisticsmodel.cpp
+++ b/src/plugins/perfprofiler/perfprofilerstatisticsmodel.cpp
@@ -108,7 +108,7 @@ PerfProfilerStatisticsModel::PerfProfilerStatisticsModel(Relation relation, QObj
int PerfProfilerStatisticsModel::columnCount(const QModelIndex &parent) const
{
- Q_UNUSED(parent);
+ Q_UNUSED(parent)
return m_columns.length();
}
@@ -163,7 +163,7 @@ void PerfProfilerStatisticsMainModel::finalize(PerfProfilerStatisticsData *data)
int PerfProfilerStatisticsMainModel::rowCount(const QModelIndex &parent) const
{
- Q_UNUSED(parent);
+ Q_UNUSED(parent)
return m_data.length();
}
@@ -213,7 +213,7 @@ void PerfProfilerStatisticsData::loadEvent(const PerfEvent &event, const PerfEve
if (event.timestamp() < 0)
return;
- Q_UNUSED(type);
+ Q_UNUSED(type)
++totalSamples;
auto data = mainData.end();
const QVector<qint32> &stack = event.frames();
@@ -370,7 +370,7 @@ PerfProfilerStatisticsRelativesModel::PerfProfilerStatisticsRelativesModel(
int PerfProfilerStatisticsRelativesModel::rowCount(const QModelIndex &parent) const
{
- Q_UNUSED(parent);
+ Q_UNUSED(parent)
return m_data.value(m_currentRelative).data.length();
}
diff --git a/src/plugins/perfprofiler/perfprofilerstatisticsview.cpp b/src/plugins/perfprofiler/perfprofilerstatisticsview.cpp
index 3b60e682f4..d023444b2e 100644
--- a/src/plugins/perfprofiler/perfprofilerstatisticsview.cpp
+++ b/src/plugins/perfprofiler/perfprofilerstatisticsview.cpp
@@ -57,7 +57,7 @@ public:
QString displayText(const QVariant &value, const QLocale &locale) const
{
- Q_UNUSED(locale);
+ Q_UNUSED(locale)
return QString::fromLatin1("0x%1").arg(value.toULongLong(), 16, 16, QLatin1Char('0'));
}
};
diff --git a/src/plugins/perfprofiler/perfprofilertracefile.cpp b/src/plugins/perfprofiler/perfprofilertracefile.cpp
index c6ea883c79..9b58f21f62 100644
--- a/src/plugins/perfprofiler/perfprofilertracefile.cpp
+++ b/src/plugins/perfprofiler/perfprofilertracefile.cpp
@@ -497,7 +497,7 @@ void PerfProfilerTraceFile::writeToDevice()
CompressedDataStream bufferStream(m_device.data());
int i = 0;
traceManager->replayPerfEvents([&](const PerfEvent &event, const PerfEventType &type) {
- Q_UNUSED(type);
+ Q_UNUSED(type)
Packet packet(&bufferStream);
packet << event;
diff --git a/src/plugins/perfprofiler/perftimelinemodelmanager.cpp b/src/plugins/perfprofiler/perftimelinemodelmanager.cpp
index 85171e85dd..48af0ccf37 100644
--- a/src/plugins/perfprofiler/perftimelinemodelmanager.cpp
+++ b/src/plugins/perfprofiler/perftimelinemodelmanager.cpp
@@ -113,7 +113,7 @@ void PerfTimelineModelManager::finalize()
void PerfTimelineModelManager::loadEvent(const PerfEvent &event, const PerfEventType &type)
{
- Q_UNUSED(type);
+ Q_UNUSED(type)
const int parallel = m_traceManager->threads().size();
auto i = m_unfinished.find(event.tid());
if (i == m_unfinished.end()) {
diff --git a/src/plugins/perfprofiler/perftimelineresourcesrenderpass.cpp b/src/plugins/perfprofiler/perftimelineresourcesrenderpass.cpp
index d53c6f162e..ba88f4b462 100644
--- a/src/plugins/perfprofiler/perftimelineresourcesrenderpass.cpp
+++ b/src/plugins/perfprofiler/perftimelineresourcesrenderpass.cpp
@@ -140,8 +140,8 @@ Timeline::TimelineRenderPass::State *PerfTimelineResourcesRenderPass::update(
Timeline::TimelineRenderPass::State *oldState, int indexFrom, int indexTo,
bool stateChanged, float spacing) const
{
- Q_UNUSED(stateChanged);
- Q_UNUSED(spacing);
+ Q_UNUSED(stateChanged)
+ Q_UNUSED(spacing)
const PerfTimelineModel *model = qobject_cast<const PerfTimelineModel *>(renderer->model());