forked from qt-creator/qt-creator
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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
|
||||
@@ -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());
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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()) {
|
||||
|
||||
@@ -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)) {
|
||||
|
||||
@@ -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()));
|
||||
|
||||
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user