diff options
author | Lars Knoll <lars.knoll@qt.io> | 2016-11-16 14:22:36 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2016-11-29 10:10:27 +0000 |
commit | e579076bb36e6594003b2ade7f3d062944ef6f47 (patch) | |
tree | 1c00c8a02c638582d342504f3bebd45dbcd46be1 /src/qml/qml/v8/qqmlbuiltinfunctions.cpp | |
parent | 4e1463c20aa6ec52f23e1e5f6426b68edb2255f0 (diff) |
Get rid of most QT_NO_FOO usages
Instead use QT_CONFIG(foo). This change actually detected a few
mis-spelled macros and invalid usages.
Change-Id: I06ac327098dd1a458e6bc379d637b8e2dac52f85
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/qml/v8/qqmlbuiltinfunctions.cpp')
-rw-r--r-- | src/qml/qml/v8/qqmlbuiltinfunctions.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/qml/qml/v8/qqmlbuiltinfunctions.cpp b/src/qml/qml/v8/qqmlbuiltinfunctions.cpp index c8a0463a2d..7bab2415c5 100644 --- a/src/qml/qml/v8/qqmlbuiltinfunctions.cpp +++ b/src/qml/qml/v8/qqmlbuiltinfunctions.cpp @@ -148,9 +148,7 @@ void Heap::QtObject::init(QQmlEngine *qmlEngine) o->defineAccessorProperty(QStringLiteral("platform"), QV4::QtObject::method_get_platform, 0); o->defineAccessorProperty(QStringLiteral("application"), QV4::QtObject::method_get_application, 0); -#ifndef QT_NO_IM o->defineAccessorProperty(QStringLiteral("inputMethod"), QV4::QtObject::method_get_inputMethod, 0); -#endif o->defineAccessorProperty(QStringLiteral("styleHints"), QV4::QtObject::method_get_styleHints, 0); o->defineDefaultProperty(QStringLiteral("callLater"), QV4::QtObject::method_callLater); @@ -1423,13 +1421,11 @@ ReturnedValue QtObject::method_get_application(CallContext *ctx) return QV4::QObjectWrapper::wrap(ctx->d()->engine, qt->d()->application); } -#ifndef QT_NO_IM ReturnedValue QtObject::method_get_inputMethod(CallContext *ctx) { QObject *o = QQml_guiProvider()->inputMethod(); return QV4::QObjectWrapper::wrap(ctx->d()->engine, o); } -#endif ReturnedValue QtObject::method_get_styleHints(CallContext *ctx) { @@ -1740,7 +1736,7 @@ void QV4::GlobalExtensions::init(Object *globalObject, QJSEngine::Extensions ext Scope scope(v4); if (extensions.testFlag(QJSEngine::TranslationExtension)) { - #ifndef QT_NO_TRANSLATION + #if QT_CONFIG(translation) globalObject->defineDefaultProperty(QStringLiteral("qsTranslate"), QV4::GlobalExtensions::method_qsTranslate); globalObject->defineDefaultProperty(QStringLiteral("QT_TRANSLATE_NOOP"), QV4::GlobalExtensions::method_qsTranslateNoOp); globalObject->defineDefaultProperty(QStringLiteral("qsTr"), QV4::GlobalExtensions::method_qsTr); @@ -1767,7 +1763,7 @@ void QV4::GlobalExtensions::init(Object *globalObject, QJSEngine::Extensions ext } -#ifndef QT_NO_TRANSLATION +#if QT_CONFIG(translation) /*! \qmlmethod string Qt::qsTranslate(string context, string sourceText, string disambiguation, int n) @@ -2015,7 +2011,7 @@ ReturnedValue GlobalExtensions::method_qsTrIdNoOp(CallContext *ctx) return QV4::Encode::undefined(); return ctx->args()[0].asReturnedValue(); } -#endif // QT_NO_TRANSLATION +#endif // translation QV4::ReturnedValue GlobalExtensions::method_gc(CallContext *ctx) |