From 1ea17d70dcdbece5868a2d35417e0bfc66d68739 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 1 Sep 2015 18:29:43 -0700 Subject: Fix compilation with ICC on Windows QV4::Managed is not copyable and its default constructor is deleted. However, it and classes derived from it are exported, which on Windows means the compiler will instantiate all possible functions and add to the DLL. ICC on Windows, unlike MSVC, attempts to instantiate the default constructor of the derived classes (like CallContext) and then the build fails due to the deleted Managed() constructor. Instead, use V4_MANAGED to mark each and every managed class as non- default-constructible and non-copyable. Only one note: the V4_MANAGED macro in QV4::Managed itself takes different parameters, so it needs to be slightly different. Task-number: QTBUG-48063 Change-Id: I42e7ef1a481840699a8dffff140007c65a7a35db Reviewed-by: Lars Knoll --- src/qml/jsruntime/qv4managed_p.h | 10 ++++++++-- src/qml/jsruntime/qv4object_p.h | 3 +++ 2 files changed, 11 insertions(+), 2 deletions(-) (limited to 'src/qml/jsruntime') diff --git a/src/qml/jsruntime/qv4managed_p.h b/src/qml/jsruntime/qv4managed_p.h index 0fe5c7ee49..aa3e668eef 100644 --- a/src/qml/jsruntime/qv4managed_p.h +++ b/src/qml/jsruntime/qv4managed_p.h @@ -60,7 +60,7 @@ inline void qYouForgotTheQ_MANAGED_Macro(T1, T2) {} #define V4_NEEDS_DESTROY static void destroy(QV4::Heap::Base *b) { static_cast(b)->~Data(); } -#define V4_MANAGED(DataClass, superClass) \ +#define V4_MANAGED_ITSELF(DataClass, superClass) \ public: \ Q_MANAGED_CHECK \ typedef QV4::Heap::DataClass Data; \ @@ -70,6 +70,12 @@ inline void qYouForgotTheQ_MANAGED_Macro(T1, T2) {} V4_MANAGED_SIZE_TEST \ QV4::Heap::DataClass *d() const { return static_cast(m); } +#define V4_MANAGED(DataClass, superClass) \ + private: \ + DataClass() Q_DECL_EQ_DELETE; \ + Q_DISABLE_COPY(DataClass) \ + V4_MANAGED_ITSELF(DataClass, superClass) + #define Q_MANAGED_TYPE(type) \ public: \ enum { MyType = Type_##type }; @@ -125,7 +131,7 @@ const QV4::ManagedVTable classname::static_vtbl = DEFINE_MANAGED_VTABLE_INT(clas struct Q_QML_PRIVATE_EXPORT Managed : Value { - V4_MANAGED(Base, Managed) + V4_MANAGED_ITSELF(Base, Managed) enum { IsExecutionContext = false, IsString = false, diff --git a/src/qml/jsruntime/qv4object_p.h b/src/qml/jsruntime/qv4object_p.h index 71a997e133..e2250b9f18 100644 --- a/src/qml/jsruntime/qv4object_p.h +++ b/src/qml/jsruntime/qv4object_p.h @@ -72,6 +72,9 @@ struct Object : Base { Data *d() const { return static_cast(m); } #define V4_OBJECT2(DataClass, superClass) \ + private: \ + DataClass() Q_DECL_EQ_DELETE; \ + Q_DISABLE_COPY(DataClass) \ public: \ Q_MANAGED_CHECK \ typedef QV4::Heap::DataClass Data; \ -- cgit v1.2.3 From 933cff33cb53c88ec5a11b8f53955054c648e21b Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 5 Oct 2015 10:45:54 +0200 Subject: Add missing "We mean it" comments to private headers. Task-number: QTBUG-48594 Change-Id: Ifc207938de7f0c8995fc712df92665f222612647 Reviewed-by: Alan Alpert --- src/qml/jsruntime/qv4alloca_p.h | 11 +++++++++++ src/qml/jsruntime/qv4argumentsobject_p.h | 11 +++++++++++ src/qml/jsruntime/qv4arraybuffer_p.h | 11 +++++++++++ src/qml/jsruntime/qv4arraydata_p.h | 11 +++++++++++ src/qml/jsruntime/qv4arrayobject_p.h | 11 +++++++++++ src/qml/jsruntime/qv4booleanobject_p.h | 11 +++++++++++ src/qml/jsruntime/qv4context_p.h | 11 +++++++++++ src/qml/jsruntime/qv4dataview_p.h | 11 +++++++++++ src/qml/jsruntime/qv4dateobject_p.h | 11 +++++++++++ src/qml/jsruntime/qv4debugging_p.h | 11 +++++++++++ src/qml/jsruntime/qv4engine_p.h | 11 +++++++++++ src/qml/jsruntime/qv4errorobject_p.h | 11 +++++++++++ src/qml/jsruntime/qv4executableallocator_p.h | 11 +++++++++++ src/qml/jsruntime/qv4function_p.h | 11 +++++++++++ src/qml/jsruntime/qv4functionobject_p.h | 11 +++++++++++ src/qml/jsruntime/qv4global_p.h | 11 +++++++++++ src/qml/jsruntime/qv4globalobject_p.h | 11 +++++++++++ src/qml/jsruntime/qv4identifier_p.h | 11 +++++++++++ src/qml/jsruntime/qv4identifiertable_p.h | 11 +++++++++++ src/qml/jsruntime/qv4internalclass_p.h | 11 +++++++++++ src/qml/jsruntime/qv4jsonobject_p.h | 11 +++++++++++ src/qml/jsruntime/qv4lookup_p.h | 11 +++++++++++ src/qml/jsruntime/qv4managed_p.h | 11 +++++++++++ src/qml/jsruntime/qv4math_p.h | 11 +++++++++++ src/qml/jsruntime/qv4mathobject_p.h | 11 +++++++++++ src/qml/jsruntime/qv4memberdata_p.h | 11 +++++++++++ src/qml/jsruntime/qv4numberobject_p.h | 11 +++++++++++ src/qml/jsruntime/qv4object_p.h | 11 +++++++++++ src/qml/jsruntime/qv4objectiterator_p.h | 11 +++++++++++ src/qml/jsruntime/qv4objectproto_p.h | 11 +++++++++++ src/qml/jsruntime/qv4persistent_p.h | 11 +++++++++++ src/qml/jsruntime/qv4profiling_p.h | 11 +++++++++++ src/qml/jsruntime/qv4property_p.h | 11 +++++++++++ src/qml/jsruntime/qv4regexp_p.h | 11 +++++++++++ src/qml/jsruntime/qv4regexpobject_p.h | 11 +++++++++++ src/qml/jsruntime/qv4runtime_p.h | 11 +++++++++++ src/qml/jsruntime/qv4scopedvalue_p.h | 11 +++++++++++ src/qml/jsruntime/qv4script_p.h | 11 +++++++++++ src/qml/jsruntime/qv4sparsearray_p.h | 11 +++++++++++ src/qml/jsruntime/qv4string_p.h | 11 +++++++++++ src/qml/jsruntime/qv4stringobject_p.h | 11 +++++++++++ src/qml/jsruntime/qv4typedarray_p.h | 11 +++++++++++ src/qml/jsruntime/qv4util_p.h | 11 +++++++++++ src/qml/jsruntime/qv4value_p.h | 11 +++++++++++ src/qml/jsruntime/qv4vme_moth_p.h | 11 +++++++++++ 45 files changed, 495 insertions(+) (limited to 'src/qml/jsruntime') diff --git a/src/qml/jsruntime/qv4alloca_p.h b/src/qml/jsruntime/qv4alloca_p.h index a4537868e2..df40a018ba 100644 --- a/src/qml/jsruntime/qv4alloca_p.h +++ b/src/qml/jsruntime/qv4alloca_p.h @@ -34,6 +34,17 @@ #ifndef QV4_ALLOCA_H #define QV4_ALLOCA_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #if defined(Q_OS_WIN) diff --git a/src/qml/jsruntime/qv4argumentsobject_p.h b/src/qml/jsruntime/qv4argumentsobject_p.h index 98a600fab6..7a9c4b1d51 100644 --- a/src/qml/jsruntime/qv4argumentsobject_p.h +++ b/src/qml/jsruntime/qv4argumentsobject_p.h @@ -33,6 +33,17 @@ #ifndef QV4ARGUMENTSOBJECTS_H #define QV4ARGUMENTSOBJECTS_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qv4object_p.h" #include "qv4functionobject_p.h" diff --git a/src/qml/jsruntime/qv4arraybuffer_p.h b/src/qml/jsruntime/qv4arraybuffer_p.h index 19fd74465c..56f45b5a72 100644 --- a/src/qml/jsruntime/qv4arraybuffer_p.h +++ b/src/qml/jsruntime/qv4arraybuffer_p.h @@ -33,6 +33,17 @@ #ifndef QV4ARRAYBUFFER_H #define QV4ARRAYBUFFER_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qv4object_p.h" #include "qv4functionobject_p.h" diff --git a/src/qml/jsruntime/qv4arraydata_p.h b/src/qml/jsruntime/qv4arraydata_p.h index cca5bf7f20..48d2b9dbbf 100644 --- a/src/qml/jsruntime/qv4arraydata_p.h +++ b/src/qml/jsruntime/qv4arraydata_p.h @@ -33,6 +33,17 @@ #ifndef QV4ARRAYDATA_H #define QV4ARRAYDATA_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qv4global_p.h" #include "qv4managed_p.h" #include "qv4property_p.h" diff --git a/src/qml/jsruntime/qv4arrayobject_p.h b/src/qml/jsruntime/qv4arrayobject_p.h index 422a0de675..afd8080fa3 100644 --- a/src/qml/jsruntime/qv4arrayobject_p.h +++ b/src/qml/jsruntime/qv4arrayobject_p.h @@ -33,6 +33,17 @@ #ifndef QV4ARRAYOBJECT_H #define QV4ARRAYOBJECT_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qv4object_p.h" #include "qv4functionobject_p.h" #include diff --git a/src/qml/jsruntime/qv4booleanobject_p.h b/src/qml/jsruntime/qv4booleanobject_p.h index 77b5a74fde..203c8ba4ea 100644 --- a/src/qml/jsruntime/qv4booleanobject_p.h +++ b/src/qml/jsruntime/qv4booleanobject_p.h @@ -33,6 +33,17 @@ #ifndef QV4BOOLEANOBJECT_H #define QV4BOOLEANOBJECT_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qv4object_p.h" #include "qv4functionobject_p.h" #include diff --git a/src/qml/jsruntime/qv4context_p.h b/src/qml/jsruntime/qv4context_p.h index 2807d1e29c..6c360e7dda 100644 --- a/src/qml/jsruntime/qv4context_p.h +++ b/src/qml/jsruntime/qv4context_p.h @@ -33,6 +33,17 @@ #ifndef QMLJS_ENVIRONMENT_H #define QMLJS_ENVIRONMENT_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qv4global_p.h" #include "qv4managed_p.h" diff --git a/src/qml/jsruntime/qv4dataview_p.h b/src/qml/jsruntime/qv4dataview_p.h index 37a8363645..26347766d3 100644 --- a/src/qml/jsruntime/qv4dataview_p.h +++ b/src/qml/jsruntime/qv4dataview_p.h @@ -33,6 +33,17 @@ #ifndef QV4DATAVIEW_H #define QV4DATAVIEW_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qv4object_p.h" #include "qv4functionobject_p.h" diff --git a/src/qml/jsruntime/qv4dateobject_p.h b/src/qml/jsruntime/qv4dateobject_p.h index a324e216e4..2eaa837666 100644 --- a/src/qml/jsruntime/qv4dateobject_p.h +++ b/src/qml/jsruntime/qv4dateobject_p.h @@ -33,6 +33,17 @@ #ifndef QV4DATEOBJECT_P_H #define QV4DATEOBJECT_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qv4object_p.h" #include "qv4functionobject_p.h" #include diff --git a/src/qml/jsruntime/qv4debugging_p.h b/src/qml/jsruntime/qv4debugging_p.h index 86faba45f7..9b07a31f26 100644 --- a/src/qml/jsruntime/qv4debugging_p.h +++ b/src/qml/jsruntime/qv4debugging_p.h @@ -34,6 +34,17 @@ #ifndef DEBUGGING_H #define DEBUGGING_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qv4global_p.h" #include "qv4engine_p.h" #include "qv4context_p.h" diff --git a/src/qml/jsruntime/qv4engine_p.h b/src/qml/jsruntime/qv4engine_p.h index ffcd904013..e94b417908 100644 --- a/src/qml/jsruntime/qv4engine_p.h +++ b/src/qml/jsruntime/qv4engine_p.h @@ -33,6 +33,17 @@ #ifndef QV4ENGINE_H #define QV4ENGINE_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qv4global_p.h" #include "private/qv4isel_p.h" #include "qv4managed_p.h" diff --git a/src/qml/jsruntime/qv4errorobject_p.h b/src/qml/jsruntime/qv4errorobject_p.h index 7f3babaa79..336050ab2b 100644 --- a/src/qml/jsruntime/qv4errorobject_p.h +++ b/src/qml/jsruntime/qv4errorobject_p.h @@ -33,6 +33,17 @@ #ifndef QV4ERROROBJECT_H #define QV4ERROROBJECT_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qv4object_p.h" #include "qv4functionobject_p.h" #include "qv4string_p.h" diff --git a/src/qml/jsruntime/qv4executableallocator_p.h b/src/qml/jsruntime/qv4executableallocator_p.h index 0d07e3c1bd..bb63d423a6 100644 --- a/src/qml/jsruntime/qv4executableallocator_p.h +++ b/src/qml/jsruntime/qv4executableallocator_p.h @@ -34,6 +34,17 @@ #ifndef QV4EXECUTABLEALLOCATOR_H #define QV4EXECUTABLEALLOCATOR_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qv4global_p.h" #include diff --git a/src/qml/jsruntime/qv4function_p.h b/src/qml/jsruntime/qv4function_p.h index 534aa1b750..0e1216a45b 100644 --- a/src/qml/jsruntime/qv4function_p.h +++ b/src/qml/jsruntime/qv4function_p.h @@ -33,6 +33,17 @@ #ifndef QV4FUNCTION_H #define QV4FUNCTION_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qv4global_p.h" #include diff --git a/src/qml/jsruntime/qv4functionobject_p.h b/src/qml/jsruntime/qv4functionobject_p.h index 182f06f74e..896bd2a4d2 100644 --- a/src/qml/jsruntime/qv4functionobject_p.h +++ b/src/qml/jsruntime/qv4functionobject_p.h @@ -33,6 +33,17 @@ #ifndef QV4FUNCTIONOBJECT_H #define QV4FUNCTIONOBJECT_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qv4object_p.h" #include "qv4function_p.h" #include "qv4context_p.h" diff --git a/src/qml/jsruntime/qv4global_p.h b/src/qml/jsruntime/qv4global_p.h index 759c6795e2..01a21ea06d 100644 --- a/src/qml/jsruntime/qv4global_p.h +++ b/src/qml/jsruntime/qv4global_p.h @@ -34,6 +34,17 @@ #ifndef QV4GLOBAL_H #define QV4GLOBAL_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #if defined(QT_BUILD_QMLDEVTOOLS_LIB) || defined(QT_QMLDEVTOOLS_LIB) #define V4_BOOTSTRAP #endif diff --git a/src/qml/jsruntime/qv4globalobject_p.h b/src/qml/jsruntime/qv4globalobject_p.h index ba1d5d2e0b..ced85621de 100644 --- a/src/qml/jsruntime/qv4globalobject_p.h +++ b/src/qml/jsruntime/qv4globalobject_p.h @@ -33,6 +33,17 @@ #ifndef QV4GLOBALOBJECT_H #define QV4GLOBALOBJECT_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qv4global_p.h" #include "qv4functionobject_p.h" diff --git a/src/qml/jsruntime/qv4identifier_p.h b/src/qml/jsruntime/qv4identifier_p.h index 7937391ff7..605b06c685 100644 --- a/src/qml/jsruntime/qv4identifier_p.h +++ b/src/qml/jsruntime/qv4identifier_p.h @@ -33,6 +33,17 @@ #ifndef QV4IDENTIFIER_H #define QV4IDENTIFIER_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include QT_BEGIN_NAMESPACE diff --git a/src/qml/jsruntime/qv4identifiertable_p.h b/src/qml/jsruntime/qv4identifiertable_p.h index d91ce623c1..3af9db963e 100644 --- a/src/qml/jsruntime/qv4identifiertable_p.h +++ b/src/qml/jsruntime/qv4identifiertable_p.h @@ -33,6 +33,17 @@ #ifndef QV4IDENTIFIERTABLE_H #define QV4IDENTIFIERTABLE_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qv4identifier_p.h" #include "qv4string_p.h" #include "qv4engine_p.h" diff --git a/src/qml/jsruntime/qv4internalclass_p.h b/src/qml/jsruntime/qv4internalclass_p.h index 342870fcd6..5b91925ede 100644 --- a/src/qml/jsruntime/qv4internalclass_p.h +++ b/src/qml/jsruntime/qv4internalclass_p.h @@ -33,6 +33,17 @@ #ifndef QV4INTERNALCLASS_H #define QV4INTERNALCLASS_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qv4global_p.h" #include diff --git a/src/qml/jsruntime/qv4jsonobject_p.h b/src/qml/jsruntime/qv4jsonobject_p.h index 61d44f206e..6a6e863bf6 100644 --- a/src/qml/jsruntime/qv4jsonobject_p.h +++ b/src/qml/jsruntime/qv4jsonobject_p.h @@ -33,6 +33,17 @@ #ifndef QV4JSONOBJECT_H #define QV4JSONOBJECT_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qv4object_p.h" #include #include diff --git a/src/qml/jsruntime/qv4lookup_p.h b/src/qml/jsruntime/qv4lookup_p.h index 232e909c48..77ad1a7b65 100644 --- a/src/qml/jsruntime/qv4lookup_p.h +++ b/src/qml/jsruntime/qv4lookup_p.h @@ -33,6 +33,17 @@ #ifndef QV4LOOKUP_H #define QV4LOOKUP_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qv4global_p.h" #include "qv4runtime_p.h" #include "qv4engine_p.h" diff --git a/src/qml/jsruntime/qv4managed_p.h b/src/qml/jsruntime/qv4managed_p.h index 413181309f..94df30944b 100644 --- a/src/qml/jsruntime/qv4managed_p.h +++ b/src/qml/jsruntime/qv4managed_p.h @@ -33,6 +33,17 @@ #ifndef QMLJS_MANAGED_H #define QMLJS_MANAGED_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qv4global_p.h" #include "qv4value_p.h" #include diff --git a/src/qml/jsruntime/qv4math_p.h b/src/qml/jsruntime/qv4math_p.h index 4f550752aa..cf627bcc5d 100644 --- a/src/qml/jsruntime/qv4math_p.h +++ b/src/qml/jsruntime/qv4math_p.h @@ -33,6 +33,17 @@ #ifndef QMLJS_MATH_H #define QMLJS_MATH_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include diff --git a/src/qml/jsruntime/qv4mathobject_p.h b/src/qml/jsruntime/qv4mathobject_p.h index ff4fb12ee6..a233f74367 100644 --- a/src/qml/jsruntime/qv4mathobject_p.h +++ b/src/qml/jsruntime/qv4mathobject_p.h @@ -33,6 +33,17 @@ #ifndef QV4MATHOBJECT_H #define QV4MATHOBJECT_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qv4object_p.h" QT_BEGIN_NAMESPACE diff --git a/src/qml/jsruntime/qv4memberdata_p.h b/src/qml/jsruntime/qv4memberdata_p.h index 50b8ddb3d1..12f407e869 100644 --- a/src/qml/jsruntime/qv4memberdata_p.h +++ b/src/qml/jsruntime/qv4memberdata_p.h @@ -33,6 +33,17 @@ #ifndef QV4MEMBERDATA_H #define QV4MEMBERDATA_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qv4global_p.h" #include "qv4managed_p.h" diff --git a/src/qml/jsruntime/qv4numberobject_p.h b/src/qml/jsruntime/qv4numberobject_p.h index 04798d31fc..cc5033531e 100644 --- a/src/qml/jsruntime/qv4numberobject_p.h +++ b/src/qml/jsruntime/qv4numberobject_p.h @@ -33,6 +33,17 @@ #ifndef QV4NUMBEROBJECT_H #define QV4NUMBEROBJECT_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qv4object_p.h" #include "qv4functionobject_p.h" #include diff --git a/src/qml/jsruntime/qv4object_p.h b/src/qml/jsruntime/qv4object_p.h index b87e8fe0ad..5c660f7e3f 100644 --- a/src/qml/jsruntime/qv4object_p.h +++ b/src/qml/jsruntime/qv4object_p.h @@ -33,6 +33,17 @@ #ifndef QV4_OBJECT_H #define QV4_OBJECT_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qv4managed_p.h" #include "qv4memberdata_p.h" #include "qv4arraydata_p.h" diff --git a/src/qml/jsruntime/qv4objectiterator_p.h b/src/qml/jsruntime/qv4objectiterator_p.h index e34b641be9..877b34c22d 100644 --- a/src/qml/jsruntime/qv4objectiterator_p.h +++ b/src/qml/jsruntime/qv4objectiterator_p.h @@ -33,6 +33,17 @@ #ifndef QV4OBJECTITERATOR_H #define QV4OBJECTITERATOR_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qv4global_p.h" #include "qv4object_p.h" diff --git a/src/qml/jsruntime/qv4objectproto_p.h b/src/qml/jsruntime/qv4objectproto_p.h index d571e50cd4..ec829e4bd2 100644 --- a/src/qml/jsruntime/qv4objectproto_p.h +++ b/src/qml/jsruntime/qv4objectproto_p.h @@ -33,6 +33,17 @@ #ifndef QV4ECMAOBJECTS_P_H #define QV4ECMAOBJECTS_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qv4object_p.h" #include "qv4functionobject_p.h" #include diff --git a/src/qml/jsruntime/qv4persistent_p.h b/src/qml/jsruntime/qv4persistent_p.h index 67a76742d1..80b4ecdea8 100644 --- a/src/qml/jsruntime/qv4persistent_p.h +++ b/src/qml/jsruntime/qv4persistent_p.h @@ -33,6 +33,17 @@ #ifndef QV4PERSISTENT_H #define QV4PERSISTENT_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qv4value_p.h" #include "qv4managed_p.h" diff --git a/src/qml/jsruntime/qv4profiling_p.h b/src/qml/jsruntime/qv4profiling_p.h index 505d393a3d..6c54fc9bbd 100644 --- a/src/qml/jsruntime/qv4profiling_p.h +++ b/src/qml/jsruntime/qv4profiling_p.h @@ -34,6 +34,17 @@ #ifndef QV4PROFILING_H #define QV4PROFILING_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qv4global_p.h" #include "qv4engine_p.h" #include "qv4function_p.h" diff --git a/src/qml/jsruntime/qv4property_p.h b/src/qml/jsruntime/qv4property_p.h index db8c6017e1..8ddb4cf6f7 100644 --- a/src/qml/jsruntime/qv4property_p.h +++ b/src/qml/jsruntime/qv4property_p.h @@ -33,6 +33,17 @@ #ifndef QV4PROPERTYDESCRIPTOR_H #define QV4PROPERTYDESCRIPTOR_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qv4global_p.h" #include "qv4value_p.h" diff --git a/src/qml/jsruntime/qv4regexp_p.h b/src/qml/jsruntime/qv4regexp_p.h index af6e346ea8..928362a995 100644 --- a/src/qml/jsruntime/qv4regexp_p.h +++ b/src/qml/jsruntime/qv4regexp_p.h @@ -33,6 +33,17 @@ #ifndef QV4REGEXP_H #define QV4REGEXP_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include diff --git a/src/qml/jsruntime/qv4regexpobject_p.h b/src/qml/jsruntime/qv4regexpobject_p.h index 4f803df9c8..81ea9cf14b 100644 --- a/src/qml/jsruntime/qv4regexpobject_p.h +++ b/src/qml/jsruntime/qv4regexpobject_p.h @@ -33,6 +33,17 @@ #ifndef QV4REGEXPOBJECT_H #define QV4REGEXPOBJECT_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qv4runtime_p.h" #include "qv4engine_p.h" #include "qv4context_p.h" diff --git a/src/qml/jsruntime/qv4runtime_p.h b/src/qml/jsruntime/qv4runtime_p.h index f597e4b2e3..571abac21e 100644 --- a/src/qml/jsruntime/qv4runtime_p.h +++ b/src/qml/jsruntime/qv4runtime_p.h @@ -33,6 +33,17 @@ #ifndef QMLJS_RUNTIME_H #define QMLJS_RUNTIME_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qv4global_p.h" #include "qv4value_p.h" #include "qv4context_p.h" diff --git a/src/qml/jsruntime/qv4scopedvalue_p.h b/src/qml/jsruntime/qv4scopedvalue_p.h index 0c79897015..101d3dcb3c 100644 --- a/src/qml/jsruntime/qv4scopedvalue_p.h +++ b/src/qml/jsruntime/qv4scopedvalue_p.h @@ -33,6 +33,17 @@ #ifndef QV4SCOPEDVALUE_P_H #define QV4SCOPEDVALUE_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qv4engine_p.h" #include "qv4value_p.h" #include "qv4persistent_p.h" diff --git a/src/qml/jsruntime/qv4script_p.h b/src/qml/jsruntime/qv4script_p.h index 63e8239342..4fecf62082 100644 --- a/src/qml/jsruntime/qv4script_p.h +++ b/src/qml/jsruntime/qv4script_p.h @@ -33,6 +33,17 @@ #ifndef QV4SCRIPT_H #define QV4SCRIPT_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qv4global_p.h" #include "qv4engine_p.h" #include "qv4functionobject_p.h" diff --git a/src/qml/jsruntime/qv4sparsearray_p.h b/src/qml/jsruntime/qv4sparsearray_p.h index 8496fc32e7..136f26a25c 100644 --- a/src/qml/jsruntime/qv4sparsearray_p.h +++ b/src/qml/jsruntime/qv4sparsearray_p.h @@ -34,6 +34,17 @@ #ifndef QV4SPARSEARRAY_H #define QV4SPARSEARRAY_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qv4global_p.h" #include diff --git a/src/qml/jsruntime/qv4string_p.h b/src/qml/jsruntime/qv4string_p.h index 93a25d7ed5..85433369fc 100644 --- a/src/qml/jsruntime/qv4string_p.h +++ b/src/qml/jsruntime/qv4string_p.h @@ -33,6 +33,17 @@ #ifndef QV4STRING_H #define QV4STRING_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include "qv4managed_p.h" diff --git a/src/qml/jsruntime/qv4stringobject_p.h b/src/qml/jsruntime/qv4stringobject_p.h index 86d77c726a..7d4f78d3c5 100644 --- a/src/qml/jsruntime/qv4stringobject_p.h +++ b/src/qml/jsruntime/qv4stringobject_p.h @@ -33,6 +33,17 @@ #ifndef QV4STRINGOBJECT_P_H #define QV4STRINGOBJECT_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qv4object_p.h" #include "qv4functionobject_p.h" #include diff --git a/src/qml/jsruntime/qv4typedarray_p.h b/src/qml/jsruntime/qv4typedarray_p.h index 74ee285da4..67e04c8ac0 100644 --- a/src/qml/jsruntime/qv4typedarray_p.h +++ b/src/qml/jsruntime/qv4typedarray_p.h @@ -33,6 +33,17 @@ #ifndef QV4TYPEDARRAY_H #define QV4TYPEDARRAY_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qv4object_p.h" #include "qv4functionobject_p.h" #include "qv4arraybuffer_p.h" diff --git a/src/qml/jsruntime/qv4util_p.h b/src/qml/jsruntime/qv4util_p.h index f9ae37855e..329831f134 100644 --- a/src/qml/jsruntime/qv4util_p.h +++ b/src/qml/jsruntime/qv4util_p.h @@ -33,6 +33,17 @@ #ifndef QV4UTIL_H #define QV4UTIL_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qv4global_p.h" QT_BEGIN_NAMESPACE diff --git a/src/qml/jsruntime/qv4value_p.h b/src/qml/jsruntime/qv4value_p.h index 14094878d8..5e38873b49 100644 --- a/src/qml/jsruntime/qv4value_p.h +++ b/src/qml/jsruntime/qv4value_p.h @@ -33,6 +33,17 @@ #ifndef QV4VALUE_P_H #define QV4VALUE_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include diff --git a/src/qml/jsruntime/qv4vme_moth_p.h b/src/qml/jsruntime/qv4vme_moth_p.h index 55cac75a66..c0421022d2 100644 --- a/src/qml/jsruntime/qv4vme_moth_p.h +++ b/src/qml/jsruntime/qv4vme_moth_p.h @@ -34,6 +34,17 @@ #ifndef QV4VME_MOTH_P_H #define QV4VME_MOTH_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include -- cgit v1.2.3 From cd7f1ebdfe2f1b66ea9b8fb1bdab90b710881b82 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 13 Oct 2015 13:08:27 +0200 Subject: Libraries: Fix single-character string literals. Use character literals where applicable. Change-Id: I294fc4cb5cbbd23df9735ba2b398118f37cbe08a Reviewed-by: Simon Hausmann --- src/qml/jsruntime/qv4functionobject.cpp | 2 +- src/qml/jsruntime/qv4jsonobject.cpp | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'src/qml/jsruntime') diff --git a/src/qml/jsruntime/qv4functionobject.cpp b/src/qml/jsruntime/qv4functionobject.cpp index a94c3f6db5..2944c7b421 100644 --- a/src/qml/jsruntime/qv4functionobject.cpp +++ b/src/qml/jsruntime/qv4functionobject.cpp @@ -263,7 +263,7 @@ ReturnedValue FunctionCtor::construct(const Managed *that, CallData *callData) if (scope.engine->hasException) return Encode::undefined(); - QString function = QLatin1String("function(") + arguments + QLatin1String("){") + body + QLatin1String("}"); + QString function = QLatin1String("function(") + arguments + QLatin1String("){") + body + QLatin1Char('}'); QQmlJS::Engine ee, *engine = ⅇ QQmlJS::Lexer lexer(engine); diff --git a/src/qml/jsruntime/qv4jsonobject.cpp b/src/qml/jsruntime/qv4jsonobject.cpp index f4f87f3aea..2e5283c639 100644 --- a/src/qml/jsruntime/qv4jsonobject.cpp +++ b/src/qml/jsruntime/qv4jsonobject.cpp @@ -801,10 +801,11 @@ QString Stringify::JO(Object *o) if (partial.isEmpty()) { result = QStringLiteral("{}"); } else if (gap.isEmpty()) { - result = QStringLiteral("{") + partial.join(QLatin1Char(',')) + QStringLiteral("}"); + result = QStringLiteral("{") + partial.join(QLatin1Char(',')) + QLatin1Char('}'); } else { QString separator = QStringLiteral(",\n") + indent; - result = QStringLiteral("{\n") + indent + partial.join(separator) + QStringLiteral("\n") + stepback + QStringLiteral("}"); + result = QStringLiteral("{\n") + indent + partial.join(separator) + QLatin1Char('\n') + + stepback + QLatin1Char('}'); } indent = stepback; -- cgit v1.2.3