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 | |
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')
-rw-r--r-- | src/qml/compiler/qqmlpropertyvalidator.cpp | 4 | ||||
-rw-r--r-- | src/qml/compiler/qv4compileddata.cpp | 2 | ||||
-rw-r--r-- | src/qml/debugger/qqmlmemoryprofiler.cpp | 4 | ||||
-rw-r--r-- | src/qml/qml/qqmlapplicationengine.cpp | 6 | ||||
-rw-r--r-- | src/qml/qml/qqmlapplicationengine_p.h | 2 | ||||
-rw-r--r-- | src/qml/qml/qqmlerror.cpp | 2 | ||||
-rw-r--r-- | src/qml/qml/qqmlglobal.cpp | 2 | ||||
-rw-r--r-- | src/qml/qml/qqmlglobal_p.h | 2 | ||||
-rw-r--r-- | src/qml/qml/qqmlimport.cpp | 14 | ||||
-rw-r--r-- | src/qml/qml/qqmlmetatype.cpp | 2 | ||||
-rw-r--r-- | src/qml/qml/qqmlobjectcreator.cpp | 4 | ||||
-rw-r--r-- | src/qml/qml/qqmlstringconverters.cpp | 12 | ||||
-rw-r--r-- | src/qml/qml/qqmlstringconverters_p.h | 2 | ||||
-rw-r--r-- | src/qml/qml/qqmlxmlhttprequest.cpp | 10 | ||||
-rw-r--r-- | src/qml/qml/qqmlxmlhttprequest_p.h | 4 | ||||
-rw-r--r-- | src/qml/qml/v8/qqmlbuiltinfunctions.cpp | 10 | ||||
-rw-r--r-- | src/qml/qml/v8/qqmlbuiltinfunctions_p.h | 4 | ||||
-rw-r--r-- | src/qml/qml/v8/qv8engine.cpp | 4 |
18 files changed, 40 insertions, 50 deletions
diff --git a/src/qml/compiler/qqmlpropertyvalidator.cpp b/src/qml/compiler/qqmlpropertyvalidator.cpp index 45379d5155..383c20239f 100644 --- a/src/qml/compiler/qqmlpropertyvalidator.cpp +++ b/src/qml/compiler/qqmlpropertyvalidator.cpp @@ -412,7 +412,7 @@ QQmlCompileError QQmlPropertyValidator::validateLiteralBinding(QQmlPropertyCache } } break; -#ifndef QT_NO_DATESTRING +#if QT_CONFIG(datestring) case QVariant::Date: { bool ok = false; QQmlStringConverters::dateFromString(binding->valueAsString(qmlUnit), &ok); @@ -437,7 +437,7 @@ QQmlCompileError QQmlPropertyValidator::validateLiteralBinding(QQmlPropertyCache } } break; -#endif // QT_NO_DATESTRING +#endif // datestring case QVariant::Point: { bool ok = false; QQmlStringConverters::pointFFromString(binding->valueAsString(qmlUnit), &ok); diff --git a/src/qml/compiler/qv4compileddata.cpp b/src/qml/compiler/qv4compileddata.cpp index f8668b48e4..8586c84c3d 100644 --- a/src/qml/compiler/qv4compileddata.cpp +++ b/src/qml/compiler/qv4compileddata.cpp @@ -471,7 +471,7 @@ QString Binding::valueAsString(const Unit *unit) const return QString::number(valueAsNumber()); case Type_Invalid: return QString(); -#ifdef QT_NO_TRANSLATION +#if !QT_CONFIG(translation) case Type_TranslationById: case Type_Translation: return unit->stringAt(stringIndex); diff --git a/src/qml/debugger/qqmlmemoryprofiler.cpp b/src/qml/debugger/qqmlmemoryprofiler.cpp index 53d4e7ab21..b89dbfd02d 100644 --- a/src/qml/debugger/qqmlmemoryprofiler.cpp +++ b/src/qml/debugger/qqmlmemoryprofiler.cpp @@ -62,13 +62,13 @@ static qmlmemprofile_pop_location *memprofile_pop_location; static qmlmemprofile_save *memprofile_save; static qmlmemprofile_is_enabled *memprofile_is_enabled; -#ifndef QT_NO_LIBRARY +#if QT_CONFIG(library) extern QFunctionPointer qt_linux_find_symbol_sys(const char *symbol); #endif bool QQmlMemoryScope::doOpenLibrary() { -#if defined(Q_OS_LINUX) && !defined(QT_NO_LIBRARY) +#if defined(Q_OS_LINUX) && QT_CONFIG(library) if (state == Unloaded) { memprofile_stats = (qmlmemprofile_stats *) qt_linux_find_symbol_sys("qmlmemprofile_stats"); memprofile_clear = (qmlmemprofile_clear *) qt_linux_find_symbol_sys("qmlmemprofile_clear"); diff --git a/src/qml/qml/qqmlapplicationengine.cpp b/src/qml/qml/qqmlapplicationengine.cpp index fef2da753b..21a1a13687 100644 --- a/src/qml/qml/qqmlapplicationengine.cpp +++ b/src/qml/qml/qqmlapplicationengine.cpp @@ -58,7 +58,7 @@ QQmlApplicationEnginePrivate::~QQmlApplicationEnginePrivate() void QQmlApplicationEnginePrivate::cleanUp() { qDeleteAll(objects); -#ifndef QT_NO_TRANSLATION +#if QT_CONFIG(translation) qDeleteAll(translators); #endif } @@ -70,7 +70,7 @@ void QQmlApplicationEnginePrivate::init() q, SLOT(_q_finishLoad(QObject*))); q->connect(q, SIGNAL(quit()), QCoreApplication::instance(), SLOT(quit())); q->connect(q, &QQmlApplicationEngine::exit, QCoreApplication::instance(), &QCoreApplication::exit); -#ifndef QT_NO_TRANSLATION +#if QT_CONFIG(translation) QTranslator* qtTranslator = new QTranslator; if (qtTranslator->load(QLatin1String("qt_") + QLocale::system().name(), QLibraryInfo::location(QLibraryInfo::TranslationsPath))) QCoreApplication::installTranslator(qtTranslator); @@ -82,7 +82,7 @@ void QQmlApplicationEnginePrivate::init() void QQmlApplicationEnginePrivate::loadTranslations(const QUrl &rootFile) { -#ifndef QT_NO_TRANSLATION +#if QT_CONFIG(translation) if (rootFile.scheme() != QLatin1String("file") && rootFile.scheme() != QLatin1String("qrc")) return; diff --git a/src/qml/qml/qqmlapplicationengine_p.h b/src/qml/qml/qqmlapplicationengine_p.h index e1d1b4a7bb..8c342a43a9 100644 --- a/src/qml/qml/qqmlapplicationengine_p.h +++ b/src/qml/qml/qqmlapplicationengine_p.h @@ -78,7 +78,7 @@ public: QSignalMapper statusMapper; QObject *appObj; -#ifndef QT_NO_TRANSLATIONS +#if QT_CONFIG(translation) QList<QTranslator *> translators; #endif }; diff --git a/src/qml/qml/qqmlerror.cpp b/src/qml/qml/qqmlerror.cpp index b309550ca8..0a6c7b4960 100644 --- a/src/qml/qml/qqmlerror.cpp +++ b/src/qml/qml/qqmlerror.cpp @@ -285,7 +285,7 @@ QDebug operator<<(QDebug debug, const QQmlError &error) if (f.open(QIODevice::ReadOnly)) { QByteArray data = f.readAll(); QTextStream stream(data, QIODevice::ReadOnly); -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) stream.setCodec("UTF-8"); #endif const QString code = stream.readAll(); diff --git a/src/qml/qml/qqmlglobal.cpp b/src/qml/qml/qqmlglobal.cpp index 722527a546..f967dacd34 100644 --- a/src/qml/qml/qqmlglobal.cpp +++ b/src/qml/qml/qqmlglobal.cpp @@ -326,7 +326,6 @@ QObject *QQmlGuiProvider::application(QObject *) { return new QQmlApplication(); QStringList QQmlGuiProvider::fontFamilies() { return QStringList(); } bool QQmlGuiProvider::openUrlExternally(QUrl &) { return false; } -#ifndef QT_NO_IM QObject *QQmlGuiProvider::inputMethod() { // We don't have any input method code by default @@ -335,7 +334,6 @@ QObject *QQmlGuiProvider::inputMethod() QQmlEngine::setObjectOwnership(o, QQmlEngine::JavaScriptOwnership); return o; } -#endif QObject *QQmlGuiProvider::styleHints() { diff --git a/src/qml/qml/qqmlglobal_p.h b/src/qml/qml/qqmlglobal_p.h index 0f5cf3a392..707814e781 100644 --- a/src/qml/qml/qqmlglobal_p.h +++ b/src/qml/qml/qqmlglobal_p.h @@ -307,9 +307,7 @@ class Q_QML_PRIVATE_EXPORT QQmlGuiProvider public: virtual ~QQmlGuiProvider(); virtual QObject *application(QObject *parent); -#ifndef QT_NO_IM virtual QObject *inputMethod(); -#endif virtual QObject *styleHints(); virtual QStringList fontFamilies(); virtual bool openUrlExternally(QUrl &); diff --git a/src/qml/qml/qqmlimport.cpp b/src/qml/qml/qqmlimport.cpp index 98e2f9eefd..f2cbf5a94f 100644 --- a/src/qml/qml/qqmlimport.cpp +++ b/src/qml/qml/qqmlimport.cpp @@ -176,7 +176,7 @@ QQmlType *getTypeForUrl(const QString &urlString, const QHashedStringRef& typeNa } // namespace -#ifndef QT_NO_LIBRARY +#if QT_CONFIG(library) struct RegisteredPlugin { QString uri; QPluginLoader* loader; @@ -301,7 +301,7 @@ public: const QString &uri, const QString &url, int vmaj, int vmin, QV4::CompiledData::Import::ImportType type, QList<QQmlError> *errors, bool lowPrecedence = false); -#ifndef QT_NO_LIBRARY +#if QT_CONFIG(library) bool populatePluginPairVector(QVector<StaticPluginPair> &result, const QString &uri, const QStringList &versionUris, const QString &qmldirPath, QList<QQmlError> *errors); #endif @@ -897,7 +897,7 @@ static QStringList versionUriList(const QString &uri, int vmaj, int vmin) return result; } -#ifndef QT_NO_LIBRARY +#if QT_CONFIG(library) /*! Get all static plugins that are QML plugins and has a meta data URI that matches with one of \a versionUris, which is a list of all possible versioned URI combinations - see versionUriList() @@ -960,7 +960,7 @@ bool QQmlImportsPrivate::importExtension(const QString &qmldirFilePath, const QQmlTypeLoader::QmldirContent *qmldir, QList<QQmlError> *errors) { -#if !defined(QT_NO_LIBRARY) +#if QT_CONFIG(library) Q_ASSERT(qmldir); if (qmlImportTrace()) @@ -1087,7 +1087,7 @@ bool QQmlImportsPrivate::importExtension(const QString &qmldirFilePath, } return false; -#endif // QT_NO_LIBRARY +#endif // library return true; } @@ -1948,7 +1948,7 @@ bool QQmlImportDatabase::registerPluginTypes(QObject *instance, const QString &b bool QQmlImportDatabase::importStaticPlugin(QObject *instance, const QString &basePath, const QString &uri, const QString &typeNamespace, int vmaj, QList<QQmlError> *errors) { -#ifndef QT_NO_LIBRARY +#if QT_CONFIG(library) // Dynamic plugins are differentiated by their filepath. For static plugins we // don't have that information so we use their address as key instead. const QString uniquePluginID = QString::asprintf("%p", instance); @@ -2001,7 +2001,7 @@ bool QQmlImportDatabase::importStaticPlugin(QObject *instance, const QString &ba bool QQmlImportDatabase::importDynamicPlugin(const QString &filePath, const QString &uri, const QString &typeNamespace, int vmaj, QList<QQmlError> *errors) { -#ifndef QT_NO_LIBRARY +#if QT_CONFIG(library) QFileInfo fileInfo(filePath); const QString absoluteFilePath = fileInfo.absoluteFilePath(); diff --git a/src/qml/qml/qqmlmetatype.cpp b/src/qml/qml/qqmlmetatype.cpp index ce0f4b798a..51964a7d11 100644 --- a/src/qml/qml/qqmlmetatype.cpp +++ b/src/qml/qml/qqmlmetatype.cpp @@ -1158,7 +1158,7 @@ void qmlClearTypeRegistrations() // Declared in qqml.h data->uriToModule.clear(); QQmlEnginePrivate::baseModulesUninitialized = true; //So the engine re-registers its types -#ifndef QT_NO_LIBRARY +#if QT_CONFIG(library) qmlClearEnginePlugins(); #endif } diff --git a/src/qml/qml/qqmlobjectcreator.cpp b/src/qml/qml/qqmlobjectcreator.cpp index 2218f277d6..115925e34a 100644 --- a/src/qml/qml/qqmlobjectcreator.cpp +++ b/src/qml/qml/qqmlobjectcreator.cpp @@ -402,7 +402,7 @@ void QQmlObjectCreator::setPropertyValue(const QQmlPropertyData *property, const } } break; -#ifndef QT_NO_DATESTRING +#if QT_CONFIG(datestring) case QVariant::Date: { bool ok = false; QDate value = QQmlStringConverters::dateFromString(binding->valueAsString(qmlUnit), &ok); @@ -430,7 +430,7 @@ void QQmlObjectCreator::setPropertyValue(const QQmlPropertyData *property, const property->writeProperty(_qobject, &value, propertyWriteFlags); } break; -#endif // QT_NO_DATESTRING +#endif // datestring case QVariant::Point: { bool ok = false; QPoint value = QQmlStringConverters::pointFFromString(binding->valueAsString(qmlUnit), &ok).toPoint(); diff --git a/src/qml/qml/qqmlstringconverters.cpp b/src/qml/qml/qqmlstringconverters.cpp index d2b3577a1f..e53f90b45b 100644 --- a/src/qml/qml/qqmlstringconverters.cpp +++ b/src/qml/qml/qqmlstringconverters.cpp @@ -71,14 +71,14 @@ QVariant QQmlStringConverters::variantFromString(const QString &s, int preferred return QVariant(int(qRound(s.toDouble(ok)))); case QMetaType::UInt: return QVariant(uint(qRound(s.toDouble(ok)))); -#ifndef QT_NO_DATESTRING +#if QT_CONFIG(datestring) case QMetaType::QDate: return QVariant::fromValue(dateFromString(s, ok)); case QMetaType::QTime: return QVariant::fromValue(timeFromString(s, ok)); case QMetaType::QDateTime: return QVariant::fromValue(dateTimeFromString(s, ok)); -#endif // QT_NO_DATESTRING +#endif // datestring case QMetaType::QPointF: return QVariant::fromValue(pointFFromString(s, ok)); case QMetaType::QPoint: @@ -106,7 +106,7 @@ unsigned QQmlStringConverters::rgbaFromString(const QString &s, bool *ok) return QQml_colorProvider()->rgbaFromString(s, ok); } -#ifndef QT_NO_DATESTRING +#if QT_CONFIG(datestring) QDate QQmlStringConverters::dateFromString(const QString &s, bool *ok) { QDate d = QDate::fromString(s, Qt::ISODate); @@ -130,7 +130,7 @@ QDateTime QQmlStringConverters::dateTimeFromString(const QString &s, bool *ok) d.setTimeSpec(Qt::UTC); return d; } -#endif // QT_NO_DATESTRING +#endif // datestring //expects input of "x,y" QPointF QQmlStringConverters::pointFFromString(const QString &s, bool *ok) @@ -229,7 +229,7 @@ bool QQmlStringConverters::createFromString(int type, const QString &s, void *da *p = uint(qRound(s.toDouble(&ok))); return ok; } -#ifndef QT_NO_DATESTRING +#if QT_CONFIG(datestring) case QMetaType::QDate: { Q_ASSERT(n >= sizeof(QDate)); @@ -251,7 +251,7 @@ bool QQmlStringConverters::createFromString(int type, const QString &s, void *da *p = dateTimeFromString(s, &ok); return ok; } -#endif // QT_NO_DATESTRING +#endif // datestring case QMetaType::QPointF: { Q_ASSERT(n >= sizeof(QPointF)); diff --git a/src/qml/qml/qqmlstringconverters_p.h b/src/qml/qml/qqmlstringconverters_p.h index b67cefaf35..af344e3344 100644 --- a/src/qml/qml/qqmlstringconverters_p.h +++ b/src/qml/qml/qqmlstringconverters_p.h @@ -72,7 +72,7 @@ namespace QQmlStringConverters Q_QML_PRIVATE_EXPORT QVariant colorFromString(const QString &, bool *ok = 0); Q_QML_PRIVATE_EXPORT unsigned rgbaFromString(const QString &, bool *ok = 0); -#ifndef QT_NO_DATESTRING +#if QT_CONFIG(datestring) Q_QML_PRIVATE_EXPORT QDate dateFromString(const QString &, bool *ok = 0); Q_QML_PRIVATE_EXPORT QTime timeFromString(const QString &, bool *ok = 0); Q_QML_PRIVATE_EXPORT QDateTime dateTimeFromString(const QString &, bool *ok = 0); diff --git a/src/qml/qml/qqmlxmlhttprequest.cpp b/src/qml/qml/qqmlxmlhttprequest.cpp index 10b1cbcfd4..6b86e38f19 100644 --- a/src/qml/qml/qqmlxmlhttprequest.cpp +++ b/src/qml/qml/qqmlxmlhttprequest.cpp @@ -70,7 +70,7 @@ using namespace QV4; -#if !defined(QT_NO_XMLSTREAMREADER) && QT_CONFIG(qml_network) +#if QT_CONFIG(xmlstreamreader) && QT_CONFIG(qml_network) #define V4THROW_REFERENCE(string) { \ ScopedObject error(scope, ctx->engine()->newReferenceErrorObject(QStringLiteral(string))); \ @@ -1068,7 +1068,7 @@ private: QByteArray m_mime; QByteArray m_charset; QTextCodec *m_textCodec; -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) QTextCodec* findTextCodec() const; #endif void readEncoding(); @@ -1510,7 +1510,7 @@ QV4::ReturnedValue QQmlXMLHttpRequest::xmlResponseBody(QV4::ExecutionEngine* eng return m_parsedDocument.value(); } -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) QTextCodec* QQmlXMLHttpRequest::findTextCodec() const { QTextCodec *codec = 0; @@ -1539,7 +1539,7 @@ QTextCodec* QQmlXMLHttpRequest::findTextCodec() const QString QQmlXMLHttpRequest::responseBody() { -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) if (!m_textCodec) m_textCodec = findTextCodec(); if (m_textCodec) @@ -2056,6 +2056,6 @@ void *qt_add_qmlxmlhttprequest(ExecutionEngine *v4) QT_END_NAMESPACE -#endif // QT_NO_XMLSTREAMREADER && qml_network +#endif // xmlstreamreader && qml_network #include <qqmlxmlhttprequest.moc> diff --git a/src/qml/qml/qqmlxmlhttprequest_p.h b/src/qml/qml/qqmlxmlhttprequest_p.h index fdb6194537..f2836d8301 100644 --- a/src/qml/qml/qqmlxmlhttprequest_p.h +++ b/src/qml/qml/qqmlxmlhttprequest_p.h @@ -55,7 +55,7 @@ #include <QtCore/qglobal.h> #include <private/qqmlglobal_p.h> -#if !defined(QT_NO_XMLSTREAMREADER) && QT_CONFIG(qml_network) +#if QT_CONFIG(xmlstreamreader) && QT_CONFIG(qml_network) QT_BEGIN_NAMESPACE @@ -64,7 +64,7 @@ void qt_rem_qmlxmlhttprequest(QV4::ExecutionEngine *engine, void *); QT_END_NAMESPACE -#endif // QT_NO_XMLSTREAMREADER && qml_network +#endif // xmlstreamreader && qml_network #endif // QQMLXMLHTTPREQUEST_P_H 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) diff --git a/src/qml/qml/v8/qqmlbuiltinfunctions_p.h b/src/qml/qml/v8/qqmlbuiltinfunctions_p.h index f428e377d7..f84c819e6a 100644 --- a/src/qml/qml/v8/qqmlbuiltinfunctions_p.h +++ b/src/qml/qml/v8/qqmlbuiltinfunctions_p.h @@ -135,9 +135,7 @@ struct QtObject : Object static ReturnedValue method_get_platform(CallContext *ctx); static ReturnedValue method_get_application(CallContext *ctx); -#ifndef QT_NO_IM static ReturnedValue method_get_inputMethod(CallContext *ctx); -#endif static ReturnedValue method_get_styleHints(CallContext *ctx); static ReturnedValue method_callLater(CallContext *ctx); @@ -169,7 +167,7 @@ struct ConsoleObject : Object struct Q_QML_PRIVATE_EXPORT GlobalExtensions { static void init(Object *globalObject, QJSEngine::Extensions extensions); -#ifndef QT_NO_TRANSLATION +#if QT_CONFIG(translation) static ReturnedValue method_qsTranslate(CallContext *ctx); static ReturnedValue method_qsTranslateNoOp(CallContext *ctx); static ReturnedValue method_qsTr(CallContext *ctx); diff --git a/src/qml/qml/v8/qv8engine.cpp b/src/qml/qml/v8/qv8engine.cpp index b0599dd0a2..1df468dd49 100644 --- a/src/qml/qml/v8/qv8engine.cpp +++ b/src/qml/qml/v8/qv8engine.cpp @@ -160,7 +160,7 @@ QV8Engine::~QV8Engine() qDeleteAll(m_extensionData); m_extensionData.clear(); -#if !defined(QT_NO_XMLSTREAMREADER) && QT_CONFIG(qml_network) +#if QT_CONFIG(xmlstreamreader) && QT_CONFIG(qml_network) qt_rem_qmlxmlhttprequest(m_v4Engine, m_xmlHttpRequestData); m_xmlHttpRequestData = 0; #endif @@ -195,7 +195,7 @@ void QV8Engine::initializeGlobal() QQmlDateExtension::registerExtension(m_v4Engine); QQmlNumberExtension::registerExtension(m_v4Engine); -#if !defined(QT_NO_XMLSTREAMREADER) && QT_CONFIG(qml_network) +#if QT_CONFIG(xmlstreamreader) && QT_CONFIG(qml_network) qt_add_domexceptions(m_v4Engine); m_xmlHttpRequestData = qt_add_qmlxmlhttprequest(m_v4Engine); #endif |