Add ; to Q_UNUSED and UNUSED_PARAM

This is required to remove the ; from the macro with Qt 6.

Task-number: QTBUG-82978
Change-Id: Iead53d18fd790fb2d870d80ef2db79666f0d2392
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This commit is contained in:
Lars Schmertmann 2020-06-26 14:43:02 +02:00
parent 6d8aca544c
commit e79281533d
55 changed files with 115 additions and 115 deletions

View File

@ -93,7 +93,7 @@ public:
#endif
{
#ifdef NDEBUG
UNUSED_PARAM(effort)
UNUSED_PARAM(effort);
#endif
// Simon: Moved this to the sub-classes linkCode(ownerUID, effort);
}
@ -327,8 +327,8 @@ inline typename LinkBufferBase<MacroAssembler, ExecutableOffsetCalculator>::Code
template <typename MacroAssembler, template <typename T> class ExecutableOffsetCalculator>
inline void LinkBufferBase<MacroAssembler, ExecutableOffsetCalculator>::linkCode(void* ownerUID, JITCompilationEffort effort)
{
UNUSED_PARAM(ownerUID)
UNUSED_PARAM(effort)
UNUSED_PARAM(ownerUID);
UNUSED_PARAM(effort);
ASSERT(!m_code);
m_executableMemory = m_assembler->m_assembler.executableCopy(*m_globalData, ownerUID, effort);
if (!m_executableMemory)
@ -435,8 +435,8 @@ inline void BranchCompactingLinkBuffer<MacroAssembler>::makeExecutable()
template <typename MacroAssembler>
inline void BranchCompactingLinkBuffer<MacroAssembler>::linkCode(void* ownerUID, JITCompilationEffort effort)
{
UNUSED_PARAM(ownerUID)
UNUSED_PARAM(effort)
UNUSED_PARAM(ownerUID);
UNUSED_PARAM(effort);
ASSERT(!m_code);
m_initialSize = m_assembler->m_assembler.codeSize();
m_executableMemory = m_globalData->executableAllocator.allocate(*m_globalData, m_initialSize, ownerUID, effort);

View File

@ -3224,7 +3224,7 @@ private:
{
#if 1
Q_UNUSED(immediate);
Q_UNUSED(dest)
Q_UNUSED(dest);
#else
intptr_t currentRegisterContents;
if (dest.value(currentRegisterContents)) {

View File

@ -117,7 +117,7 @@ void QQuickBoundaryReturnJob::updateCurrentTime(int t)
void QQuickBoundaryReturnJob::updateState(QAbstractAnimationJob::State newState, QAbstractAnimationJob::State oldState)
{
Q_UNUSED(oldState)
Q_UNUSED(oldState);
if (newState == QAbstractAnimationJob::Stopped) {
qCDebug(lcBR) << "return animation done";
boundaryRule->resetOvershoot();

View File

@ -785,7 +785,7 @@ void QQuickLocalStorage::openDatabaseSync(QQmlV4Function *args)
args->setReturnValue(db.asReturnedValue());
#else
Q_UNUSED(args)
Q_UNUSED(args);
#endif // settings
}

View File

@ -48,13 +48,13 @@ QQmlDebugTranslationServiceImpl::QQmlDebugTranslationServiceImpl(QObject *parent
void QQmlDebugTranslationServiceImpl::messageReceived(const QByteArray &message)
{
Q_UNUSED(message)
Q_UNUSED(message);
}
QString QQmlDebugTranslationServiceImpl::foundElidedText(QObject *textObject, const QString &layoutText, const QString &elideText)
{
Q_UNUSED(textObject)
Q_UNUSED(layoutText)
Q_UNUSED(textObject);
Q_UNUSED(layoutText);
return elideText;
}
@ -62,9 +62,9 @@ void QQmlDebugTranslationServiceImpl::foundTranslationBinding(
QQmlTranslationBinding *binding, QObject *scopeObject,
const QQmlRefPointer<QQmlContextData> &contextData)
{
Q_UNUSED(binding)
Q_UNUSED(scopeObject)
Q_UNUSED(contextData)
Q_UNUSED(binding);
Q_UNUSED(scopeObject);
Q_UNUSED(contextData);
}
QT_END_NAMESPACE

View File

@ -56,7 +56,7 @@ QStringList QSGOpenVGAdaptation::keys() const
QSGContext *QSGOpenVGAdaptation::create(const QString &key) const
{
Q_UNUSED(key)
Q_UNUSED(key);
if (!instance)
instance = new QSGOpenVGContext();
return instance;
@ -69,7 +69,7 @@ QSGRenderLoop *QSGOpenVGAdaptation::createWindowManager()
QSGContextFactoryInterface::Flags QSGOpenVGAdaptation::flags(const QString &key) const
{
Q_UNUSED(key)
Q_UNUSED(key);
return 0;
}

View File

@ -113,7 +113,7 @@ QSGRenderer *QSGOpenVGRenderContext::createRenderer(QSGRendererInterface::Render
QSGOpenVGContext::QSGOpenVGContext(QObject *parent)
{
Q_UNUSED(parent)
Q_UNUSED(parent);
}
QSGRenderContext *QSGOpenVGContext::createRenderContext()
@ -133,13 +133,13 @@ QSGImageNode *QSGOpenVGContext::createImageNode()
QSGPainterNode *QSGOpenVGContext::createPainterNode(QQuickPaintedItem *item)
{
Q_UNUSED(item)
Q_UNUSED(item);
return new QSGOpenVGPainterNode(item);
}
QSGGlyphNode *QSGOpenVGContext::createGlyphNode(QSGRenderContext *rc, bool preferNativeGlyphNode)
{
Q_UNUSED(preferNativeGlyphNode)
Q_UNUSED(preferNativeGlyphNode);
return new QSGOpenVGGlyphNode(rc);
}

View File

@ -185,12 +185,12 @@ void QSGOpenVGLayer::setRecursive(bool recursive)
void QSGOpenVGLayer::setFormat(uint format)
{
Q_UNUSED(format)
Q_UNUSED(format);
}
void QSGOpenVGLayer::setHasMipmaps(bool mipmap)
{
Q_UNUSED(mipmap)
Q_UNUSED(mipmap);
}
void QSGOpenVGLayer::setDevicePixelRatio(qreal ratio)

View File

@ -127,11 +127,11 @@ bool QSGOpenVGNodeVisitor::visit(QSGGeometryNode *node)
{
if (QSGSimpleRectNode *rectNode = dynamic_cast<QSGSimpleRectNode *>(node)) {
// TODO: Try and render the QSGSimpleRectNode
Q_UNUSED(rectNode)
Q_UNUSED(rectNode);
return false;
} else if (QSGSimpleTextureNode *tn = dynamic_cast<QSGSimpleTextureNode *>(node)) {
// TODO: Try and render the QSGSimpleTextureNode
Q_UNUSED(tn)
Q_UNUSED(tn);
return false;
} else if (QSGOpenVGNinePatchNode *nn = dynamic_cast<QSGOpenVGNinePatchNode *>(node)) {
renderRenderableNode(nn);

View File

@ -159,7 +159,7 @@ QSGRenderContext *QSGOpenVGRenderLoop::createRenderContext(QSGContext *) const
void QSGOpenVGRenderLoop::releaseResources(QQuickWindow *window)
{
Q_UNUSED(window)
Q_UNUSED(window);
}
QSurface::SurfaceType QSGOpenVGRenderLoop::windowSurfaceType() const

View File

@ -44,7 +44,7 @@ QT_BEGIN_NAMESPACE
QSGOpenVGTexture::QSGOpenVGTexture(const QImage &image, uint flags)
{
Q_UNUSED(flags)
Q_UNUSED(flags);
VGImageFormat format = QSGOpenVGHelpers::qImageFormatToVGImageFormat(image.format());
m_image = vgCreateImage(format, image.width(), image.height(), VG_IMAGE_QUALITY_BETTER);

View File

@ -1394,7 +1394,7 @@ public:
errorString->clear();
return true;
#else
Q_UNUSED(outputFileName)
Q_UNUSED(outputFileName);
*errorString = QStringLiteral("features.temporaryfile is disabled.");
return false;
#endif

View File

@ -888,7 +888,7 @@ void BaselineAssembler::storeReg(int reg)
void BaselineAssembler::loadLocal(int index, int level)
{
Heap::CallContext ctx;
Q_UNUSED(ctx)
Q_UNUSED(ctx);
pasm()->loadPointerFromValue(regAddr(CallData::Context), PlatformAssembler::ScratchRegister);
while (level) {
pasm()->loadPtr(Address(PlatformAssembler::ScratchRegister, ctx.outer.offset), PlatformAssembler::ScratchRegister);
@ -900,7 +900,7 @@ void BaselineAssembler::loadLocal(int index, int level)
void BaselineAssembler::storeLocal(int index, int level)
{
Heap::CallContext ctx;
Q_UNUSED(ctx)
Q_UNUSED(ctx);
pasm()->loadPtr(regAddr(CallData::Context), PlatformAssembler::ScratchRegister);
while (level) {
pasm()->loadPtr(Address(PlatformAssembler::ScratchRegister, ctx.outer.offset), PlatformAssembler::ScratchRegister);
@ -1592,7 +1592,7 @@ void BaselineAssembler::pushCatchContext(int index, int name)
void BaselineAssembler::popContext()
{
Heap::CallContext ctx;
Q_UNUSED(ctx)
Q_UNUSED(ctx);
pasm()->loadPointerFromValue(regAddr(CallData::Context), PlatformAssembler::ScratchRegister);
pasm()->loadPtr(Address(PlatformAssembler::ScratchRegister, ctx.outer.offset), PlatformAssembler::ScratchRegister);
pasm()->storeHeapObject(PlatformAssembler::ScratchRegister, regAddr(CallData::Context));

View File

@ -501,7 +501,7 @@ ReturnedValue QQmlContextWrapper::resolveQmlContextPropertyLookupGetter(Lookup *
ReturnedValue QQmlContextWrapper::lookupScript(Lookup *l, ExecutionEngine *engine, Value *base)
{
Q_UNUSED(base)
Q_UNUSED(base);
Scope scope(engine);
Scoped<QmlContext> qmlContext(scope, engine->qmlContext());
if (!qmlContext)
@ -519,14 +519,14 @@ ReturnedValue QQmlContextWrapper::lookupScript(Lookup *l, ExecutionEngine *engin
ReturnedValue QQmlContextWrapper::lookupSingleton(Lookup *l, ExecutionEngine *engine, Value *base)
{
Q_UNUSED(engine)
Q_UNUSED(base)
Q_UNUSED(engine);
Q_UNUSED(base);
return Value::fromHeapObject(l->qmlContextSingletonLookup.singleton).asReturnedValue();
}
ReturnedValue QQmlContextWrapper::lookupIdObject(Lookup *l, ExecutionEngine *engine, Value *base)
{
Q_UNUSED(base)
Q_UNUSED(base);
Scope scope(engine);
Scoped<QmlContext> qmlContext(scope, engine->qmlContext());
if (!qmlContext)

View File

@ -224,7 +224,7 @@ void Heap::RegExp::init(ExecutionEngine *engine, const QString &pattern, uint fl
JSC::Yarr::jitCompile(yarrPattern, JSC::Yarr::Char16, vm, *jitCode);
}
#else
Q_UNUSED(engine)
Q_UNUSED(engine);
#endif
if (hasValidJITCode()) {
valid = true;

View File

@ -62,7 +62,7 @@ void Heap::UrlCtor::init(QV4::ExecutionContext *scope)
void UrlPrototype::init(ExecutionEngine *engine, Object *ctor)
{
Q_UNUSED(ctor)
Q_UNUSED(ctor);
Scope scope(engine);
ScopedObject o(scope);
@ -721,7 +721,7 @@ void Heap::UrlSearchParamsCtor::init(QV4::ExecutionContext *scope)
void UrlSearchParamsPrototype::init(ExecutionEngine *engine, Object *ctor)
{
Q_UNUSED(ctor)
Q_UNUSED(ctor);
Scope scope(engine);
ScopedObject o(scope);

View File

@ -2572,8 +2572,8 @@ bool QQml_isFileCaseCorrect(const QString &fileName, int lengthIn /* = -1 */)
return false;
}
#else
Q_UNUSED(lengthIn)
Q_UNUSED(fileName)
Q_UNUSED(lengthIn);
Q_UNUSED(fileName);
#endif
return true;
}

View File

@ -428,7 +428,7 @@ private:
bool QQmlPropertyData::operator==(const QQmlPropertyData &other) const
{
Q_UNUSED(m_reserved)
Q_UNUSED(m_reserved);
return flags() == other.flags() &&
propType() == other.propType() &&
coreIndex() == other.coreIndex() &&

View File

@ -792,7 +792,7 @@ int QQmlType::scopedEnumIndex(QQmlEnginePrivate *engine, const QString &name, bo
int QQmlType::scopedEnumValue(QQmlEnginePrivate *engine, int index, const QV4::String *name, bool *ok) const
{
Q_UNUSED(engine)
Q_UNUSED(engine);
Q_ASSERT(ok);
*ok = true;
@ -809,7 +809,7 @@ int QQmlType::scopedEnumValue(QQmlEnginePrivate *engine, int index, const QV4::S
int QQmlType::scopedEnumValue(QQmlEnginePrivate *engine, int index, const QString &name, bool *ok) const
{
Q_UNUSED(engine)
Q_UNUSED(engine);
Q_ASSERT(ok);
*ok = true;

View File

@ -337,7 +337,7 @@ QVariant QQmlPropertyMap::operator[](const QString &key) const
*/
QVariant QQmlPropertyMap::updateValue(const QString &key, const QVariant &input)
{
Q_UNUSED(key)
Q_UNUSED(key);
return input;
}

View File

@ -82,7 +82,7 @@ protected:
QQmlPropertyMap(DerivedType *derived, QObject *parentObj)
: QQmlPropertyMap(&DerivedType::staticMetaObject, parentObj)
{
Q_UNUSED(derived)
Q_UNUSED(derived);
}
private:

View File

@ -69,8 +69,8 @@ void QQmlDebugTranslationClient::messageReceived(const QByteArray &data)
void QQmlDebugTranslationClient::triggerLanguage(const QUrl &url, const QString &locale)
{
Q_UNUSED(url)
Q_UNUSED(locale)
Q_UNUSED(url);
Q_UNUSED(locale);
}
QT_END_NAMESPACE

View File

@ -93,7 +93,7 @@ public:
virtual void setWatchedRoles(const QList<QByteArray> &roles) = 0;
virtual QQmlIncubator::Status incubationStatus(int index) = 0;
virtual void drainReusableItemsPool(int maxPoolTime) { Q_UNUSED(maxPoolTime) }
virtual void drainReusableItemsPool(int maxPoolTime) { Q_UNUSED(maxPoolTime); }
virtual int poolSize() { return 0; }
virtual int indexOf(QObject *object, QObject *objectContext) const = 0;

View File

@ -339,7 +339,7 @@ void QAccessibleQuickItem::doAction(const QString &actionName)
QStringList QAccessibleQuickItem::keyBindingsForAction(const QString &actionName) const
{
Q_UNUSED(actionName)
Q_UNUSED(actionName);
return QStringList();
}

View File

@ -120,7 +120,7 @@ QString QAccessibleQuickWindow::text(QAccessible::Text text) const
return QString::fromLatin1(object()->metaObject()->className()) ;
}
#else
Q_UNUSED(text)
Q_UNUSED(text);
#endif
return window()->title();
}

View File

@ -291,8 +291,8 @@ void QQuickDesignerCustomObjectData::keepBindingFromGettingDeleted(QQmlContext *
const QQuickDesignerSupport::PropertyName &propertyName)
{
//Refcounting is taking care
Q_UNUSED(context)
Q_UNUSED(propertyName)
Q_UNUSED(context);
Q_UNUSED(propertyName);
}
void QQuickDesignerCustomObjectData::handleDestroyed()

View File

@ -214,7 +214,7 @@ QObject *QQuickDesignerSupportItems::createPrimitive(const QString &typeName, QT
{
ComponentCompleteDisabler disableComponentComplete;
Q_UNUSED(disableComponentComplete)
Q_UNUSED(disableComponentComplete);
QObject *object = nullptr;
QQmlType type = QQmlMetaType::qmlType(typeName, version);
@ -260,7 +260,7 @@ QObject *QQuickDesignerSupportItems::createPrimitive(const QString &typeName, QT
QObject *QQuickDesignerSupportItems::createComponent(const QUrl &componentUrl, QQmlContext *context)
{
ComponentCompleteDisabler disableComponentComplete;
Q_UNUSED(disableComponentComplete)
Q_UNUSED(disableComponentComplete);
QQmlComponent component(context->engine(), componentUrl);

View File

@ -86,7 +86,7 @@ void QQuickDesignerWindowManager::makeOpenGLContext(QQuickWindow *window)
m_openGlContext->makeCurrent(window);
}
#else
Q_UNUSED(window)
Q_UNUSED(window);
#endif
}

View File

@ -605,7 +605,7 @@ void QQuickPointerHandler::handlePointerEvent(QQuickPointerEvent *event)
bool QQuickPointerHandler::wantsPointerEvent(QQuickPointerEvent *event)
{
Q_D(const QQuickPointerHandler);
Q_UNUSED(event)
Q_UNUSED(event);
return d->enabled;
}

View File

@ -479,7 +479,7 @@ void QQuickWheelHandler::handleEventPoint(QQuickEventPoint *point)
void QQuickWheelHandler::onTargetChanged(QQuickItem *oldTarget)
{
Q_UNUSED(oldTarget)
Q_UNUSED(oldTarget);
Q_D(QQuickWheelHandler);
d->metaPropertyDirty = true;
}

View File

@ -144,7 +144,7 @@ Q_QUICK_PRIVATE_EXPORT QColor qt_color_from_string(const QV4::Value &name)
return QColor(p);
else {
bool isRgb(false), isHsl(false), hasAlpha(false);
Q_UNUSED(isHsl)
Q_UNUSED(isHsl);
while (isspace(*p)) p++;
if (strncmp(p, "rgb", 3) == 0)

View File

@ -274,7 +274,7 @@ void QQuickContents::updateRect()
void QQuickContents::itemGeometryChanged(QQuickItem *changed, QQuickGeometryChange change, const QRectF &)
{
Q_UNUSED(changed)
Q_UNUSED(changed);
bool wChanged = false;
bool hChanged = false;
//### we can only pass changed if the left edge has moved left, or the right edge has moved right
@ -3813,7 +3813,7 @@ void QQuickItem::geometryChange(const QRectF &newGeometry, const QRectF &oldGeom
QSGNode *QQuickItem::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *updatePaintNodeData)
{
Q_UNUSED(updatePaintNodeData)
Q_UNUSED(updatePaintNodeData);
delete oldNode;
return nullptr;
}
@ -8804,7 +8804,7 @@ void QQuickItemLayer::setName(const QByteArray &name) {
void QQuickItemLayer::itemOpacityChanged(QQuickItem *item)
{
Q_UNUSED(item)
Q_UNUSED(item);
updateOpacity();
}
@ -8815,7 +8815,7 @@ void QQuickItemLayer::itemGeometryChanged(QQuickItem *, QQuickGeometryChange, co
void QQuickItemLayer::itemParentChanged(QQuickItem *item, QQuickItem *parent)
{
Q_UNUSED(item)
Q_UNUSED(item);
Q_ASSERT(item == m_item);
Q_ASSERT(parent != m_effectSource);
Q_ASSERT(parent == nullptr || parent != m_effect);

View File

@ -3553,7 +3553,7 @@ bool QQuickTextInputPrivate::finishChange(int validateFromState, bool update, bo
{
Q_Q(QQuickTextInput);
Q_UNUSED(update)
Q_UNUSED(update);
#if QT_CONFIG(im)
bool inputMethodAttributesChanged = m_textDirty || m_selDirty;
#endif
@ -3666,7 +3666,7 @@ void QQuickTextInputPrivate::internalSetText(const QString &txt, int pos, bool e
bool changed = finishChange(-1, true, edited);
#if !QT_CONFIG(accessibility)
Q_UNUSED(changed)
Q_UNUSED(changed);
#else
Q_Q(QQuickTextInput);
if (changed && QAccessible::isActive()) {

View File

@ -71,7 +71,7 @@ public:
void setGradientStops(const QGradientStops &stops) override;
void setGradientVertical(bool vertical) override;
void setRadius(qreal radius) override;
void setAntialiasing(bool antialiasing) override { Q_UNUSED(antialiasing) }
void setAntialiasing(bool antialiasing) override { Q_UNUSED(antialiasing); }
void setAligned(bool aligned) override;
void update() override;

View File

@ -388,7 +388,7 @@ void qsg_dumpShadowRoots(Node *n)
--indent;
#else
Q_UNUSED(n)
Q_UNUSED(n);
#endif
}

View File

@ -165,7 +165,7 @@ void QSGNodeUpdater::leaveGeometryNode(QSGGeometryNode *g)
#ifdef QSG_UPDATER_DEBUG
qDebug() << "leave geometry" << g;
#else
Q_UNUSED(g)
Q_UNUSED(g);
#endif
}
@ -186,7 +186,7 @@ void QSGNodeUpdater::leaveRenderNode(QSGRenderNode *r)
#ifdef QSG_UPDATER_DEBUG
qDebug() << "leave render" << r;
#else
Q_UNUSED(r)
Q_UNUSED(r);
#endif
}

View File

@ -196,7 +196,7 @@ static void qt_debug_remove_texture(QSGTexture* texture)
}
}
#else
Q_UNUSED(texture)
Q_UNUSED(texture);
#endif
--qt_debug_texture_count;

View File

@ -142,7 +142,7 @@ public:
virtual void setGradientStops(const QGradientStops &stops) = 0;
virtual void setGradientVertical(bool vertical) = 0;
virtual void setRadius(qreal radius) = 0;
virtual void setAntialiasing(bool antialiasing) { Q_UNUSED(antialiasing) }
virtual void setAntialiasing(bool antialiasing) { Q_UNUSED(antialiasing); }
virtual void setAligned(bool aligned) = 0;
virtual void update() = 0;
@ -162,7 +162,7 @@ public:
// in the inner source rect maps to the upper-left corner of the inner target rect.
virtual void setSubSourceRect(const QRectF &rect) = 0;
virtual void setTexture(QSGTexture *texture) = 0;
virtual void setAntialiasing(bool antialiasing) { Q_UNUSED(antialiasing) }
virtual void setAntialiasing(bool antialiasing) { Q_UNUSED(antialiasing); }
virtual void setMirror(bool mirror) = 0;
virtual void setMipmapFiltering(QSGTexture::Filtering filtering) = 0;
virtual void setFiltering(QSGTexture::Filtering filtering) = 0;

View File

@ -131,7 +131,7 @@ void QSGRenderLoop::postJob(QQuickWindow *window, QRunnable *job)
cd->rhi->makeThreadLocalNativeContextCurrent();
job->run();
#else
Q_UNUSED(window)
Q_UNUSED(window);
job->run();
#endif
delete job;

View File

@ -167,7 +167,7 @@ class QQuickValueTypeProvider : public QQmlValueTypeProvider
public:
#if defined(QT_NO_DEBUG) && !defined(QT_FORCE_ASSERTS)
#define ASSERT_VALID_SIZE(size, min) Q_UNUSED(size)
#define ASSERT_VALID_SIZE(size, min) Q_UNUSED(size);
#else
#define ASSERT_VALID_SIZE(size, min) Q_ASSERT(size >= min)
#endif

View File

@ -335,8 +335,8 @@ private:
static QObject *module_api_factory(QQmlEngine *engine, QJSEngine *scriptEngine)
{
Q_UNUSED(engine)
Q_UNUSED(scriptEngine)
Q_UNUSED(engine);
Q_UNUSED(scriptEngine);
MyTestSingletonType *api = new MyTestSingletonType();
return api;
}

View File

@ -136,7 +136,7 @@ void MyQmlObject::v8function(QQmlV4Function *function)
static QJSValue script_api(QQmlEngine *engine, QJSEngine *scriptEngine)
{
Q_UNUSED(engine)
Q_UNUSED(engine);
static int testProperty = 13;
QJSValue v = scriptEngine->newObject();
@ -146,7 +146,7 @@ static QJSValue script_api(QQmlEngine *engine, QJSEngine *scriptEngine)
static QJSValue readonly_script_api(QQmlEngine *engine, QJSEngine *scriptEngine)
{
Q_UNUSED(engine)
Q_UNUSED(engine);
static int testProperty = 42;
QJSValue v = scriptEngine->newObject();
@ -161,8 +161,8 @@ static QJSValue readonly_script_api(QQmlEngine *engine, QJSEngine *scriptEngine)
static QObject *testImportOrder_api(QQmlEngine *engine, QJSEngine *scriptEngine)
{
Q_UNUSED(engine)
Q_UNUSED(scriptEngine)
Q_UNUSED(engine);
Q_UNUSED(scriptEngine);
testImportOrderApi *o = new testImportOrderApi(37);
return o;
@ -170,8 +170,8 @@ static QObject *testImportOrder_api(QQmlEngine *engine, QJSEngine *scriptEngine)
static QObject *testImportOrder_api1(QQmlEngine *engine, QJSEngine *scriptEngine)
{
Q_UNUSED(engine)
Q_UNUSED(scriptEngine)
Q_UNUSED(engine);
Q_UNUSED(scriptEngine);
testImportOrderApi *o = new testImportOrderApi(1);
return o;
@ -179,8 +179,8 @@ static QObject *testImportOrder_api1(QQmlEngine *engine, QJSEngine *scriptEngine
static QObject *testImportOrder_api2(QQmlEngine *engine, QJSEngine *scriptEngine)
{
Q_UNUSED(engine)
Q_UNUSED(scriptEngine)
Q_UNUSED(engine);
Q_UNUSED(scriptEngine);
testImportOrderApi *o = new testImportOrderApi(2);
return o;
@ -188,8 +188,8 @@ static QObject *testImportOrder_api2(QQmlEngine *engine, QJSEngine *scriptEngine
static QObject *qobject_api(QQmlEngine *engine, QJSEngine *scriptEngine)
{
Q_UNUSED(engine)
Q_UNUSED(scriptEngine)
Q_UNUSED(engine);
Q_UNUSED(scriptEngine);
testQObjectApi *o = new testQObjectApi();
o->setQObjectTestProperty(20);
@ -200,8 +200,8 @@ static QObject *qobject_api(QQmlEngine *engine, QJSEngine *scriptEngine)
static QObject *qobject_api_two(QQmlEngine *engine, QJSEngine *scriptEngine)
{
Q_UNUSED(engine)
Q_UNUSED(scriptEngine)
Q_UNUSED(engine);
Q_UNUSED(scriptEngine);
testQObjectApiTwo *o = new testQObjectApiTwo;
return o;
@ -209,7 +209,7 @@ static QObject *qobject_api_two(QQmlEngine *engine, QJSEngine *scriptEngine)
static QObject *qobject_api_engine_parent(QQmlEngine *engine, QJSEngine *scriptEngine)
{
Q_UNUSED(scriptEngine)
Q_UNUSED(scriptEngine);
static int testProperty = 26;
testQObjectApi *o = new testQObjectApi(engine);
@ -219,16 +219,16 @@ static QObject *qobject_api_engine_parent(QQmlEngine *engine, QJSEngine *scriptE
static QObject *fallback_bindings_object(QQmlEngine *engine, QJSEngine *scriptEngine)
{
Q_UNUSED(engine)
Q_UNUSED(scriptEngine)
Q_UNUSED(engine);
Q_UNUSED(scriptEngine);
return new FallbackBindingsObject();
}
static QObject *fallback_bindings_derived(QQmlEngine *engine, QJSEngine *scriptEngine)
{
Q_UNUSED(engine)
Q_UNUSED(scriptEngine)
Q_UNUSED(engine);
Q_UNUSED(scriptEngine);
return new FallbackBindingsDerived();
}

View File

@ -4296,7 +4296,7 @@ void tst_qqmlecmascript::verifyContextLifetime(const QQmlRefPointer<QQmlContextD
{
QV4::Scope scope(v4);
QV4::ScopedContext temporaryScope(scope, QV4::QmlContext::create(scope.engine->rootContext(), scriptContext, nullptr));
Q_UNUSED(temporaryScope)
Q_UNUSED(temporaryScope);
}
ctxt->engine()->collectGarbage();

View File

@ -31,15 +31,15 @@
static QObject *myTypeObjectSingleton(QQmlEngine *engine, QJSEngine *scriptEngine)
{
Q_UNUSED(engine)
Q_UNUSED(scriptEngine)
Q_UNUSED(engine);
Q_UNUSED(scriptEngine);
return new MyTypeObject();
}
static QJSValue myQJSValueQObjectSingleton(QQmlEngine *engine, QJSEngine *scriptEngine)
{
Q_UNUSED(engine)
Q_UNUSED(engine);
QJSValue value = scriptEngine->newQObject(new MyTypeObject());
return value;

View File

@ -63,7 +63,7 @@
DEFINE_BOOL_CONFIG_OPTION(qmlCheckTypes, QML_CHECK_TYPES)
static inline bool isCaseSensitiveFileSystem(const QString &path) {
Q_UNUSED(path)
Q_UNUSED(path);
#if defined(Q_OS_MAC)
return pathconf(path.toLatin1().constData(), _PC_CASE_SENSITIVE);
#elif defined(Q_OS_WIN)

View File

@ -151,8 +151,8 @@ private:
static QObject *test_module_api_factory(QQmlEngine *engine, QJSEngine *scriptEngine)
{
Q_UNUSED(engine)
Q_UNUSED(scriptEngine)
Q_UNUSED(engine);
Q_UNUSED(scriptEngine);
TestModuleApi *api = new TestModuleApi;
return api;
}

View File

@ -623,7 +623,7 @@ void tst_qquickborderimage::multiFrame()
QFETCH(QString, qmlfile);
QFETCH(bool, asynchronous);
Q_UNUSED(asynchronous)
Q_UNUSED(asynchronous);
QQuickView view(testFileUrl(qmlfile));
QQuickBorderImage *image = qobject_cast<QQuickBorderImage*>(view.rootObject());

View File

@ -301,7 +301,7 @@ private:
}
void releaseView(QQuickView *view) {
Q_ASSERT(view == m_view);
Q_UNUSED(view)
Q_UNUSED(view);
m_view->setSource(QUrl());
}
#else

View File

@ -1222,7 +1222,7 @@ void tst_qquickimage::multiFrame()
QFETCH(QString, qmlfile);
QFETCH(bool, asynchronous);
Q_UNUSED(asynchronous)
Q_UNUSED(asynchronous);
QQuickView view(testFileUrl(qmlfile));
QQuickImage *image = qobject_cast<QQuickImage*>(view.rootObject());

View File

@ -341,7 +341,7 @@ public:
: QQuickImageProvider(Pixmap) {}
virtual QPixmap requestPixmap(const QString &d, QSize *, const QSize &) {
Q_UNUSED(d)
Q_UNUSED(d);
QPixmap pix(800, 600);
pix.fill(fillColor);
return pix;

View File

@ -150,7 +150,7 @@ public:
bool canFetchMore(const QModelIndex &parent) const override
{
Q_UNUSED(parent)
Q_UNUSED(parent);
return m_dataCanBeFetched;
}
@ -167,7 +167,7 @@ public:
void fetchMore(const QModelIndex &parent) override
{
Q_UNUSED(parent)
Q_UNUSED(parent);
addRow(m_rows - 1);
}

View File

@ -2774,7 +2774,7 @@ public:
bool childMouseEventFilter(QQuickItem *item, QEvent *event) override
{
Q_UNUSED(item)
Q_UNUSED(item);
if (event->type() == QEvent::MouseButtonPress && !contains(static_cast<QMouseEvent*>(event)->position().toPoint())) {
// This is an evil hack: in case of items that are not rectangles, we never accept the event.
// Instead the events are now delivered to QDeclarativeGeoMapItemBase which doesn't to anything with them.

View File

@ -66,7 +66,7 @@ void QQuickViewTestUtil::moveMouseAway(QQuickView *window)
#if QT_CONFIG(cursor) // Get the cursor out of the way.
QCursor::setPos(window->geometry().topRight() + QPoint(100, 100));
#else
Q_UNUSED(window)
Q_UNUSED(window);
#endif
}
@ -489,7 +489,7 @@ namespace QQuickTest {
if (moveMouseOut)
QCursor::setPos(v.geometry().topRight() + QPoint(100, 100));
#else
Q_UNUSED(moveMouseOut)
Q_UNUSED(moveMouseOut);
#endif
return true;
}

View File

@ -30,8 +30,8 @@
static QJSValue script_api(QQmlEngine *engine, QJSEngine *scriptEngine)
{
Q_UNUSED(engine)
Q_UNUSED(scriptEngine)
Q_UNUSED(engine);
Q_UNUSED(scriptEngine);
static int testProperty = 13;
QJSValue v = scriptEngine->newObject();
@ -41,8 +41,8 @@ static QJSValue script_api(QQmlEngine *engine, QJSEngine *scriptEngine)
static QObject *qobject_api(QQmlEngine *engine, QJSEngine *scriptEngine)
{
Q_UNUSED(engine)
Q_UNUSED(scriptEngine)
Q_UNUSED(engine);
Q_UNUSED(scriptEngine);
testQObjectApi *o = new testQObjectApi;
o->setQObjectTestProperty(20);
@ -51,7 +51,7 @@ static QObject *qobject_api(QQmlEngine *engine, QJSEngine *scriptEngine)
static QObject *qobject_api_engine_parent(QQmlEngine *engine, QJSEngine *scriptEngine)
{
Q_UNUSED(scriptEngine)
Q_UNUSED(scriptEngine);
static int testProperty = 26;
testQObjectApi *o = new testQObjectApi(engine);

View File

@ -229,7 +229,7 @@ public:
public Q_SLOTS:
void checkFinished(QObject *o, const QUrl &url)
{
Q_UNUSED(url)
Q_UNUSED(url);
if (o) {
checkForWindow(o);
if (conf && qae)
@ -286,7 +286,7 @@ void LoadWatcher::checkForWindow(QObject *o)
if (o->isWindowType() && o->inherits("QQuickWindow"))
haveWindow = true;
#else
Q_UNUSED(o)
Q_UNUSED(o);
#endif // QT_GUI_LIB
}
@ -338,8 +338,8 @@ static void getAppFlags(int argc, char **argv)
}
}
#else
Q_UNUSED(argc)
Q_UNUSED(argv)
Q_UNUSED(argc);
Q_UNUSED(argv);
#endif // QT_GUI_LIB
}