Skip to content

Commit

Permalink
Merge "Merge remote-tracking branch 'origin/dev' into 5.11" into refs…
Browse files Browse the repository at this point in the history
…/staging/5.11
  • Loading branch information
jaheikk authored and The Qt Project committed Feb 10, 2018
2 parents 0b48fce + 32b506d commit 095dbc4
Show file tree
Hide file tree
Showing 5,332 changed files with 4,554 additions and 1,017 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
5 changes: 5 additions & 0 deletions config_help.txt
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,11 @@ Build options:

-testcocoon .......... Instrument with the TestCocoon code coverage tool [no]
-gcov ................ Instrument with the GCov code coverage tool [no]

-trace [backend] ..... Enable instrumentation with tracepoints.
Currently supported backends are 'etw' (Windows) and
'lttng' (Linux), or 'yes' for auto-detection. [no]

-sanitize {address|thread|memory|undefined}
Instrument with the specified compiler sanitizer.

Expand Down
2 changes: 1 addition & 1 deletion examples/corelib/corelib.pro
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ CONFIG += no_docs_target

SUBDIRS = \
ipc \
json \
mimetypes \
serialization \
threads \
tools
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ CONFIG -= app_bundle
TEMPLATE = app

# install
target.path = $$[QT_INSTALL_EXAMPLES]/corelib/json/savegame
target.path = $$[QT_INSTALL_EXAMPLES]/corelib/serialization/savegame
INSTALLS += target

SOURCES += main.cpp \
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions mkspecs/features/exclusive_builds.prf
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@ defineTest(addExclusiveBuilds) {
}

# Default directories to process
QMAKE_DIR_REPLACE = OBJECTS_DIR MOC_DIR RCC_DIR PRECOMPILED_DIR QGLTF_DIR DESTDIR
QMAKE_DIR_REPLACE_SANE += QGLTF_DIR
QMAKE_DIR_REPLACE = OBJECTS_DIR MOC_DIR RCC_DIR PRECOMPILED_DIR QGLTF_DIR DESTDIR TRACEGEN_DIR
QMAKE_DIR_REPLACE_SANE += QGLTF_DIR TRACEGEN_DIR
1 change: 1 addition & 0 deletions mkspecs/features/qt_build_config.prf
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ OBJECTS_DIR = .obj
MOC_DIR = .moc
RCC_DIR = .rcc
UI_DIR = .uic
TRACEGEN_DIR = .tracegen
intel_icl {
# ICL 14.0 has a bug that makes it not find #includes in dirs starting with .
MOC_DIR = tmp/moc
Expand Down
54 changes: 54 additions & 0 deletions mkspecs/features/qt_tracepoints.prf
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# W A R N I N G
# -------------
#
# This file is not part of the Qt API. It exists purely as an
# implementation detail. It may change from version to version
# without notice, or even be removed.
#
# We mean it.
#

qtPrepareTool(QMAKE_TRACEGEN, tracegen)

isEmpty(TRACEGEN_DIR): TRACEGEN_DIR = .

PROVIDER_NAME = qt$$lower($$MODULE)
INCLUDEPATH += $$absolute_path($$TRACEGEN_DIR, $$OUT_PWD)
HEADER_PATH = $$OUT_PWD/$$TRACEGEN_DIR/$${PROVIDER_NAME}_tracepoints_p$${first(QMAKE_EXT_H)}

!force_bootstrap:if(qtConfig(lttng)|qtConfig(etw)) {
SOURCE_PATH = $$OUT_PWD/$$TRACEGEN_DIR/$${PROVIDER_NAME}_tracepoints$${first(QMAKE_EXT_CPP)}

isEmpty(BUILDS)|build_pass {
impl_file_contents = \
"$${LITERAL_HASH}define TRACEPOINT_CREATE_PROBES" \
"$${LITERAL_HASH}define TRACEPOINT_DEFINE" \
"$${LITERAL_HASH}include \"$${HEADER_PATH}\""

write_file($$SOURCE_PATH, impl_file_contents)|error()
}

GENERATED_SOURCES += $$SOURCE_PATH

tracegen.input = TRACEPOINT_PROVIDER
tracegen.output = $$HEADER_PATH
tracegen.variable_out = HEADERS
tracegen.depends += $$QMAKE_TRACEGEN_EXE
tracegen.CONFIG = target_predeps

qtConfig(lttng) {
tracegen.commands = $$QMAKE_TRACEGEN lttng ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT}
QMAKE_USE_PRIVATE += lttng-ust
} else {
tracegen.commands = $$QMAKE_TRACEGEN etw ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT}
}

QMAKE_EXTRA_COMPILERS += tracegen

DEFINES += Q_TRACEPOINT
} else {
isEmpty(BUILDS)|build_pass {
header_file_contents = "$${LITERAL_HASH}include <private/qtrace_p.h>"
write_file($$HEADER_PATH, header_file_contents)|error()
}
}
52 changes: 26 additions & 26 deletions qmake/Makefile.unix
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ DEPEND_SRC = \
$(SOURCE_PATH)/src/corelib/global/qrandom.cpp \
$(SOURCE_PATH)/src/corelib/io/qabstractfileengine.cpp \
$(SOURCE_PATH)/src/corelib/io/qbuffer.cpp \
$(SOURCE_PATH)/src/corelib/io/qdatastream.cpp \
$(SOURCE_PATH)/src/corelib/io/qdebug.cpp \
$(SOURCE_PATH)/src/corelib/io/qdir.cpp \
$(SOURCE_PATH)/src/corelib/io/qdiriterator.cpp \
Expand All @@ -91,18 +90,21 @@ DEPEND_SRC = \
$(SOURCE_PATH)/src/corelib/io/qiodevice.cpp \
$(SOURCE_PATH)/src/corelib/io/qsettings.cpp \
$(SOURCE_PATH)/src/corelib/io/qtemporaryfile.cpp \
$(SOURCE_PATH)/src/corelib/io/qtextstream.cpp \
$(SOURCE_PATH)/src/corelib/json/qjsonarray.cpp \
$(SOURCE_PATH)/src/corelib/json/qjson.cpp \
$(SOURCE_PATH)/src/corelib/json/qjsondocument.cpp \
$(SOURCE_PATH)/src/corelib/json/qjsonobject.cpp \
$(SOURCE_PATH)/src/corelib/json/qjsonparser.cpp \
$(SOURCE_PATH)/src/corelib/json/qjsonvalue.cpp \
$(SOURCE_PATH)/src/corelib/kernel/qcore_mac_objc.mm \
$(SOURCE_PATH)/src/corelib/kernel/qmetatype.cpp \
$(SOURCE_PATH)/src/corelib/kernel/qsystemerror.cpp \
$(SOURCE_PATH)/src/corelib/kernel/qvariant.cpp \
$(SOURCE_PATH)/src/corelib/plugin/quuid.cpp \
$(SOURCE_PATH)/src/corelib/serialization/qdatastream.cpp \
$(SOURCE_PATH)/src/corelib/serialization/qjsonarray.cpp \
$(SOURCE_PATH)/src/corelib/serialization/qjson.cpp \
$(SOURCE_PATH)/src/corelib/serialization/qjsondocument.cpp \
$(SOURCE_PATH)/src/corelib/serialization/qjsonobject.cpp \
$(SOURCE_PATH)/src/corelib/serialization/qjsonparser.cpp \
$(SOURCE_PATH)/src/corelib/serialization/qjsonvalue.cpp \
$(SOURCE_PATH)/src/corelib/serialization/qtextstream.cpp \
$(SOURCE_PATH)/src/corelib/serialization/qxmlstream.cpp \
$(SOURCE_PATH)/src/corelib/serialization/qxmlutils.cpp \
$(SOURCE_PATH)/src/corelib/tools/qarraydata.cpp \
$(SOURCE_PATH)/src/corelib/tools/qbitarray.cpp \
$(SOURCE_PATH)/src/corelib/tools/qbytearray.cpp\
Expand All @@ -123,8 +125,6 @@ DEPEND_SRC = \
$(SOURCE_PATH)/src/corelib/tools/qstringlist.cpp \
$(SOURCE_PATH)/src/corelib/tools/qversionnumber.cpp \
$(SOURCE_PATH)/src/corelib/tools/qvsnprintf.cpp \
$(SOURCE_PATH)/src/corelib/xml/qxmlstream.cpp \
$(SOURCE_PATH)/src/corelib/xml/qxmlutils.cpp \
$(QTSRCS) $(QTSRCS2)
# QTSRCS and QTSRCS2 come from Makefile.unix.* (concatenated with this
# by configure); QTSRCS2 may include *.mm entries on macOS.
Expand Down Expand Up @@ -256,9 +256,6 @@ projectgenerator.o: $(QMKSRC)/generators/projectgenerator.cpp
$(CXX) -c -o $@ $(CXXFLAGS) $<


qtextstream.o: $(SOURCE_PATH)/src/corelib/io/qtextstream.cpp
$(CXX) -c -o $@ $(CXXFLAGS) $<

qvariant.o: $(SOURCE_PATH)/src/corelib/kernel/qvariant.cpp
$(CXX) -c -o $@ $(CXXFLAGS) $<

Expand Down Expand Up @@ -367,9 +364,6 @@ qlocale_win.o: $(SOURCE_PATH)/src/corelib/tools/qlocale_win.cpp
qversionnumber.o: $(SOURCE_PATH)/src/corelib/tools/qversionnumber.cpp
$(CXX) -c -o $@ $(CXXFLAGS) $<

qdatastream.o: $(SOURCE_PATH)/src/corelib/io/qdatastream.cpp
$(CXX) -c -o $@ $(CXXFLAGS) $<

qbuffer.o: $(SOURCE_PATH)/src/corelib/io/qbuffer.cpp
$(CXX) -c -o $@ $(CXXFLAGS) $<

Expand Down Expand Up @@ -454,34 +448,40 @@ qlinkedlist.o: $(SOURCE_PATH)/src/corelib/tools/qlinkedlist.cpp
qcryptographichash.o: $(SOURCE_PATH)/src/corelib/tools/qcryptographichash.cpp
$(CXX) -c -o $@ $(CXXFLAGS) $<

qxmlstream.o: $(SOURCE_PATH)/src/corelib/xml/qxmlstream.cpp
qlogging.o: $(SOURCE_PATH)/src/corelib/global/qlogging.cpp
$(CXX) -c -o $@ $(CXXFLAGS) $<

qsystemlibrary.o: $(SOURCE_PATH)/src/corelib/plugin/qsystemlibrary.cpp
$(CXX) -c -o $@ $(CXXFLAGS) $<

qxmlutils.o: $(SOURCE_PATH)/src/corelib/xml/qxmlutils.cpp
qdatastream.o: $(SOURCE_PATH)/src/corelib/serialization/qdatastream.cpp
$(CXX) -c -o $@ $(CXXFLAGS) $<

qlogging.o: $(SOURCE_PATH)/src/corelib/global/qlogging.cpp
qjson.o: $(SOURCE_PATH)/src/corelib/serialization/qjson.cpp
$(CXX) -c -o $@ $(CXXFLAGS) $<

qsystemlibrary.o: $(SOURCE_PATH)/src/corelib/plugin/qsystemlibrary.cpp
qjsondocument.o: $(SOURCE_PATH)/src/corelib/serialization/qjsondocument.cpp
$(CXX) -c -o $@ $(CXXFLAGS) $<

qjsonparser.o: $(SOURCE_PATH)/src/corelib/serialization/qjsonparser.cpp
$(CXX) -c -o $@ $(CXXFLAGS) $<

qjson.o: $(SOURCE_PATH)/src/corelib/json/qjson.cpp
qjsonarray.o: $(SOURCE_PATH)/src/corelib/serialization/qjsonarray.cpp
$(CXX) -c -o $@ $(CXXFLAGS) $<

qjsondocument.o: $(SOURCE_PATH)/src/corelib/json/qjsondocument.cpp
qjsonobject.o: $(SOURCE_PATH)/src/corelib/serialization/qjsonobject.cpp
$(CXX) -c -o $@ $(CXXFLAGS) $<

qjsonparser.o: $(SOURCE_PATH)/src/corelib/json/qjsonparser.cpp
qjsonvalue.o: $(SOURCE_PATH)/src/corelib/serialization/qjsonvalue.cpp
$(CXX) -c -o $@ $(CXXFLAGS) $<

qjsonarray.o: $(SOURCE_PATH)/src/corelib/json/qjsonarray.cpp
qxmlstream.o: $(SOURCE_PATH)/src/corelib/serialization/qxmlstream.cpp
$(CXX) -c -o $@ $(CXXFLAGS) $<

qjsonobject.o: $(SOURCE_PATH)/src/corelib/json/qjsonobject.cpp
qxmlutils.o: $(SOURCE_PATH)/src/corelib/serialization/qxmlutils.cpp
$(CXX) -c -o $@ $(CXXFLAGS) $<

qjsonvalue.o: $(SOURCE_PATH)/src/corelib/json/qjsonvalue.cpp
qtextstream.o: $(SOURCE_PATH)/src/corelib/serialization/qtextstream.cpp
$(CXX) -c -o $@ $(CXXFLAGS) $<

# DO NOT DELETE THIS LINE -- make depend depends on it
7 changes: 2 additions & 5 deletions qmake/Makefile.win32
Original file line number Diff line number Diff line change
Expand Up @@ -197,13 +197,10 @@ qmake_pch.obj:
{$(SOURCE_PATH)\src\corelib\plugin}.cpp{}.obj::
$(CXX) $(CXXFLAGS) $<

{$(SOURCE_PATH)\src\corelib\tools}.cpp{}.obj::
$(CXX) $(CXXFLAGS) $<

{$(SOURCE_PATH)\src\corelib\xml}.cpp{}.obj::
{$(SOURCE_PATH)\src\corelib\serialization}.cpp{}.obj::
$(CXX) $(CXXFLAGS) $<

{$(SOURCE_PATH)\src\corelib\json}.cpp{}.obj::
{$(SOURCE_PATH)\src\corelib\tools}.cpp{}.obj::
$(CXX) $(CXXFLAGS) $<

# Make sure qstring_compat.obj and qlibraryinfo.obj aren't compiled with PCH enabled
Expand Down
3 changes: 1 addition & 2 deletions qmake/qmake.pro
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@ VPATH += \
../src/corelib/kernel \
../src/corelib/codecs \
../src/corelib/plugin \
../src/corelib/xml \
../src/corelib/io \
../src/corelib/json \
../src/corelib/serialization \
../tools/shared/windows

INCLUDEPATH += . \
Expand Down
36 changes: 35 additions & 1 deletion src/corelib/configure.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
"posix-ipc": { "type": "boolean", "name": "ipc_posix" },
"pps": { "type": "boolean", "name": "qqnx_pps" },
"slog2": "boolean",
"syslog": "boolean"
"syslog": "boolean",
"trace": { "type": "optionalString", "values": [ "etw", "lttng", "no", "yes" ] }
}
},

Expand Down Expand Up @@ -147,6 +148,18 @@
"-lrt"
]
},
"lttng-ust": {
"label": "lttng-ust",
"test": {
"include": "lttng/ust-events.h",
"main": "lttng_session_destroy(nullptr);"
},
"sources": [
{ "type": "pkgConfig", "args": "lttng-ust" },
"-llttng-ust"
],
"use": "libdl"
},
"pcre2": {
"label": "PCRE2",
"test": {
Expand Down Expand Up @@ -858,6 +871,22 @@
"section": "Utilities",
"output": [ "publicFeature" ]
},
"lttng": {
"label": "LTTNG",
"autoDetect": false,
"enable": "input.trace == 'lttng' || (input.trace =='yes' && config.linux)",
"disable": "input.trace == 'etw' || input.trace =='no'",
"condition": "config.linux && libs.lttng-ust",
"output": [ "privateFeature" ]
},
"etw": {
"label": "ETW",
"autoDetect": false,
"enable": "input.trace == 'etw' || (input.trace == 'yes' && config.win32)",
"disable": "input.trace == 'lttng' || input.trace == 'no'",
"condition": "config.win32",
"output": [ "privateFeature" ]
},
"topleveldomain": {
"label": "QUrl::topLevelDomain()",
"purpose": "Provides support for extracting the top level domain from URLs.
Expand Down Expand Up @@ -907,6 +936,11 @@ Please apply the patch corresponding to your Standard Library vendor, found in
"glib",
"iconv",
"icu",
{
"message": "Tracing backend",
"type": "firstAvailableFeature",
"args": "etw lttng"
},
{
"section": "Logging backends",
"entries": [
Expand Down
6 changes: 4 additions & 2 deletions src/corelib/corelib.pro
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ MODULE = core # not corelib, as per project file
MODULE_CONFIG = moc resources
!isEmpty(QT_NAMESPACE): MODULE_DEFINES = QT_NAMESPACE=$$QT_NAMESPACE

TRACEPOINT_PROVIDER = $$PWD/qtcore.tracepoints
CONFIG += qt_tracepoints

CONFIG += $$MODULE_CONFIG
DEFINES += $$MODULE_DEFINES
DEFINES += QT_NO_USING_NAMESPACE QT_NO_FOREACH
Expand Down Expand Up @@ -35,13 +38,12 @@ include(thread/thread.pri)
include(tools/tools.pri)
include(io/io.pri)
include(itemmodels/itemmodels.pri)
include(json/json.pri)
include(plugin/plugin.pri)
include(kernel/kernel.pri)
include(codecs/codecs.pri)
include(serialization/serialization.pri)
include(statemachine/statemachine.pri)
include(mimetypes/mimetypes.pri)
include(xml/xml.pri)

win32 {
LIBS_PRIVATE += -lws2_32
Expand Down
2 changes: 2 additions & 0 deletions src/corelib/global/qconfig-bootstrapped.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
#define QT_FEATURE_cxx11_random (QT_HAS_INCLUDE(<random>) ? 1 : -1)
#define QT_NO_DATASTREAM
#define QT_FEATURE_datetimeparser -1
#define QT_FEATURE_etw -1
#define QT_FEATURE_getauxval (QT_HAS_INCLUDE(<sys/auxv.h>) ? 1 : -1)
#define QT_FEATURE_getentropy -1
#define QT_NO_GEOM_VARIANT
Expand All @@ -92,6 +93,7 @@
#else
# define QT_FEATURE_linkat -1
#endif
#define QT_FEATURE_lttng -1
#define QT_NO_QOBJECT
#define QT_FEATURE_process -1
#define QT_FEATURE_regularexpression -1
Expand Down
2 changes: 2 additions & 0 deletions src/corelib/global/qfloat16.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ static void qFloatFromFloat16_fast(float *, const quint16 *, qsizetype) Q_DECL_N
#endif
/*!
\since 5.11
\relates <QFloat16>
Converts \a len floats from \a in to qfloat16 and stores them in \a out.
Both \a in and \a out must have \a len allocated entries.
Expand All @@ -193,6 +194,7 @@ Q_CORE_EXPORT void qFloatToFloat16(qfloat16 *out, const float *in, qsizetype len

/*!
\since 5.11
\relates <QFloat16>
Converts \a len qfloat16 from \a in to floats and stores them in \a out.
Both \a in and \a out must have \a len allocated entries.
Expand Down
5 changes: 5 additions & 0 deletions src/corelib/global/qglobal.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,11 @@

#if QT_VERSION >= QT_VERSION_CHECK(6,0,0)
# define QT_NO_UNSHARABLE_CONTAINERS
# define QT6_VIRTUAL virtual
# define QT6_NOT_VIRTUAL
#else
# define QT6_VIRTUAL
# define QT6_NOT_VIRTUAL virtual
#endif

/* These two macros makes it possible to turn the builtin line expander into a
Expand Down
Loading

0 comments on commit 095dbc4

Please sign in to comment.