Merge remote-tracking branch 'origin/5.8' into 5.9
Change-Id: I2bd2e61bae1eab4fc74fa6accd741ed9ae1f0669
This commit is contained in:
commit
27432d40f2
33
mkspecs/common/solaris.conf
Normal file
33
mkspecs/common/solaris.conf
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
#
|
||||||
|
# qmake configuration for common solaris
|
||||||
|
#
|
||||||
|
|
||||||
|
QMAKE_PLATFORM += solaris
|
||||||
|
|
||||||
|
include(unix.conf)
|
||||||
|
|
||||||
|
QMAKE_CFLAGS_THREAD = -D_REENTRANT
|
||||||
|
QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD
|
||||||
|
QMAKE_LFLAGS_GCSECTIONS = -Wl,-z,ignore
|
||||||
|
|
||||||
|
QMAKE_LFLAGS_REL_RPATH = -Wl,-z,origin
|
||||||
|
QMAKE_REL_RPATH_BASE = $ORIGIN
|
||||||
|
|
||||||
|
QMAKE_INCDIR_X11 = /usr/X11/include
|
||||||
|
QMAKE_INCDIR_OPENGL = /usr/X11/include/mesa
|
||||||
|
|
||||||
|
QMAKE_LIBS =
|
||||||
|
QMAKE_LIBS_DYNLOAD = -ldl
|
||||||
|
QMAKE_LIBS_X11 = -lXext -lX11 -lresolv -lsocket -lnsl
|
||||||
|
QMAKE_LIBS_NIS =
|
||||||
|
QMAKE_LIBS_OPENGL = -lGL
|
||||||
|
QMAKE_LIBS_THREAD = -lpthread -lrt
|
||||||
|
QMAKE_LIBS_NETWORK = -lresolv -lsocket -lxnet -lnsl
|
||||||
|
|
||||||
|
QMAKE_AR = ar cq
|
||||||
|
QMAKE_OBJCOPY = objcopy
|
||||||
|
QMAKE_NM = nm -P
|
||||||
|
QMAKE_RANLIB =
|
||||||
|
|
||||||
|
QMAKE_STRIP = strip
|
||||||
|
QMAKE_STRIPFLAGS_LIB +=
|
@ -57,7 +57,7 @@ defineReplace(mocCmdBase) {
|
|||||||
msvc: RET += --compiler-flavor=msvc
|
msvc: RET += --compiler-flavor=msvc
|
||||||
|
|
||||||
isEmpty(MOC_PREDEF_FILE): RET += $$join(QMAKE_COMPILER_DEFINES, " -D", -D)
|
isEmpty(MOC_PREDEF_FILE): RET += $$join(QMAKE_COMPILER_DEFINES, " -D", -D)
|
||||||
else: RET += --include $$moc_predefs.output
|
else: RET += --include $$shell_quote($$moc_predefs.output)
|
||||||
|
|
||||||
RET += $$incvar $$QMAKE_MOC_OPTIONS
|
RET += $$incvar $$QMAKE_MOC_OPTIONS
|
||||||
return($$RET)
|
return($$RET)
|
||||||
|
@ -718,7 +718,8 @@ defineTest(qtConfTest_compile) {
|
|||||||
isEmpty(host): host = false
|
isEmpty(host): host = false
|
||||||
|
|
||||||
test_dir = $$QMAKE_CONFIG_TESTS_DIR/$$test
|
test_dir = $$QMAKE_CONFIG_TESTS_DIR/$$test
|
||||||
test_out_dir = $$shadowed($$test_dir)
|
test_base_out_dir = $$shadowed($$QMAKE_CONFIG_TESTS_DIR)
|
||||||
|
test_out_dir = $$test_base_out_dir/$$test
|
||||||
!isEmpty($${1}.pro): \
|
!isEmpty($${1}.pro): \
|
||||||
test_dir = $$test_dir/$$eval($${1}.pro)
|
test_dir = $$test_dir/$$eval($${1}.pro)
|
||||||
test_cmd_base = "$$QMAKE_CD $$system_quote($$system_path($$test_out_dir)) &&"
|
test_cmd_base = "$$QMAKE_CD $$system_quote($$system_path($$test_out_dir)) &&"
|
||||||
@ -779,7 +780,7 @@ defineTest(qtConfTest_compile) {
|
|||||||
QMAKE_MAKE = "$$QMAKE_MAKE clean && $$QMAKE_MAKE"
|
QMAKE_MAKE = "$$QMAKE_MAKE clean && $$QMAKE_MAKE"
|
||||||
|
|
||||||
mkpath($$test_out_dir)|error()
|
mkpath($$test_out_dir)|error()
|
||||||
write_file($$test_out_dir/.qmake.cache)|error()
|
write_file($$test_base_out_dir/.qmake.cache)|error()
|
||||||
|
|
||||||
# add possible command line args
|
# add possible command line args
|
||||||
qmake_args += $$qtConfPrepareArgs($$eval($${1}.args)) $$eval($${1}.literal_args)
|
qmake_args += $$qtConfPrepareArgs($$eval($${1}.args)) $$eval($${1}.literal_args)
|
||||||
|
@ -1,79 +1,21 @@
|
|||||||
#
|
#
|
||||||
# qmake configuration for solaris-g++64
|
# qmake configuration for solaris-g++-64
|
||||||
#
|
|
||||||
# The X11 header files used to be broken on Solaris until patches were
|
|
||||||
# released in early 2001 for Solaris 2.6, 7, and 8. On Solaris 2.5.1
|
|
||||||
# or non-patched systems -fpermissive works around the incompatibility
|
|
||||||
# between GCC 2.95 or better and Solaris - but we still get warnings
|
|
||||||
# because we don't use -isystem.
|
|
||||||
#
|
|
||||||
# From the standards(5) manual page:
|
|
||||||
# The XNS4 specification is safe for use only in ILP32 (32-bit)
|
|
||||||
# environments and should not be used for LP64 (64-bit)
|
|
||||||
# application environments. Use XNS5, which has LP64-clean
|
|
||||||
# interfaces that are portable across ILP32 and LP64 environments.
|
|
||||||
# [...]
|
|
||||||
# For platforms supporting the LP64 (64-bit) programming environment
|
|
||||||
# where the SC5.0 Compilers have been installed, SUSv2-conforming LP64
|
|
||||||
# applications using XNS5 library calls should be built with command
|
|
||||||
# lines of the form:
|
|
||||||
# c89 $(getconf XBS5_LP64_OFF64_CFLAGS) -D_XOPEN_SOURCE=500 \
|
|
||||||
# $(getconf XBS5_LP64_OFF64_LDFLAGS) foo.c -o foo \
|
|
||||||
# $(getconf XBS5_LP64_OFF64_LIBS) -lxnet
|
|
||||||
# So it appears that _XOPEN_SOURCE=500 should be defined when building
|
|
||||||
# 64-bit applications (on Solaris 7 and better). But then __EXTENSIONS__
|
|
||||||
# should be defined as well to recover all the default system interface.
|
|
||||||
#
|
#
|
||||||
|
|
||||||
MAKEFILE_GENERATOR = UNIX
|
MAKEFILE_GENERATOR = UNIX
|
||||||
QMAKE_PLATFORM = solaris
|
CONFIG += incremental
|
||||||
|
QMAKE_INCREMENTAL_STYLE = sublib
|
||||||
|
|
||||||
include(../common/unix.conf)
|
include(../common/solaris.conf)
|
||||||
|
|
||||||
QMAKE_COMPILER = gcc
|
QMAKE_CFLAGS = -m64
|
||||||
|
|
||||||
QMAKE_CC = gcc
|
|
||||||
QMAKE_LEX = flex
|
|
||||||
QMAKE_LEXFLAGS =
|
|
||||||
QMAKE_YACC = yacc
|
|
||||||
QMAKE_YACCFLAGS = -d
|
|
||||||
QMAKE_CFLAGS = -m64 -D_XOPEN_SOURCE=500 -D__EXTENSIONS__
|
|
||||||
QMAKE_CFLAGS_DEPS = -M
|
|
||||||
QMAKE_CFLAGS_WARN_ON = -Wall -W
|
|
||||||
QMAKE_CFLAGS_WARN_OFF = -w
|
|
||||||
QMAKE_CFLAGS_RELEASE = -O2
|
|
||||||
QMAKE_CFLAGS_DEBUG = -g
|
|
||||||
QMAKE_CFLAGS_SHLIB = -fPIC
|
|
||||||
QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB
|
|
||||||
QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
|
|
||||||
QMAKE_CFLAGS_THREAD = -D_REENTRANT
|
|
||||||
|
|
||||||
QMAKE_CXX = g++
|
|
||||||
QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
|
|
||||||
QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS
|
|
||||||
QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
|
|
||||||
QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
|
|
||||||
QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
|
|
||||||
QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
|
|
||||||
QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB
|
|
||||||
QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB
|
|
||||||
QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
|
|
||||||
QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD
|
|
||||||
|
|
||||||
QMAKE_INCDIR = /usr/sfw/include
|
|
||||||
QMAKE_LIBDIR = /usr/sfw/lib/64
|
|
||||||
QMAKE_INCDIR_X11 = /usr/openwin/include
|
|
||||||
QMAKE_LIBDIR_X11 = /usr/openwin/lib/64
|
|
||||||
QMAKE_INCDIR_OPENGL = /usr/openwin/include
|
|
||||||
QMAKE_LIBDIR_OPENGL = /usr/openwin/lib/64
|
|
||||||
|
|
||||||
QMAKE_LINK = g++
|
|
||||||
QMAKE_LINK_SHLIB = g++
|
|
||||||
QMAKE_LINK_C = gcc
|
|
||||||
QMAKE_LINK_C_SHLIB = gcc
|
|
||||||
QMAKE_LFLAGS = -m64
|
QMAKE_LFLAGS = -m64
|
||||||
QMAKE_LFLAGS_RELEASE =
|
|
||||||
QMAKE_LFLAGS_DEBUG = -g
|
QMAKE_LIBDIR_X11 = /usr/X11/lib/64
|
||||||
|
QMAKE_LIBDIR_OPENGL = /usr/X11/lib/64
|
||||||
|
|
||||||
|
include(../common/gcc-base.conf)
|
||||||
|
|
||||||
QMAKE_LFLAGS_SHLIB = -shared
|
QMAKE_LFLAGS_SHLIB = -shared
|
||||||
QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB
|
QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB
|
||||||
QMAKE_LFLAGS_SONAME = -h$$LITERAL_WHITESPACE
|
QMAKE_LFLAGS_SONAME = -h$$LITERAL_WHITESPACE
|
||||||
@ -81,17 +23,9 @@ QMAKE_LFLAGS_THREAD =
|
|||||||
QMAKE_LFLAGS_NOUNDEF = -z defs
|
QMAKE_LFLAGS_NOUNDEF = -z defs
|
||||||
QMAKE_LFLAGS_RPATH = -Wl,-R,
|
QMAKE_LFLAGS_RPATH = -Wl,-R,
|
||||||
|
|
||||||
QMAKE_LIBS =
|
include(../common/g++-base.conf)
|
||||||
QMAKE_LIBS_DYNLOAD = -ldl
|
|
||||||
QMAKE_LIBS_X11 = -lXext -lX11 -lresolv -lsocket -lnsl
|
|
||||||
QMAKE_LIBS_NIS =
|
|
||||||
QMAKE_LIBS_OPENGL = -lGL
|
|
||||||
QMAKE_LIBS_THREAD = -lpthread -lrt
|
|
||||||
QMAKE_LIBS_NETWORK = -lresolv -lsocket -lxnet -lnsl
|
|
||||||
|
|
||||||
QMAKE_AR = ar cq
|
QMAKE_LFLAGS_RELEASE =
|
||||||
QMAKE_OBJCOPY = objcopy
|
QMAKE_LFLAGS_DEBUG = -g
|
||||||
QMAKE_NM = nm -P
|
|
||||||
QMAKE_RANLIB =
|
|
||||||
|
|
||||||
load(qt_config)
|
load(qt_config)
|
||||||
|
@ -1,62 +1,18 @@
|
|||||||
#
|
#
|
||||||
# qmake configuration for solaris-g++
|
# qmake configuration for solaris-g++
|
||||||
#
|
#
|
||||||
# The X11 header files used to be broken on Solaris until patches were
|
|
||||||
# released in early 2001 for Solaris 2.6, 7, and 8. On Solaris 2.5.1
|
|
||||||
# or non-patched systems -fpermissive works around the incompatibility
|
|
||||||
# between GCC 2.95 or better and Solaris - but we still get warnings
|
|
||||||
# because we don't use -isystem.
|
|
||||||
#
|
|
||||||
|
|
||||||
MAKEFILE_GENERATOR = UNIX
|
MAKEFILE_GENERATOR = UNIX
|
||||||
QMAKE_PLATFORM = solaris
|
CONFIG += incremental
|
||||||
|
QMAKE_INCREMENTAL_STYLE = sublib
|
||||||
|
|
||||||
include(../common/unix.conf)
|
include(../common/solaris.conf)
|
||||||
|
|
||||||
QMAKE_COMPILER = gcc
|
QMAKE_LIBDIR_X11 = /usr/X11/lib
|
||||||
|
QMAKE_LIBDIR_OPENGL = /usr/X11/lib
|
||||||
|
|
||||||
QMAKE_CC = gcc
|
include(../common/gcc-base.conf)
|
||||||
QMAKE_LEX = flex
|
|
||||||
QMAKE_LEXFLAGS =
|
|
||||||
QMAKE_YACC = yacc
|
|
||||||
QMAKE_YACCFLAGS = -d
|
|
||||||
QMAKE_CFLAGS =
|
|
||||||
QMAKE_CFLAGS_DEPS = -M
|
|
||||||
QMAKE_CFLAGS_WARN_ON = -Wall -W
|
|
||||||
QMAKE_CFLAGS_WARN_OFF = -w
|
|
||||||
QMAKE_CFLAGS_RELEASE = -O2
|
|
||||||
QMAKE_CFLAGS_DEBUG = -g
|
|
||||||
QMAKE_CFLAGS_SHLIB = -fPIC
|
|
||||||
QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB
|
|
||||||
QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
|
|
||||||
QMAKE_CFLAGS_THREAD = -D_REENTRANT
|
|
||||||
|
|
||||||
QMAKE_CXX = g++
|
|
||||||
QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
|
|
||||||
QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS
|
|
||||||
QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
|
|
||||||
QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
|
|
||||||
QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
|
|
||||||
QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
|
|
||||||
QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB
|
|
||||||
QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB
|
|
||||||
QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
|
|
||||||
QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD
|
|
||||||
|
|
||||||
QMAKE_INCDIR = /usr/sfw/include
|
|
||||||
QMAKE_LIBDIR = /usr/sfw/lib
|
|
||||||
QMAKE_INCDIR_X11 = /usr/openwin/include
|
|
||||||
QMAKE_LIBDIR_X11 = /usr/openwin/lib
|
|
||||||
QMAKE_INCDIR_OPENGL = /usr/openwin/include
|
|
||||||
QMAKE_LIBDIR_OPENGL = /usr/openwin/lib
|
|
||||||
|
|
||||||
QMAKE_LINK = g++
|
|
||||||
QMAKE_LINK_SHLIB = g++
|
|
||||||
QMAKE_LINK_C = gcc
|
|
||||||
QMAKE_LINK_C_SHLIB = gcc
|
|
||||||
QMAKE_LFLAGS =
|
|
||||||
QMAKE_LFLAGS_RELEASE =
|
|
||||||
QMAKE_LFLAGS_DEBUG = -g
|
|
||||||
QMAKE_LFLAGS_SHLIB = -shared
|
QMAKE_LFLAGS_SHLIB = -shared
|
||||||
QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB
|
QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB
|
||||||
QMAKE_LFLAGS_SONAME = -h$$LITERAL_WHITESPACE
|
QMAKE_LFLAGS_SONAME = -h$$LITERAL_WHITESPACE
|
||||||
@ -64,17 +20,9 @@ QMAKE_LFLAGS_THREAD =
|
|||||||
QMAKE_LFLAGS_NOUNDEF = -z defs
|
QMAKE_LFLAGS_NOUNDEF = -z defs
|
||||||
QMAKE_LFLAGS_RPATH = -Wl,-R,
|
QMAKE_LFLAGS_RPATH = -Wl,-R,
|
||||||
|
|
||||||
QMAKE_LIBS =
|
include(../common/g++-base.conf)
|
||||||
QMAKE_LIBS_DYNLOAD = -ldl
|
|
||||||
QMAKE_LIBS_X11 = -lXext -lX11 -lresolv -lsocket -lnsl
|
|
||||||
QMAKE_LIBS_NIS =
|
|
||||||
QMAKE_LIBS_OPENGL = -lGL
|
|
||||||
QMAKE_LIBS_THREAD = -lpthread -lrt
|
|
||||||
QMAKE_LIBS_NETWORK = -lresolv -lsocket -lxnet -lnsl
|
|
||||||
|
|
||||||
QMAKE_AR = ar cq
|
QMAKE_LFLAGS_RELEASE =
|
||||||
QMAKE_OBJCOPY = objcopy
|
QMAKE_LFLAGS_DEBUG = -g
|
||||||
QMAKE_NM = nm -P
|
|
||||||
QMAKE_RANLIB =
|
|
||||||
|
|
||||||
load(qt_config)
|
load(qt_config)
|
||||||
|
@ -14,7 +14,7 @@ OBJS=project.o option.o property.o main.o ioutils.o proitems.o \
|
|||||||
QOBJS=qtextcodec.o qutfcodec.o qstring.o qstring_compat.o qstringbuilder.o qtextstream.o qiodevice.o \
|
QOBJS=qtextcodec.o qutfcodec.o qstring.o qstring_compat.o qstringbuilder.o qtextstream.o qiodevice.o \
|
||||||
qringbuffer.o qdebug.o qmalloc.o qglobal.o \
|
qringbuffer.o qdebug.o qmalloc.o qglobal.o \
|
||||||
qarraydata.o qbytearray.o qbytearraymatcher.o qdatastream.o qbuffer.o qlist.o qfiledevice.o qfile.o \
|
qarraydata.o qbytearray.o qbytearraymatcher.o qdatastream.o qbuffer.o qlist.o qfiledevice.o qfile.o \
|
||||||
qfilesystementry.o qfilesystemengine.o qfsfileengine.o qfsfileengine_iterator.o qregexp.o qvector.o \
|
qfilesystementry.o qfilesystemengine.o qfsfileengine.o qfsfileengine_iterator.o qregexp.o \
|
||||||
qbitarray.o qdir.o qdiriterator.o quuid.o qhash.o qfileinfo.o qdatetime.o qstringlist.o \
|
qbitarray.o qdir.o qdiriterator.o quuid.o qhash.o qfileinfo.o qdatetime.o qstringlist.o \
|
||||||
qabstractfileengine.o qtemporaryfile.o qmap.o qmetatype.o qsettings.o qsystemerror.o \
|
qabstractfileengine.o qtemporaryfile.o qmap.o qmetatype.o qsettings.o qsystemerror.o \
|
||||||
qvariant.o qvsnprintf.o qlocale.o qlocale_tools.o qlinkedlist.o qnumeric.o \
|
qvariant.o qvsnprintf.o qlocale.o qlocale_tools.o qlinkedlist.o qnumeric.o \
|
||||||
@ -62,7 +62,7 @@ DEPEND_SRC = \
|
|||||||
$(SOURCE_PATH)/src/corelib/io/qabstractfileengine.cpp \
|
$(SOURCE_PATH)/src/corelib/io/qabstractfileengine.cpp \
|
||||||
$(SOURCE_PATH)/src/corelib/io/qfsfileengine_iterator.cpp \
|
$(SOURCE_PATH)/src/corelib/io/qfsfileengine_iterator.cpp \
|
||||||
$(SOURCE_PATH)/src/corelib/io/qfsfileengine.cpp $(SOURCE_PATH)/src/corelib/tools/qlist.cpp \
|
$(SOURCE_PATH)/src/corelib/io/qfsfileengine.cpp $(SOURCE_PATH)/src/corelib/tools/qlist.cpp \
|
||||||
$(SOURCE_PATH)/src/corelib/tools/qvector.cpp $(SOURCE_PATH)/src/corelib/tools/qbitarray.cpp \
|
$(SOURCE_PATH)/src/corelib/tools/qbitarray.cpp \
|
||||||
$(SOURCE_PATH)/src/corelib/io/qdiriterator.cpp \
|
$(SOURCE_PATH)/src/corelib/io/qdiriterator.cpp \
|
||||||
$(SOURCE_PATH)/src/corelib/io/qdir.cpp $(SOURCE_PATH)/src/corelib/plugin/quuid.cpp \
|
$(SOURCE_PATH)/src/corelib/io/qdir.cpp $(SOURCE_PATH)/src/corelib/plugin/quuid.cpp \
|
||||||
$(SOURCE_PATH)/src/corelib/io/qfileinfo.cpp $(SOURCE_PATH)/src/corelib/tools/qdatetime.cpp \
|
$(SOURCE_PATH)/src/corelib/io/qfileinfo.cpp $(SOURCE_PATH)/src/corelib/tools/qdatetime.cpp \
|
||||||
@ -375,9 +375,6 @@ qtemporaryfile.o: $(SOURCE_PATH)/src/corelib/io/qtemporaryfile.cpp
|
|||||||
qregexp.o: $(SOURCE_PATH)/src/corelib/tools/qregexp.cpp
|
qregexp.o: $(SOURCE_PATH)/src/corelib/tools/qregexp.cpp
|
||||||
$(CXX) -c -o $@ $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/tools/qregexp.cpp
|
$(CXX) -c -o $@ $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/tools/qregexp.cpp
|
||||||
|
|
||||||
qvector.o: $(SOURCE_PATH)/src/corelib/tools/qvector.cpp
|
|
||||||
$(CXX) -c -o $@ $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/tools/qvector.cpp
|
|
||||||
|
|
||||||
qbitarray.o: $(SOURCE_PATH)/src/corelib/tools/qbitarray.cpp
|
qbitarray.o: $(SOURCE_PATH)/src/corelib/tools/qbitarray.cpp
|
||||||
$(CXX) -c -o $@ $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/tools/qbitarray.cpp
|
$(CXX) -c -o $@ $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/tools/qbitarray.cpp
|
||||||
|
|
||||||
|
@ -108,7 +108,6 @@ QTOBJS= \
|
|||||||
qtextstream.obj \
|
qtextstream.obj \
|
||||||
qdatastream.obj \
|
qdatastream.obj \
|
||||||
quuid.obj \
|
quuid.obj \
|
||||||
qvector.obj \
|
|
||||||
qsettings.obj \
|
qsettings.obj \
|
||||||
qvariant.obj \
|
qvariant.obj \
|
||||||
qsettings_win.obj \
|
qsettings_win.obj \
|
||||||
|
@ -68,7 +68,6 @@ bootstrap { #Qt code
|
|||||||
qlibraryinfo.cpp \
|
qlibraryinfo.cpp \
|
||||||
qsystemerror.cpp \
|
qsystemerror.cpp \
|
||||||
qvariant.cpp \
|
qvariant.cpp \
|
||||||
qvector.cpp \
|
|
||||||
qvsnprintf.cpp \
|
qvsnprintf.cpp \
|
||||||
qxmlstream.cpp \
|
qxmlstream.cpp \
|
||||||
qxmlutils.cpp \
|
qxmlutils.cpp \
|
||||||
|
@ -77,6 +77,7 @@
|
|||||||
#define QT_NO_SYSTEMLOCALE
|
#define QT_NO_SYSTEMLOCALE
|
||||||
#define QT_FEATURE_slog2 -1
|
#define QT_FEATURE_slog2 -1
|
||||||
#define QT_FEATURE_syslog -1
|
#define QT_FEATURE_syslog -1
|
||||||
|
#define QT_FEATURE_temporaryfile 1
|
||||||
#define QT_NO_THREAD
|
#define QT_NO_THREAD
|
||||||
#define QT_FEATURE_timezone -1
|
#define QT_FEATURE_timezone -1
|
||||||
#define QT_FEATURE_topleveldomain -1
|
#define QT_FEATURE_topleveldomain -1
|
||||||
|
@ -3974,7 +3974,10 @@ bool QInternal::activateCallbacks(Callback cb, void **parameters)
|
|||||||
{
|
{
|
||||||
Q_ASSERT_X(cb >= 0, "QInternal::activateCallback()", "Callback id must be a valid id");
|
Q_ASSERT_X(cb >= 0, "QInternal::activateCallback()", "Callback id must be a valid id");
|
||||||
|
|
||||||
QInternal_CallBackTable *cbt = global_callback_table();
|
if (!global_callback_table.exists())
|
||||||
|
return false;
|
||||||
|
|
||||||
|
QInternal_CallBackTable *cbt = &(*global_callback_table);
|
||||||
if (cbt && cb < cbt->callbacks.size()) {
|
if (cbt && cb < cbt->callbacks.size()) {
|
||||||
QList<qInternalCallback> callbacks = cbt->callbacks[cb];
|
QList<qInternalCallback> callbacks = cbt->callbacks[cb];
|
||||||
bool ret = false;
|
bool ret = false;
|
||||||
|
@ -1007,10 +1007,9 @@ qint64 QIODevice::read(char *data, qint64 maxSize)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
const bool sequential = d->isSequential();
|
const bool sequential = d->isSequential();
|
||||||
const bool keepDataInBuffer = sequential && d->transactionStarted;
|
|
||||||
|
|
||||||
// Short circuit for getChar()
|
// Short-cut for getChar(), unless we need to keep the data in the buffer.
|
||||||
if (maxSize == 1 && !keepDataInBuffer) {
|
if (maxSize == 1 && !(sequential && d->transactionStarted)) {
|
||||||
int chint;
|
int chint;
|
||||||
while ((chint = d->buffer.getChar()) != -1) {
|
while ((chint = d->buffer.getChar()) != -1) {
|
||||||
if (!sequential)
|
if (!sequential)
|
||||||
@ -1031,43 +1030,67 @@ qint64 QIODevice::read(char *data, qint64 maxSize)
|
|||||||
}
|
}
|
||||||
|
|
||||||
CHECK_MAXLEN(read, qint64(-1));
|
CHECK_MAXLEN(read, qint64(-1));
|
||||||
|
CHECK_READABLE(read, qint64(-1));
|
||||||
|
|
||||||
|
const qint64 readBytes = d->read(data, maxSize);
|
||||||
|
|
||||||
|
#if defined QIODEVICE_DEBUG
|
||||||
|
printf("%p \treturning %lld, d->pos == %lld, d->buffer.size() == %lld\n", this,
|
||||||
|
readBytes, d->pos, d->buffer.size());
|
||||||
|
if (readBytes > 0)
|
||||||
|
debugBinaryString(data - readBytes, readBytes);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return readBytes;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\internal
|
||||||
|
*/
|
||||||
|
qint64 QIODevicePrivate::read(char *data, qint64 maxSize, bool peeking)
|
||||||
|
{
|
||||||
|
Q_Q(QIODevice);
|
||||||
|
|
||||||
|
const bool buffered = (openMode & QIODevice::Unbuffered) == 0;
|
||||||
|
const bool sequential = isSequential();
|
||||||
|
const bool keepDataInBuffer = sequential
|
||||||
|
? peeking || transactionStarted
|
||||||
|
: peeking && buffered;
|
||||||
|
const qint64 savedPos = pos;
|
||||||
qint64 readSoFar = 0;
|
qint64 readSoFar = 0;
|
||||||
bool madeBufferReadsOnly = true;
|
bool madeBufferReadsOnly = true;
|
||||||
bool deviceAtEof = false;
|
bool deviceAtEof = false;
|
||||||
char *readPtr = data;
|
char *readPtr = data;
|
||||||
|
qint64 bufferPos = (sequential && transactionStarted) ? transactionPos : Q_INT64_C(0);
|
||||||
forever {
|
forever {
|
||||||
// Try reading from the buffer.
|
// Try reading from the buffer.
|
||||||
qint64 bufferReadChunkSize = keepDataInBuffer
|
qint64 bufferReadChunkSize = keepDataInBuffer
|
||||||
? d->buffer.peek(data, maxSize, d->transactionPos)
|
? buffer.peek(data, maxSize, bufferPos)
|
||||||
: d->buffer.read(data, maxSize);
|
: buffer.read(data, maxSize);
|
||||||
if (bufferReadChunkSize > 0) {
|
if (bufferReadChunkSize > 0) {
|
||||||
if (keepDataInBuffer)
|
bufferPos += bufferReadChunkSize;
|
||||||
d->transactionPos += bufferReadChunkSize;
|
if (!sequential)
|
||||||
else if (!sequential)
|
pos += bufferReadChunkSize;
|
||||||
d->pos += bufferReadChunkSize;
|
#if defined QIODEVICE_DEBUG
|
||||||
|
printf("%p \treading %lld bytes from buffer into position %lld\n", q,
|
||||||
|
bufferReadChunkSize, readSoFar);
|
||||||
|
#endif
|
||||||
readSoFar += bufferReadChunkSize;
|
readSoFar += bufferReadChunkSize;
|
||||||
data += bufferReadChunkSize;
|
data += bufferReadChunkSize;
|
||||||
maxSize -= bufferReadChunkSize;
|
maxSize -= bufferReadChunkSize;
|
||||||
#if defined QIODEVICE_DEBUG
|
|
||||||
printf("%p \treading %lld bytes from buffer into position %lld\n", this,
|
|
||||||
bufferReadChunkSize, readSoFar - bufferReadChunkSize);
|
|
||||||
#endif
|
|
||||||
} else {
|
|
||||||
CHECK_READABLE(read, qint64(-1));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (maxSize > 0 && !deviceAtEof) {
|
if (maxSize > 0 && !deviceAtEof) {
|
||||||
qint64 readFromDevice = 0;
|
qint64 readFromDevice = 0;
|
||||||
// Make sure the device is positioned correctly.
|
// Make sure the device is positioned correctly.
|
||||||
if (sequential || d->pos == d->devicePos || seek(d->pos)) {
|
if (sequential || pos == devicePos || q->seek(pos)) {
|
||||||
madeBufferReadsOnly = false; // fix readData attempt
|
madeBufferReadsOnly = false; // fix readData attempt
|
||||||
if ((maxSize >= d->readBufferChunkSize || (d->openMode & Unbuffered))
|
if ((!buffered || maxSize >= readBufferChunkSize) && !keepDataInBuffer) {
|
||||||
&& !keepDataInBuffer) {
|
|
||||||
// Read big chunk directly to output buffer
|
// Read big chunk directly to output buffer
|
||||||
readFromDevice = readData(data, maxSize);
|
readFromDevice = q->readData(data, maxSize);
|
||||||
deviceAtEof = (readFromDevice != maxSize);
|
deviceAtEof = (readFromDevice != maxSize);
|
||||||
#if defined QIODEVICE_DEBUG
|
#if defined QIODEVICE_DEBUG
|
||||||
printf("%p \treading %lld bytes from device (total %lld)\n", this,
|
printf("%p \treading %lld bytes from device (total %lld)\n", q,
|
||||||
readFromDevice, readSoFar);
|
readFromDevice, readSoFar);
|
||||||
#endif
|
#endif
|
||||||
if (readFromDevice > 0) {
|
if (readFromDevice > 0) {
|
||||||
@ -1075,24 +1098,24 @@ qint64 QIODevice::read(char *data, qint64 maxSize)
|
|||||||
data += readFromDevice;
|
data += readFromDevice;
|
||||||
maxSize -= readFromDevice;
|
maxSize -= readFromDevice;
|
||||||
if (!sequential) {
|
if (!sequential) {
|
||||||
d->pos += readFromDevice;
|
pos += readFromDevice;
|
||||||
d->devicePos += readFromDevice;
|
devicePos += readFromDevice;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Do not read more than maxSize on unbuffered devices
|
// Do not read more than maxSize on unbuffered devices
|
||||||
const qint64 bytesToBuffer = (d->openMode & Unbuffered)
|
const qint64 bytesToBuffer = (buffered || readBufferChunkSize < maxSize)
|
||||||
? qMin(maxSize, qint64(d->readBufferChunkSize))
|
? qint64(readBufferChunkSize)
|
||||||
: qint64(d->readBufferChunkSize);
|
: maxSize;
|
||||||
// Try to fill QIODevice buffer by single read
|
// Try to fill QIODevice buffer by single read
|
||||||
readFromDevice = readData(d->buffer.reserve(bytesToBuffer), bytesToBuffer);
|
readFromDevice = q->readData(buffer.reserve(bytesToBuffer), bytesToBuffer);
|
||||||
deviceAtEof = (readFromDevice != bytesToBuffer);
|
deviceAtEof = (readFromDevice != bytesToBuffer);
|
||||||
d->buffer.chop(bytesToBuffer - qMax(Q_INT64_C(0), readFromDevice));
|
buffer.chop(bytesToBuffer - qMax(Q_INT64_C(0), readFromDevice));
|
||||||
if (readFromDevice > 0) {
|
if (readFromDevice > 0) {
|
||||||
if (!sequential)
|
if (!sequential)
|
||||||
d->devicePos += readFromDevice;
|
devicePos += readFromDevice;
|
||||||
#if defined QIODEVICE_DEBUG
|
#if defined QIODEVICE_DEBUG
|
||||||
printf("%p \treading %lld from device into buffer\n", this,
|
printf("%p \treading %lld from device into buffer\n", q,
|
||||||
readFromDevice);
|
readFromDevice);
|
||||||
#endif
|
#endif
|
||||||
continue;
|
continue;
|
||||||
@ -1108,7 +1131,7 @@ qint64 QIODevice::read(char *data, qint64 maxSize)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((d->openMode & Text) && readPtr < data) {
|
if ((openMode & QIODevice::Text) && readPtr < data) {
|
||||||
const char *endPtr = data;
|
const char *endPtr = data;
|
||||||
|
|
||||||
// optimization to avoid initial self-assignment
|
// optimization to avoid initial self-assignment
|
||||||
@ -1140,14 +1163,18 @@ qint64 QIODevice::read(char *data, qint64 maxSize)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined QIODEVICE_DEBUG
|
// Restore positions after reading
|
||||||
printf("%p \treturning %lld, d->pos == %lld, d->buffer.size() == %lld\n", this,
|
if (keepDataInBuffer) {
|
||||||
readSoFar, d->pos, d->buffer.size());
|
if (peeking)
|
||||||
debugBinaryString(data - readSoFar, readSoFar);
|
pos = savedPos; // does nothing on sequential devices
|
||||||
#endif
|
else
|
||||||
|
transactionPos = bufferPos;
|
||||||
|
} else if (peeking) {
|
||||||
|
seekBuffer(savedPos); // unbuffered random-access device
|
||||||
|
}
|
||||||
|
|
||||||
if (madeBufferReadsOnly && d->isBufferEmpty())
|
if (madeBufferReadsOnly && isBufferEmpty())
|
||||||
readData(data, 0);
|
q->readData(data, 0);
|
||||||
|
|
||||||
return readSoFar;
|
return readSoFar;
|
||||||
}
|
}
|
||||||
@ -1759,27 +1786,7 @@ bool QIODevicePrivate::putCharHelper(char c)
|
|||||||
*/
|
*/
|
||||||
qint64 QIODevicePrivate::peek(char *data, qint64 maxSize)
|
qint64 QIODevicePrivate::peek(char *data, qint64 maxSize)
|
||||||
{
|
{
|
||||||
Q_Q(QIODevice);
|
return read(data, maxSize, true);
|
||||||
|
|
||||||
if (transactionStarted) {
|
|
||||||
const qint64 savedTransactionPos = transactionPos;
|
|
||||||
const qint64 savedPos = pos;
|
|
||||||
|
|
||||||
qint64 readBytes = q->read(data, maxSize);
|
|
||||||
|
|
||||||
// Restore initial position
|
|
||||||
if (isSequential())
|
|
||||||
transactionPos = savedTransactionPos;
|
|
||||||
else
|
|
||||||
seekBuffer(savedPos);
|
|
||||||
return readBytes;
|
|
||||||
}
|
|
||||||
|
|
||||||
q->startTransaction();
|
|
||||||
qint64 readBytes = q->read(data, maxSize);
|
|
||||||
q->rollbackTransaction();
|
|
||||||
|
|
||||||
return readBytes;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@ -1787,26 +1794,17 @@ qint64 QIODevicePrivate::peek(char *data, qint64 maxSize)
|
|||||||
*/
|
*/
|
||||||
QByteArray QIODevicePrivate::peek(qint64 maxSize)
|
QByteArray QIODevicePrivate::peek(qint64 maxSize)
|
||||||
{
|
{
|
||||||
Q_Q(QIODevice);
|
QByteArray result(maxSize, Qt::Uninitialized);
|
||||||
|
|
||||||
if (transactionStarted) {
|
const qint64 readBytes = read(result.data(), maxSize, true);
|
||||||
const qint64 savedTransactionPos = transactionPos;
|
|
||||||
const qint64 savedPos = pos;
|
|
||||||
|
|
||||||
QByteArray result = q->read(maxSize);
|
if (readBytes < maxSize) {
|
||||||
|
if (readBytes <= 0)
|
||||||
// Restore initial position
|
result.clear();
|
||||||
if (isSequential())
|
|
||||||
transactionPos = savedTransactionPos;
|
|
||||||
else
|
else
|
||||||
seekBuffer(savedPos);
|
result.resize(readBytes);
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
q->startTransaction();
|
|
||||||
QByteArray result = q->read(maxSize);
|
|
||||||
q->rollbackTransaction();
|
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1844,7 +1842,12 @@ bool QIODevice::getChar(char *c)
|
|||||||
*/
|
*/
|
||||||
qint64 QIODevice::peek(char *data, qint64 maxSize)
|
qint64 QIODevice::peek(char *data, qint64 maxSize)
|
||||||
{
|
{
|
||||||
return d_func()->peek(data, maxSize);
|
Q_D(QIODevice);
|
||||||
|
|
||||||
|
CHECK_MAXLEN(peek, qint64(-1));
|
||||||
|
CHECK_READABLE(peek, qint64(-1));
|
||||||
|
|
||||||
|
return d->peek(data, maxSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@ -1866,7 +1869,13 @@ qint64 QIODevice::peek(char *data, qint64 maxSize)
|
|||||||
*/
|
*/
|
||||||
QByteArray QIODevice::peek(qint64 maxSize)
|
QByteArray QIODevice::peek(qint64 maxSize)
|
||||||
{
|
{
|
||||||
return d_func()->peek(maxSize);
|
Q_D(QIODevice);
|
||||||
|
|
||||||
|
CHECK_MAXLEN(peek, QByteArray());
|
||||||
|
CHECK_MAXBYTEARRAYSIZE(peek);
|
||||||
|
CHECK_READABLE(peek, QByteArray());
|
||||||
|
|
||||||
|
return d->peek(maxSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
@ -171,6 +171,7 @@ public:
|
|||||||
void setReadChannelCount(int count);
|
void setReadChannelCount(int count);
|
||||||
void setWriteChannelCount(int count);
|
void setWriteChannelCount(int count);
|
||||||
|
|
||||||
|
qint64 read(char *data, qint64 maxSize, bool peeking = false);
|
||||||
virtual qint64 peek(char *data, qint64 maxSize);
|
virtual qint64 peek(char *data, qint64 maxSize);
|
||||||
virtual QByteArray peek(qint64 maxSize);
|
virtual QByteArray peek(qint64 maxSize);
|
||||||
|
|
||||||
|
@ -149,12 +149,23 @@ static QString cleanPath(const QString &_path)
|
|||||||
|
|
||||||
Q_DECLARE_TYPEINFO(QResourceRoot, Q_MOVABLE_TYPE);
|
Q_DECLARE_TYPEINFO(QResourceRoot, Q_MOVABLE_TYPE);
|
||||||
|
|
||||||
Q_GLOBAL_STATIC_WITH_ARGS(QMutex, resourceMutex, (QMutex::Recursive))
|
|
||||||
|
|
||||||
typedef QList<QResourceRoot*> ResourceList;
|
typedef QList<QResourceRoot*> ResourceList;
|
||||||
Q_GLOBAL_STATIC(ResourceList, resourceList)
|
struct QResourceGlobalData
|
||||||
|
{
|
||||||
|
QMutex resourceMutex{QMutex::Recursive};
|
||||||
|
ResourceList resourceList;
|
||||||
|
QStringList resourceSearchPaths;
|
||||||
|
};
|
||||||
|
Q_GLOBAL_STATIC(QResourceGlobalData, resourceGlobalData)
|
||||||
|
|
||||||
Q_GLOBAL_STATIC(QStringList, resourceSearchPaths)
|
static inline QMutex *resourceMutex()
|
||||||
|
{ return &resourceGlobalData->resourceMutex; }
|
||||||
|
|
||||||
|
static inline ResourceList *resourceList()
|
||||||
|
{ return &resourceGlobalData->resourceList; }
|
||||||
|
|
||||||
|
static inline QStringList *resourceSearchPaths()
|
||||||
|
{ return &resourceGlobalData->resourceSearchPaths; }
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\class QResource
|
\class QResource
|
||||||
@ -870,6 +881,9 @@ Q_CORE_EXPORT bool qRegisterResourceData(int version, const unsigned char *tree,
|
|||||||
Q_CORE_EXPORT bool qUnregisterResourceData(int version, const unsigned char *tree,
|
Q_CORE_EXPORT bool qUnregisterResourceData(int version, const unsigned char *tree,
|
||||||
const unsigned char *name, const unsigned char *data)
|
const unsigned char *name, const unsigned char *data)
|
||||||
{
|
{
|
||||||
|
if (resourceGlobalData.isDestroyed())
|
||||||
|
return false;
|
||||||
|
|
||||||
QMutexLocker lock(resourceMutex());
|
QMutexLocker lock(resourceMutex());
|
||||||
if ((version == 0x01 || version == 0x02) && resourceList()) {
|
if ((version == 0x01 || version == 0x02) && resourceList()) {
|
||||||
QResourceRoot res(version, tree, name, data);
|
QResourceRoot res(version, tree, name, data);
|
||||||
|
@ -305,12 +305,13 @@ void qRemovePostRoutine(QtCleanUpFunction p)
|
|||||||
|
|
||||||
static void qt_call_pre_routines()
|
static void qt_call_pre_routines()
|
||||||
{
|
{
|
||||||
QStartUpFuncList *list = preRList();
|
if (!preRList.exists())
|
||||||
if (!list)
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
#ifndef QT_NO_THREAD
|
#ifndef QT_NO_THREAD
|
||||||
QMutexLocker locker(&globalPreRoutinesMutex);
|
QMutexLocker locker(&globalPreRoutinesMutex);
|
||||||
#endif
|
#endif
|
||||||
|
QVFuncList *list = &(*preRList);
|
||||||
// Unlike qt_call_post_routines, we don't empty the list, because
|
// Unlike qt_call_post_routines, we don't empty the list, because
|
||||||
// Q_COREAPP_STARTUP_FUNCTION is a macro, so the user expects
|
// Q_COREAPP_STARTUP_FUNCTION is a macro, so the user expects
|
||||||
// the function to be executed every time QCoreApplication is created.
|
// the function to be executed every time QCoreApplication is created.
|
||||||
@ -320,16 +321,10 @@ static void qt_call_pre_routines()
|
|||||||
|
|
||||||
void Q_CORE_EXPORT qt_call_post_routines()
|
void Q_CORE_EXPORT qt_call_post_routines()
|
||||||
{
|
{
|
||||||
QVFuncList *list = 0;
|
if (!postRList.exists())
|
||||||
QT_TRY {
|
|
||||||
list = postRList();
|
|
||||||
} QT_CATCH(const std::bad_alloc &) {
|
|
||||||
// ignore - if we can't allocate a post routine list,
|
|
||||||
// there's a high probability that there's no post
|
|
||||||
// routine to be executed :)
|
|
||||||
}
|
|
||||||
if (!list)
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
QVFuncList *list = &(*postRList);
|
||||||
while (!list->isEmpty())
|
while (!list->isEmpty())
|
||||||
(list->takeFirst())();
|
(list->takeFirst())();
|
||||||
}
|
}
|
||||||
|
@ -617,40 +617,34 @@ bool QLibrary::isLibrary(const QString &fileName)
|
|||||||
{
|
{
|
||||||
#if defined(Q_OS_WIN)
|
#if defined(Q_OS_WIN)
|
||||||
return fileName.endsWith(QLatin1String(".dll"), Qt::CaseInsensitive);
|
return fileName.endsWith(QLatin1String(".dll"), Qt::CaseInsensitive);
|
||||||
#else
|
#else // Generic Unix
|
||||||
QString completeSuffix = QFileInfo(fileName).completeSuffix();
|
QString completeSuffix = QFileInfo(fileName).completeSuffix();
|
||||||
if (completeSuffix.isEmpty())
|
if (completeSuffix.isEmpty())
|
||||||
return false;
|
return false;
|
||||||
const QVector<QStringRef> suffixes = completeSuffix.splitRef(QLatin1Char('.'));
|
const QVector<QStringRef> suffixes = completeSuffix.splitRef(QLatin1Char('.'));
|
||||||
# if defined(Q_OS_DARWIN)
|
|
||||||
|
|
||||||
// On Mac, libs look like libmylib.1.0.0.dylib
|
|
||||||
const QStringRef &lastSuffix = suffixes.at(suffixes.count() - 1);
|
|
||||||
const QStringRef &firstSuffix = suffixes.at(0);
|
|
||||||
|
|
||||||
bool valid = (lastSuffix == QLatin1String("dylib")
|
|
||||||
|| firstSuffix == QLatin1String("so")
|
|
||||||
|| firstSuffix == QLatin1String("bundle"));
|
|
||||||
|
|
||||||
return valid;
|
|
||||||
# else // Generic Unix
|
|
||||||
QStringList validSuffixList;
|
QStringList validSuffixList;
|
||||||
|
|
||||||
# if defined(Q_OS_HPUX)
|
# if defined(Q_OS_HPUX)
|
||||||
/*
|
/*
|
||||||
See "HP-UX Linker and Libraries User's Guide", section "Link-time Differences between PA-RISC and IPF":
|
See "HP-UX Linker and Libraries User's Guide", section "Link-time Differences between PA-RISC and IPF":
|
||||||
"In PA-RISC (PA-32 and PA-64) shared libraries are suffixed with .sl. In IPF (32-bit and 64-bit),
|
"In PA-RISC (PA-32 and PA-64) shared libraries are suffixed with .sl. In IPF (32-bit and 64-bit),
|
||||||
the shared libraries are suffixed with .so. For compatibility, the IPF linker also supports the .sl suffix."
|
the shared libraries are suffixed with .so. For compatibility, the IPF linker also supports the .sl suffix."
|
||||||
*/
|
*/
|
||||||
validSuffixList << QLatin1String("sl");
|
validSuffixList << QLatin1String("sl");
|
||||||
# if defined __ia64
|
# if defined __ia64
|
||||||
validSuffixList << QLatin1String("so");
|
|
||||||
# endif
|
|
||||||
# elif defined(Q_OS_AIX)
|
|
||||||
validSuffixList << QLatin1String("a") << QLatin1String("so");
|
|
||||||
# elif defined(Q_OS_UNIX)
|
|
||||||
validSuffixList << QLatin1String("so");
|
validSuffixList << QLatin1String("so");
|
||||||
# endif
|
# endif
|
||||||
|
# elif defined(Q_OS_AIX)
|
||||||
|
validSuffixList << QLatin1String("a") << QLatin1String("so");
|
||||||
|
# elif defined(Q_OS_DARWIN)
|
||||||
|
// On Apple platforms, dylib look like libmylib.1.0.0.dylib
|
||||||
|
if (suffixes.last() == QLatin1String("dylib"))
|
||||||
|
return true;
|
||||||
|
|
||||||
|
validSuffixList << QLatin1String("so") << QLatin1String("bundle");
|
||||||
|
# elif defined(Q_OS_UNIX)
|
||||||
|
validSuffixList << QLatin1String("so");
|
||||||
|
# endif
|
||||||
|
|
||||||
// Examples of valid library names:
|
// Examples of valid library names:
|
||||||
// libfoo.so
|
// libfoo.so
|
||||||
@ -669,9 +663,7 @@ bool QLibrary::isLibrary(const QString &fileName)
|
|||||||
if (i != suffixPos)
|
if (i != suffixPos)
|
||||||
suffixes.at(i).toInt(&valid);
|
suffixes.at(i).toInt(&valid);
|
||||||
return valid;
|
return valid;
|
||||||
# endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef const char * (*QtPluginQueryVerificationDataFunction)();
|
typedef const char * (*QtPluginQueryVerificationDataFunction)();
|
||||||
|
@ -96,7 +96,7 @@ void qt_create_tls()
|
|||||||
{
|
{
|
||||||
if (qt_current_thread_data_tls_index != TLS_OUT_OF_INDEXES)
|
if (qt_current_thread_data_tls_index != TLS_OUT_OF_INDEXES)
|
||||||
return;
|
return;
|
||||||
static QMutex mutex;
|
static QBasicMutex mutex;
|
||||||
QMutexLocker locker(&mutex);
|
QMutexLocker locker(&mutex);
|
||||||
qt_current_thread_data_tls_index = TlsAlloc();
|
qt_current_thread_data_tls_index = TlsAlloc();
|
||||||
}
|
}
|
||||||
@ -166,7 +166,7 @@ void QAdoptedThread::init()
|
|||||||
|
|
||||||
static QVector<HANDLE> qt_adopted_thread_handles;
|
static QVector<HANDLE> qt_adopted_thread_handles;
|
||||||
static QVector<QThread *> qt_adopted_qthreads;
|
static QVector<QThread *> qt_adopted_qthreads;
|
||||||
static QMutex qt_adopted_thread_watcher_mutex;
|
static QBasicMutex qt_adopted_thread_watcher_mutex;
|
||||||
static DWORD qt_adopted_thread_watcher_id = 0;
|
static DWORD qt_adopted_thread_watcher_id = 0;
|
||||||
static HANDLE qt_adopted_thread_wakeup = 0;
|
static HANDLE qt_adopted_thread_wakeup = 0;
|
||||||
|
|
||||||
|
@ -230,12 +230,39 @@
|
|||||||
// SSE4.2 intrinsics
|
// SSE4.2 intrinsics
|
||||||
#if defined(__SSE4_2__) || (defined(QT_COMPILER_SUPPORTS_SSE4_2) && defined(QT_COMPILER_SUPPORTS_SIMD_ALWAYS))
|
#if defined(__SSE4_2__) || (defined(QT_COMPILER_SUPPORTS_SSE4_2) && defined(QT_COMPILER_SUPPORTS_SIMD_ALWAYS))
|
||||||
#include <nmmintrin.h>
|
#include <nmmintrin.h>
|
||||||
|
|
||||||
|
# if defined(__SSE4_2__) && defined(QT_COMPILER_SUPPORTS_SIMD_ALWAYS)
|
||||||
|
// POPCNT instructions:
|
||||||
|
// All processors that support SSE4.2 support POPCNT
|
||||||
|
// (but neither MSVC nor the Intel compiler define this macro)
|
||||||
|
# define __POPCNT__ 1
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// AVX intrinsics
|
// AVX intrinsics
|
||||||
#if defined(__AVX__) || (defined(QT_COMPILER_SUPPORTS_AVX) && defined(QT_COMPILER_SUPPORTS_SIMD_ALWAYS))
|
#if defined(__AVX__) || (defined(QT_COMPILER_SUPPORTS_AVX) && defined(QT_COMPILER_SUPPORTS_SIMD_ALWAYS))
|
||||||
// immintrin.h is the ultimate header, we don't need anything else after this
|
// immintrin.h is the ultimate header, we don't need anything else after this
|
||||||
#include <immintrin.h>
|
#include <immintrin.h>
|
||||||
|
|
||||||
|
# if defined(__AVX__) && defined(QT_COMPILER_SUPPORTS_SIMD_ALWAYS)
|
||||||
|
// AES, PCLMULQDQ instructions:
|
||||||
|
// All processors that support AVX support AES, PCLMULQDQ
|
||||||
|
// (but neither MSVC nor the Intel compiler define these macros)
|
||||||
|
# define __AES__ 1
|
||||||
|
# define __PCLMUL__ 1
|
||||||
|
# endif
|
||||||
|
|
||||||
|
# if defined(__AVX2__) && defined(QT_COMPILER_SUPPORTS_SIMD_ALWAYS)
|
||||||
|
// F16C & RDRAND instructions:
|
||||||
|
// All processors that support AVX2 support F16C & RDRAND:
|
||||||
|
// (but neither MSVC nor the Intel compiler define these macros)
|
||||||
|
# define __F16C__ 1
|
||||||
|
# define __RDRND__ 1
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(__AES__) || defined(__PCLMUL__)
|
||||||
|
# include <wmmintrin.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define QT_FUNCTION_TARGET_STRING_SSE2 "sse2"
|
#define QT_FUNCTION_TARGET_STRING_SSE2 "sse2"
|
||||||
@ -255,7 +282,10 @@
|
|||||||
#define QT_FUNCTION_TARGET_STRING_AVX512IFMA "avx512ifma"
|
#define QT_FUNCTION_TARGET_STRING_AVX512IFMA "avx512ifma"
|
||||||
#define QT_FUNCTION_TARGET_STRING_AVX512VBMI "avx512vbmi"
|
#define QT_FUNCTION_TARGET_STRING_AVX512VBMI "avx512vbmi"
|
||||||
|
|
||||||
#define QT_FUNCTION_TARGET_STRING_F16C "f16c"
|
#define QT_FUNCTION_TARGET_STRING_AES "aes,sse4.2"
|
||||||
|
#define QT_FUNCTION_TARGET_STRING_PCLMUL "pclmul,sse4.2"
|
||||||
|
#define QT_FUNCTION_TARGET_STRING_POPCNT "popcnt"
|
||||||
|
#define QT_FUNCTION_TARGET_STRING_F16C "f16c,avx"
|
||||||
#define QT_FUNCTION_TARGET_STRING_RDRAND "rdrnd"
|
#define QT_FUNCTION_TARGET_STRING_RDRAND "rdrnd"
|
||||||
#define QT_FUNCTION_TARGET_STRING_BMI "bmi"
|
#define QT_FUNCTION_TARGET_STRING_BMI "bmi"
|
||||||
#define QT_FUNCTION_TARGET_STRING_BMI2 "bmi2"
|
#define QT_FUNCTION_TARGET_STRING_BMI2 "bmi2"
|
||||||
|
@ -110,7 +110,6 @@ SOURCES += \
|
|||||||
tools/qtextboundaryfinder.cpp \
|
tools/qtextboundaryfinder.cpp \
|
||||||
tools/qtimeline.cpp \
|
tools/qtimeline.cpp \
|
||||||
tools/qunicodetools.cpp \
|
tools/qunicodetools.cpp \
|
||||||
tools/qvector.cpp \
|
|
||||||
tools/qvsnprintf.cpp \
|
tools/qvsnprintf.cpp \
|
||||||
tools/qversionnumber.cpp
|
tools/qversionnumber.cpp
|
||||||
|
|
||||||
|
@ -520,7 +520,7 @@
|
|||||||
},
|
},
|
||||||
"libinput-axis-api": {
|
"libinput-axis-api": {
|
||||||
"label": "axis API in libinput",
|
"label": "axis API in libinput",
|
||||||
"condition": "tests.libinput_axis_api",
|
"condition": "features.libinput && tests.libinput_axis_api",
|
||||||
"output": [ "privateFeature" ]
|
"output": [ "privateFeature" ]
|
||||||
},
|
},
|
||||||
"lgmon": {
|
"lgmon": {
|
||||||
@ -614,8 +614,7 @@
|
|||||||
"eglfs": {
|
"eglfs": {
|
||||||
"label": "EGLFS",
|
"label": "EGLFS",
|
||||||
"section": "Platform plugins",
|
"section": "Platform plugins",
|
||||||
"autoDetect": "!config.android && !config.win32",
|
"condition": "!config.android && !config.darwin && !config.win32 && features.egl",
|
||||||
"condition": "features.egl",
|
|
||||||
"output": [ "privateFeature" ]
|
"output": [ "privateFeature" ]
|
||||||
},
|
},
|
||||||
"eglfs_brcm": {
|
"eglfs_brcm": {
|
||||||
|
@ -103,6 +103,11 @@ void QEGLStreamConvenience::initialize(EGLDisplay dpy)
|
|||||||
stream_consumer_gltexture = reinterpret_cast<PFNEGLSTREAMCONSUMERGLTEXTUREEXTERNALKHRPROC>(eglGetProcAddress("eglStreamConsumerGLTextureExternalKHR"));
|
stream_consumer_gltexture = reinterpret_cast<PFNEGLSTREAMCONSUMERGLTEXTUREEXTERNALKHRPROC>(eglGetProcAddress("eglStreamConsumerGLTextureExternalKHR"));
|
||||||
stream_consumer_acquire = reinterpret_cast<PFNEGLSTREAMCONSUMERACQUIREKHRPROC>(eglGetProcAddress("eglStreamConsumerAcquireKHR"));
|
stream_consumer_acquire = reinterpret_cast<PFNEGLSTREAMCONSUMERACQUIREKHRPROC>(eglGetProcAddress("eglStreamConsumerAcquireKHR"));
|
||||||
stream_consumer_release = reinterpret_cast<PFNEGLSTREAMCONSUMERRELEASEKHRPROC>(eglGetProcAddress("eglStreamConsumerReleaseKHR"));
|
stream_consumer_release = reinterpret_cast<PFNEGLSTREAMCONSUMERRELEASEKHRPROC>(eglGetProcAddress("eglStreamConsumerReleaseKHR"));
|
||||||
|
create_stream_attrib_nv = reinterpret_cast<PFNEGLCREATESTREAMATTRIBNVPROC>(eglGetProcAddress("eglCreateStreamAttribNV"));
|
||||||
|
set_stream_attrib_nv = reinterpret_cast<PFNEGLSETSTREAMATTRIBNVPROC>(eglGetProcAddress("eglSetStreamAttribNV"));
|
||||||
|
query_stream_attrib_nv = reinterpret_cast<PFNEGLQUERYSTREAMATTRIBNVPROC>(eglGetProcAddress("eglQueryStreamAttribNV"));
|
||||||
|
acquire_stream_attrib_nv = reinterpret_cast<PFNEGLSTREAMCONSUMERACQUIREATTRIBNVPROC>(eglGetProcAddress("eglStreamConsumerAcquireAttribNV"));
|
||||||
|
release_stream_attrib_nv = reinterpret_cast<PFNEGLSTREAMCONSUMERRELEASEATTRIBNVPROC>(eglGetProcAddress("eglStreamConsumerReleaseAttribNV"));
|
||||||
|
|
||||||
has_egl_stream = strstr(extensions, "EGL_KHR_stream");
|
has_egl_stream = strstr(extensions, "EGL_KHR_stream");
|
||||||
has_egl_stream_producer_eglsurface = strstr(extensions, "EGL_KHR_stream_producer_eglsurface");
|
has_egl_stream_producer_eglsurface = strstr(extensions, "EGL_KHR_stream_producer_eglsurface");
|
||||||
|
@ -148,6 +148,14 @@ typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMEROUTPUTEXTPROC) (EGLDisplay
|
|||||||
#define EGL_PLATFORM_X11_KHR 0x31D5
|
#define EGL_PLATFORM_X11_KHR 0x31D5
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef EGL_NV_stream_attrib
|
||||||
|
typedef EGLStreamKHR (EGLAPIENTRYP PFNEGLCREATESTREAMATTRIBNVPROC) (EGLDisplay dpy, const EGLAttrib *attrib_list);
|
||||||
|
typedef EGLBoolean (EGLAPIENTRYP PFNEGLSETSTREAMATTRIBNVPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLAttrib value);
|
||||||
|
typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSTREAMATTRIBNVPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLAttrib *value);
|
||||||
|
typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMERACQUIREATTRIBNVPROC) (EGLDisplay dpy, EGLStreamKHR stream, const EGLAttrib *attrib_list);
|
||||||
|
typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMERRELEASEATTRIBNVPROC) (EGLDisplay dpy, EGLStreamKHR stream, const EGLAttrib *attrib_list);
|
||||||
|
#endif
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
class QEGLStreamConvenience
|
class QEGLStreamConvenience
|
||||||
@ -160,6 +168,11 @@ public:
|
|||||||
PFNEGLQUERYDEVICESEXTPROC query_devices;
|
PFNEGLQUERYDEVICESEXTPROC query_devices;
|
||||||
PFNEGLQUERYDEVICESTRINGEXTPROC query_device_string;
|
PFNEGLQUERYDEVICESTRINGEXTPROC query_device_string;
|
||||||
PFNEGLCREATESTREAMKHRPROC create_stream;
|
PFNEGLCREATESTREAMKHRPROC create_stream;
|
||||||
|
PFNEGLCREATESTREAMATTRIBNVPROC create_stream_attrib_nv;
|
||||||
|
PFNEGLSETSTREAMATTRIBNVPROC set_stream_attrib_nv;
|
||||||
|
PFNEGLQUERYSTREAMATTRIBNVPROC query_stream_attrib_nv;
|
||||||
|
PFNEGLSTREAMCONSUMERACQUIREATTRIBNVPROC acquire_stream_attrib_nv;
|
||||||
|
PFNEGLSTREAMCONSUMERRELEASEATTRIBNVPROC release_stream_attrib_nv;
|
||||||
PFNEGLDESTROYSTREAMKHRPROC destroy_stream;
|
PFNEGLDESTROYSTREAMKHRPROC destroy_stream;
|
||||||
PFNEGLSTREAMATTRIBKHRPROC stream_attrib;
|
PFNEGLSTREAMATTRIBKHRPROC stream_attrib;
|
||||||
PFNEGLQUERYSTREAMKHRPROC query_stream;
|
PFNEGLQUERYSTREAMKHRPROC query_stream;
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
HEADERS += \
|
HEADERS += \
|
||||||
$$PWD/qbasicfontdatabase_p.h \
|
$$PWD/qbasicfontdatabase_p.h \
|
||||||
$$QT_SOURCE_TREE/src/gui/text/qfontengine_ft_p.h
|
$$PWD/qfontengine_ft_p.h
|
||||||
|
|
||||||
SOURCES += \
|
SOURCES += \
|
||||||
$$PWD/qbasicfontdatabase.cpp \
|
$$PWD/qbasicfontdatabase.cpp \
|
||||||
$$QT_SOURCE_TREE/src/gui/text/qfontengine_ft.cpp
|
$$PWD/qfontengine_ft.cpp
|
||||||
|
|
||||||
QMAKE_USE += freetype
|
QMAKE_USE_PRIVATE += freetype
|
||||||
|
@ -49,8 +49,7 @@
|
|||||||
#include <QtCore/QtEndian>
|
#include <QtCore/QtEndian>
|
||||||
|
|
||||||
#undef QT_NO_FREETYPE
|
#undef QT_NO_FREETYPE
|
||||||
#include <QtGui/private/qfontengine_ft_p.h>
|
#include <QtFontDatabaseSupport/private/qfontengine_ft_p.h>
|
||||||
#include <QtGui/private/qfontengine_p.h>
|
|
||||||
|
|
||||||
#include <ft2build.h>
|
#include <ft2build.h>
|
||||||
#include FT_TRUETYPE_TABLES_H
|
#include FT_TRUETYPE_TABLES_H
|
||||||
|
@ -126,13 +126,7 @@ private:
|
|||||||
QFontEngine::Holder hbFace;
|
QFontEngine::Holder hbFace;
|
||||||
};
|
};
|
||||||
|
|
||||||
// If this is exported this breaks compilation of the windows
|
|
||||||
// plugin as qfontengine_ft_p.h/.cpp are also compiled there
|
|
||||||
#ifndef Q_OS_WIN
|
|
||||||
class Q_GUI_EXPORT QFontEngineFT : public QFontEngine
|
|
||||||
#else
|
|
||||||
class QFontEngineFT : public QFontEngine
|
class QFontEngineFT : public QFontEngine
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
@ -3,4 +3,4 @@ HEADERS += $$PWD/qfontconfigdatabase_p.h \
|
|||||||
SOURCES += $$PWD/qfontconfigdatabase.cpp \
|
SOURCES += $$PWD/qfontconfigdatabase.cpp \
|
||||||
$$PWD/qfontenginemultifontconfig.cpp
|
$$PWD/qfontenginemultifontconfig.cpp
|
||||||
|
|
||||||
QMAKE_USE += fontconfig
|
QMAKE_USE_PRIVATE += fontconfig
|
||||||
|
@ -40,6 +40,8 @@
|
|||||||
#include "qfontconfigdatabase_p.h"
|
#include "qfontconfigdatabase_p.h"
|
||||||
#include "qfontenginemultifontconfig_p.h"
|
#include "qfontenginemultifontconfig_p.h"
|
||||||
|
|
||||||
|
#include <QtFontDatabaseSupport/private/qfontengine_ft_p.h>
|
||||||
|
|
||||||
#include <QtCore/QList>
|
#include <QtCore/QList>
|
||||||
#include <QtCore/QElapsedTimer>
|
#include <QtCore/QElapsedTimer>
|
||||||
#include <QtCore/QFile>
|
#include <QtCore/QFile>
|
||||||
@ -49,7 +51,6 @@
|
|||||||
#include <qpa/qplatformintegration.h>
|
#include <qpa/qplatformintegration.h>
|
||||||
#include <qpa/qplatformservices.h>
|
#include <qpa/qplatformservices.h>
|
||||||
|
|
||||||
#include <QtGui/private/qfontengine_ft_p.h>
|
|
||||||
#include <QtGui/private/qguiapplication_p.h>
|
#include <QtGui/private/qguiapplication_p.h>
|
||||||
#include <QtGui/private/qhighdpiscaling_p.h>
|
#include <QtGui/private/qhighdpiscaling_p.h>
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
|
|
||||||
#include "qfontenginemultifontconfig_p.h"
|
#include "qfontenginemultifontconfig_p.h"
|
||||||
|
|
||||||
#include <QtGui/private/qfontengine_ft_p.h>
|
#include <QtFontDatabaseSupport/private/qfontengine_ft_p.h>
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
|
@ -2,9 +2,9 @@ HEADERS += $$PWD/qcoretextfontdatabase_p.h $$PWD/qfontengine_coretext_p.h
|
|||||||
OBJECTIVE_SOURCES += $$PWD/qfontengine_coretext.mm $$PWD/qcoretextfontdatabase.mm
|
OBJECTIVE_SOURCES += $$PWD/qfontengine_coretext.mm $$PWD/qcoretextfontdatabase.mm
|
||||||
|
|
||||||
qtConfig(freetype) {
|
qtConfig(freetype) {
|
||||||
QMAKE_USE += freetype
|
QMAKE_USE_PRIVATE += freetype
|
||||||
HEADERS += $$QT_SOURCE_TREE/src/gui/text/qfontengine_ft_p.h
|
HEADERS += basic/qfontengine_ft_p.h
|
||||||
SOURCES += $$QT_SOURCE_TREE/src/gui/text/qfontengine_ft.cpp
|
SOURCES += basic/qfontengine_ft.cpp
|
||||||
}
|
}
|
||||||
|
|
||||||
uikit: \
|
uikit: \
|
||||||
|
@ -53,7 +53,7 @@
|
|||||||
#include <QtCore/QSettings>
|
#include <QtCore/QSettings>
|
||||||
#include <QtCore/QtEndian>
|
#include <QtCore/QtEndian>
|
||||||
#ifndef QT_NO_FREETYPE
|
#ifndef QT_NO_FREETYPE
|
||||||
#include <QtGui/private/qfontengine_ft_p.h>
|
#include <QtFontDatabaseSupport/private/qfontengine_ft_p.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
@ -40,6 +40,8 @@
|
|||||||
#include "qwindowsfontdatabase_ft_p.h"
|
#include "qwindowsfontdatabase_ft_p.h"
|
||||||
#include "qwindowsfontdatabase_p.h"
|
#include "qwindowsfontdatabase_p.h"
|
||||||
|
|
||||||
|
#include <QtFontDatabaseSupport/private/qfontengine_ft_p.h>
|
||||||
|
|
||||||
#include <ft2build.h>
|
#include <ft2build.h>
|
||||||
#include FT_TRUETYPE_TABLES_H
|
#include FT_TRUETYPE_TABLES_H
|
||||||
|
|
||||||
@ -47,7 +49,6 @@
|
|||||||
#include <QtCore/QDirIterator>
|
#include <QtCore/QDirIterator>
|
||||||
#include <QtCore/QSettings>
|
#include <QtCore/QSettings>
|
||||||
#include <QtCore/QRegularExpression>
|
#include <QtCore/QRegularExpression>
|
||||||
#include <QtGui/private/qfontengine_ft_p.h>
|
|
||||||
#include <QtGui/QGuiApplication>
|
#include <QtGui/QGuiApplication>
|
||||||
#include <QtGui/QFontDatabase>
|
#include <QtGui/QFontDatabase>
|
||||||
|
|
||||||
|
@ -39,11 +39,12 @@
|
|||||||
|
|
||||||
#include "qwinrtfontdatabase_p.h"
|
#include "qwinrtfontdatabase_p.h"
|
||||||
|
|
||||||
|
#include <QtFontDatabaseSupport/private/qfontengine_ft_p.h>
|
||||||
|
|
||||||
#include <QtCore/QCoreApplication>
|
#include <QtCore/QCoreApplication>
|
||||||
#include <QtCore/QFile>
|
#include <QtCore/QFile>
|
||||||
|
|
||||||
#include <QtCore/QUuid>
|
#include <QtCore/QUuid>
|
||||||
#include <QtGui/private/qfontengine_ft_p.h>
|
|
||||||
#include <dwrite_1.h>
|
#include <dwrite_1.h>
|
||||||
#include <wrl.h>
|
#include <wrl.h>
|
||||||
using namespace Microsoft::WRL;
|
using namespace Microsoft::WRL;
|
||||||
|
@ -43,7 +43,11 @@
|
|||||||
#include "qwindowsscreen.h"
|
#include "qwindowsscreen.h"
|
||||||
#include "qwindowsintegration.h"
|
#include "qwindowsintegration.h"
|
||||||
#include "qwindowsnativeinterface.h"
|
#include "qwindowsnativeinterface.h"
|
||||||
#include "qwindowsglcontext.h"
|
#if QT_CONFIG(dynamicgl)
|
||||||
|
# include "qwindowsglcontext.h"
|
||||||
|
#else
|
||||||
|
# include "qwindowsopenglcontext.h"
|
||||||
|
#endif
|
||||||
#ifdef QT_NO_CURSOR
|
#ifdef QT_NO_CURSOR
|
||||||
# include "qwindowscursor.h"
|
# include "qwindowscursor.h"
|
||||||
#endif
|
#endif
|
||||||
|
@ -313,7 +313,7 @@ void QSqlDatabasePrivate::disable()
|
|||||||
|
|
||||||
/*!
|
/*!
|
||||||
\class QSqlDatabase
|
\class QSqlDatabase
|
||||||
\brief The QSqlDatabase class represents a connection to
|
\brief The QSqlDatabase class handles a connection to
|
||||||
a database.
|
a database.
|
||||||
|
|
||||||
\ingroup database
|
\ingroup database
|
||||||
@ -332,18 +332,17 @@ void QSqlDatabasePrivate::disable()
|
|||||||
Create a connection (i.e., an instance of QSqlDatabase) by calling
|
Create a connection (i.e., an instance of QSqlDatabase) by calling
|
||||||
one of the static addDatabase() functions, where you specify
|
one of the static addDatabase() functions, where you specify
|
||||||
\l{SQL Database Drivers#Supported Databases} {the driver or type
|
\l{SQL Database Drivers#Supported Databases} {the driver or type
|
||||||
of driver} to use (i.e., what kind of database will you access?)
|
of driver} to use (depending on the type of database)
|
||||||
and a connection name. A connection is known by its own name,
|
and a connection name. A connection is known by its own name,
|
||||||
\e{not} by the name of the database it connects to. You can have
|
\e{not} by the name of the database it connects to. You can have
|
||||||
multiple connections to one database. QSqlDatabase also supports
|
multiple connections to one database. QSqlDatabase also supports
|
||||||
the concept of a \e{default} connection, which is the unnamed
|
the concept of a \e{default} connection, which is the unnamed
|
||||||
connection. To create the default connection, don't pass the
|
connection. To create the default connection, don't pass the
|
||||||
connection name argument when you call addDatabase().
|
connection name argument when you call addDatabase().
|
||||||
Subsequently, when you call any static member function that takes
|
Subsequently, the default connection will be assumed if you call
|
||||||
the connection name argument, if you don't pass the connection
|
any static member function without specifying the connection name.
|
||||||
name argument, the default connection is assumed. The following
|
The following snippet shows how to create and open a default connection
|
||||||
snippet shows how to create and open a default connection to a
|
to a PostgreSQL database:
|
||||||
PostgreSQL database:
|
|
||||||
|
|
||||||
\snippet sqldatabase/sqldatabase.cpp 0
|
\snippet sqldatabase/sqldatabase.cpp 0
|
||||||
|
|
||||||
@ -374,27 +373,50 @@ void QSqlDatabasePrivate::disable()
|
|||||||
referenced by other QSqlDatabase objects. Use contains() to see if
|
referenced by other QSqlDatabase objects. Use contains() to see if
|
||||||
a given connection name is in the list of connections.
|
a given connection name is in the list of connections.
|
||||||
|
|
||||||
Once a connection is established, you can call tables() to get the
|
\table
|
||||||
list of tables in the database, call primaryIndex() to get a
|
\header
|
||||||
table's primary index, and call record() to get meta-information
|
\li {2,1}Some utility methods:
|
||||||
about a table's fields (e.g., field names).
|
\row
|
||||||
|
\li tables()
|
||||||
|
\li returns the list of tables
|
||||||
|
\row
|
||||||
|
\li primaryIndex()
|
||||||
|
\li returns a table's primary index
|
||||||
|
\row
|
||||||
|
\li record()
|
||||||
|
\li returns meta-information about a table's fields
|
||||||
|
\row
|
||||||
|
\li transaction()
|
||||||
|
\li starts a transaction
|
||||||
|
\row
|
||||||
|
\li commit()
|
||||||
|
\li saves and completes a transaction
|
||||||
|
\row
|
||||||
|
\li rollback()
|
||||||
|
\li cancels a transaction
|
||||||
|
\row
|
||||||
|
\li hasFeature()
|
||||||
|
\li checks if a driver supports transactions
|
||||||
|
\row
|
||||||
|
\li lastError()
|
||||||
|
\li returns information about the last error
|
||||||
|
\row
|
||||||
|
\li drivers()
|
||||||
|
\li returns the names of the available SQL drivers
|
||||||
|
\row
|
||||||
|
\li isDriverAvailable()
|
||||||
|
\li checks if a particular driver is available
|
||||||
|
\row
|
||||||
|
\li registerSqlDriver()
|
||||||
|
\li registers a custom-made driver
|
||||||
|
\endtable
|
||||||
|
|
||||||
\note QSqlDatabase::exec() is deprecated. Use QSqlQuery::exec()
|
\note QSqlDatabase::exec() is deprecated. Use QSqlQuery::exec()
|
||||||
instead.
|
instead.
|
||||||
|
|
||||||
If the driver supports transactions, use transaction() to start a
|
\note When using transactions, you must start the
|
||||||
transaction, and commit() or rollback() to complete it. Use
|
|
||||||
\l{QSqlDriver::} {hasFeature()} to ask if the driver supports
|
|
||||||
transactions. \note When using transactions, you must start the
|
|
||||||
transaction before you create your query.
|
transaction before you create your query.
|
||||||
|
|
||||||
If an error occurs, lastError() will return information about it.
|
|
||||||
|
|
||||||
Get the names of the available SQL drivers with drivers(). Check
|
|
||||||
for the presence of a particular driver with isDriverAvailable().
|
|
||||||
If you have created your own custom driver, you must register it
|
|
||||||
with registerSqlDriver().
|
|
||||||
|
|
||||||
\sa QSqlDriver, QSqlQuery, {Qt SQL}, {Threads and the SQL Module}
|
\sa QSqlDriver, QSqlQuery, {Qt SQL}, {Threads and the SQL Module}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -963,9 +985,9 @@ QString QSqlDatabase::userName() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
Returns the connection's password. If the password was not set
|
Returns the connection's password. An empty string will be returned
|
||||||
with setPassword(), and if the password was given in the open()
|
if the password was not set with setPassword(), and if the password
|
||||||
call, or if no password was used, an empty string is returned.
|
was given in the open() call, or if no password was used.
|
||||||
*/
|
*/
|
||||||
QString QSqlDatabase::password() const
|
QString QSqlDatabase::password() const
|
||||||
{
|
{
|
||||||
@ -1045,7 +1067,7 @@ QStringList QSqlDatabase::tables(QSql::TableType type) const
|
|||||||
|
|
||||||
/*!
|
/*!
|
||||||
Returns the primary index for table \a tablename. If no primary
|
Returns the primary index for table \a tablename. If no primary
|
||||||
index exists an empty QSqlIndex is returned.
|
index exists, an empty QSqlIndex is returned.
|
||||||
|
|
||||||
\sa tables(), record()
|
\sa tables(), record()
|
||||||
*/
|
*/
|
||||||
@ -1071,8 +1093,9 @@ QSqlRecord QSqlDatabase::record(const QString& tablename) const
|
|||||||
|
|
||||||
/*!
|
/*!
|
||||||
Sets database-specific \a options. This must be done before the
|
Sets database-specific \a options. This must be done before the
|
||||||
connection is opened or it has no effect (or you can close() the
|
connection is opened, otherwise it has no effect. Another possibility
|
||||||
connection, call this function and open() the connection again).
|
is to close the connection, call QSqlDatabase::setConnectOptions(),
|
||||||
|
and open() the connection again.
|
||||||
|
|
||||||
The format of the \a options string is a semicolon separated list
|
The format of the \a options string is a semicolon separated list
|
||||||
of option names or option=value pairs. The options depend on the
|
of option names or option=value pairs. The options depend on the
|
||||||
|
@ -80,7 +80,6 @@ SOURCES += \
|
|||||||
../../corelib/tools/qstringbuilder.cpp \
|
../../corelib/tools/qstringbuilder.cpp \
|
||||||
../../corelib/tools/qstring_compat.cpp \
|
../../corelib/tools/qstring_compat.cpp \
|
||||||
../../corelib/tools/qstringlist.cpp \
|
../../corelib/tools/qstringlist.cpp \
|
||||||
../../corelib/tools/qvector.cpp \
|
|
||||||
../../corelib/tools/qvsnprintf.cpp \
|
../../corelib/tools/qvsnprintf.cpp \
|
||||||
../../corelib/xml/qxmlutils.cpp \
|
../../corelib/xml/qxmlutils.cpp \
|
||||||
../../corelib/xml/qxmlstream.cpp \
|
../../corelib/xml/qxmlstream.cpp \
|
||||||
|
@ -1551,24 +1551,19 @@ QFormLayout::TakeRowResult QFormLayout::takeRow(int row)
|
|||||||
{
|
{
|
||||||
Q_D(QFormLayout);
|
Q_D(QFormLayout);
|
||||||
|
|
||||||
const int storageIndex = storageIndexFromLayoutItem(d->m_matrix, d->m_things.value(row));
|
if (Q_UNLIKELY(!(uint(row) < uint(d->m_matrix.rowCount())))) {
|
||||||
if (Q_UNLIKELY(storageIndex == -1)) {
|
|
||||||
qWarning("QFormLayout::takeRow: Invalid row %d", row);
|
qWarning("QFormLayout::takeRow: Invalid row %d", row);
|
||||||
return TakeRowResult();
|
return TakeRowResult();
|
||||||
}
|
}
|
||||||
|
|
||||||
int storageRow, dummy;
|
QFormLayoutItem *label = d->m_matrix(row, 0);
|
||||||
QFormLayoutPrivate::ItemMatrix::storageIndexToPosition(storageIndex, &storageRow, &dummy);
|
QFormLayoutItem *field = d->m_matrix(row, 1);
|
||||||
Q_ASSERT(d->m_matrix(storageRow, dummy));
|
|
||||||
|
|
||||||
QFormLayoutItem *label = d->m_matrix(storageRow, 0);
|
|
||||||
QFormLayoutItem *field = d->m_matrix(storageRow, 1);
|
|
||||||
|
|
||||||
Q_ASSERT(field);
|
Q_ASSERT(field);
|
||||||
|
|
||||||
d->m_things.removeOne(label);
|
d->m_things.removeOne(label);
|
||||||
d->m_things.removeOne(field);
|
d->m_things.removeOne(field);
|
||||||
d->m_matrix.removeRow(storageRow);
|
d->m_matrix.removeRow(row);
|
||||||
|
|
||||||
invalidate();
|
invalidate();
|
||||||
|
|
||||||
|
2
tests/auto/corelib/kernel/qelapsedtimer/BLACKLIST
Normal file
2
tests/auto/corelib/kernel/qelapsedtimer/BLACKLIST
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
[elapsed]
|
||||||
|
windows
|
@ -302,15 +302,10 @@ void tst_QLibrary::isLibrary_data()
|
|||||||
QTest::newRow(".sl") << QString("mylib.sl") << sl_VALID;
|
QTest::newRow(".sl") << QString("mylib.sl") << sl_VALID;
|
||||||
QTest::newRow(".so") << QString("mylib.so") << so_VALID;
|
QTest::newRow(".so") << QString("mylib.so") << so_VALID;
|
||||||
QTest::newRow(".so+version") << QString("mylib.so.0") << so_VALID;
|
QTest::newRow(".so+version") << QString("mylib.so.0") << so_VALID;
|
||||||
|
|
||||||
// special tests:
|
|
||||||
#ifndef Q_OS_MAC
|
|
||||||
QTest::newRow("version+.so") << QString("libc-2.7.so") << so_VALID;
|
QTest::newRow("version+.so") << QString("libc-2.7.so") << so_VALID;
|
||||||
QTest::newRow("version+.so+version") << QString("liboil-0.3.so.0.1.0") << so_VALID;
|
QTest::newRow("version+.so+version") << QString("liboil-0.3.so.0.1.0") << so_VALID;
|
||||||
#else
|
|
||||||
QTest::newRow("version+.so") << QString("libc-2.7.so") << false;
|
// special tests:
|
||||||
QTest::newRow("version+.so+version") << QString("liboil-0.3.so.0.1.0") << false;
|
|
||||||
#endif
|
|
||||||
#ifdef Q_OS_MAC
|
#ifdef Q_OS_MAC
|
||||||
QTest::newRow("good (libmylib.1.0.0.dylib)") << QString("libmylib.1.0.0.dylib") << true;
|
QTest::newRow("good (libmylib.1.0.0.dylib)") << QString("libmylib.1.0.0.dylib") << true;
|
||||||
QTest::newRow("good (libmylib.dylib)") << QString("libmylib.dylib") << true;
|
QTest::newRow("good (libmylib.dylib)") << QString("libmylib.dylib") << true;
|
||||||
|
2
tests/auto/corelib/thread/qwaitcondition/BLACKLIST
Normal file
2
tests/auto/corelib/thread/qwaitcondition/BLACKLIST
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
[wakeOne]
|
||||||
|
windows
|
@ -757,13 +757,14 @@ void tst_QFormLayout::removeRow()
|
|||||||
|
|
||||||
layout->removeRow(1);
|
layout->removeRow(1);
|
||||||
|
|
||||||
QVERIFY(!w1);
|
QVERIFY(w1);
|
||||||
QCOMPARE(layout->count(), 1);
|
QVERIFY(!w2);
|
||||||
|
QCOMPARE(layout->count(), 2);
|
||||||
QCOMPARE(layout->rowCount(), 1);
|
QCOMPARE(layout->rowCount(), 1);
|
||||||
|
|
||||||
layout->removeRow(0);
|
layout->removeRow(0);
|
||||||
|
|
||||||
QVERIFY(!w2);
|
QVERIFY(!w1);
|
||||||
QCOMPARE(layout->count(), 0);
|
QCOMPARE(layout->count(), 0);
|
||||||
QCOMPARE(layout->rowCount(), 0);
|
QCOMPARE(layout->rowCount(), 0);
|
||||||
}
|
}
|
||||||
@ -863,17 +864,19 @@ void tst_QFormLayout::takeRow()
|
|||||||
|
|
||||||
QVERIFY(w2);
|
QVERIFY(w2);
|
||||||
QVERIFY(result.fieldItem);
|
QVERIFY(result.fieldItem);
|
||||||
QVERIFY(result.labelItem);
|
QVERIFY(!result.labelItem);
|
||||||
QCOMPARE(layout->count(), 1);
|
QCOMPARE(layout->count(), 2);
|
||||||
QCOMPARE(layout->rowCount(), 1);
|
QCOMPARE(layout->rowCount(), 1);
|
||||||
|
QCOMPARE(result.fieldItem->widget(), w2.data());
|
||||||
|
|
||||||
result = layout->takeRow(0);
|
result = layout->takeRow(0);
|
||||||
|
|
||||||
QVERIFY(w1);
|
QVERIFY(w1);
|
||||||
QVERIFY(result.fieldItem);
|
QVERIFY(result.fieldItem);
|
||||||
QVERIFY(!result.labelItem);
|
QVERIFY(result.labelItem);
|
||||||
QCOMPARE(layout->count(), 0);
|
QCOMPARE(layout->count(), 0);
|
||||||
QCOMPARE(layout->rowCount(), 0);
|
QCOMPARE(layout->rowCount(), 0);
|
||||||
|
QCOMPARE(result.fieldItem->widget(), w1.data());
|
||||||
|
|
||||||
result = layout->takeRow(0);
|
result = layout->takeRow(0);
|
||||||
|
|
||||||
|
@ -39,6 +39,8 @@ class tst_qiodevice : public QObject
|
|||||||
private slots:
|
private slots:
|
||||||
void read_old();
|
void read_old();
|
||||||
void read_old_data() { read_data(); }
|
void read_old_data() { read_data(); }
|
||||||
|
void peekAndRead();
|
||||||
|
void peekAndRead_data() { read_data(); }
|
||||||
//void read_new();
|
//void read_new();
|
||||||
//void read_new_data() { read_data(); }
|
//void read_new_data() { read_data(); }
|
||||||
private:
|
private:
|
||||||
@ -86,6 +88,36 @@ void tst_qiodevice::read_old()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void tst_qiodevice::peekAndRead()
|
||||||
|
{
|
||||||
|
QFETCH(qint64, size);
|
||||||
|
|
||||||
|
QString name = "tmp" + QString::number(size);
|
||||||
|
|
||||||
|
{
|
||||||
|
QFile file(name);
|
||||||
|
file.open(QIODevice::WriteOnly);
|
||||||
|
file.seek(size);
|
||||||
|
file.write("x", 1);
|
||||||
|
file.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
QBENCHMARK {
|
||||||
|
QFile file(name);
|
||||||
|
file.open(QIODevice::ReadOnly);
|
||||||
|
|
||||||
|
QByteArray ba(size / 1024, Qt::Uninitialized);
|
||||||
|
while (!file.atEnd()) {
|
||||||
|
file.peek(ba.data(), ba.size());
|
||||||
|
file.read(ba.data(), ba.size());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
QFile file(name);
|
||||||
|
file.remove();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
QTEST_MAIN(tst_qiodevice)
|
QTEST_MAIN(tst_qiodevice)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user