diff options
Diffstat (limited to 'src')
20 files changed, 28 insertions, 26 deletions
diff --git a/src/script/api/qscriptclass.cpp b/src/script/api/qscriptclass.cpp index bd7c452..1ff6da0 100644 --- a/src/script/api/qscriptclass.cpp +++ b/src/script/api/qscriptclass.cpp @@ -236,7 +236,7 @@ QScriptClass::QueryFlags QScriptClass::queryProperty( Q_UNUSED(name); Q_UNUSED(flags); Q_UNUSED(id); - return 0; + return {}; } /*! @@ -276,7 +276,7 @@ QScriptValue::PropertyFlags QScriptClass::propertyFlags( Q_UNUSED(object); Q_UNUSED(name); Q_UNUSED(id); - return 0; + return {}; } /*! diff --git a/src/script/api/qscriptengine.cpp b/src/script/api/qscriptengine.cpp index 5bd399f..40ba46c 100644 --- a/src/script/api/qscriptengine.cpp +++ b/src/script/api/qscriptengine.cpp @@ -1332,8 +1332,10 @@ void QScriptEnginePrivate::collectGarbage() void QScriptEnginePrivate::reportAdditionalMemoryCost(int size) { - if (size > 0) + if (size > 0) { + QScript::APIShim shim(this); globalData->heap.reportExtraMemoryCost(size); + } } QScript::TimeoutCheckerProxy *QScriptEnginePrivate::timeoutChecker() const @@ -1988,9 +1990,9 @@ QScriptValue::PropertyFlags QScriptEnginePrivate::propertyFlags(JSC::ExecState * JSC::JSValue proto = object->prototype(); return propertyFlags(exec, proto, id, mode); } - return 0; + return {}; } - QScriptValue::PropertyFlags result = 0; + QScriptValue::PropertyFlags result; if (attribs & JSC::ReadOnly) result |= QScriptValue::ReadOnly; if (attribs & JSC::DontEnum) diff --git a/src/script/api/qscriptengine_p.h b/src/script/api/qscriptengine_p.h index a71bbc5..84821c4 100644 --- a/src/script/api/qscriptengine_p.h +++ b/src/script/api/qscriptengine_p.h @@ -329,7 +329,7 @@ public: void markQObjectData(JSC::MarkStack&); JSC::JSValue newQObject(QObject *object, QScriptEngine::ValueOwnership ownership = QScriptEngine::QtOwnership, - const QScriptEngine:: QObjectWrapOptions &options = 0); + const QScriptEngine:: QObjectWrapOptions &options = {}); JSC::JSValue newQMetaObject(const QMetaObject *metaObject, JSC::JSValue ctor); diff --git a/src/script/api/qscriptvalue.cpp b/src/script/api/qscriptvalue.cpp index 48d34cf..7569064 100644 --- a/src/script/api/qscriptvalue.cpp +++ b/src/script/api/qscriptvalue.cpp @@ -1507,7 +1507,7 @@ QScriptValue::PropertyFlags QScriptValue::propertyFlags(const QString &name, { Q_D(const QScriptValue); if (!d || !d->isObject()) - return 0; + return {}; QScript::APIShim shim(d->engine); JSC::ExecState *exec = d->engine->currentFrame; return d->propertyFlags(JSC::Identifier(exec, name), mode); @@ -1527,7 +1527,7 @@ QScriptValue::PropertyFlags QScriptValue::propertyFlags(const QScriptString &nam { Q_D(const QScriptValue); if (!d || !d->isObject() || !QScriptStringPrivate::isValid(name)) - return 0; + return {}; return d->propertyFlags(name.d_ptr->identifier, mode); } diff --git a/src/script/api/qscriptvalueiterator.cpp b/src/script/api/qscriptvalueiterator.cpp index a1e3b21..8a038f5 100644 --- a/src/script/api/qscriptvalueiterator.cpp +++ b/src/script/api/qscriptvalueiterator.cpp @@ -323,7 +323,7 @@ QScriptValue::PropertyFlags QScriptValueIterator::flags() const { Q_D(const QScriptValueIterator); if (!d || !d->initialized || !d->engine()) - return 0; + return {}; QScript::APIShim shim(d->engine()); return d->object()->propertyFlags(*d->current); } diff --git a/src/script/bridge/qscriptdeclarativeclass.cpp b/src/script/bridge/qscriptdeclarativeclass.cpp index 1149c4f..11b3caa 100644 --- a/src/script/bridge/qscriptdeclarativeclass.cpp +++ b/src/script/bridge/qscriptdeclarativeclass.cpp @@ -487,7 +487,7 @@ QScriptDeclarativeClass::queryProperty(Object *object, const Identifier &name, Q_UNUSED(object); Q_UNUSED(name); Q_UNUSED(flags); - return 0; + return {}; } QScriptDeclarativeClass::Value @@ -511,7 +511,7 @@ QScriptDeclarativeClass::propertyFlags(Object *object, const Identifier &name) { Q_UNUSED(object); Q_UNUSED(name); - return 0; + return {}; } QScriptDeclarativeClass::Value QScriptDeclarativeClass::call(Object *object, diff --git a/src/scripttools/debugging/qscriptbreakpointsmodel.cpp b/src/scripttools/debugging/qscriptbreakpointsmodel.cpp index 7f56a09..90acb76 100644 --- a/src/scripttools/debugging/qscriptbreakpointsmodel.cpp +++ b/src/scripttools/debugging/qscriptbreakpointsmodel.cpp @@ -472,7 +472,7 @@ QVariant QScriptBreakpointsModel::headerData(int section, Qt::Orientation orient Qt::ItemFlags QScriptBreakpointsModel::flags(const QModelIndex &index) const { if (!index.isValid()) - return 0; + return {}; Qt::ItemFlags ret = QAbstractItemModel::flags(index); switch (index.column()) { case 0: diff --git a/src/scripttools/debugging/qscriptbreakpointswidget.cpp b/src/scripttools/debugging/qscriptbreakpointswidget.cpp index 51059e2..a227390 100644 --- a/src/scripttools/debugging/qscriptbreakpointswidget.cpp +++ b/src/scripttools/debugging/qscriptbreakpointswidget.cpp @@ -272,7 +272,7 @@ private Q_SLOTS: }; QScriptBreakpointsWidget::QScriptBreakpointsWidget(QWidget *parent) - : QScriptBreakpointsWidgetInterface(*new QScriptBreakpointsWidgetPrivate, parent, 0) + : QScriptBreakpointsWidgetInterface(*new QScriptBreakpointsWidgetPrivate, parent, {}) { Q_D(QScriptBreakpointsWidget); d->view = new QTreeView(); diff --git a/src/scripttools/debugging/qscriptdebuggercodefinderwidget.cpp b/src/scripttools/debugging/qscriptdebuggercodefinderwidget.cpp index a538234..4d73af8 100644 --- a/src/scripttools/debugging/qscriptdebuggercodefinderwidget.cpp +++ b/src/scripttools/debugging/qscriptdebuggercodefinderwidget.cpp @@ -121,7 +121,7 @@ void QScriptDebuggerCodeFinderWidgetPrivate::_q_previous() QScriptDebuggerCodeFinderWidget::QScriptDebuggerCodeFinderWidget(QWidget *parent) : QScriptDebuggerCodeFinderWidgetInterface( - *new QScriptDebuggerCodeFinderWidgetPrivate, parent, 0) + *new QScriptDebuggerCodeFinderWidgetPrivate, parent, {}) { Q_D(QScriptDebuggerCodeFinderWidget); QString system = QLatin1String("win"); diff --git a/src/scripttools/debugging/qscriptdebuggercodeview.cpp b/src/scripttools/debugging/qscriptdebuggercodeview.cpp index 19545b6..02caeda 100644 --- a/src/scripttools/debugging/qscriptdebuggercodeview.cpp +++ b/src/scripttools/debugging/qscriptdebuggercodeview.cpp @@ -68,7 +68,7 @@ QScriptDebuggerCodeViewPrivate::~QScriptDebuggerCodeViewPrivate() } QScriptDebuggerCodeView::QScriptDebuggerCodeView(QWidget *parent) - : QScriptDebuggerCodeViewInterface(*new QScriptDebuggerCodeViewPrivate, parent, 0) + : QScriptDebuggerCodeViewInterface(*new QScriptDebuggerCodeViewPrivate, parent, {}) { Q_D(QScriptDebuggerCodeView); d->editor = new QScriptEdit(); diff --git a/src/scripttools/debugging/qscriptdebuggercodewidget.cpp b/src/scripttools/debugging/qscriptdebuggercodewidget.cpp index 23e1bf6..f0d6af0 100644 --- a/src/scripttools/debugging/qscriptdebuggercodewidget.cpp +++ b/src/scripttools/debugging/qscriptdebuggercodewidget.cpp @@ -198,7 +198,7 @@ void QScriptDebuggerCodeWidgetPrivate::_q_onToolTipRequest( } QScriptDebuggerCodeWidget::QScriptDebuggerCodeWidget(QWidget *parent) - : QScriptDebuggerCodeWidgetInterface(*new QScriptDebuggerCodeWidgetPrivate, parent, 0) + : QScriptDebuggerCodeWidgetInterface(*new QScriptDebuggerCodeWidgetPrivate, parent, {}) { Q_D(QScriptDebuggerCodeWidget); QVBoxLayout *vbox = new QVBoxLayout(this); diff --git a/src/scripttools/debugging/qscriptdebuggerconsolewidget.cpp b/src/scripttools/debugging/qscriptdebuggerconsolewidget.cpp index 5cf68b6..712cb85 100644 --- a/src/scripttools/debugging/qscriptdebuggerconsolewidget.cpp +++ b/src/scripttools/debugging/qscriptdebuggerconsolewidget.cpp @@ -315,7 +315,7 @@ void QScriptDebuggerConsoleWidgetPrivate::_q_onCompletionTaskFinished() } QScriptDebuggerConsoleWidget::QScriptDebuggerConsoleWidget(QWidget *parent) - : QScriptDebuggerConsoleWidgetInterface(*new QScriptDebuggerConsoleWidgetPrivate, parent, 0) + : QScriptDebuggerConsoleWidgetInterface(*new QScriptDebuggerConsoleWidgetPrivate, parent, {}) { Q_D(QScriptDebuggerConsoleWidget); d->commandLine = new CommandLine(); diff --git a/src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp b/src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp index 25ca0fb..7578b51 100644 --- a/src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp +++ b/src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp @@ -462,7 +462,7 @@ QModelIndex QScriptDebuggerLocalsModelPrivate::addTopLevelObject(const QString & return indexFromNode(node); QScriptDebuggerValueProperty prop(name, object, QString::fromLatin1(""), // ### string representation of object - /*flags=*/0); + QScriptValue::PropertyFlags{}); int rowIndex = invisibleRootNode->children.size(); q->beginInsertRows(QModelIndex(), rowIndex, rowIndex); node = new QScriptDebuggerLocalsModelNode(prop, invisibleRootNode); @@ -907,7 +907,7 @@ Qt::ItemFlags QScriptDebuggerLocalsModel::flags(const QModelIndex &index) const { Q_D(const QScriptDebuggerLocalsModel); if (!index.isValid()) - return 0; + return {}; Qt::ItemFlags ret = QAbstractItemModel::flags(index); if ((index.column() == 1) && index.parent().isValid()) { QScriptDebuggerLocalsModelNode *node = d->nodeFromIndex(index); diff --git a/src/scripttools/debugging/qscriptdebuggerlocalswidget.cpp b/src/scripttools/debugging/qscriptdebuggerlocalswidget.cpp index 3f11c87..ec268e3 100644 --- a/src/scripttools/debugging/qscriptdebuggerlocalswidget.cpp +++ b/src/scripttools/debugging/qscriptdebuggerlocalswidget.cpp @@ -343,7 +343,7 @@ void QScriptDebuggerLocalsItemDelegate::paint(QPainter *painter, const QStyleOpt } QScriptDebuggerLocalsWidget::QScriptDebuggerLocalsWidget(QWidget *parent) - : QScriptDebuggerLocalsWidgetInterface(*new QScriptDebuggerLocalsWidgetPrivate, parent, 0) + : QScriptDebuggerLocalsWidgetInterface(*new QScriptDebuggerLocalsWidgetPrivate, parent, {}) { Q_D(QScriptDebuggerLocalsWidget); d->view = new QTreeView(); diff --git a/src/scripttools/debugging/qscriptdebuggerscriptswidget.cpp b/src/scripttools/debugging/qscriptdebuggerscriptswidget.cpp index 1ded58b..ac134a0 100644 --- a/src/scripttools/debugging/qscriptdebuggerscriptswidget.cpp +++ b/src/scripttools/debugging/qscriptdebuggerscriptswidget.cpp @@ -94,7 +94,7 @@ void QScriptDebuggerScriptsWidgetPrivate::_q_onCurrentChanged(const QModelIndex } QScriptDebuggerScriptsWidget::QScriptDebuggerScriptsWidget(QWidget *parent) - : QScriptDebuggerScriptsWidgetInterface(*new QScriptDebuggerScriptsWidgetPrivate, parent, 0) + : QScriptDebuggerScriptsWidgetInterface(*new QScriptDebuggerScriptsWidgetPrivate, parent, {}) { Q_D(QScriptDebuggerScriptsWidget); d->view = new QTreeView(); diff --git a/src/scripttools/debugging/qscriptdebuggerstackwidget.cpp b/src/scripttools/debugging/qscriptdebuggerstackwidget.cpp index f72968b..d851f0b 100644 --- a/src/scripttools/debugging/qscriptdebuggerstackwidget.cpp +++ b/src/scripttools/debugging/qscriptdebuggerstackwidget.cpp @@ -76,7 +76,7 @@ void QScriptDebuggerStackWidgetPrivate::_q_onCurrentChanged(const QModelIndex &i } QScriptDebuggerStackWidget::QScriptDebuggerStackWidget(QWidget *parent) - : QScriptDebuggerStackWidgetInterface(*new QScriptDebuggerStackWidgetPrivate, parent, 0) + : QScriptDebuggerStackWidgetInterface(*new QScriptDebuggerStackWidgetPrivate, parent, {}) { Q_D(QScriptDebuggerStackWidget); d->view = new QTreeView(); diff --git a/src/scripttools/debugging/qscriptdebuggervalueproperty.cpp b/src/scripttools/debugging/qscriptdebuggervalueproperty.cpp index f46d3dd..6fed959 100644 --- a/src/scripttools/debugging/qscriptdebuggervalueproperty.cpp +++ b/src/scripttools/debugging/qscriptdebuggervalueproperty.cpp @@ -160,7 +160,7 @@ QScriptValue::PropertyFlags QScriptDebuggerValueProperty::flags() const { Q_D(const QScriptDebuggerValueProperty); if (!d) - return 0; + return {}; return d->flags; } diff --git a/src/scripttools/debugging/qscriptdebugoutputwidget.cpp b/src/scripttools/debugging/qscriptdebugoutputwidget.cpp index a522519..f6b3fa3 100644 --- a/src/scripttools/debugging/qscriptdebugoutputwidget.cpp +++ b/src/scripttools/debugging/qscriptdebugoutputwidget.cpp @@ -95,7 +95,7 @@ QScriptDebugOutputWidgetPrivate::~QScriptDebugOutputWidgetPrivate() } QScriptDebugOutputWidget::QScriptDebugOutputWidget(QWidget *parent) - : QScriptDebugOutputWidgetInterface(*new QScriptDebugOutputWidgetPrivate, parent, 0) + : QScriptDebugOutputWidgetInterface(*new QScriptDebugOutputWidgetPrivate, parent, {}) { Q_D(QScriptDebugOutputWidget); d->outputEdit = new QScriptDebugOutputWidgetOutputEdit(); diff --git a/src/scripttools/debugging/qscripterrorlogwidget.cpp b/src/scripttools/debugging/qscripterrorlogwidget.cpp index 165f0fd..3fd636d 100644 --- a/src/scripttools/debugging/qscripterrorlogwidget.cpp +++ b/src/scripttools/debugging/qscripterrorlogwidget.cpp @@ -90,7 +90,7 @@ QScriptErrorLogWidgetPrivate::~QScriptErrorLogWidgetPrivate() } QScriptErrorLogWidget::QScriptErrorLogWidget(QWidget *parent) - : QScriptErrorLogWidgetInterface(*new QScriptErrorLogWidgetPrivate, parent, 0) + : QScriptErrorLogWidgetInterface(*new QScriptErrorLogWidgetPrivate, parent, {}) { Q_D(QScriptErrorLogWidget); d->outputEdit = new QScriptErrorLogWidgetOutputEdit(); diff --git a/src/scripttools/debugging/qscriptvalueproperty.cpp b/src/scripttools/debugging/qscriptvalueproperty.cpp index 8f710cd..feebd82 100644 --- a/src/scripttools/debugging/qscriptvalueproperty.cpp +++ b/src/scripttools/debugging/qscriptvalueproperty.cpp @@ -141,7 +141,7 @@ QScriptValue::PropertyFlags QScriptValueProperty::flags() const { Q_D(const QScriptValueProperty); if (!d) - return 0; + return {}; return d->flags; } |