forked from qt-creator/qt-creator
QmlPuppet: Adapt to C++ 17 [[maybe_unused]]
It has the advantage to to move the attribute to the declaration instead of using a workaround. Change-Id: Ia6115ab8fefbe03f247edfea2b7bed73e9149068 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -741,8 +741,7 @@ QObject *ObjectNodeInstance::createPrimitiveFromSource(const QString &typeName,
|
||||
|
||||
QObject *ObjectNodeInstance::createComponentWrap(const QString &nodeSource, const QByteArray &importCode, QQmlContext *context)
|
||||
{
|
||||
QmlPrivateGate::ComponentCompleteDisabler disableComponentComplete;
|
||||
Q_UNUSED(disableComponentComplete)
|
||||
[[maybe_unused]] QmlPrivateGate::ComponentCompleteDisabler disableComponentComplete;
|
||||
|
||||
QQmlComponent *component = new QQmlComponent(context->engine());
|
||||
|
||||
@@ -794,12 +793,11 @@ static inline QString fixComponentPathForIncompatibleQt(const QString &component
|
||||
return result;
|
||||
}
|
||||
|
||||
QObject *ObjectNodeInstance::createComponent(const QString &componentPath, QQmlContext *context)
|
||||
QObject *ObjectNodeInstance::createComponent([[maybe_unused]] const QString &componentPath,
|
||||
QQmlContext *context)
|
||||
{
|
||||
QmlPrivateGate::ComponentCompleteDisabler disableComponentComplete;
|
||||
|
||||
Q_UNUSED(disableComponentComplete)
|
||||
|
||||
QQmlComponent component(context->engine(), fixComponentPathForIncompatibleQt(componentPath));
|
||||
|
||||
QObject *object = nullptr;
|
||||
@@ -831,8 +829,7 @@ QObject *ObjectNodeInstance::createCustomParserObject(const QString &nodeSource,
|
||||
const QByteArray &importCode,
|
||||
QQmlContext *context)
|
||||
{
|
||||
QmlPrivateGate::ComponentCompleteDisabler disableComponentComplete;
|
||||
Q_UNUSED(disableComponentComplete)
|
||||
[[maybe_unused]] QmlPrivateGate::ComponentCompleteDisabler disableComponentComplete;
|
||||
|
||||
QQmlComponent component(context->engine());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user