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>
This commit is contained in:
hjk
2019-07-23 10:58:00 +02:00
parent 2b26eca80f
commit 251287f0d3
283 changed files with 781 additions and 781 deletions

View File

@@ -198,18 +198,18 @@ void FlameGraph::rebuild()
void FlameGraph::mousePressEvent(QMouseEvent *event)
{
Q_UNUSED(event);
Q_UNUSED(event)
}
void FlameGraph::mouseReleaseEvent(QMouseEvent *event)
{
Q_UNUSED(event);
Q_UNUSED(event)
setSelectedTypeId(-1);
}
void FlameGraph::mouseDoubleClickEvent(QMouseEvent *event)
{
Q_UNUSED(event);
Q_UNUSED(event)
setSelectedTypeId(-1);
resetRoot();
}

View File

@@ -88,8 +88,8 @@ QString formatTime(qint64 timestamp, qint64 reference)
static QObject *createFormatter(QQmlEngine *engine, QJSEngine *scriptEngine)
{
Q_UNUSED(engine);
Q_UNUSED(scriptEngine);
Q_UNUSED(engine)
Q_UNUSED(scriptEngine)
return new TimeFormatter;
}
@@ -97,7 +97,7 @@ void TimeFormatter::setupTimeFormatter()
{
static const int typeIndex = qmlRegisterSingletonType<TimeFormatter>(
"TimelineTimeFormatter", 1, 0, "TimeFormatter", createFormatter);
Q_UNUSED(typeIndex);
Q_UNUSED(typeIndex)
}
}

View File

@@ -269,7 +269,7 @@ OpaqueColoredPoint2DWithSize *OpaqueColoredPoint2DWithSize::fromVertexData(QSGGe
Q_ASSERT(attributes[3].position == 3);
Q_ASSERT(attributes[3].tupleSize == 4);
Q_ASSERT(attributes[3].type == GL_UNSIGNED_BYTE);
Q_UNUSED(attributes);
Q_UNUSED(attributes)
return static_cast<OpaqueColoredPoint2DWithSize *>(geometry->vertexData());
}
@@ -383,7 +383,7 @@ TimelineRenderPass::State *TimelineItemsRenderPass::update(const TimelineAbstrac
int indexTo, bool stateChanged,
float spacing) const
{
Q_UNUSED(stateChanged);
Q_UNUSED(stateChanged)
const TimelineModel *model = renderer->model();
if (!model || indexFrom < 0 || indexTo > model->count() || indexFrom >= indexTo)
return oldState;

View File

@@ -170,7 +170,7 @@ int TimelineModel::modelId() const
int TimelineModel::collapsedRowHeight(int rowNumber) const
{
Q_UNUSED(rowNumber);
Q_UNUSED(rowNumber)
return TimelineModelPrivate::DefaultRowHeight;
}
@@ -367,7 +367,7 @@ int TimelineModel::parentIndex(int index) const
QVariantMap TimelineModel::location(int index) const
{
Q_UNUSED(index);
Q_UNUSED(index)
QVariantMap map;
return map;
}
@@ -379,25 +379,25 @@ QVariantMap TimelineModel::location(int index) const
*/
bool TimelineModel::handlesTypeId(int typeIndex) const
{
Q_UNUSED(typeIndex);
Q_UNUSED(typeIndex)
return false;
}
float TimelineModel::relativeHeight(int index) const
{
Q_UNUSED(index);
Q_UNUSED(index)
return 1.0f;
}
qint64 TimelineModel::rowMinValue(int rowNumber) const
{
Q_UNUSED(rowNumber);
Q_UNUSED(rowNumber)
return 0;
}
qint64 TimelineModel::rowMaxValue(int rowNumber) const
{
Q_UNUSED(rowNumber);
Q_UNUSED(rowNumber)
return 0;
}
@@ -516,7 +516,7 @@ int TimelineModel::rowCount() const
QRgb TimelineModel::color(int index) const
{
Q_UNUSED(index);
Q_UNUSED(index)
return QRgb();
}
@@ -527,19 +527,19 @@ QVariantList TimelineModel::labels() const
QVariantMap TimelineModel::details(int index) const
{
Q_UNUSED(index);
Q_UNUSED(index)
return QVariantMap();
}
int TimelineModel::expandedRow(int index) const
{
Q_UNUSED(index);
Q_UNUSED(index)
return 0;
}
int TimelineModel::collapsedRow(int index) const
{
Q_UNUSED(index);
Q_UNUSED(index)
return 0;
}

View File

@@ -106,9 +106,9 @@ TimelineRenderPass::State *TimelineNotesRenderPass::update(const TimelineAbstrac
int lastIndex, bool stateChanged,
float spacing) const
{
Q_UNUSED(firstIndex);
Q_UNUSED(lastIndex);
Q_UNUSED(spacing);
Q_UNUSED(firstIndex)
Q_UNUSED(lastIndex)
Q_UNUSED(spacing)
const TimelineNotesModel *notes = renderer->notes();
const TimelineModel *model = renderer->model();

View File

@@ -158,7 +158,7 @@ QSGNode *TimelineRenderer::updatePaintNode(QSGNode *node, UpdatePaintNodeData *u
void TimelineRenderer::mousePressEvent(QMouseEvent *event)
{
Q_UNUSED(event);
Q_UNUSED(event)
}
int TimelineRenderer::TimelineRendererPrivate::rowFromPosition(int y) const

View File

@@ -66,7 +66,7 @@ TimelineRenderPass::State *TimelineSelectionRenderPass::update(
const TimelineAbstractRenderer *renderer, const TimelineRenderState *parentState,
State *oldState, int firstIndex, int lastIndex, bool stateChanged, float spacing) const
{
Q_UNUSED(stateChanged);
Q_UNUSED(stateChanged)
const TimelineModel *model = renderer->model();
if (!model || model->isEmpty())

View File

@@ -105,8 +105,8 @@ public:
static QObject *singletonProvider(QQmlEngine *engine, QJSEngine *scriptEngine)
{
Q_UNUSED(engine);
Q_UNUSED(scriptEngine);
Q_UNUSED(engine)
Q_UNUSED(scriptEngine)
return Utils::proxyTheme();
}
@@ -114,7 +114,7 @@ void TimelineTheme::setupTheme(QQmlEngine *engine)
{
static const int typeIndex = qmlRegisterSingletonType<Utils::Theme>("TimelineTheme", 1, 0,
"Theme", singletonProvider);
Q_UNUSED(typeIndex);
Q_UNUSED(typeIndex)
engine->addImageProvider(QLatin1String("icons"), new TimelineImageIconProvider);
}