summaryrefslogtreecommitdiffstats
path: root/tests/benchmarks
diff options
context:
space:
mode:
authorLars Schmertmann <Lars.Schmertmann@governikus.de>2020-06-27 14:18:09 +0200
committerLars Schmertmann <Lars.Schmertmann@governikus.de>2020-07-07 11:51:48 +0200
commit6ce2f3f26bf08b4c6952f492a3731eb4fe5a42bc (patch)
tree727427eb4c603e74954d4da462484ea7bf5c65bb /tests/benchmarks
parentd9cc1499954829faf9486fb72056e29f1bad58e3 (diff)
Add ; to Q_UNUSED
This is required to remove the ; from the macro with Qt 6. Task-number: QTBUG-82978 Change-Id: I3f0b6717956ca8fa486bed9817b89dfa19f5e0e1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'tests/benchmarks')
-rw-r--r--tests/benchmarks/corelib/time/qdatetime/main.cpp10
-rw-r--r--tests/benchmarks/gui/text/qfontmetrics/main.cpp2
-rw-r--r--tests/benchmarks/gui/text/qtext/main.cpp2
-rw-r--r--tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractitemview.cpp28
-rw-r--r--tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractscrollarea.cpp4
-rw-r--r--tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractviewitem.cpp2
-rw-r--r--tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/backgrounditem.cpp2
-rw-r--r--tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/gvbwidget.cpp2
-rw-r--r--tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/listmodel.cpp6
-rw-r--r--tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/simplelistview.cpp2
-rw-r--r--tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/webview.cpp2
11 files changed, 31 insertions, 31 deletions
diff --git a/tests/benchmarks/corelib/time/qdatetime/main.cpp b/tests/benchmarks/corelib/time/qdatetime/main.cpp
index 1d63547f8f..c6d2b84597 100644
--- a/tests/benchmarks/corelib/time/qdatetime/main.cpp
+++ b/tests/benchmarks/corelib/time/qdatetime/main.cpp
@@ -126,7 +126,7 @@ void tst_QDateTime::create()
QBENCHMARK {
for (int jd = JULIAN_DAY_2010; jd < JULIAN_DAY_2020; ++jd) {
QDateTime test(QDate::fromJulianDay(jd), QTime::fromMSecsSinceStartOfDay(0));
- Q_UNUSED(test)
+ Q_UNUSED(test);
}
}
}
@@ -427,7 +427,7 @@ void tst_QDateTime::equivalent()
for (const QDateTime &test : list)
result = (test == other);
}
- Q_UNUSED(result)
+ Q_UNUSED(result);
}
void tst_QDateTime::equivalentUtc()
@@ -440,7 +440,7 @@ void tst_QDateTime::equivalentUtc()
for (const QDateTime &test : list)
result = (test == other);
}
- Q_UNUSED(result)
+ Q_UNUSED(result);
}
void tst_QDateTime::lessThan()
@@ -453,7 +453,7 @@ void tst_QDateTime::lessThan()
for (const QDateTime &test : list)
result = (test < other);
}
- Q_UNUSED(result)
+ Q_UNUSED(result);
}
void tst_QDateTime::lessThanUtc()
@@ -466,7 +466,7 @@ void tst_QDateTime::lessThanUtc()
for (const QDateTime &test : list)
result = (test < other);
}
- Q_UNUSED(result)
+ Q_UNUSED(result);
}
void tst_QDateTime::currentDateTime()
diff --git a/tests/benchmarks/gui/text/qfontmetrics/main.cpp b/tests/benchmarks/gui/text/qfontmetrics/main.cpp
index d01d00c6a9..86c7cebfd4 100644
--- a/tests/benchmarks/gui/text/qfontmetrics/main.cpp
+++ b/tests/benchmarks/gui/text/qfontmetrics/main.cpp
@@ -53,7 +53,7 @@ private:
void tst_QFontMetrics::testQFontMetrics( const QFontMetrics &fm )
{
int fontHeight = fm.height();
- Q_UNUSED(fontHeight)
+ Q_UNUSED(fontHeight);
}
void tst_QFontMetrics::fontmetrics_create()
diff --git a/tests/benchmarks/gui/text/qtext/main.cpp b/tests/benchmarks/gui/text/qtext/main.cpp
index 192da24f3f..ef88f64d8f 100644
--- a/tests/benchmarks/gui/text/qtext/main.cpp
+++ b/tests/benchmarks/gui/text/qtext/main.cpp
@@ -399,7 +399,7 @@ void tst_QText::paintLayoutToPixmap_painterFill()
void tst_QText::document()
{
QTextDocument *doc = new QTextDocument;
- Q_UNUSED(doc)
+ Q_UNUSED(doc);
QBENCHMARK {
QTextDocument *doc = new QTextDocument;
diff --git a/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractitemview.cpp b/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractitemview.cpp
index 961cf4e03c..e5214b51fb 100644
--- a/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractitemview.cpp
+++ b/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractitemview.cpp
@@ -215,7 +215,7 @@ void AbstractItemView::setSelectionModel(QItemSelectionModel *smodel)
/*virtual*/
void AbstractItemView::currentIndexChanged(const QModelIndex &current, const QModelIndex &previous)
{
- Q_UNUSED(previous)
+ Q_UNUSED(previous);
if (current != m_currentIndex)
m_currentIndex = current;
@@ -225,24 +225,24 @@ void AbstractItemView::currentIndexChanged(const QModelIndex &current, const QMo
void AbstractItemView::currentSelectionChanged(const QItemSelection &selected,
const QItemSelection &deselected)
{
- Q_UNUSED(selected)
- Q_UNUSED(deselected)
+ Q_UNUSED(selected);
+ Q_UNUSED(deselected);
}
/*virtual*/
void AbstractItemView::dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight)
{
- Q_UNUSED(topLeft)
- Q_UNUSED(bottomRight)
+ Q_UNUSED(topLeft);
+ Q_UNUSED(bottomRight);
// TODO implement if we like to edit view items.
}
/*virtual*/
void AbstractItemView::rowsAboutToBeInserted(const QModelIndex &index, int start, int end)
{
- Q_UNUSED(index)
- Q_UNUSED(start)
- Q_UNUSED(end)
+ Q_UNUSED(index);
+ Q_UNUSED(start);
+ Q_UNUSED(end);
// TODO implement
}
@@ -250,17 +250,17 @@ void AbstractItemView::rowsAboutToBeInserted(const QModelIndex &index, int start
/*virtual*/
void AbstractItemView::rowsAboutToBeRemoved(const QModelIndex &index,int start, int end)
{
- Q_UNUSED(index)
- Q_UNUSED(start)
- Q_UNUSED(end)
+ Q_UNUSED(index);
+ Q_UNUSED(start);
+ Q_UNUSED(end);
}
/*virtual*/
void AbstractItemView::rowsRemoved(const QModelIndex &parent,int start, int end)
{
- Q_UNUSED(parent)
- Q_UNUSED(start)
- Q_UNUSED(end)
+ Q_UNUSED(parent);
+ Q_UNUSED(start);
+ Q_UNUSED(end);
if (start <= m_currentIndex.row() && m_currentIndex.row() <= end) {
QModelIndex newCurrentIndex = m_model->index(start, 0, m_rootIndex);
diff --git a/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractscrollarea.cpp b/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractscrollarea.cpp
index 39847b8edb..e4588cc1d1 100644
--- a/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractscrollarea.cpp
+++ b/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractscrollarea.cpp
@@ -166,8 +166,8 @@ bool AbstractScrollArea::event(QEvent *e)
void AbstractScrollArea::scrollContentsBy(qreal dx, qreal dy)
{
- Q_UNUSED(dx)
- Q_UNUSED(dy)
+ Q_UNUSED(dx);
+ Q_UNUSED(dy);
prepareGeometryChange();
}
diff --git a/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractviewitem.cpp b/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractviewitem.cpp
index 6a6df15e23..dbd7c40c35 100644
--- a/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractviewitem.cpp
+++ b/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractviewitem.cpp
@@ -96,7 +96,7 @@ void AbstractViewItem::themeChange()
/*virtual*/
void AbstractViewItem::setSubtreeCacheEnabled(bool enabled)
{
- Q_UNUSED(enabled)
+ Q_UNUSED(enabled);
; // No impl
}
diff --git a/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/backgrounditem.cpp b/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/backgrounditem.cpp
index 9f5f16d373..1b928ab908 100644
--- a/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/backgrounditem.cpp
+++ b/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/backgrounditem.cpp
@@ -58,7 +58,7 @@ void BackgroundItem::paint(QPainter *painter,
const QStyleOptionGraphicsItem *option,
QWidget *widget)
{
- Q_UNUSED(widget)
+ Q_UNUSED(widget);
painter->setCompositionMode(QPainter::CompositionMode_Source);
painter->drawPixmap(option->exposedRect, m_background, option->exposedRect);
}
diff --git a/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/gvbwidget.cpp b/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/gvbwidget.cpp
index 3682ae55e1..93285c0723 100644
--- a/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/gvbwidget.cpp
+++ b/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/gvbwidget.cpp
@@ -41,6 +41,6 @@ GvbWidget::~GvbWidget()
void GvbWidget::keyPressEvent(QKeyEvent *event)
{
- Q_UNUSED(event)
+ Q_UNUSED(event);
}
diff --git a/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/listmodel.cpp b/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/listmodel.cpp
index 933af2f770..1aa2cfa1ea 100644
--- a/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/listmodel.cpp
+++ b/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/listmodel.cpp
@@ -69,9 +69,9 @@ QVariant ListModel::data(const QModelIndex &index, int role) const
bool ListModel::setData(const QModelIndex &index, const QVariant &value, int role)
{
// TODO implement if we like to edit list items
- Q_UNUSED(index)
- Q_UNUSED(value)
- Q_UNUSED(role)
+ Q_UNUSED(index);
+ Q_UNUSED(value);
+ Q_UNUSED(role);
return false;
}
diff --git a/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/simplelistview.cpp b/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/simplelistview.cpp
index 7ff089fa1e..b1467238f8 100644
--- a/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/simplelistview.cpp
+++ b/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/simplelistview.cpp
@@ -409,7 +409,7 @@ void SimpleListView::setListItemCaching(bool enabled)
void SimpleListView::scrollContentsBy(qreal dx, qreal dy)
{
Q_D(SimpleListView);
- Q_UNUSED(dx)
+ Q_UNUSED(dx);
QRectF contentRect = d->m_content->boundingRect();
QRectF viewportRect = viewport()->boundingRect();
QPointF contentPos = d->m_content->pos();
diff --git a/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/webview.cpp b/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/webview.cpp
index 59ed50157b..d09bd43214 100644
--- a/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/webview.cpp
+++ b/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/webview.cpp
@@ -88,7 +88,7 @@ void WebViewPrivate::_q_loadStarted()
void WebViewPrivate::_q_loadProgress(int progress)
{
- Q_UNUSED(progress)
+ Q_UNUSED(progress);
// qDebug() << "WebView: load progress" << progress;
adjustSize();
}