Merge remote-tracking branch 'origin/5.9' into dev
Conflicts: qmake/Makefile.unix Change-Id: Ia18e391198222eef34ffa2df6f683e052058d032bb10
commit
bc4cd465dd
|
|
@ -1,42 +1,244 @@
|
|||
# This file is used to ignore files which are generated in the Qt build system
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
examples/*/*/*
|
||||
!examples/*/*/*[.]*
|
||||
!examples/*/*/README
|
||||
!examples/*/doc/*
|
||||
!examples/*/doc/*/*
|
||||
examples/*/*/*[.]app
|
||||
!examples/declarative/*
|
||||
examples/tutorials/*/*/*
|
||||
!examples/tutorials/*/*/*[.]*
|
||||
!examples/tutorials/*/*/README
|
||||
!examples/tutorials/*
|
||||
!examples/tutorials/*/*
|
||||
!examples/ja_JP/*/*
|
||||
demos/*/*
|
||||
!demos/spectrum/*
|
||||
demos/spectrum/bin
|
||||
!demos/*/*[.]*
|
||||
demos/*/*[.]app
|
||||
!demos/declarative/*
|
||||
config.tests/*/*/*
|
||||
!config.tests/*/*/*[.]*
|
||||
config.tests/*/*/*[.]app
|
||||
config.tests/arch/arch
|
||||
config.tests/configure.cfg
|
||||
config.tests/conftest-out
|
||||
config.tests/conftest.cpp
|
||||
# Specific files/paths
|
||||
|
||||
# qmake/configure stuff
|
||||
/.qmake.cache
|
||||
/.qmake.stash
|
||||
/config.tests/*/*/*
|
||||
!/config.tests/*/*/*[.]*
|
||||
/config.tests/.qmake.cache
|
||||
/config.tests/arch/arch
|
||||
/config.tests/conftest-out
|
||||
/config.tests/conftest.cpp
|
||||
/config.opt
|
||||
/config.status
|
||||
/config.summary
|
||||
/config.log
|
||||
/config.cache
|
||||
/mkspecs/modules/qt_*.pri
|
||||
/mkspecs/modules-inst/
|
||||
/mkspecs/qconfig.pri
|
||||
/mkspecs/qdevice.pri
|
||||
/mkspecs/qmodule.pri
|
||||
/src/corelib/global/qconfig.cpp
|
||||
/src/corelib/global/qconfig.h
|
||||
/src/corelib/global/qconfig_p.h
|
||||
/bin/qt.conf
|
||||
/bin/qmake
|
||||
/qmake/qmake
|
||||
qt*-config.h
|
||||
qt*-config_p.h
|
||||
qt*-config.pri
|
||||
|
||||
/include/
|
||||
|
||||
/lib/*
|
||||
!/lib/README
|
||||
/plugins/
|
||||
|
||||
/imports/
|
||||
/qml/
|
||||
|
||||
/doc/*.qch
|
||||
/doc/activeqt
|
||||
/doc/qdoc
|
||||
/doc/qmake
|
||||
/doc/qt*/*
|
||||
|
||||
/src/angle/src/QtANGLE/*.def
|
||||
/src/angle/src/QtANGLE/libANGLE
|
||||
|
||||
/src/corelib/global/qfloat16tables.cpp
|
||||
|
||||
/examples/*/*/*
|
||||
!/examples/*/*/*[.]*
|
||||
!/examples/*/*/README
|
||||
!/examples/*/doc/*
|
||||
!/examples/*/doc/*/*
|
||||
|
||||
/translations/*.qm
|
||||
/translations/*_en.ts
|
||||
/translations/*_untranslated.ts
|
||||
|
||||
# This includes binaries from other modules because of non-prefix builds.
|
||||
/bin/assistant
|
||||
/bin/designer
|
||||
/bin/dumpcpp
|
||||
/bin/dumpdoc
|
||||
/bin/idc
|
||||
/bin/kmap2qmap
|
||||
/bin/lconvert
|
||||
/bin/linguist
|
||||
/bin/lrelease
|
||||
/bin/lupdate
|
||||
/bin/makeqpf
|
||||
/bin/moc
|
||||
/bin/patternist
|
||||
/bin/phonon
|
||||
/bin/pixeltool
|
||||
/bin/qcollectiongenerator
|
||||
/bin/qdbus
|
||||
/bin/qdbuscpp2xml
|
||||
/bin/qdbusviewer
|
||||
/bin/qdbusxml2cpp
|
||||
/bin/qdoc
|
||||
/bin/qev
|
||||
/bin/qfloat16-tables
|
||||
/bin/qglinfo
|
||||
/bin/qgltf
|
||||
/bin/qhelpconverter
|
||||
/bin/qhelpgenerator
|
||||
/bin/qlalr
|
||||
/bin/qml
|
||||
/bin/qml1plugindump
|
||||
/bin/qmleasing
|
||||
/bin/qmlimportscanner
|
||||
/bin/qmljs
|
||||
/bin/qmllint
|
||||
/bin/qmlmin
|
||||
/bin/qmlplugindump
|
||||
/bin/qmlprofiler
|
||||
/bin/qmlscene
|
||||
/bin/qmltestrunner
|
||||
/bin/qtattributionsscanner
|
||||
/bin/qtdiag
|
||||
/bin/qtpaths
|
||||
/bin/qtplugininfo
|
||||
/bin/rcc
|
||||
/bin/servicefw
|
||||
/bin/sfwlisten
|
||||
/bin/uic
|
||||
/bin/xmlpatterns
|
||||
/bin/xmlpatternsvalidator
|
||||
|
||||
# Unit tests libs/plugins/data
|
||||
/tests/auto/cmake/build/
|
||||
/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-cache/mime/
|
||||
/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-xml/mime/
|
||||
/tests/auto/corelib/plugin/qlibrary/libmylib.so2
|
||||
/tests/auto/corelib/plugin/qlibrary/mylib.dl2
|
||||
/tests/auto/qlibrary/libmylib.so*
|
||||
/tests/auto/qmake/testdata/quotedfilenames/test.cpp
|
||||
/tests/auto/qprocess/fileWriterProcess.txt
|
||||
|
||||
# Unit tests executables (other than those named tst_*)
|
||||
/tests/auto/corelib/codecs/qtextcodec/echo/echo
|
||||
/tests/auto/corelib/global/qlogging/app/app
|
||||
/tests/auto/corelib/io/qlockfile/qlockfiletesthelper/qlockfile_test_helper
|
||||
/tests/auto/corelib/io/qprocess-noapplication/qprocess-noapplication
|
||||
/tests/auto/corelib/io/qprocess/testForwarding/testForwarding
|
||||
/tests/auto/corelib/io/qprocess/testProcessHang/testProcessHang
|
||||
/tests/auto/corelib/io/qresourceengine/qresourceengine
|
||||
/tests/auto/corelib/kernel/qsharedmemory/helperbinary
|
||||
/tests/auto/corelib/kernel/qsystemsemaphore/helperbinary
|
||||
/tests/auto/corelib/plugin/quuid/testProcessUniqueness/testProcessUniqueness
|
||||
/tests/auto/corelib/thread/qthreadstorage/crashOnExit
|
||||
/tests/auto/corelib/thread/qthreadstorage/crashonexit/crashonexit
|
||||
/tests/auto/corelib/tools/qcommandlineparser/testhelper/qcommandlineparser_test_helper
|
||||
/tests/auto/dbus/qdbusabstractadaptor/qmyserver/qmyserver
|
||||
/tests/auto/dbus/qdbusabstractinterface/qpinger/qpinger
|
||||
/tests/auto/dbus/qdbusinterface/qmyserver/qmyserver
|
||||
/tests/auto/gui/kernel/qfileopenevent/qfileopeneventexternal/qfileopeneventexternal
|
||||
/tests/auto/gui/kernel/qguivariant/no_application/no_application
|
||||
/tests/auto/network/bearer/qnetworksession/lackey/lackey
|
||||
/tests/auto/network/socket/qlocalsocket/socketprocess/socketprocess
|
||||
/tests/auto/other/qobjectrace/qobjectrace
|
||||
/tests/auto/other/qprocess_and_guieventloop/write-read-write/write-read-write
|
||||
/tests/auto/testlib/selftests/assert/assert
|
||||
/tests/auto/testlib/selftests/badxml/badxml
|
||||
/tests/auto/testlib/selftests/benchlibcallgrind/benchlibcallgrind
|
||||
/tests/auto/testlib/selftests/benchlibcounting/benchlibcounting
|
||||
/tests/auto/testlib/selftests/benchlibeventcounter/benchlibeventcounter
|
||||
/tests/auto/testlib/selftests/benchliboptions/benchliboptions
|
||||
/tests/auto/testlib/selftests/benchlibtickcounter/benchlibtickcounter
|
||||
/tests/auto/testlib/selftests/benchlibwalltime/benchlibwalltime
|
||||
/tests/auto/testlib/selftests/blacklisted/blacklisted
|
||||
/tests/auto/testlib/selftests/cmptest/cmptest
|
||||
/tests/auto/testlib/selftests/commandlinedata/commandlinedata
|
||||
/tests/auto/testlib/selftests/counting/counting
|
||||
/tests/auto/testlib/selftests/crashes/crashes
|
||||
/tests/auto/testlib/selftests/datatable/datatable
|
||||
/tests/auto/testlib/selftests/datetime/datetime
|
||||
/tests/auto/testlib/selftests/differentexec/differentexec
|
||||
/tests/auto/testlib/selftests/exceptionthrow/exceptionthrow
|
||||
/tests/auto/testlib/selftests/expectfail/expectfail
|
||||
/tests/auto/testlib/selftests/failcleanup/failcleanup
|
||||
/tests/auto/testlib/selftests/failinit/failinit
|
||||
/tests/auto/testlib/selftests/failinitdata/failinitdata
|
||||
/tests/auto/testlib/selftests/fetchbogus/fetchbogus
|
||||
/tests/auto/testlib/selftests/findtestdata/findtestdata
|
||||
/tests/auto/testlib/selftests/float/float
|
||||
/tests/auto/testlib/selftests/globaldata/globaldata
|
||||
/tests/auto/testlib/selftests/longstring/longstring
|
||||
/tests/auto/testlib/selftests/maxwarnings/maxwarnings
|
||||
/tests/auto/testlib/selftests/multiexec/multiexec
|
||||
/tests/auto/testlib/selftests/printdatatags/printdatatags
|
||||
/tests/auto/testlib/selftests/printdatatagswithglobaltags/printdatatagswithglobaltags
|
||||
/tests/auto/testlib/selftests/qexecstringlist/qexecstringlist
|
||||
/tests/auto/testlib/selftests/silent/silent
|
||||
/tests/auto/testlib/selftests/singleskip/singleskip
|
||||
/tests/auto/testlib/selftests/skip/skip
|
||||
/tests/auto/testlib/selftests/skipcleanup/skipcleanup
|
||||
/tests/auto/testlib/selftests/skipglobal/skipglobal
|
||||
/tests/auto/testlib/selftests/skipinit/skipinit
|
||||
/tests/auto/testlib/selftests/skipinitdata/skipinitdata
|
||||
/tests/auto/testlib/selftests/sleep/sleep
|
||||
/tests/auto/testlib/selftests/strcmp/strcmp
|
||||
/tests/auto/testlib/selftests/subtest/subtest
|
||||
/tests/auto/testlib/selftests/verbose1/verbose1
|
||||
/tests/auto/testlib/selftests/verbose2/verbose2
|
||||
/tests/auto/testlib/selftests/verifyexceptionthrown/verifyexceptionthrown
|
||||
/tests/auto/testlib/selftests/waitwithoutgui/waitwithoutgui
|
||||
/tests/auto/testlib/selftests/warnings/warnings
|
||||
/tests/auto/testlib/selftests/xunit/xunit
|
||||
/tests/auto/widgets/kernel/qapplication/modal/modal
|
||||
|
||||
QObject.log
|
||||
tst_*
|
||||
!tst_*.*
|
||||
tst_*.log
|
||||
tst_*.debug
|
||||
tst_*~
|
||||
|
||||
# Generic directories
|
||||
.metadata/
|
||||
.pc/
|
||||
debug/
|
||||
release/
|
||||
tmp/
|
||||
tmp-debug/
|
||||
tmp-debug-shared/
|
||||
tmp-release/
|
||||
tmp-release-shared/
|
||||
qtc-qmldump/
|
||||
qtc-qmldbg/
|
||||
*.app/
|
||||
*.d/
|
||||
|
||||
# Generic files
|
||||
.#*
|
||||
.com.apple.timemachine.supported
|
||||
.DS_Store
|
||||
callgrind.out.*
|
||||
core
|
||||
Makefile*
|
||||
!/qmake/Makefile.win32*
|
||||
!/qmake/Makefile.unix
|
||||
pcviewer.cfg
|
||||
tags
|
||||
*~
|
||||
*.a
|
||||
*.la
|
||||
*.core
|
||||
*.d
|
||||
*.dll
|
||||
*.exe
|
||||
*.dylib
|
||||
*.moc
|
||||
*.gcov
|
||||
*.gcda
|
||||
*.gcno
|
||||
*.lib
|
||||
*.o
|
||||
*.obj
|
||||
*.orig
|
||||
|
|
@ -47,131 +249,9 @@ pcviewer.cfg
|
|||
*.pbxuser
|
||||
*.mode1
|
||||
*.mode1v3
|
||||
*_pch.h.cpp
|
||||
*_resource.rc
|
||||
.#*
|
||||
*.*#
|
||||
*_wrapper.sh
|
||||
*_wrapper.bat
|
||||
wrapper.sh
|
||||
wrapper.bat
|
||||
core
|
||||
.qmake.cache
|
||||
.qmake.stash
|
||||
.qmake.vars
|
||||
.device.vars
|
||||
*.prl
|
||||
tags
|
||||
.DS_Store
|
||||
*.debug
|
||||
Makefile*
|
||||
!qmake/Makefile.win32*
|
||||
!qmake/Makefile.unix
|
||||
*.prl
|
||||
*.app
|
||||
*.pro.user*
|
||||
*.qmlproject.user*
|
||||
*.gcov
|
||||
*.gcda
|
||||
*.gcno
|
||||
bin/*.dll
|
||||
bin/assistant*
|
||||
bin/designer*
|
||||
bin/dumpcpp*
|
||||
bin/idc*
|
||||
bin/jsondb*
|
||||
bin/linguist*
|
||||
bin/lrelease*
|
||||
bin/lupdate*
|
||||
bin/lconvert*
|
||||
bin/moc*
|
||||
bin/makeqpf*
|
||||
bin/pixeltool*
|
||||
bin/qmake*
|
||||
bin/qdoc*
|
||||
bin/qfloat16-tables*
|
||||
bin/qt3to4*
|
||||
bin/qttracereplay*
|
||||
bin/rcc*
|
||||
bin/uic*
|
||||
bin/patternist*
|
||||
bin/phonon*
|
||||
bin/qcollectiongenerator*
|
||||
bin/qdbus*
|
||||
bin/qhelpconverter*
|
||||
bin/qhelpgenerator*
|
||||
bin/qglinfo*
|
||||
bin/qtconfig*
|
||||
bin/xmlpatterns*
|
||||
bin/cetest*
|
||||
bin/collectiongenerator
|
||||
bin/helpconverter
|
||||
bin/helpgenerator
|
||||
bin/kmap2qmap*
|
||||
bin/qlalr*
|
||||
bin/qmlconv*
|
||||
bin/qmldebugger*
|
||||
bin/qml*
|
||||
bin/qttracereplay*
|
||||
bin/qt.conf
|
||||
bin/servicefw*
|
||||
bin/sfwlisten*
|
||||
configure.cache
|
||||
config.opt
|
||||
config.status
|
||||
config.summary
|
||||
config.log
|
||||
config.cache
|
||||
mkspecs/default
|
||||
mkspecs/default-host
|
||||
mkspecs/qconfig.pri
|
||||
mkspecs/qdevice.pri
|
||||
mkspecs/qfeatures.pri
|
||||
mkspecs/qhost.pri
|
||||
moc_*.cpp
|
||||
qmake/qmake
|
||||
qmake/qmake.exe
|
||||
qmake/Makefile.bak
|
||||
qmake/qmake_pch.pch
|
||||
src/corelib/global/qconfig.cpp
|
||||
src/corelib/global/qconfig.h
|
||||
src/corelib/global/qconfig.h.qmake
|
||||
src/corelib/global/qconfig_p.h
|
||||
src/corelib/global/qfeatures.h
|
||||
src/corelib/global/qfloat16tables.cpp
|
||||
src/platformsupport/*_interface.*
|
||||
src/platformsupport/*_adaptor.*
|
||||
ui_*.h
|
||||
tests/auto/qprocess/test*/*.exe
|
||||
tests/auto/qtcpsocket/stressTest/*.exe
|
||||
tests/auto/qprocess/fileWriterProcess/*.exe
|
||||
tests/auto/qmake/testdata/quotedfilenames/*.exe
|
||||
tests/auto/compilerwarnings/*.exe
|
||||
tests/auto/qmake/testdata/quotedfilenames/test.cpp
|
||||
tests/auto/qprocess/fileWriterProcess.txt
|
||||
tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-cache/mime/
|
||||
tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-xml/mime/
|
||||
.com.apple.timemachine.supported
|
||||
tests/auto/qlibrary/libmylib.so*
|
||||
tests/auto/qresourceengine/runtime_resource.rcc
|
||||
tools/activeqt/testcon/testcon.tlb
|
||||
translations/*.qm
|
||||
translations/*_untranslated.ts
|
||||
qrc_*.cpp
|
||||
*.version
|
||||
*.version.in
|
||||
qt*-config.h
|
||||
qt*-config_p.h
|
||||
qt*-config.pri
|
||||
|
||||
# Test generated files
|
||||
QObject.log
|
||||
tst_*
|
||||
!tst_*.*
|
||||
tst_*.log
|
||||
tst_*.debug
|
||||
tst_*~
|
||||
tests/auto/cmake/build
|
||||
|
||||
# xemacs temporary files
|
||||
*.flc
|
||||
|
|
@ -186,8 +266,6 @@ tests/auto/cmake/build
|
|||
*.pdb
|
||||
*.sln
|
||||
*.suo
|
||||
*.vcproj
|
||||
*vcproj.*.*.user
|
||||
*.ncb
|
||||
*.vcxproj
|
||||
*.vcxproj.filters
|
||||
|
|
@ -198,155 +276,44 @@ tests/auto/cmake/build
|
|||
*.appxmanifest
|
||||
.qmake.winrt_uuid_*
|
||||
|
||||
# MinGW generated files
|
||||
*.Debug
|
||||
*.Release
|
||||
|
||||
# WebKit temp files
|
||||
src/3rdparty/webkit/WebCore/mocinclude.tmp
|
||||
src/3rdparty/webkit/includes.txt
|
||||
src/3rdparty/webkit/includes2.txt
|
||||
|
||||
# generated files in configure.exe bootstrapping
|
||||
tools/configure/configure.intermediate.manifest
|
||||
tools/configure/configure_pch.pch
|
||||
/configureapp.exe
|
||||
|
||||
# Symlinks generated by configure
|
||||
tools/qvfb/qvfbhdr.h
|
||||
tools/qvfb/qlock_p.h
|
||||
tools/qvfb/qlock.cpp
|
||||
tools/qvfb/qwssignalhandler.cpp
|
||||
tools/qvfb/qwssignalhandler_p.h
|
||||
.DS_Store
|
||||
.pch
|
||||
.rcc
|
||||
*.app
|
||||
config.status
|
||||
config.tests/common/c++default/c++default.ii
|
||||
config.tests/unix/cups/cups
|
||||
config.tests/unix/getaddrinfo/getaddrinfo
|
||||
config.tests/unix/getifaddrs/getifaddrs
|
||||
config.tests/unix/iconv/iconv
|
||||
config.tests/unix/ipv6/ipv6
|
||||
config.tests/unix/ipv6ifname/ipv6ifname
|
||||
config.tests/unix/largefile/largefile
|
||||
config.tests/unix/nis/nis
|
||||
config.tests/unix/odbc/odbc
|
||||
config.tests/unix/openssl/openssl
|
||||
config.tests/unix/stl/stl
|
||||
config.tests/unix/zlib/zlib
|
||||
config.tests/unix/3dnow/3dnow
|
||||
config.tests/unix/mmx/mmx
|
||||
config.tests/unix/sse/sse
|
||||
config.tests/unix/sse2/sse2
|
||||
|
||||
|
||||
|
||||
# Directories to ignore
|
||||
# ---------------------
|
||||
|
||||
debug
|
||||
include/*
|
||||
include/*/*
|
||||
lib/*
|
||||
imports/*
|
||||
!lib/fonts
|
||||
!lib/README
|
||||
plugins/*/*
|
||||
release
|
||||
tmp
|
||||
doc-build
|
||||
doc/html/*
|
||||
doc/qt*/*
|
||||
doc/qch
|
||||
doc-build
|
||||
.rcc
|
||||
.pch
|
||||
.metadata
|
||||
tmp-debug
|
||||
tmp-debug-shared
|
||||
tmp-release
|
||||
tmp-release-shared
|
||||
|
||||
qtc-debugging-helper
|
||||
qtc-qmldump
|
||||
qtc-qmldbg
|
||||
src/corelib/lib
|
||||
src/network/lib
|
||||
src/xml/lib/
|
||||
|
||||
.pc/
|
||||
|
||||
# INTEGRITY generated files
|
||||
*.gpj
|
||||
*.int
|
||||
*.ael
|
||||
*.dla
|
||||
*.dnm
|
||||
*.dep
|
||||
*.map
|
||||
work
|
||||
|
||||
# Precompiled headers
|
||||
*.gch
|
||||
*.pchi
|
||||
*.pchi.cpp
|
||||
*_pch.obj
|
||||
*_pch.pch
|
||||
|
||||
#generated module def and version header files
|
||||
mkspecs/modules/qt_*.pri
|
||||
mkspecs/modules-inst/
|
||||
mkspecs/qmodule.pri
|
||||
# Qt-specific files
|
||||
codeattributions.qdoc
|
||||
moc_*.cpp
|
||||
qrc_*.cpp
|
||||
ui_*.h
|
||||
*.moc
|
||||
*.prl
|
||||
*.pro.user*
|
||||
*.qmlproject.user*
|
||||
*.rcc
|
||||
|
||||
#unit tests libs/plugins
|
||||
tests/auto/corelib/plugin/qlibrary/libmylib.so2
|
||||
tests/auto/corelib/plugin/qlibrary/mylib.dl2
|
||||
# Generated by qt_module.prf
|
||||
*.version
|
||||
*.version.in
|
||||
|
||||
#unit tests executables (other than those named tst_*)
|
||||
tests/auto/testlib/selftests/assert/assert
|
||||
tests/auto/testlib/selftests/badxml/badxml
|
||||
tests/auto/testlib/selftests/benchlibcallgrind/benchlibcallgrind
|
||||
tests/auto/testlib/selftests/benchlibeventcounter/benchlibeventcounter
|
||||
tests/auto/testlib/selftests/benchliboptions/benchliboptions
|
||||
tests/auto/testlib/selftests/benchlibtickcounter/benchlibtickcounter
|
||||
tests/auto/testlib/selftests/benchlibwalltime/benchlibwalltime
|
||||
tests/auto/testlib/selftests/cmptest/cmptest
|
||||
tests/auto/testlib/selftests/commandlinedata/commandlinedata
|
||||
tests/auto/testlib/selftests/crashes/crashes
|
||||
tests/auto/testlib/selftests/datatable/datatable
|
||||
tests/auto/testlib/selftests/datetime/datetime
|
||||
tests/auto/testlib/selftests/differentexec/differentexec
|
||||
tests/auto/testlib/selftests/exceptionthrow/exceptionthrow
|
||||
tests/auto/testlib/selftests/expectfail/expectfail
|
||||
tests/auto/testlib/selftests/failinit/failinit
|
||||
tests/auto/testlib/selftests/failinitdata/failinitdata
|
||||
tests/auto/testlib/selftests/fetchbogus/fetchbogus
|
||||
tests/auto/testlib/selftests/float/float
|
||||
tests/auto/testlib/selftests/globaldata/globaldata
|
||||
tests/auto/testlib/selftests/longstring/longstring
|
||||
tests/auto/testlib/selftests/maxwarnings/maxwarnings
|
||||
tests/auto/testlib/selftests/multiexec/multiexec
|
||||
tests/auto/testlib/selftests/qexecstringlist/qexecstringlist
|
||||
tests/auto/testlib/selftests/singleskip/singleskip
|
||||
tests/auto/testlib/selftests/skip/skip
|
||||
tests/auto/testlib/selftests/skipglobal/skipglobal
|
||||
tests/auto/testlib/selftests/skipinit/skipinit
|
||||
tests/auto/testlib/selftests/skipinitdata/skipinitdata
|
||||
tests/auto/testlib/selftests/sleep/sleep
|
||||
tests/auto/testlib/selftests/strcmp/strcmp
|
||||
tests/auto/testlib/selftests/subtest/subtest
|
||||
tests/auto/testlib/selftests/waitwithoutgui/waitwithoutgui
|
||||
tests/auto/testlib/selftests/warnings/warnings
|
||||
tests/auto/testlib/selftests/xunit/xunit
|
||||
tests/auto/corelib/thread/qthreadstorage/crashOnExit
|
||||
tests/auto/corelib/io/qresourceengine/qresourceengine
|
||||
tests/auto/corelib/codecs/qtextcodec/echo/echo
|
||||
tests/auto/corelib/plugin/quuid/testProcessUniqueness/testProcessUniqueness
|
||||
tests/auto/corelib/io/qlockfile/qlockfiletesthelper/qlockfile_test_helper
|
||||
tests/auto/corelib/tools/qcommandlineparser/testhelper/qcommandlineparser_test_helper
|
||||
tests/auto/dbus/qdbusabstractadaptor/qmyserver/qmyserver
|
||||
tests/auto/dbus/qdbusabstractinterface/qpinger/qpinger
|
||||
tests/auto/dbus/qdbusabstractinterface/test/pinger_interface.*
|
||||
tests/auto/dbus/qdbusinterface/qmyserver/qmyserver
|
||||
tests/auto/gui/kernel/qfileopenevent/qfileopeneventexternal/qfileopeneventexternal
|
||||
tests/auto/network/bearer/qnetworksession/lackey/lackey
|
||||
tests/auto/widgets/kernel/qapplication/modal/modal
|
||||
# Generated by qtPrepareTool()
|
||||
wrapper.sh
|
||||
wrapper.bat
|
||||
*_wrapper.sh
|
||||
*_wrapper.bat
|
||||
|
||||
# Generated static plugin import sources
|
||||
# Generated by dbusxml2cpp
|
||||
*_interface.*
|
||||
*_adaptor.*
|
||||
|
||||
# Generated by qt.prf
|
||||
*_plugin_import.cpp
|
||||
|
|
|
|||
|
|
@ -0,0 +1,54 @@
|
|||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2017 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the config.tests of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include <immintrin.h>
|
||||
|
||||
int main(int, char**)
|
||||
{
|
||||
float f = 1.f;
|
||||
unsigned short s = _cvtss_sh(f, 0);
|
||||
float g = _cvtsh_ss(s);
|
||||
bool result = f == g;
|
||||
(void)result;
|
||||
__m128i a = _mm_setzero_si128();
|
||||
__m256 b = _mm256_cvtph_ps(a);
|
||||
__m128i c = _mm256_cvtps_ph(b, 0);
|
||||
(void)c;
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
SOURCES = f16c.cpp
|
||||
CONFIG -= qt dylib release debug_and_release
|
||||
CONFIG += debug console
|
||||
!defined(QMAKE_CFLAGS_F16C, "var"):error("This compiler does not support F16C")
|
||||
else:QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_F16C
|
||||
|
|
@ -74,6 +74,7 @@
|
|||
"developer-build": "void",
|
||||
"device": "string",
|
||||
"device-option": "addString",
|
||||
"f16c": "boolean",
|
||||
"force-asserts": { "type": "boolean", "name": "force_asserts" },
|
||||
"force-debug-info": { "type": "boolean", "name": "force_debug_info" },
|
||||
"force-pkg-config": { "type": "void", "name": "pkg-config" },
|
||||
|
|
@ -316,6 +317,11 @@
|
|||
"type": "compile",
|
||||
"test": "common/sse4_2"
|
||||
},
|
||||
"f16c": {
|
||||
"label": "F16C instructions",
|
||||
"type": "compile",
|
||||
"test": "common/f16c"
|
||||
},
|
||||
"avx": {
|
||||
"label": "AVX instructions",
|
||||
"type": "compile",
|
||||
|
|
@ -777,6 +783,14 @@
|
|||
{ "type": "define", "name": "QT_COMPILER_SUPPORTS_AVX", "value": 1 }
|
||||
]
|
||||
},
|
||||
"f16c": {
|
||||
"label": "F16C",
|
||||
"condition": "features.avx && tests.f16c",
|
||||
"output": [
|
||||
"privateConfig",
|
||||
{ "type": "define", "name": "QT_COMPILER_SUPPORTS_F16C", "value": 1 }
|
||||
]
|
||||
},
|
||||
"avx2": {
|
||||
"label": "AVX2",
|
||||
"condition": "features.avx && tests.avx2",
|
||||
|
|
@ -1120,7 +1134,7 @@ Configure with '-qreal float' to create a build that is binary-compatible with 5
|
|||
{
|
||||
"message": "AVX",
|
||||
"type": "featureList",
|
||||
"args": "avx avx2",
|
||||
"args": "avx avx2 f16c",
|
||||
"condition": "(arch.i386 || arch.x86_64)"
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -239,9 +239,9 @@ private:
|
|||
int i = data.indexOf("a href=\"?view=detail");
|
||||
if (i > 0) {
|
||||
QString href = data.mid(i, data.indexOf('\"', i + 8) - i + 1);
|
||||
QRegExp regex("dpap=([A-Za-z0-9]+)");
|
||||
regex.indexIn(href);
|
||||
QString airport = regex.cap(1);
|
||||
QRegularExpression regex("dpap=([A-Za-z0-9]+)");
|
||||
QRegularExpressionMatch match = regex.match(href);
|
||||
QString airport = match.captured(1);
|
||||
QUrlQuery query(m_url);
|
||||
query.addQueryItem("dpap", airport);
|
||||
m_url.setQuery(query);
|
||||
|
|
|
|||
|
|
@ -203,10 +203,11 @@ QSize MainWindow::getSize()
|
|||
if (!ok)
|
||||
return QSize();
|
||||
|
||||
QRegExp regExp(tr("([0-9]+) *x *([0-9]+)"));
|
||||
if (regExp.exactMatch(text)) {
|
||||
int width = regExp.cap(1).toInt();
|
||||
int height = regExp.cap(2).toInt();
|
||||
QRegularExpression regExp(tr("^([0-9]+) *x *([0-9]+)$"));
|
||||
QRegularExpressionMatch match = regExp.match(text);
|
||||
if (match.hasMatch()) {
|
||||
int width = match.captured(1).toInt();
|
||||
int height = match.captured(2).toInt();
|
||||
if (width > 0 && width < 2048 && height > 0 && height < 2048)
|
||||
return QSize(width, height);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -119,12 +119,11 @@ QApplication *qtApp = 0;
|
|||
QVBoxLayout *vlayout = new QVBoxLayout();
|
||||
vlayout->addLayout(hlayout);
|
||||
|
||||
//RedWidget * redWidget = new RedWidget;
|
||||
//vlayout->addWidget(redWidget);
|
||||
RedWidget *redWidget = new RedWidget;
|
||||
vlayout->addWidget(redWidget);
|
||||
|
||||
nativeWidget->setLayout(vlayout);
|
||||
|
||||
|
||||
// show() must be called on nativeWiget to get the widgets int he correct state.
|
||||
nativeWidget->show();
|
||||
|
||||
|
|
|
|||
|
|
@ -59,6 +59,7 @@
|
|||
#include <QFile>
|
||||
#include <QTextBrowser>
|
||||
#include <QBoxLayout>
|
||||
#include <QRegularExpression>
|
||||
|
||||
extern QPixmap cached(const QString &img);
|
||||
|
||||
|
|
@ -339,14 +340,12 @@ void ArthurFrame::showSource()
|
|||
foreach (QString keyword, ppKeywords)
|
||||
contents.replace(keyword, QLatin1String("<font color=navy>") + keyword + QLatin1String("</font>"));
|
||||
|
||||
contents.replace(QRegExp("(\\d\\d?)"), QLatin1String("<font color=navy>\\1</font>"));
|
||||
contents.replace(QRegularExpression("(\\d\\d?)"), QLatin1String("<font color=navy>\\1</font>"));
|
||||
|
||||
QRegExp commentRe("(//.+)\\n");
|
||||
commentRe.setMinimal(true);
|
||||
QRegularExpression commentRe("(//.+?)\\n");
|
||||
contents.replace(commentRe, QLatin1String("<font color=red>\\1</font>\n"));
|
||||
|
||||
QRegExp stringLiteralRe("(\".+\")");
|
||||
stringLiteralRe.setMinimal(true);
|
||||
QRegularExpression stringLiteralRe("(\".+?\")");
|
||||
contents.replace(stringLiteralRe, QLatin1String("<font color=green>\\1</font>"));
|
||||
|
||||
QString html = contents;
|
||||
|
|
|
|||
|
|
@ -138,7 +138,8 @@ void MainWindow::aboutToShowSaveAsMenu()
|
|||
void MainWindow::findCodecs()
|
||||
{
|
||||
QMap<QString, QTextCodec *> codecMap;
|
||||
QRegExp iso8859RegExp("ISO[- ]8859-([0-9]+).*");
|
||||
QRegularExpression iso8859RegExp("^ISO[- ]8859-([0-9]+).*$");
|
||||
QRegularExpressionMatch match;
|
||||
|
||||
foreach (int mib, QTextCodec::availableMibs()) {
|
||||
QTextCodec *codec = QTextCodec::codecForMib(mib);
|
||||
|
|
@ -150,8 +151,8 @@ void MainWindow::findCodecs()
|
|||
rank = 1;
|
||||
} else if (sortKey.startsWith(QLatin1String("UTF-16"))) {
|
||||
rank = 2;
|
||||
} else if (iso8859RegExp.exactMatch(sortKey)) {
|
||||
if (iso8859RegExp.cap(1).size() == 1)
|
||||
} else if ((match = iso8859RegExp.match(sortKey)).hasMatch()) {
|
||||
if (match.captured(1).size() == 1)
|
||||
rank = 3;
|
||||
else
|
||||
rank = 4;
|
||||
|
|
|
|||
|
|
@ -56,14 +56,14 @@ VariantDelegate::VariantDelegate(QObject *parent)
|
|||
: QItemDelegate(parent)
|
||||
{
|
||||
boolExp.setPattern("true|false");
|
||||
boolExp.setCaseSensitivity(Qt::CaseInsensitive);
|
||||
boolExp.setPatternOptions(QRegularExpression::CaseInsensitiveOption);
|
||||
|
||||
byteArrayExp.setPattern("[\\x00-\\xff]*");
|
||||
charExp.setPattern(".");
|
||||
colorExp.setPattern("\\(([0-9]*),([0-9]*),([0-9]*),([0-9]*)\\)");
|
||||
colorExp.setPattern("^\\(([0-9]*),([0-9]*),([0-9]*),([0-9]*)\\)$");
|
||||
doubleExp.setPattern("");
|
||||
pointExp.setPattern("\\((-?[0-9]*),(-?[0-9]*)\\)");
|
||||
rectExp.setPattern("\\((-?[0-9]*),(-?[0-9]*),(-?[0-9]*),(-?[0-9]*)\\)");
|
||||
pointExp.setPattern("^\\((-?[0-9]*),(-?[0-9]*)\\)$");
|
||||
rectExp.setPattern("^\\((-?[0-9]*),(-?[0-9]*),(-?[0-9]*),(-?[0-9]*)\\)$");
|
||||
signedIntegerExp.setPattern("-?[0-9]*");
|
||||
sizeExp = pointExp;
|
||||
unsignedIntegerExp.setPattern("[0-9]*");
|
||||
|
|
@ -104,7 +104,7 @@ QWidget *VariantDelegate::createEditor(QWidget *parent,
|
|||
QLineEdit *lineEdit = new QLineEdit(parent);
|
||||
lineEdit->setFrame(false);
|
||||
|
||||
QRegExp regExp;
|
||||
QRegularExpression regExp;
|
||||
|
||||
switch (originalValue.type()) {
|
||||
case QVariant::Bool:
|
||||
|
|
@ -152,8 +152,8 @@ QWidget *VariantDelegate::createEditor(QWidget *parent,
|
|||
;
|
||||
}
|
||||
|
||||
if (!regExp.isEmpty()) {
|
||||
QValidator *validator = new QRegExpValidator(regExp, lineEdit);
|
||||
if (regExp.isValid()) {
|
||||
QValidator *validator = new QRegularExpressionValidator(regExp, lineEdit);
|
||||
lineEdit->setValidator(validator);
|
||||
}
|
||||
|
||||
|
|
@ -185,17 +185,18 @@ void VariantDelegate::setModelData(QWidget *editor, QAbstractItemModel *model,
|
|||
|
||||
QVariant originalValue = index.model()->data(index, Qt::UserRole);
|
||||
QVariant value;
|
||||
QRegularExpressionMatch match;
|
||||
|
||||
switch (originalValue.type()) {
|
||||
case QVariant::Char:
|
||||
value = text.at(0);
|
||||
break;
|
||||
case QVariant::Color:
|
||||
colorExp.exactMatch(text);
|
||||
value = QColor(qMin(colorExp.cap(1).toInt(), 255),
|
||||
qMin(colorExp.cap(2).toInt(), 255),
|
||||
qMin(colorExp.cap(3).toInt(), 255),
|
||||
qMin(colorExp.cap(4).toInt(), 255));
|
||||
match = colorExp.match(text);
|
||||
value = QColor(qMin(match.captured(1).toInt(), 255),
|
||||
qMin(match.captured(2).toInt(), 255),
|
||||
qMin(match.captured(3).toInt(), 255),
|
||||
qMin(match.captured(4).toInt(), 255));
|
||||
break;
|
||||
case QVariant::Date:
|
||||
{
|
||||
|
|
@ -214,17 +215,17 @@ void VariantDelegate::setModelData(QWidget *editor, QAbstractItemModel *model,
|
|||
}
|
||||
break;
|
||||
case QVariant::Point:
|
||||
pointExp.exactMatch(text);
|
||||
value = QPoint(pointExp.cap(1).toInt(), pointExp.cap(2).toInt());
|
||||
match = pointExp.match(text);
|
||||
value = QPoint(match.captured(1).toInt(), match.captured(2).toInt());
|
||||
break;
|
||||
case QVariant::Rect:
|
||||
rectExp.exactMatch(text);
|
||||
value = QRect(rectExp.cap(1).toInt(), rectExp.cap(2).toInt(),
|
||||
rectExp.cap(3).toInt(), rectExp.cap(4).toInt());
|
||||
match = rectExp.match(text);
|
||||
value = QRect(match.captured(1).toInt(), match.captured(2).toInt(),
|
||||
match.captured(3).toInt(), match.captured(4).toInt());
|
||||
break;
|
||||
case QVariant::Size:
|
||||
sizeExp.exactMatch(text);
|
||||
value = QSize(sizeExp.cap(1).toInt(), sizeExp.cap(2).toInt());
|
||||
match = sizeExp.match(text);
|
||||
value = QSize(match.captured(1).toInt(), match.captured(2).toInt());
|
||||
break;
|
||||
case QVariant::StringList:
|
||||
value = text.split(',');
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@
|
|||
#define VARIANTDELEGATE_H
|
||||
|
||||
#include <QItemDelegate>
|
||||
#include <QRegExp>
|
||||
#include <QRegularExpression>
|
||||
|
||||
class VariantDelegate : public QItemDelegate
|
||||
{
|
||||
|
|
@ -73,19 +73,19 @@ public:
|
|||
static QString displayText(const QVariant &value);
|
||||
|
||||
private:
|
||||
mutable QRegExp boolExp;
|
||||
mutable QRegExp byteArrayExp;
|
||||
mutable QRegExp charExp;
|
||||
mutable QRegExp colorExp;
|
||||
mutable QRegExp dateExp;
|
||||
mutable QRegExp dateTimeExp;
|
||||
mutable QRegExp doubleExp;
|
||||
mutable QRegExp pointExp;
|
||||
mutable QRegExp rectExp;
|
||||
mutable QRegExp signedIntegerExp;
|
||||
mutable QRegExp sizeExp;
|
||||
mutable QRegExp timeExp;
|
||||
mutable QRegExp unsignedIntegerExp;
|
||||
mutable QRegularExpression boolExp;
|
||||
mutable QRegularExpression byteArrayExp;
|
||||
mutable QRegularExpression charExp;
|
||||
mutable QRegularExpression colorExp;
|
||||
mutable QRegularExpression dateExp;
|
||||
mutable QRegularExpression dateTimeExp;
|
||||
mutable QRegularExpression doubleExp;
|
||||
mutable QRegularExpression pointExp;
|
||||
mutable QRegularExpression rectExp;
|
||||
mutable QRegularExpression signedIntegerExp;
|
||||
mutable QRegularExpression sizeExp;
|
||||
mutable QRegularExpression timeExp;
|
||||
mutable QRegularExpression unsignedIntegerExp;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -57,11 +57,12 @@ StyleSheetEditor::StyleSheetEditor(QWidget *parent)
|
|||
{
|
||||
ui.setupUi(this);
|
||||
|
||||
QRegExp regExp(".(.*)\\+?Style");
|
||||
QRegularExpression regExp("^.(.*)\\+?Style$");
|
||||
QString defaultStyle = QApplication::style()->metaObject()->className();
|
||||
QRegularExpressionMatch match = regExp.match(defaultStyle);
|
||||
|
||||
if (regExp.exactMatch(defaultStyle))
|
||||
defaultStyle = regExp.cap(1);
|
||||
if (match.hasMatch())
|
||||
defaultStyle = match.captured(1);
|
||||
|
||||
ui.styleCombo->addItems(QStyleFactory::keys());
|
||||
ui.styleCombo->setCurrentIndex(ui.styleCombo->findText(defaultStyle, Qt::MatchContains));
|
||||
|
|
|
|||
|
|
@ -85,6 +85,7 @@ QMAKE_CFLAGS_SSE3 += -msse3
|
|||
QMAKE_CFLAGS_SSSE3 += -mssse3
|
||||
QMAKE_CFLAGS_SSE4_1 += -msse4.1
|
||||
QMAKE_CFLAGS_SSE4_2 += -msse4.2
|
||||
QMAKE_CFLAGS_F16C += -mf16c
|
||||
QMAKE_CFLAGS_AVX += -mavx
|
||||
QMAKE_CFLAGS_AVX2 += -mavx2
|
||||
QMAKE_CFLAGS_AVX512F += -mavx512f
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
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
|
||||
return($$RET)
|
||||
|
|
|
|||
|
|
@ -718,7 +718,8 @@ defineTest(qtConfTest_compile) {
|
|||
isEmpty(host): host = false
|
||||
|
||||
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): \
|
||||
test_dir = $$test_dir/$$eval($${1}.pro)
|
||||
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"
|
||||
|
||||
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
|
||||
qmake_args += $$qtConfPrepareArgs($$eval($${1}.args)) $$eval($${1}.literal_args)
|
||||
|
|
|
|||
|
|
@ -104,6 +104,7 @@ addSimdCompiler(avx512bw)
|
|||
addSimdCompiler(avx512vl)
|
||||
addSimdCompiler(avx512ifma)
|
||||
addSimdCompiler(avx512vbmi)
|
||||
addSimdCompiler(f16c)
|
||||
addSimdCompiler(neon)
|
||||
addSimdCompiler(mips_dsp)
|
||||
addSimdCompiler(mips_dspr2)
|
||||
|
|
|
|||
|
|
@ -1,79 +1,21 @@
|
|||
#
|
||||
# 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.
|
||||
# qmake configuration for solaris-g++-64
|
||||
#
|
||||
|
||||
MAKEFILE_GENERATOR = UNIX
|
||||
QMAKE_PLATFORM = solaris
|
||||
CONFIG += incremental
|
||||
QMAKE_INCREMENTAL_STYLE = sublib
|
||||
|
||||
include(../common/unix.conf)
|
||||
include(../common/solaris.conf)
|
||||
|
||||
QMAKE_COMPILER = gcc
|
||||
|
||||
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_CFLAGS = -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_PLUGIN = $$QMAKE_LFLAGS_SHLIB
|
||||
QMAKE_LFLAGS_SONAME = -h$$LITERAL_WHITESPACE
|
||||
|
|
@ -81,17 +23,9 @@ QMAKE_LFLAGS_THREAD =
|
|||
QMAKE_LFLAGS_NOUNDEF = -z defs
|
||||
QMAKE_LFLAGS_RPATH = -Wl,-R,
|
||||
|
||||
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
|
||||
include(../common/g++-base.conf)
|
||||
|
||||
QMAKE_AR = ar cq
|
||||
QMAKE_OBJCOPY = objcopy
|
||||
QMAKE_NM = nm -P
|
||||
QMAKE_RANLIB =
|
||||
QMAKE_LFLAGS_RELEASE =
|
||||
QMAKE_LFLAGS_DEBUG = -g
|
||||
|
||||
load(qt_config)
|
||||
|
|
|
|||
|
|
@ -1,62 +1,18 @@
|
|||
#
|
||||
# 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
|
||||
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
|
||||
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
|
||||
include(../common/gcc-base.conf)
|
||||
|
||||
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_PLUGIN = $$QMAKE_LFLAGS_SHLIB
|
||||
QMAKE_LFLAGS_SONAME = -h$$LITERAL_WHITESPACE
|
||||
|
|
@ -64,17 +20,9 @@ QMAKE_LFLAGS_THREAD =
|
|||
QMAKE_LFLAGS_NOUNDEF = -z defs
|
||||
QMAKE_LFLAGS_RPATH = -Wl,-R,
|
||||
|
||||
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
|
||||
include(../common/g++-base.conf)
|
||||
|
||||
QMAKE_AR = ar cq
|
||||
QMAKE_OBJCOPY = objcopy
|
||||
QMAKE_NM = nm -P
|
||||
QMAKE_RANLIB =
|
||||
QMAKE_LFLAGS_RELEASE =
|
||||
QMAKE_LFLAGS_DEBUG = -g
|
||||
|
||||
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 \
|
||||
qringbuffer.o qdebug.o qmalloc.o qglobal.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 \
|
||||
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 \
|
||||
|
|
@ -62,7 +62,7 @@ DEPEND_SRC = \
|
|||
$(SOURCE_PATH)/src/corelib/io/qabstractfileengine.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/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/qdir.cpp $(SOURCE_PATH)/src/corelib/plugin/quuid.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
|
||||
$(CXX) -c -o $@ $(CXXFLAGS) $<
|
||||
|
||||
qvector.o: $(SOURCE_PATH)/src/corelib/tools/qvector.cpp
|
||||
$(CXX) -c -o $@ $(CXXFLAGS) $<
|
||||
|
||||
qbitarray.o: $(SOURCE_PATH)/src/corelib/tools/qbitarray.cpp
|
||||
$(CXX) -c -o $@ $(CXXFLAGS) $<
|
||||
|
||||
|
|
|
|||
|
|
@ -108,7 +108,6 @@ QTOBJS= \
|
|||
qtextstream.obj \
|
||||
qdatastream.obj \
|
||||
quuid.obj \
|
||||
qvector.obj \
|
||||
qsettings.obj \
|
||||
qvariant.obj \
|
||||
qsettings_win.obj \
|
||||
|
|
|
|||
|
|
@ -1230,10 +1230,6 @@
|
|||
This variable is also used to specify which additional files will be
|
||||
deployed to embedded devices.
|
||||
|
||||
For Windows CE, the default deployment target path is
|
||||
\c{%CSIDL_PROGRAM_FILES%\target}, which usually gets expanded to
|
||||
\c{\Program Files\target}.
|
||||
|
||||
\target LEXIMPLS
|
||||
\section1 LEXIMPLS
|
||||
|
||||
|
|
@ -2354,16 +2350,6 @@
|
|||
qmake or \l{#QMAKESPEC}{qmake.conf} and rarely
|
||||
needs to be modified.
|
||||
|
||||
\target SIGNATURE_FILE
|
||||
\section1 SIGNATURE_FILE
|
||||
|
||||
\note This variable is only used on Windows CE.
|
||||
|
||||
Specifies which signature file should be used to sign the project target.
|
||||
|
||||
\note This variable will overwrite the setting you have specified in configure,
|
||||
with the \c -signature option.
|
||||
|
||||
\target SOURCES
|
||||
\section1 SOURCES
|
||||
|
||||
|
|
@ -4483,8 +4469,8 @@
|
|||
include the precompiled header file in \c HEADERS, as
|
||||
qmake will do this if the configuration supports precompiled headers.
|
||||
|
||||
The MSVC and g++ specs targeting Windows (and Windows CE) enable
|
||||
\c precompile_header by default.
|
||||
The MSVC and g++ specs targeting Windows enable \c precompile_header
|
||||
by default.
|
||||
|
||||
Using this option, you may trigger
|
||||
conditional blocks in your project file to add settings when using
|
||||
|
|
|
|||
|
|
@ -566,9 +566,9 @@ void NmakeMakefileGenerator::writeBuildRulesPart(QTextStream &t)
|
|||
if(!project->isEmpty("QMAKE_PRE_LINK"))
|
||||
t << "\n\t" <<var("QMAKE_PRE_LINK");
|
||||
if(project->isActiveConfig("staticlib")) {
|
||||
t << "\n\t$(LIBAPP) $(LIBFLAGS) " << var("QMAKE_LINK_O_FLAG") << "$(DESTDIR_TARGET) @<<\n\t "
|
||||
<< "$(OBJECTS)"
|
||||
<< "\n<<";
|
||||
t << "\n\t$(LIBAPP) $(LIBFLAGS) " << var("QMAKE_LINK_O_FLAG") << "$(DESTDIR_TARGET) @<<\n\t ";
|
||||
writeResponseFileFiles(t, project->values("OBJECTS"));
|
||||
t << "<<";
|
||||
} else {
|
||||
const bool embedManifest = ((templateName == "app" && project->isActiveConfig("embed_manifest_exe"))
|
||||
|| (templateName == "lib" && project->isActiveConfig("embed_manifest_dll")
|
||||
|
|
@ -652,11 +652,38 @@ void NmakeMakefileGenerator::writeLinkCommand(QTextStream &t, const QString &ext
|
|||
t << "$(LINKER) $(LFLAGS)";
|
||||
if (!extraFlags.isEmpty())
|
||||
t << ' ' << extraFlags;
|
||||
t << " " << var("QMAKE_LINK_O_FLAG") << "$(DESTDIR_TARGET) @<<\n"
|
||||
<< "$(OBJECTS) $(LIBS)";
|
||||
t << " " << var("QMAKE_LINK_O_FLAG") << "$(DESTDIR_TARGET) @<<\n";
|
||||
writeResponseFileFiles(t, project->values("OBJECTS"));
|
||||
t << "$(LIBS)\n";
|
||||
if (!extraInlineFileContent.isEmpty())
|
||||
t << ' ' << extraInlineFileContent;
|
||||
t << "\n<<";
|
||||
t << extraInlineFileContent << '\n';
|
||||
t << "<<";
|
||||
}
|
||||
|
||||
void NmakeMakefileGenerator::writeResponseFileFiles(QTextStream &t, const ProStringList &files)
|
||||
{
|
||||
if (files.isEmpty())
|
||||
return;
|
||||
// Add line breaks in file lists in reponse files to work around LNK1170.
|
||||
// The actual line length limit is 131070, but let's use a smaller limit
|
||||
// in case other tools are similarly hampered.
|
||||
const int maxLineLength = 1000;
|
||||
int len = 0;
|
||||
for (const ProString &file : files) {
|
||||
const ProString escapedFilePath = escapeFilePath(file);
|
||||
if (len) {
|
||||
if (len + escapedFilePath.length() > maxLineLength) {
|
||||
t << '\n';
|
||||
len = 0;
|
||||
} else {
|
||||
t << ' ';
|
||||
len++;
|
||||
}
|
||||
}
|
||||
t << escapedFilePath;
|
||||
len += escapedFilePath.length();
|
||||
}
|
||||
t << '\n';
|
||||
}
|
||||
|
||||
int NmakeMakefileGenerator::msvcVersion() const
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ class NmakeMakefileGenerator : public Win32MakefileGenerator
|
|||
void writeImplicitRulesPart(QTextStream &t);
|
||||
void writeBuildRulesPart(QTextStream &t);
|
||||
void writeLinkCommand(QTextStream &t, const QString &extraFlags = QString(), const QString &extraInlineFileContent = QString());
|
||||
void writeResponseFileFiles(QTextStream &t, const ProStringList &files);
|
||||
int msvcVersion() const;
|
||||
void init();
|
||||
static QStringList sourceFilesForImplicitRulesFilter();
|
||||
|
|
|
|||
|
|
@ -68,7 +68,6 @@ bootstrap { #Qt code
|
|||
qlibraryinfo.cpp \
|
||||
qsystemerror.cpp \
|
||||
qvariant.cpp \
|
||||
qvector.cpp \
|
||||
qvsnprintf.cpp \
|
||||
qxmlstream.cpp \
|
||||
qxmlutils.cpp \
|
||||
|
|
|
|||
|
|
@ -243,13 +243,24 @@ public class QtNative
|
|||
}
|
||||
}
|
||||
|
||||
private static void runPendingCppRunnablesOnUiThread()
|
||||
private static void runPendingCppRunnablesOnAndroidThread()
|
||||
{
|
||||
synchronized (m_mainActivityMutex) {
|
||||
if (!m_activityPaused && m_activity != null)
|
||||
m_activity.runOnUiThread(runPendingCppRunnablesRunnable);
|
||||
else
|
||||
runAction(runPendingCppRunnablesRunnable);
|
||||
if (m_activity != null) {
|
||||
if (!m_activityPaused)
|
||||
m_activity.runOnUiThread(runPendingCppRunnablesRunnable);
|
||||
else
|
||||
runAction(runPendingCppRunnablesRunnable);
|
||||
} else {
|
||||
final Looper mainLooper = Looper.getMainLooper();
|
||||
final Thread looperThread = mainLooper.getThread();
|
||||
if (looperThread.equals(Thread.currentThread())) {
|
||||
runPendingCppRunnablesRunnable.run();
|
||||
} else {
|
||||
final Handler handler = new Handler(mainLooper);
|
||||
handler.post(runPendingCppRunnablesRunnable);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -211,8 +211,7 @@
|
|||
},
|
||||
"dlopen": {
|
||||
"label": "dlopen()",
|
||||
"condition": "tests.dlopen || libs.libdl",
|
||||
"output": [ { "type": "define", "negative": true, "name": "QT_NO_DYNAMIC_LIBRARY" } ]
|
||||
"condition": "tests.dlopen || libs.libdl"
|
||||
},
|
||||
"libdl": {
|
||||
"label": "dlopen() in libdl",
|
||||
|
|
@ -443,7 +442,7 @@
|
|||
"label": "QProcess",
|
||||
"purpose": "Supports external process invocation.",
|
||||
"section": "File I/O",
|
||||
"condition": "!config.winrt && !config.uikit && !config.integrity && !config.vxworks",
|
||||
"condition": "features.processenvironment && !config.winrt && !config.uikit && !config.integrity && !config.vxworks",
|
||||
"output": [ "publicFeature", "feature" ]
|
||||
},
|
||||
"processenvironment": {
|
||||
|
|
@ -463,6 +462,7 @@
|
|||
"label": "QLibrary",
|
||||
"purpose": "Provides a wrapper for dynamically loaded libraries.",
|
||||
"section": "File I/O",
|
||||
"condition": "config.win32 || config.hpux || (!config.nacl && features.dlopen)",
|
||||
"output": [ "publicFeature", "feature" ]
|
||||
},
|
||||
"settings": {
|
||||
|
|
|
|||
|
|
@ -87,15 +87,15 @@ public:
|
|||
bool MyWidget::event(QEvent *event)
|
||||
{
|
||||
if (event->type() == QEvent::KeyPress) {
|
||||
QKeyEvent *ke = static_cast<QKeyEvent *>(event);
|
||||
if (ke->key() == Qt::Key_Tab) {
|
||||
// special tab handling here
|
||||
return true;
|
||||
}
|
||||
QKeyEvent *ke = static_cast<QKeyEvent *>(event);
|
||||
if (ke->key() == Qt::Key_Tab) {
|
||||
// special tab handling here
|
||||
return true;
|
||||
}
|
||||
} else if (event->type() == MyCustomEventType) {
|
||||
MyCustomEvent *myEvent = static_cast<MyCustomEvent *>(event);
|
||||
// custom event handling here
|
||||
return true;
|
||||
MyCustomEvent *myEvent = static_cast<MyCustomEvent *>(event);
|
||||
// custom event handling here
|
||||
return true;
|
||||
}
|
||||
|
||||
return QWidget::event(event);
|
||||
|
|
|
|||
|
|
@ -77,6 +77,7 @@
|
|||
#define QT_NO_SYSTEMLOCALE
|
||||
#define QT_FEATURE_slog2 -1
|
||||
#define QT_FEATURE_syslog -1
|
||||
#define QT_FEATURE_temporaryfile 1
|
||||
#define QT_NO_THREAD
|
||||
#define QT_FEATURE_timezone -1
|
||||
#define QT_FEATURE_topleveldomain -1
|
||||
|
|
|
|||
|
|
@ -61,8 +61,21 @@ QT_BEGIN_NAMESPACE
|
|||
|
||||
Q_STATIC_ASSERT_X(sizeof(float) == sizeof(quint32),
|
||||
"qfloat16 assumes that floats are 32 bits wide");
|
||||
|
||||
// There are a few corner cases regarding denormals where GHS compiler is relying
|
||||
// hardware behavior that is not IEC 559 compliant. Therefore the compiler
|
||||
// reports std::numeric_limits<float>::is_iec559 as false. This is all right
|
||||
// according to our needs.
|
||||
|
||||
#if !defined(Q_CC_GHS)
|
||||
Q_STATIC_ASSERT_X(std::numeric_limits<float>::is_iec559,
|
||||
"Only works with IEEE 754 floating point");
|
||||
#endif
|
||||
|
||||
Q_STATIC_ASSERT_X(std::numeric_limits<float>::has_infinity &&
|
||||
std::numeric_limits<float>::has_quiet_NaN &&
|
||||
std::numeric_limits<float>::has_signaling_NaN,
|
||||
"Only works with IEEE 754 floating point");
|
||||
|
||||
/*!
|
||||
Returns true if the \c qfloat16 \a {f} is equivalent to infinity.
|
||||
|
|
|
|||
|
|
@ -44,6 +44,10 @@
|
|||
#include <QtCore/qmetatype.h>
|
||||
#include <string.h>
|
||||
|
||||
#if defined __F16C__
|
||||
#include <immintrin.h>
|
||||
#endif
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
#if 0
|
||||
|
|
@ -111,19 +115,34 @@ inline int qIntCast(qfloat16 f) Q_DECL_NOTHROW
|
|||
|
||||
inline qfloat16::qfloat16(float f) Q_DECL_NOTHROW
|
||||
{
|
||||
#if defined(QT_COMPILER_SUPPORTS_F16C) && defined(__F16C__)
|
||||
b16 = _cvtss_sh(f, 0);
|
||||
#elif defined (__ARM_FP16_FORMAT_IEEE)
|
||||
__fp16 f16 = f;
|
||||
memcpy(&b16, &f16, sizeof(quint16));
|
||||
#else
|
||||
quint32 u;
|
||||
memcpy(&u, &f, sizeof(quint32));
|
||||
b16 = basetable[(u >> 23) & 0x1ff]
|
||||
+ ((u & 0x007fffff) >> shifttable[(u >> 23) & 0x1ff]);
|
||||
#endif
|
||||
}
|
||||
|
||||
inline qfloat16::operator float() const Q_DECL_NOTHROW
|
||||
{
|
||||
#if defined(QT_COMPILER_SUPPORTS_F16C) && defined(__F16C__)
|
||||
return _cvtsh_ss(b16);
|
||||
#elif defined (__ARM_FP16_FORMAT_IEEE)
|
||||
__fp16 f16;
|
||||
memcpy(&f16, &b16, sizeof(quint16));
|
||||
return f16;
|
||||
#else
|
||||
quint32 u = mantissatable[offsettable[b16 >> 10] + (b16 & 0x3ff)]
|
||||
+ exponenttable[b16 >> 10];
|
||||
float f;
|
||||
memcpy(&f, &u, sizeof(quint32));
|
||||
return f;
|
||||
#endif
|
||||
}
|
||||
|
||||
inline qfloat16::operator double() const Q_DECL_NOTHROW
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
||||
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()) {
|
||||
QList<qInternalCallback> callbacks = cbt->callbacks[cb];
|
||||
bool ret = false;
|
||||
|
|
|
|||
|
|
@ -1445,12 +1445,14 @@ QString qFormatLogMessage(QtMsgType type, const QMessageLogContext &context, con
|
|||
now.start();
|
||||
uint ms = now.msecsSinceReference();
|
||||
message.append(QString::asprintf("%6d.%03d", uint(ms / 1000), uint(ms % 1000)));
|
||||
#if QT_CONFIG(datestring)
|
||||
} else if (timeFormat.isEmpty()) {
|
||||
message.append(QDateTime::currentDateTime().toString(Qt::ISODate));
|
||||
} else {
|
||||
message.append(QDateTime::currentDateTime().toString(timeFormat));
|
||||
#endif // QT_CONFIG(datestring)
|
||||
}
|
||||
#endif
|
||||
#endif // !QT_BOOTSTRAPPED
|
||||
} else if (token == ifCategoryTokenC) {
|
||||
if (!context.category || (strcmp(context.category, "default") == 0))
|
||||
skip = true;
|
||||
|
|
|
|||
|
|
@ -2105,7 +2105,7 @@
|
|||
On \macos, tool windows correspond to the
|
||||
\l{http://developer.apple.com/documentation/Carbon/Conceptual/HandlingWindowsControls/hitb-wind_cont_concept/chapter_2_section_2.html}{Floating}
|
||||
class of windows. This means that the window lives on a
|
||||
level above normal windows; it impossible to put a normal
|
||||
level above normal windows making it impossible to put a normal
|
||||
window on top of it. By default, tool windows will disappear
|
||||
when the application is inactive. This can be controlled by
|
||||
the Qt::WA_MacAlwaysShowToolWindow attribute.
|
||||
|
|
|
|||
|
|
@ -1007,10 +1007,9 @@ qint64 QIODevice::read(char *data, qint64 maxSize)
|
|||
#endif
|
||||
|
||||
const bool sequential = d->isSequential();
|
||||
const bool keepDataInBuffer = sequential && d->transactionStarted;
|
||||
|
||||
// Short circuit for getChar()
|
||||
if (maxSize == 1 && !keepDataInBuffer) {
|
||||
// Short-cut for getChar(), unless we need to keep the data in the buffer.
|
||||
if (maxSize == 1 && !(sequential && d->transactionStarted)) {
|
||||
int chint;
|
||||
while ((chint = d->buffer.getChar()) != -1) {
|
||||
if (!sequential)
|
||||
|
|
@ -1031,43 +1030,67 @@ qint64 QIODevice::read(char *data, qint64 maxSize)
|
|||
}
|
||||
|
||||
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;
|
||||
bool madeBufferReadsOnly = true;
|
||||
bool deviceAtEof = false;
|
||||
char *readPtr = data;
|
||||
qint64 bufferPos = (sequential && transactionStarted) ? transactionPos : Q_INT64_C(0);
|
||||
forever {
|
||||
// Try reading from the buffer.
|
||||
qint64 bufferReadChunkSize = keepDataInBuffer
|
||||
? d->buffer.peek(data, maxSize, d->transactionPos)
|
||||
: d->buffer.read(data, maxSize);
|
||||
? buffer.peek(data, maxSize, bufferPos)
|
||||
: buffer.read(data, maxSize);
|
||||
if (bufferReadChunkSize > 0) {
|
||||
if (keepDataInBuffer)
|
||||
d->transactionPos += bufferReadChunkSize;
|
||||
else if (!sequential)
|
||||
d->pos += bufferReadChunkSize;
|
||||
bufferPos += bufferReadChunkSize;
|
||||
if (!sequential)
|
||||
pos += bufferReadChunkSize;
|
||||
#if defined QIODEVICE_DEBUG
|
||||
printf("%p \treading %lld bytes from buffer into position %lld\n", q,
|
||||
bufferReadChunkSize, readSoFar);
|
||||
#endif
|
||||
readSoFar += bufferReadChunkSize;
|
||||
data += 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) {
|
||||
qint64 readFromDevice = 0;
|
||||
// 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
|
||||
if ((maxSize >= d->readBufferChunkSize || (d->openMode & Unbuffered))
|
||||
&& !keepDataInBuffer) {
|
||||
if ((!buffered || maxSize >= readBufferChunkSize) && !keepDataInBuffer) {
|
||||
// Read big chunk directly to output buffer
|
||||
readFromDevice = readData(data, maxSize);
|
||||
readFromDevice = q->readData(data, maxSize);
|
||||
deviceAtEof = (readFromDevice != maxSize);
|
||||
#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);
|
||||
#endif
|
||||
if (readFromDevice > 0) {
|
||||
|
|
@ -1075,24 +1098,24 @@ qint64 QIODevice::read(char *data, qint64 maxSize)
|
|||
data += readFromDevice;
|
||||
maxSize -= readFromDevice;
|
||||
if (!sequential) {
|
||||
d->pos += readFromDevice;
|
||||
d->devicePos += readFromDevice;
|
||||
pos += readFromDevice;
|
||||
devicePos += readFromDevice;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// Do not read more than maxSize on unbuffered devices
|
||||
const qint64 bytesToBuffer = (d->openMode & Unbuffered)
|
||||
? qMin(maxSize, qint64(d->readBufferChunkSize))
|
||||
: qint64(d->readBufferChunkSize);
|
||||
const qint64 bytesToBuffer = (buffered || readBufferChunkSize < maxSize)
|
||||
? qint64(readBufferChunkSize)
|
||||
: maxSize;
|
||||
// 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);
|
||||
d->buffer.chop(bytesToBuffer - qMax(Q_INT64_C(0), readFromDevice));
|
||||
buffer.chop(bytesToBuffer - qMax(Q_INT64_C(0), readFromDevice));
|
||||
if (readFromDevice > 0) {
|
||||
if (!sequential)
|
||||
d->devicePos += readFromDevice;
|
||||
devicePos += readFromDevice;
|
||||
#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);
|
||||
#endif
|
||||
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;
|
||||
|
||||
// optimization to avoid initial self-assignment
|
||||
|
|
@ -1140,14 +1163,18 @@ qint64 QIODevice::read(char *data, qint64 maxSize)
|
|||
break;
|
||||
}
|
||||
|
||||
#if defined QIODEVICE_DEBUG
|
||||
printf("%p \treturning %lld, d->pos == %lld, d->buffer.size() == %lld\n", this,
|
||||
readSoFar, d->pos, d->buffer.size());
|
||||
debugBinaryString(data - readSoFar, readSoFar);
|
||||
#endif
|
||||
// Restore positions after reading
|
||||
if (keepDataInBuffer) {
|
||||
if (peeking)
|
||||
pos = savedPos; // does nothing on sequential devices
|
||||
else
|
||||
transactionPos = bufferPos;
|
||||
} else if (peeking) {
|
||||
seekBuffer(savedPos); // unbuffered random-access device
|
||||
}
|
||||
|
||||
if (madeBufferReadsOnly && d->isBufferEmpty())
|
||||
readData(data, 0);
|
||||
if (madeBufferReadsOnly && isBufferEmpty())
|
||||
q->readData(data, 0);
|
||||
|
||||
return readSoFar;
|
||||
}
|
||||
|
|
@ -1759,27 +1786,7 @@ bool QIODevicePrivate::putCharHelper(char c)
|
|||
*/
|
||||
qint64 QIODevicePrivate::peek(char *data, qint64 maxSize)
|
||||
{
|
||||
Q_Q(QIODevice);
|
||||
|
||||
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;
|
||||
return read(data, maxSize, true);
|
||||
}
|
||||
|
||||
/*!
|
||||
|
|
@ -1787,26 +1794,17 @@ qint64 QIODevicePrivate::peek(char *data, qint64 maxSize)
|
|||
*/
|
||||
QByteArray QIODevicePrivate::peek(qint64 maxSize)
|
||||
{
|
||||
Q_Q(QIODevice);
|
||||
QByteArray result(maxSize, Qt::Uninitialized);
|
||||
|
||||
if (transactionStarted) {
|
||||
const qint64 savedTransactionPos = transactionPos;
|
||||
const qint64 savedPos = pos;
|
||||
const qint64 readBytes = read(result.data(), maxSize, true);
|
||||
|
||||
QByteArray result = q->read(maxSize);
|
||||
|
||||
// Restore initial position
|
||||
if (isSequential())
|
||||
transactionPos = savedTransactionPos;
|
||||
if (readBytes < maxSize) {
|
||||
if (readBytes <= 0)
|
||||
result.clear();
|
||||
else
|
||||
seekBuffer(savedPos);
|
||||
return result;
|
||||
result.resize(readBytes);
|
||||
}
|
||||
|
||||
q->startTransaction();
|
||||
QByteArray result = q->read(maxSize);
|
||||
q->rollbackTransaction();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
@ -1844,7 +1842,12 @@ bool QIODevice::getChar(char *c)
|
|||
*/
|
||||
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)
|
||||
{
|
||||
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 setWriteChannelCount(int count);
|
||||
|
||||
qint64 read(char *data, qint64 maxSize, bool peeking = false);
|
||||
virtual qint64 peek(char *data, 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_GLOBAL_STATIC_WITH_ARGS(QMutex, resourceMutex, (QMutex::Recursive))
|
||||
|
||||
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
|
||||
|
|
@ -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,
|
||||
const unsigned char *name, const unsigned char *data)
|
||||
{
|
||||
if (resourceGlobalData.isDestroyed())
|
||||
return false;
|
||||
|
||||
QMutexLocker lock(resourceMutex());
|
||||
if ((version == 0x01 || version == 0x02) && resourceList()) {
|
||||
QResourceRoot res(version, tree, name, data);
|
||||
|
|
|
|||
|
|
@ -268,7 +268,7 @@ QByteArray QStorageInfo::device() const
|
|||
}
|
||||
|
||||
/*!
|
||||
\since 5.8
|
||||
\since 5.9
|
||||
Returns the subvolume name for this volume.
|
||||
|
||||
Some filesystem types allow multiple subvolumes inside one device, which
|
||||
|
|
|
|||
|
|
@ -305,12 +305,13 @@ void qRemovePostRoutine(QtCleanUpFunction p)
|
|||
|
||||
static void qt_call_pre_routines()
|
||||
{
|
||||
QStartUpFuncList *list = preRList();
|
||||
if (!list)
|
||||
if (!preRList.exists())
|
||||
return;
|
||||
|
||||
#ifndef QT_NO_THREAD
|
||||
QMutexLocker locker(&globalPreRoutinesMutex);
|
||||
#endif
|
||||
QVFuncList *list = &(*preRList);
|
||||
// Unlike qt_call_post_routines, we don't empty the list, because
|
||||
// Q_COREAPP_STARTUP_FUNCTION is a macro, so the user expects
|
||||
// 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()
|
||||
{
|
||||
QVFuncList *list = 0;
|
||||
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)
|
||||
if (!postRList.exists())
|
||||
return;
|
||||
|
||||
QVFuncList *list = &(*postRList);
|
||||
while (!list->isEmpty())
|
||||
(list->takeFirst())();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,6 +52,18 @@
|
|||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
namespace QtAndroidPrivate {
|
||||
// *Listener virtual function implementations.
|
||||
// Defined out-of-line to pin the vtable/type_info.
|
||||
ActivityResultListener::~ActivityResultListener() {}
|
||||
NewIntentListener::~NewIntentListener() {}
|
||||
ResumePauseListener::~ResumePauseListener() {}
|
||||
void ResumePauseListener::handlePause() {}
|
||||
void ResumePauseListener::handleResume() {}
|
||||
GenericMotionEventListener::~GenericMotionEventListener() {}
|
||||
KeyEventListener::~KeyEventListener() {}
|
||||
}
|
||||
|
||||
static JavaVM *g_javaVM = Q_NULLPTR;
|
||||
static jobject g_jActivity = Q_NULLPTR;
|
||||
static jobject g_jService = Q_NULLPTR;
|
||||
|
|
@ -61,7 +73,7 @@ static jclass g_jNativeClass = Q_NULLPTR;
|
|||
static jmethodID g_runPendingCppRunnablesMethodID = Q_NULLPTR;
|
||||
static jmethodID g_hideSplashScreenMethodID = Q_NULLPTR;
|
||||
Q_GLOBAL_STATIC(std::deque<QtAndroidPrivate::Runnable>, g_pendingRunnables);
|
||||
Q_GLOBAL_STATIC(QMutex, g_pendingRunnablesMutex);
|
||||
static QBasicMutex g_pendingRunnablesMutex;
|
||||
|
||||
class PermissionsResultClass : public QObject
|
||||
{
|
||||
|
|
@ -76,21 +88,24 @@ private:
|
|||
|
||||
typedef QHash<int, QSharedPointer<PermissionsResultClass>> PendingPermissionRequestsHash;
|
||||
Q_GLOBAL_STATIC(PendingPermissionRequestsHash, g_pendingPermissionRequests);
|
||||
Q_GLOBAL_STATIC(QMutex, g_pendingPermissionRequestsMutex);
|
||||
Q_GLOBAL_STATIC(QAtomicInt, g_requestPermissionsRequestCode);
|
||||
static QBasicMutex g_pendingPermissionRequestsMutex;
|
||||
static int nextRequestCode()
|
||||
{
|
||||
static QBasicAtomicInt counter = Q_BASIC_ATOMIC_INITIALIZER(0);
|
||||
return counter.fetchAndAddRelaxed(1);
|
||||
}
|
||||
|
||||
// function called from Java from Android UI thread
|
||||
static void runPendingCppRunnables(JNIEnv */*env*/, jobject /*obj*/)
|
||||
{
|
||||
for (;;) { // run all posted runnables
|
||||
g_pendingRunnablesMutex->lock();
|
||||
QMutexLocker locker(&g_pendingRunnablesMutex);
|
||||
if (g_pendingRunnables->empty()) {
|
||||
g_pendingRunnablesMutex->unlock();
|
||||
break;
|
||||
}
|
||||
QtAndroidPrivate::Runnable runnable(std::move(g_pendingRunnables->front()));
|
||||
g_pendingRunnables->pop_front();
|
||||
g_pendingRunnablesMutex->unlock();
|
||||
locker.unlock();
|
||||
runnable(); // run it outside the sync block!
|
||||
}
|
||||
}
|
||||
|
|
@ -110,16 +125,17 @@ Q_GLOBAL_STATIC(GenericMotionEventListeners, g_genericMotionEventListeners)
|
|||
static void sendRequestPermissionsResult(JNIEnv *env, jobject /*obj*/, jint requestCode,
|
||||
jobjectArray permissions, jintArray grantResults)
|
||||
{
|
||||
g_pendingPermissionRequestsMutex->lock();
|
||||
QMutexLocker locker(&g_pendingPermissionRequestsMutex);
|
||||
auto it = g_pendingPermissionRequests->find(requestCode);
|
||||
if (it == g_pendingPermissionRequests->end()) {
|
||||
g_pendingPermissionRequestsMutex->unlock();
|
||||
// show an error or something ?
|
||||
return;
|
||||
}
|
||||
g_pendingPermissionRequestsMutex->unlock();
|
||||
auto request = std::move(*it);
|
||||
g_pendingPermissionRequests->erase(it);
|
||||
locker.unlock();
|
||||
|
||||
Qt::ConnectionType connection = QThread::currentThread() == it.value()->thread() ? Qt::DirectConnection : Qt::BlockingQueuedConnection;
|
||||
Qt::ConnectionType connection = QThread::currentThread() == request->thread() ? Qt::DirectConnection : Qt::BlockingQueuedConnection;
|
||||
QtAndroidPrivate::PermissionsHash hash;
|
||||
const int size = env->GetArrayLength(permissions);
|
||||
std::unique_ptr<jint[]> results(new jint[size]);
|
||||
|
|
@ -131,10 +147,7 @@ static void sendRequestPermissionsResult(JNIEnv *env, jobject /*obj*/, jint requ
|
|||
QtAndroidPrivate::PermissionsResult::Denied;
|
||||
hash[permission] = value;
|
||||
}
|
||||
QMetaObject::invokeMethod(it.value().data(), "sendResult", connection, Q_ARG(QtAndroidPrivate::PermissionsHash, hash));
|
||||
g_pendingPermissionRequestsMutex->lock();
|
||||
g_pendingPermissionRequests->erase(it);
|
||||
g_pendingPermissionRequestsMutex->unlock();
|
||||
QMetaObject::invokeMethod(request.data(), "sendResult", connection, Q_ARG(QtAndroidPrivate::PermissionsHash, hash));
|
||||
}
|
||||
|
||||
static jboolean dispatchGenericMotionEvent(JNIEnv *, jclass, jobject event)
|
||||
|
|
@ -391,7 +404,7 @@ jint QtAndroidPrivate::initJNI(JavaVM *vm, JNIEnv *env)
|
|||
return JNI_ERR;
|
||||
|
||||
g_runPendingCppRunnablesMethodID = env->GetStaticMethodID(jQtNative,
|
||||
"runPendingCppRunnablesOnUiThread",
|
||||
"runPendingCppRunnablesOnAndroidThread",
|
||||
"()V");
|
||||
g_hideSplashScreenMethodID = env->GetStaticMethodID(jQtNative, "hideSplashScreen", "()V");
|
||||
g_jNativeClass = static_cast<jclass>(env->NewGlobalRef(jQtNative));
|
||||
|
|
@ -447,10 +460,10 @@ void QtAndroidPrivate::runOnUiThread(QRunnable *runnable, JNIEnv *env)
|
|||
|
||||
void QtAndroidPrivate::runOnAndroidThread(const QtAndroidPrivate::Runnable &runnable, JNIEnv *env)
|
||||
{
|
||||
g_pendingRunnablesMutex->lock();
|
||||
QMutexLocker locker(&g_pendingRunnablesMutex);
|
||||
const bool triggerRun = g_pendingRunnables->empty();
|
||||
g_pendingRunnables->push_back(runnable);
|
||||
g_pendingRunnablesMutex->unlock();
|
||||
locker.unlock();
|
||||
if (triggerRun)
|
||||
env->CallStaticVoidMethod(g_jNativeClass, g_runPendingCppRunnablesMethodID);
|
||||
}
|
||||
|
|
@ -475,18 +488,16 @@ void QtAndroidPrivate::requestPermissions(JNIEnv *env, const QStringList &permis
|
|||
return;
|
||||
}
|
||||
// Check API 23+ permissions
|
||||
const int requestCode = (*g_requestPermissionsRequestCode)++;
|
||||
const int requestCode = nextRequestCode();
|
||||
if (!directCall) {
|
||||
g_pendingPermissionRequestsMutex->lock();
|
||||
QMutexLocker locker(&g_pendingPermissionRequestsMutex);
|
||||
(*g_pendingPermissionRequests)[requestCode] = QSharedPointer<PermissionsResultClass>::create(callbackFunc);
|
||||
g_pendingPermissionRequestsMutex->unlock();
|
||||
}
|
||||
|
||||
runOnAndroidThread([permissions, callbackFunc, requestCode, directCall] {
|
||||
if (directCall) {
|
||||
g_pendingPermissionRequestsMutex->lock();
|
||||
QMutexLocker locker(&g_pendingPermissionRequestsMutex);
|
||||
(*g_pendingPermissionRequests)[requestCode] = QSharedPointer<PermissionsResultClass>::create(callbackFunc);
|
||||
g_pendingPermissionRequestsMutex->unlock();
|
||||
}
|
||||
|
||||
QJNIEnvironmentPrivate env;
|
||||
|
|
@ -507,8 +518,10 @@ QHash<QString, QtAndroidPrivate::PermissionsResult> QtAndroidPrivate::requestPer
|
|||
*res = result;
|
||||
sem->release();
|
||||
}, true);
|
||||
sem->tryAcquire(1, timeoutMs);
|
||||
return *res;
|
||||
if (sem->tryAcquire(1, timeoutMs))
|
||||
return std::move(*res);
|
||||
else // mustn't touch *res
|
||||
return QHash<QString, QtAndroidPrivate::PermissionsResult>();
|
||||
}
|
||||
|
||||
QtAndroidPrivate::PermissionsResult QtAndroidPrivate::checkPermission(const QString &permission)
|
||||
|
|
|
|||
|
|
@ -65,36 +65,36 @@ namespace QtAndroidPrivate
|
|||
class Q_CORE_EXPORT ActivityResultListener
|
||||
{
|
||||
public:
|
||||
virtual ~ActivityResultListener() {}
|
||||
virtual ~ActivityResultListener();
|
||||
virtual bool handleActivityResult(jint requestCode, jint resultCode, jobject data) = 0;
|
||||
};
|
||||
|
||||
class Q_CORE_EXPORT NewIntentListener
|
||||
{
|
||||
public:
|
||||
virtual ~NewIntentListener() {}
|
||||
virtual ~NewIntentListener();
|
||||
virtual bool handleNewIntent(JNIEnv *env, jobject intent) = 0;
|
||||
};
|
||||
|
||||
class Q_CORE_EXPORT ResumePauseListener
|
||||
{
|
||||
public:
|
||||
virtual ~ResumePauseListener() {}
|
||||
virtual void handlePause() {};
|
||||
virtual void handleResume() {};
|
||||
virtual ~ResumePauseListener();
|
||||
virtual void handlePause();
|
||||
virtual void handleResume();
|
||||
};
|
||||
|
||||
class Q_CORE_EXPORT GenericMotionEventListener
|
||||
{
|
||||
public:
|
||||
virtual ~GenericMotionEventListener() {}
|
||||
virtual ~GenericMotionEventListener();
|
||||
virtual bool handleGenericMotionEvent(jobject event) = 0;
|
||||
};
|
||||
|
||||
class Q_CORE_EXPORT KeyEventListener
|
||||
{
|
||||
public:
|
||||
virtual ~KeyEventListener() {}
|
||||
virtual ~KeyEventListener();
|
||||
virtual bool handleKeyEvent(jobject event) = 0;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -834,38 +834,27 @@ void QMetaType::registerStreamOperators(int idx, SaveOperator saveOp,
|
|||
const char *QMetaType::typeName(int typeId)
|
||||
{
|
||||
const uint type = typeId;
|
||||
// In theory it can be filled during compilation time, but for some reason template code
|
||||
// that is able to do it causes GCC 4.6 to generate additional 3K of executable code. Probably
|
||||
// it is not worth of it.
|
||||
static const char *namesCache[QMetaType::HighestInternalId + 1];
|
||||
|
||||
const char *result;
|
||||
if (type <= QMetaType::HighestInternalId && ((result = namesCache[type])))
|
||||
return result;
|
||||
|
||||
#define QT_METATYPE_TYPEID_TYPENAME_CONVERTER(MetaTypeName, TypeId, RealName) \
|
||||
case QMetaType::MetaTypeName: result = #RealName; break;
|
||||
case QMetaType::MetaTypeName: return #RealName; break;
|
||||
|
||||
switch (QMetaType::Type(type)) {
|
||||
QT_FOR_EACH_STATIC_TYPE(QT_METATYPE_TYPEID_TYPENAME_CONVERTER)
|
||||
case QMetaType::UnknownType:
|
||||
case QMetaType::User:
|
||||
break;
|
||||
}
|
||||
|
||||
default: {
|
||||
if (Q_UNLIKELY(type < QMetaType::User)) {
|
||||
return 0; // It can happen when someone cast int to QVariant::Type, we should not crash...
|
||||
} else {
|
||||
const QVector<QCustomTypeInfo> * const ct = customTypes();
|
||||
QReadLocker locker(customTypesLock());
|
||||
return ct && uint(ct->count()) > type - QMetaType::User && !ct->at(type - QMetaType::User).typeName.isEmpty()
|
||||
? ct->at(type - QMetaType::User).typeName.constData()
|
||||
: 0;
|
||||
}
|
||||
}
|
||||
if (Q_UNLIKELY(type < QMetaType::User)) {
|
||||
return nullptr; // It can happen when someone cast int to QVariant::Type, we should not crash...
|
||||
}
|
||||
|
||||
const QVector<QCustomTypeInfo> * const ct = customTypes();
|
||||
QReadLocker locker(customTypesLock());
|
||||
return ct && uint(ct->count()) > type - QMetaType::User && !ct->at(type - QMetaType::User).typeName.isEmpty()
|
||||
? ct->at(type - QMetaType::User).typeName.constData()
|
||||
: nullptr;
|
||||
|
||||
#undef QT_METATYPE_TYPEID_TYPENAME_CONVERTER
|
||||
|
||||
Q_ASSERT(type <= QMetaType::HighestInternalId);
|
||||
namesCache[type] = result;
|
||||
return result;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -3708,7 +3708,7 @@ void QMetaObject::activate(QObject *sender, int signalOffset, int local_signal_i
|
|||
continue;
|
||||
|
||||
QObject * const receiver = c->receiver;
|
||||
const bool receiverInSameThread = currentThreadId == receiver->d_func()->threadData->threadId;
|
||||
const bool receiverInSameThread = currentThreadId == receiver->d_func()->threadData->threadId.load();
|
||||
|
||||
// determine if this connection should be sent immediately or
|
||||
// put into the event queue
|
||||
|
|
|
|||
|
|
@ -142,10 +142,12 @@ int QElfParser::parse(const char *dataStart, ulong fdlen, const QString &library
|
|||
data += sizeof(qelfhalf_t); // e_shtrndx
|
||||
|
||||
if ((quint32)(e_shnum * e_shentsize) > fdlen) {
|
||||
if (lib)
|
||||
lib->errorString = QLibrary::tr("'%1' is an invalid ELF object (%2)")
|
||||
.arg(library, QLibrary::tr("announced %1 section(s), each %2 byte(s), exceed file size")
|
||||
.arg(e_shnum).arg(e_shentsize));
|
||||
if (lib) {
|
||||
const QString message =
|
||||
QLibrary::tr("announced %n section(s), each %1 byte(s), exceed file size",
|
||||
nullptr, int(e_shnum)).arg(e_shentsize);
|
||||
lib->errorString = QLibrary::tr("'%1' is an invalid ELF object (%2)").arg(library, message);
|
||||
}
|
||||
return Corrupt;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -617,40 +617,34 @@ bool QLibrary::isLibrary(const QString &fileName)
|
|||
{
|
||||
#if defined(Q_OS_WIN)
|
||||
return fileName.endsWith(QLatin1String(".dll"), Qt::CaseInsensitive);
|
||||
#else
|
||||
#else // Generic Unix
|
||||
QString completeSuffix = QFileInfo(fileName).completeSuffix();
|
||||
if (completeSuffix.isEmpty())
|
||||
return false;
|
||||
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;
|
||||
|
||||
# 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":
|
||||
"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."
|
||||
*/
|
||||
validSuffixList << QLatin1String("sl");
|
||||
# if defined __ia64
|
||||
validSuffixList << QLatin1String("so");
|
||||
# endif
|
||||
# elif defined(Q_OS_AIX)
|
||||
validSuffixList << QLatin1String("a") << QLatin1String("so");
|
||||
# elif defined(Q_OS_UNIX)
|
||||
# if defined __ia64
|
||||
validSuffixList << QLatin1String("so");
|
||||
# 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:
|
||||
// libfoo.so
|
||||
|
|
@ -669,9 +663,7 @@ bool QLibrary::isLibrary(const QString &fileName)
|
|||
if (i != suffixPos)
|
||||
suffixes.at(i).toInt(&valid);
|
||||
return valid;
|
||||
# endif
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
typedef const char * (*QtPluginQueryVerificationDataFunction)();
|
||||
|
|
|
|||
|
|
@ -50,13 +50,9 @@
|
|||
# include <private/qcore_mac_p.h>
|
||||
#endif
|
||||
|
||||
#if (defined(Q_OS_VXWORKS) && !defined(VXWORKS_RTP)) || defined (Q_OS_NACL)
|
||||
#define QT_NO_DYNAMIC_LIBRARY
|
||||
#endif
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
#if !defined(QT_HPUX_LD) && !defined(QT_NO_DYNAMIC_LIBRARY)
|
||||
#if !defined(QT_HPUX_LD)
|
||||
QT_BEGIN_INCLUDE_NAMESPACE
|
||||
#include <dlfcn.h>
|
||||
QT_END_INCLUDE_NAMESPACE
|
||||
|
|
@ -64,9 +60,7 @@ QT_END_INCLUDE_NAMESPACE
|
|||
|
||||
static QString qdlerror()
|
||||
{
|
||||
#if defined(QT_NO_DYNAMIC_LIBRARY)
|
||||
const char *err = "This platform does not support dynamic libraries.";
|
||||
#elif !defined(QT_HPUX_LD)
|
||||
#if !defined(QT_HPUX_LD)
|
||||
const char *err = dlerror();
|
||||
#else
|
||||
const char *err = strerror(errno);
|
||||
|
|
@ -131,7 +125,6 @@ QStringList QLibraryPrivate::prefixes_sys()
|
|||
bool QLibraryPrivate::load_sys()
|
||||
{
|
||||
QString attempt;
|
||||
#if !defined(QT_NO_DYNAMIC_LIBRARY)
|
||||
QFileSystemEntry fsEntry(fileName);
|
||||
|
||||
QString path = fsEntry.path();
|
||||
|
|
@ -250,7 +243,6 @@ bool QLibraryPrivate::load_sys()
|
|||
}
|
||||
}
|
||||
#endif
|
||||
#endif // QT_NO_DYNAMIC_LIBRARY
|
||||
if (!pHnd) {
|
||||
errorString = QLibrary::tr("Cannot load library %1: %2").arg(fileName, qdlerror());
|
||||
}
|
||||
|
|
@ -263,29 +255,27 @@ bool QLibraryPrivate::load_sys()
|
|||
|
||||
bool QLibraryPrivate::unload_sys()
|
||||
{
|
||||
#if !defined(QT_NO_DYNAMIC_LIBRARY)
|
||||
# if defined(QT_HPUX_LD)
|
||||
#if defined(QT_HPUX_LD)
|
||||
if (shl_unload((shl_t)pHnd)) {
|
||||
# else
|
||||
#else
|
||||
if (dlclose(pHnd)) {
|
||||
# endif
|
||||
# if defined (Q_OS_QNX) // Workaround until fixed in QNX; fixes crash in
|
||||
#endif
|
||||
#if defined (Q_OS_QNX) // Workaround until fixed in QNX; fixes crash in
|
||||
char *error = dlerror(); // QtDeclarative auto test "qqmlenginecleanup" for instance
|
||||
if (!qstrcmp(error, "Shared objects still referenced")) // On QNX that's only "informative"
|
||||
return true;
|
||||
errorString = QLibrary::tr("Cannot unload library %1: %2").arg(fileName,
|
||||
QLatin1String(error));
|
||||
# else
|
||||
#else
|
||||
errorString = QLibrary::tr("Cannot unload library %1: %2").arg(fileName, qdlerror());
|
||||
# endif
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
errorString.clear();
|
||||
return true;
|
||||
}
|
||||
|
||||
#if defined(Q_OS_LINUX) && !defined(QT_NO_DYNAMIC_LIBRARY)
|
||||
#if defined(Q_OS_LINUX)
|
||||
Q_CORE_EXPORT QFunctionPointer qt_linux_find_symbol_sys(const char *symbol)
|
||||
{
|
||||
return QFunctionPointer(dlsym(RTLD_DEFAULT, symbol));
|
||||
|
|
@ -305,8 +295,6 @@ QFunctionPointer QLibraryPrivate::resolve_sys(const char* symbol)
|
|||
QFunctionPointer address = 0;
|
||||
if (shl_findsym((shl_t*)&pHnd, symbol, TYPE_UNDEFINED, &address) < 0)
|
||||
address = 0;
|
||||
#elif defined (QT_NO_DYNAMIC_LIBRARY)
|
||||
QFunctionPointer address = 0;
|
||||
#else
|
||||
QFunctionPointer address = QFunctionPointer(dlsym(pHnd, symbol));
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -968,10 +968,10 @@ QUuid QUuid::createUuid()
|
|||
if (!uuidseed.hasLocalData())
|
||||
{
|
||||
int *pseed = new int;
|
||||
static QBasicAtomicInt serial = Q_BASIC_ATOMIC_INITIALIZER(2);
|
||||
static QBasicAtomicInt serial = Q_BASIC_ATOMIC_INITIALIZER(0);
|
||||
qsrand(*pseed = QDateTime::currentSecsSinceEpoch()
|
||||
+ quintptr(&pseed)
|
||||
+ serial.fetchAndAddRelaxed(1));
|
||||
+ 2 + serial.fetchAndAddRelaxed(1));
|
||||
uuidseed.setLocalData(pseed);
|
||||
}
|
||||
#else
|
||||
|
|
|
|||
|
|
@ -107,8 +107,6 @@ QT_BEGIN_NAMESPACE
|
|||
* waiting in the past. We then set the mutex to 0x0 and perform a FUTEX_WAKE.
|
||||
*/
|
||||
|
||||
static QBasicAtomicInt futexFlagSupport = Q_BASIC_ATOMIC_INITIALIZER(-1);
|
||||
|
||||
static inline int _q_futex(void *addr, int op, int val, const struct timespec *timeout) Q_DECL_NOTHROW
|
||||
{
|
||||
volatile int *int_addr = reinterpret_cast<volatile int *>(addr);
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ public:
|
|||
int writerCount;
|
||||
int waitingReaders;
|
||||
int waitingWriters;
|
||||
bool recursive;
|
||||
const bool recursive;
|
||||
|
||||
//Called with the mutex locked
|
||||
bool lockForWrite(int timeout);
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ QT_BEGIN_NAMESPACE
|
|||
*/
|
||||
|
||||
QThreadData::QThreadData(int initialRefCount)
|
||||
: _ref(initialRefCount), loopLevel(0), scopeLevel(0), thread(0), threadId(0),
|
||||
: _ref(initialRefCount), loopLevel(0), scopeLevel(0),
|
||||
eventDispatcher(0),
|
||||
quitNow(false), canWait(true), isAdopted(false), requiresCoreApplication(true)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -284,7 +284,7 @@ public:
|
|||
QStack<QEventLoop *> eventLoops;
|
||||
QPostEventList postEventList;
|
||||
QAtomicPointer<QThread> thread;
|
||||
Qt::HANDLE threadId;
|
||||
QAtomicPointer<void> threadId;
|
||||
QAtomicPointer<QAbstractEventDispatcher> eventDispatcher;
|
||||
QVector<void *> tls;
|
||||
FlaggedDebugSignatures flaggedSignatures;
|
||||
|
|
|
|||
|
|
@ -255,7 +255,7 @@ QThreadData *QThreadData::current(bool createIfNecessary)
|
|||
}
|
||||
data->deref();
|
||||
data->isAdopted = true;
|
||||
data->threadId = to_HANDLE(pthread_self());
|
||||
data->threadId.store(to_HANDLE(pthread_self()));
|
||||
if (!QCoreApplicationPrivate::theMainThread)
|
||||
QCoreApplicationPrivate::theMainThread = data->thread.load();
|
||||
}
|
||||
|
|
@ -335,7 +335,7 @@ void *QThreadPrivate::start(void *arg)
|
|||
thr->d_func()->setPriority(QThread::Priority(thr->d_func()->priority & ~ThreadPriorityResetFlag));
|
||||
}
|
||||
|
||||
data->threadId = to_HANDLE(pthread_self());
|
||||
data->threadId.store(to_HANDLE(pthread_self()));
|
||||
set_thread_data(data);
|
||||
|
||||
data->ref();
|
||||
|
|
@ -352,7 +352,7 @@ void *QThreadPrivate::start(void *arg)
|
|||
// sets the name of the current thread.
|
||||
QString objectName = thr->objectName();
|
||||
|
||||
pthread_t thread_id = from_HANDLE<pthread_t>(data->threadId);
|
||||
pthread_t thread_id = from_HANDLE<pthread_t>(data->threadId.load());
|
||||
if (Q_LIKELY(objectName.isEmpty()))
|
||||
setCurrentThreadName(thread_id, thr->metaObject()->className());
|
||||
else
|
||||
|
|
@ -651,7 +651,7 @@ void QThread::start(Priority priority)
|
|||
#endif
|
||||
code = pthread_create(&threadId, &attr, QThreadPrivate::start, this);
|
||||
}
|
||||
d->data->threadId = to_HANDLE(threadId);
|
||||
d->data->threadId.store(to_HANDLE(threadId));
|
||||
|
||||
pthread_attr_destroy(&attr);
|
||||
|
||||
|
|
@ -660,7 +660,7 @@ void QThread::start(Priority priority)
|
|||
|
||||
d->running = false;
|
||||
d->finished = false;
|
||||
d->data->threadId = 0;
|
||||
d->data->threadId.store(nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -670,10 +670,10 @@ void QThread::terminate()
|
|||
Q_D(QThread);
|
||||
QMutexLocker locker(&d->mutex);
|
||||
|
||||
if (!d->data->threadId)
|
||||
if (!d->data->threadId.load())
|
||||
return;
|
||||
|
||||
int code = pthread_cancel(from_HANDLE<pthread_t>(d->data->threadId));
|
||||
int code = pthread_cancel(from_HANDLE<pthread_t>(d->data->threadId.load()));
|
||||
if (code) {
|
||||
qWarning("QThread::start: Thread termination error: %s",
|
||||
qPrintable(qt_error_string((code))));
|
||||
|
|
@ -686,7 +686,7 @@ bool QThread::wait(unsigned long time)
|
|||
Q_D(QThread);
|
||||
QMutexLocker locker(&d->mutex);
|
||||
|
||||
if (from_HANDLE<pthread_t>(d->data->threadId) == pthread_self()) {
|
||||
if (from_HANDLE<pthread_t>(d->data->threadId.load()) == pthread_self()) {
|
||||
qWarning("QThread::wait: Thread tried to wait on itself");
|
||||
return false;
|
||||
}
|
||||
|
|
@ -728,7 +728,7 @@ void QThreadPrivate::setPriority(QThread::Priority threadPriority)
|
|||
int sched_policy;
|
||||
sched_param param;
|
||||
|
||||
if (pthread_getschedparam(from_HANDLE<pthread_t>(data->threadId), &sched_policy, ¶m) != 0) {
|
||||
if (pthread_getschedparam(from_HANDLE<pthread_t>(data->threadId.load()), &sched_policy, ¶m) != 0) {
|
||||
// failed to get the scheduling policy, don't bother setting
|
||||
// the priority
|
||||
qWarning("QThread::setPriority: Cannot get scheduler parameters");
|
||||
|
|
@ -744,15 +744,15 @@ void QThreadPrivate::setPriority(QThread::Priority threadPriority)
|
|||
}
|
||||
|
||||
param.sched_priority = prio;
|
||||
int status = pthread_setschedparam(from_HANDLE<pthread_t>(data->threadId), sched_policy, ¶m);
|
||||
int status = pthread_setschedparam(from_HANDLE<pthread_t>(data->threadId.load()), sched_policy, ¶m);
|
||||
|
||||
# ifdef SCHED_IDLE
|
||||
// were we trying to set to idle priority and failed?
|
||||
if (status == -1 && sched_policy == SCHED_IDLE && errno == EINVAL) {
|
||||
// reset to lowest priority possible
|
||||
pthread_getschedparam(from_HANDLE<pthread_t>(data->threadId), &sched_policy, ¶m);
|
||||
pthread_getschedparam(from_HANDLE<pthread_t>(data->threadId.load()), &sched_policy, ¶m);
|
||||
param.sched_priority = sched_get_priority_min(sched_policy);
|
||||
pthread_setschedparam(from_HANDLE<pthread_t>(data->threadId), sched_policy, ¶m);
|
||||
pthread_setschedparam(from_HANDLE<pthread_t>(data->threadId.load()), sched_policy, ¶m);
|
||||
}
|
||||
# else
|
||||
Q_UNUSED(status);
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ void qt_create_tls()
|
|||
{
|
||||
if (qt_current_thread_data_tls_index != TLS_OUT_OF_INDEXES)
|
||||
return;
|
||||
static QMutex mutex;
|
||||
static QBasicMutex mutex;
|
||||
QMutexLocker locker(&mutex);
|
||||
qt_current_thread_data_tls_index = TlsAlloc();
|
||||
}
|
||||
|
|
@ -137,7 +137,7 @@ QThreadData *QThreadData::current(bool createIfNecessary)
|
|||
}
|
||||
threadData->deref();
|
||||
threadData->isAdopted = true;
|
||||
threadData->threadId = reinterpret_cast<Qt::HANDLE>(quintptr(GetCurrentThreadId()));
|
||||
threadData->threadId.store(reinterpret_cast<Qt::HANDLE>(quintptr(GetCurrentThreadId())));
|
||||
|
||||
if (!QCoreApplicationPrivate::theMainThread) {
|
||||
QCoreApplicationPrivate::theMainThread = threadData->thread.load();
|
||||
|
|
@ -166,7 +166,7 @@ void QAdoptedThread::init()
|
|||
|
||||
static QVector<HANDLE> qt_adopted_thread_handles;
|
||||
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 HANDLE qt_adopted_thread_wakeup = 0;
|
||||
|
||||
|
|
@ -351,7 +351,7 @@ unsigned int __stdcall QT_ENSURE_STACK_ALIGNED_FOR_SSE QThreadPrivate::start(voi
|
|||
|
||||
qt_create_tls();
|
||||
TlsSetValue(qt_current_thread_data_tls_index, data);
|
||||
data->threadId = reinterpret_cast<Qt::HANDLE>(quintptr(GetCurrentThreadId()));
|
||||
data->threadId.store(reinterpret_cast<Qt::HANDLE>(quintptr(GetCurrentThreadId())));
|
||||
|
||||
QThread::setTerminationEnabled(false);
|
||||
|
||||
|
|
|
|||
|
|
@ -245,7 +245,8 @@ void QThreadPoolPrivate::startThread(QRunnable *runnable)
|
|||
{
|
||||
QScopedPointer <QThreadPoolThread> thread(new QThreadPoolThread(this));
|
||||
thread->setObjectName(QLatin1String("Thread (pooled)"));
|
||||
allThreads.insert(thread.data());
|
||||
Q_ASSERT(!allThreads.contains(thread.data())); // if this assert hits, we have an ABA problem (deleted threads don't get removed here)
|
||||
allThreads.append(thread.data());
|
||||
++activeThreads;
|
||||
|
||||
if (runnable->autoDelete())
|
||||
|
|
@ -265,7 +266,7 @@ void QThreadPoolPrivate::reset()
|
|||
|
||||
while (!allThreads.empty()) {
|
||||
// move the contents of the set out so that we can iterate without the lock
|
||||
QSet<QThreadPoolThread *> allThreadsCopy;
|
||||
QList<QThreadPoolThread *> allThreadsCopy;
|
||||
allThreadsCopy.swap(allThreads);
|
||||
locker.unlock();
|
||||
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ public:
|
|||
void stealAndRunRunnable(QRunnable *runnable);
|
||||
|
||||
mutable QMutex mutex;
|
||||
QSet<QThreadPoolThread *> allThreads;
|
||||
QList<QThreadPoolThread *> allThreads;
|
||||
QQueue<QThreadPoolThread *> waitingThreads;
|
||||
QQueue<QThreadPoolThread *> expiredThreads;
|
||||
QVector<QPair<QRunnable *, int> > queue;
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ QT_BEGIN_NAMESPACE
|
|||
In Qt, Unicode characters are 16-bit entities without any markup
|
||||
or structure. This class represents such an entity. It is
|
||||
lightweight, so it can be used everywhere. Most compilers treat
|
||||
it like a \c{unsigned short}.
|
||||
it like an \c{unsigned short}.
|
||||
|
||||
QChar provides a full complement of testing/classification
|
||||
functions, converting to and from other formats, converting from
|
||||
|
|
|
|||
|
|
@ -145,7 +145,7 @@ QCollatorSortKey QCollator::sortKey(const QString &string) const
|
|||
string.size(), (uint8_t *)result.data(), result.size());
|
||||
}
|
||||
result.truncate(size);
|
||||
return QCollatorSortKey(new QCollatorSortKeyPrivate(result));
|
||||
return QCollatorSortKey(new QCollatorSortKeyPrivate(std::move(result)));
|
||||
}
|
||||
|
||||
return QCollatorSortKey(new QCollatorSortKeyPrivate(QByteArray()));
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ QCollatorSortKey QCollator::sortKey(const QString &string) const
|
|||
ret.size(), &actualSize, ret.data());
|
||||
}
|
||||
ret[actualSize] = 0;
|
||||
return QCollatorSortKey(new QCollatorSortKeyPrivate(ret));
|
||||
return QCollatorSortKey(new QCollatorSortKeyPrivate(std::move(ret)));
|
||||
}
|
||||
|
||||
int QCollatorSortKey::compare(const QCollatorSortKey &key) const
|
||||
|
|
|
|||
|
|
@ -131,9 +131,10 @@ class QCollatorSortKeyPrivate : public QSharedData
|
|||
{
|
||||
friend class QCollator;
|
||||
public:
|
||||
QCollatorSortKeyPrivate(const CollatorKeyType &key)
|
||||
template <typename...T>
|
||||
explicit QCollatorSortKeyPrivate(T &&...args)
|
||||
: QSharedData()
|
||||
, m_key(key)
|
||||
, m_key(std::forward<T>(args)...)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ QCollatorSortKey QCollator::sortKey(const QString &string) const
|
|||
}
|
||||
result.resize(size+1);
|
||||
result[size] = 0;
|
||||
return QCollatorSortKey(new QCollatorSortKeyPrivate(result));
|
||||
return QCollatorSortKey(new QCollatorSortKeyPrivate(std::move(result)));
|
||||
}
|
||||
|
||||
int QCollatorSortKey::compare(const QCollatorSortKey &otherKey) const
|
||||
|
|
|
|||
|
|
@ -147,7 +147,7 @@ QCollatorSortKey QCollator::sortKey(const QString &string) const
|
|||
if (finalSize == 0) {
|
||||
qWarning() << "there were problems when generating the ::sortKey by LCMapStringW with error:" << GetLastError();
|
||||
}
|
||||
return QCollatorSortKey(new QCollatorSortKeyPrivate(ret));
|
||||
return QCollatorSortKey(new QCollatorSortKeyPrivate(std::move(ret)));
|
||||
}
|
||||
|
||||
int QCollatorSortKey::compare(const QCollatorSortKey &otherKey) const
|
||||
|
|
|
|||
|
|
@ -230,12 +230,39 @@
|
|||
// SSE4.2 intrinsics
|
||||
#if defined(__SSE4_2__) || (defined(QT_COMPILER_SUPPORTS_SSE4_2) && defined(QT_COMPILER_SUPPORTS_SIMD_ALWAYS))
|
||||
#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
|
||||
|
||||
// AVX intrinsics
|
||||
#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
|
||||
#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
|
||||
|
||||
#define QT_FUNCTION_TARGET_STRING_SSE2 "sse2"
|
||||
|
|
@ -255,7 +282,10 @@
|
|||
#define QT_FUNCTION_TARGET_STRING_AVX512IFMA "avx512ifma"
|
||||
#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_BMI "bmi"
|
||||
#define QT_FUNCTION_TARGET_STRING_BMI2 "bmi2"
|
||||
|
|
|
|||
|
|
@ -4635,6 +4635,8 @@ QByteArray QString::toLatin1_helper_inplace(QString &s)
|
|||
|
||||
QByteArray QString::toLocal8Bit_helper(const QChar *data, int size)
|
||||
{
|
||||
if (!data)
|
||||
return QByteArray();
|
||||
#ifndef QT_NO_TEXTCODEC
|
||||
QTextCodec *localeCodec = QTextCodec::codecForLocale();
|
||||
if (localeCodec)
|
||||
|
|
@ -10394,6 +10396,8 @@ static inline bool qt_ends_with(const QChar *haystack, int haystackLen,
|
|||
*/
|
||||
QByteArray QStringRef::toLatin1() const
|
||||
{
|
||||
if (isNull())
|
||||
return QByteArray();
|
||||
return QString::toLatin1_helper(unicode(), length());
|
||||
}
|
||||
|
||||
|
|
@ -10432,9 +10436,11 @@ QByteArray QStringRef::toLatin1() const
|
|||
QByteArray QStringRef::toLocal8Bit() const
|
||||
{
|
||||
#ifndef QT_NO_TEXTCODEC
|
||||
QTextCodec *localeCodec = QTextCodec::codecForLocale();
|
||||
if (localeCodec)
|
||||
return localeCodec->fromUnicode(unicode(), length());
|
||||
if (!isNull()) {
|
||||
QTextCodec *localeCodec = QTextCodec::codecForLocale();
|
||||
if (localeCodec)
|
||||
return localeCodec->fromUnicode(unicode(), length());
|
||||
}
|
||||
#endif // QT_NO_TEXTCODEC
|
||||
return toLatin1();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -147,15 +147,10 @@ typedef QLatin1String QLatin1Literal;
|
|||
|
||||
typedef QTypedArrayData<ushort> QStringData;
|
||||
|
||||
#if defined(Q_COMPILER_UNICODE_STRINGS)
|
||||
|
||||
#define QT_UNICODE_LITERAL_II(str) u"" str
|
||||
typedef char16_t qunicodechar;
|
||||
|
||||
#elif defined(Q_OS_WIN) \
|
||||
|| (defined(__SIZEOF_WCHAR_T__) && __SIZEOF_WCHAR_T__ == 2) \
|
||||
|| (!defined(__SIZEOF_WCHAR_T__) && defined(WCHAR_MAX) && (WCHAR_MAX - 0 < 65536))
|
||||
// wchar_t is 2 bytes
|
||||
#if defined(Q_OS_WIN) && !defined(Q_COMPILER_UNICODE_STRINGS)
|
||||
// fall back to wchar_t if the a Windows compiler does not
|
||||
// support Unicode string literals, assuming wchar_t is 2 bytes
|
||||
// on that platform (sanity-checked by static_assert further below)
|
||||
|
||||
#if defined(Q_CC_MSVC)
|
||||
# define QT_UNICODE_LITERAL_II(str) L##str
|
||||
|
|
@ -165,21 +160,22 @@ typedef char16_t qunicodechar;
|
|||
typedef wchar_t qunicodechar;
|
||||
|
||||
#else
|
||||
// all our supported compilers support Unicode string literals,
|
||||
// even if their Q_COMPILER_UNICODE_STRING has been revoked due
|
||||
// to lacking stdlib support. But QStringLiteral only needs the
|
||||
// core language feature, so just use u"" here unconditionally:
|
||||
|
||||
#define QT_NO_UNICODE_LITERAL
|
||||
typedef ushort qunicodechar;
|
||||
#define QT_UNICODE_LITERAL_II(str) u"" str
|
||||
typedef char16_t qunicodechar;
|
||||
|
||||
#endif
|
||||
|
||||
Q_STATIC_ASSERT_X(sizeof(qunicodechar) == 2,
|
||||
"qunicodechar must typedef an integral type of size 2");
|
||||
|
||||
#ifndef QT_NO_UNICODE_LITERAL
|
||||
# define QT_UNICODE_LITERAL(str) QT_UNICODE_LITERAL_II(str)
|
||||
# if defined(Q_COMPILER_LAMBDA)
|
||||
|
||||
# define QStringLiteral(str) \
|
||||
([]() -> QString { \
|
||||
#define QT_UNICODE_LITERAL(str) QT_UNICODE_LITERAL_II(str)
|
||||
#define QStringLiteral(str) \
|
||||
([]() Q_DECL_NOEXCEPT -> QString { \
|
||||
enum { Size = sizeof(QT_UNICODE_LITERAL(str))/2 - 1 }; \
|
||||
static const QStaticStringData<Size> qstring_literal = { \
|
||||
Q_STATIC_STRING_DATA_HEADER_INITIALIZER(Size), \
|
||||
|
|
@ -190,17 +186,6 @@ Q_STATIC_ASSERT_X(sizeof(qunicodechar) == 2,
|
|||
}()) \
|
||||
/**/
|
||||
|
||||
# endif
|
||||
#endif // QT_NO_UNICODE_LITERAL
|
||||
|
||||
#ifndef QStringLiteral
|
||||
// no lambdas, not GCC, or GCC in C++98 mode with 4-byte wchar_t
|
||||
// fallback, return a temporary QString
|
||||
// source code is assumed to be encoded in UTF-8
|
||||
|
||||
# define QStringLiteral(str) QString::fromUtf8("" str "", sizeof(str) - 1)
|
||||
#endif
|
||||
|
||||
#define Q_STATIC_STRING_DATA_HEADER_INITIALIZER_WITH_OFFSET(size, offset) \
|
||||
{ Q_REFCOUNT_INITIALIZE_STATIC, size, 0, 0, offset } \
|
||||
/**/
|
||||
|
|
@ -535,9 +520,9 @@ public:
|
|||
QByteArray toUtf8() && Q_REQUIRED_RESULT
|
||||
{ return toUtf8_helper(*this); }
|
||||
QByteArray toLocal8Bit() const & Q_REQUIRED_RESULT
|
||||
{ return toLocal8Bit_helper(constData(), size()); }
|
||||
{ return toLocal8Bit_helper(isNull() ? nullptr : constData(), size()); }
|
||||
QByteArray toLocal8Bit() && Q_REQUIRED_RESULT
|
||||
{ return toLocal8Bit_helper(constData(), size()); }
|
||||
{ return toLocal8Bit_helper(isNull() ? nullptr : constData(), size()); }
|
||||
#else
|
||||
QByteArray toLatin1() const Q_REQUIRED_RESULT;
|
||||
QByteArray toUtf8() const Q_REQUIRED_RESULT;
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ QByteArray QString::toLatin1() const
|
|||
|
||||
QByteArray QString::toLocal8Bit() const
|
||||
{
|
||||
return toLocal8Bit_helper(constData(), size());
|
||||
return toLocal8Bit_helper(isNull() ? nullptr : constData(), size());
|
||||
}
|
||||
|
||||
QByteArray QString::toUtf8() const
|
||||
|
|
|
|||
|
|
@ -110,7 +110,6 @@ SOURCES += \
|
|||
tools/qtextboundaryfinder.cpp \
|
||||
tools/qtimeline.cpp \
|
||||
tools/qunicodetools.cpp \
|
||||
tools/qvector.cpp \
|
||||
tools/qvsnprintf.cpp \
|
||||
tools/qversionnumber.cpp
|
||||
|
||||
|
|
|
|||
|
|
@ -520,7 +520,7 @@
|
|||
},
|
||||
"libinput-axis-api": {
|
||||
"label": "axis API in libinput",
|
||||
"condition": "tests.libinput_axis_api",
|
||||
"condition": "features.libinput && tests.libinput_axis_api",
|
||||
"output": [ "privateFeature" ]
|
||||
},
|
||||
"lgmon": {
|
||||
|
|
@ -614,8 +614,7 @@
|
|||
"eglfs": {
|
||||
"label": "EGLFS",
|
||||
"section": "Platform plugins",
|
||||
"autoDetect": "!config.android && !config.win32",
|
||||
"condition": "features.egl",
|
||||
"condition": "!config.android && !config.darwin && !config.win32 && features.egl",
|
||||
"output": [ "privateFeature" ]
|
||||
},
|
||||
"eglfs_brcm": {
|
||||
|
|
|
|||
|
|
@ -60,14 +60,13 @@ void MyHighlighter::highlightBlock(const QString &text)
|
|||
QTextCharFormat myClassFormat;
|
||||
myClassFormat.setFontWeight(QFont::Bold);
|
||||
myClassFormat.setForeground(Qt::darkMagenta);
|
||||
QString pattern = "\\bMy[A-Za-z]+\\b";
|
||||
|
||||
QRegExp expression(pattern);
|
||||
int index = text.indexOf(expression);
|
||||
while (index >= 0) {
|
||||
int length = expression.matchedLength();
|
||||
setFormat(index, length, myClassFormat);
|
||||
index = text.indexOf(expression, index + length);
|
||||
QRegularExpression expression("\\bMy[A-Za-z]+\\b");
|
||||
QRegularExpressionMatchIterator i = expression.globalMatch(text);
|
||||
while (i.hasNext())
|
||||
{
|
||||
QRegularExpressionMatch match = i.next();
|
||||
setFormat(match.capturedStart(), match.capturedLength(), myClassFormat);
|
||||
}
|
||||
}
|
||||
//! [1]
|
||||
|
|
@ -77,8 +76,8 @@ void MyHighlighter::highlightBlock(const QString &text)
|
|||
QTextCharFormat multiLineCommentFormat;
|
||||
multiLineCommentFormat.setForeground(Qt::red);
|
||||
|
||||
QRegExp startExpression("/\\*");
|
||||
QRegExp endExpression("\\*/");
|
||||
QRegularExpression startExpression("/\\*");
|
||||
QRegularExpression endExpression("\\*/");
|
||||
|
||||
setCurrentBlockState(0);
|
||||
|
||||
|
|
@ -87,14 +86,15 @@ if (previousBlockState() != 1)
|
|||
startIndex = text.indexOf(startExpression);
|
||||
|
||||
while (startIndex >= 0) {
|
||||
int endIndex = text.indexOf(endExpression, startIndex);
|
||||
QRegularExpressionMatch endMatch;
|
||||
int endIndex = text.indexOf(endExpression, startIndex, &endMatch);
|
||||
int commentLength;
|
||||
if (endIndex == -1) {
|
||||
setCurrentBlockState(1);
|
||||
commentLength = text.length() - startIndex;
|
||||
} else {
|
||||
commentLength = endIndex - startIndex
|
||||
+ endExpression.matchedLength();
|
||||
+ endMatch.capturedLength();
|
||||
}
|
||||
setFormat(startIndex, commentLength, multiLineCommentFormat);
|
||||
startIndex = text.indexOf(startExpression,
|
||||
|
|
@ -104,25 +104,6 @@ while (startIndex >= 0) {
|
|||
|
||||
|
||||
//! [3]
|
||||
void MyHighlighter::highlightBlock(const QString &text)
|
||||
{
|
||||
QTextCharFormat myClassFormat;
|
||||
myClassFormat.setFontWeight(QFont::Bold);
|
||||
myClassFormat.setForeground(Qt::darkMagenta);
|
||||
QString pattern = "\\bMy[A-Za-z]+\\b";
|
||||
|
||||
QRegExp expression(pattern);
|
||||
int index = text.indexOf(expression);
|
||||
while (index >= 0) {
|
||||
int length = expression.matchedLength();
|
||||
setFormat(index, length, myClassFormat);
|
||||
index = text.indexOf(expression, index + length);
|
||||
}
|
||||
}
|
||||
//! [3]
|
||||
|
||||
|
||||
//! [4]
|
||||
struct ParenthesisInfo
|
||||
{
|
||||
QChar char;
|
||||
|
|
@ -133,4 +114,4 @@ struct BlockData : public QTextBlockUserData
|
|||
{
|
||||
QVector<ParenthesisInfo> parentheses;
|
||||
};
|
||||
//! [4]
|
||||
//! [3]
|
||||
|
|
|
|||
|
|
@ -97,7 +97,11 @@ QT_BEGIN_NAMESPACE
|
|||
\value On Display the pixmap when the widget is in an "on" state
|
||||
*/
|
||||
|
||||
static QBasicAtomicInt serialNumCounter = Q_BASIC_ATOMIC_INITIALIZER(1);
|
||||
static int nextSerialNumCounter()
|
||||
{
|
||||
static QBasicAtomicInt serial = Q_BASIC_ATOMIC_INITIALIZER(0);
|
||||
return 1 + serial.fetchAndAddRelaxed(1);
|
||||
}
|
||||
|
||||
static void qt_cleanup_icon_cache();
|
||||
namespace {
|
||||
|
|
@ -139,7 +143,7 @@ static qreal qt_effective_device_pixel_ratio(QWindow *window = 0)
|
|||
|
||||
QIconPrivate::QIconPrivate(QIconEngine *e)
|
||||
: engine(e), ref(1),
|
||||
serialNum(serialNumCounter.fetchAndAddRelaxed(1)),
|
||||
serialNum(nextSerialNumCounter()),
|
||||
detach_no(0),
|
||||
is_mask(false)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -89,12 +89,16 @@ static QImage rotated90(const QImage &src);
|
|||
static QImage rotated180(const QImage &src);
|
||||
static QImage rotated270(const QImage &src);
|
||||
|
||||
QBasicAtomicInt qimage_serial_number = Q_BASIC_ATOMIC_INITIALIZER(1);
|
||||
static int next_qimage_serial_number()
|
||||
{
|
||||
static QBasicAtomicInt serial = Q_BASIC_ATOMIC_INITIALIZER(0);
|
||||
return 1 + serial.fetchAndAddRelaxed(1);
|
||||
}
|
||||
|
||||
QImageData::QImageData()
|
||||
: ref(0), width(0), height(0), depth(0), nbytes(0), devicePixelRatio(1.0), data(0),
|
||||
format(QImage::Format_ARGB32), bytes_per_line(0),
|
||||
ser_no(qimage_serial_number.fetchAndAddRelaxed(1)),
|
||||
ser_no(next_qimage_serial_number()),
|
||||
detach_no(0),
|
||||
dpmx(qt_defaultDpiX() * 100 / qreal(2.54)),
|
||||
dpmy(qt_defaultDpiY() * 100 / qreal(2.54)),
|
||||
|
|
|
|||
|
|
@ -46,6 +46,22 @@
|
|||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
struct QDefaultColorTables
|
||||
{
|
||||
QDefaultColorTables()
|
||||
: gray(256), alpha(256)
|
||||
{
|
||||
for (int i = 0; i < 256; ++i) {
|
||||
gray[i] = qRgb(i, i, i);
|
||||
alpha[i] = qRgba(0, 0, 0, i);
|
||||
}
|
||||
}
|
||||
|
||||
QVector<QRgb> gray, alpha;
|
||||
};
|
||||
|
||||
Q_GLOBAL_STATIC(QDefaultColorTables, defaultColorTables);
|
||||
|
||||
// table to flip bits
|
||||
static const uchar bitflip[256] = {
|
||||
/*
|
||||
|
|
@ -1952,11 +1968,7 @@ static void convert_Alpha8_to_Indexed8(QImageData *dest, const QImageData *src,
|
|||
|
||||
memcpy(dest->data, src->data, src->bytes_per_line * src->height);
|
||||
|
||||
QVector<QRgb> colors(256);
|
||||
for (int i=0; i<256; ++i)
|
||||
colors[i] = qRgba(0, 0, 0, i);
|
||||
|
||||
dest->colortable = colors;
|
||||
dest->colortable = defaultColorTables->alpha;
|
||||
}
|
||||
|
||||
static void convert_Grayscale8_to_Indexed8(QImageData *dest, const QImageData *src, Qt::ImageConversionFlags)
|
||||
|
|
@ -1966,22 +1978,15 @@ static void convert_Grayscale8_to_Indexed8(QImageData *dest, const QImageData *s
|
|||
|
||||
memcpy(dest->data, src->data, src->bytes_per_line * src->height);
|
||||
|
||||
QVector<QRgb> colors(256);
|
||||
for (int i=0; i<256; ++i)
|
||||
colors[i] = qRgb(i, i, i);
|
||||
|
||||
dest->colortable = colors;
|
||||
dest->colortable = defaultColorTables->gray;
|
||||
}
|
||||
|
||||
static bool convert_Alpha8_to_Indexed8_inplace(QImageData *data, Qt::ImageConversionFlags)
|
||||
{
|
||||
Q_ASSERT(data->format == QImage::Format_Alpha8);
|
||||
|
||||
QVector<QRgb> colors(256);
|
||||
for (int i=0; i<256; ++i)
|
||||
colors[i] = qRgba(0, 0, 0, i);
|
||||
|
||||
data->colortable = colors;
|
||||
data->colortable = defaultColorTables->alpha;
|
||||
data->format = QImage::Format_Indexed8;
|
||||
|
||||
return true;
|
||||
|
|
@ -1991,11 +1996,7 @@ static bool convert_Grayscale8_to_Indexed8_inplace(QImageData *data, Qt::ImageCo
|
|||
{
|
||||
Q_ASSERT(data->format == QImage::Format_Grayscale8);
|
||||
|
||||
QVector<QRgb> colors(256);
|
||||
for (int i=0; i<256; ++i)
|
||||
colors[i] = qRgb(i, i, i);
|
||||
|
||||
data->colortable = colors;
|
||||
data->colortable = defaultColorTables->gray;
|
||||
data->format = QImage::Format_Indexed8;
|
||||
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -2162,7 +2162,7 @@ void QGuiApplicationPrivate::processActivatedEvent(QWindowSystemInterfacePrivate
|
|||
void QGuiApplicationPrivate::processWindowStateChangedEvent(QWindowSystemInterfacePrivate::WindowStateChangedEvent *wse)
|
||||
{
|
||||
if (QWindow *window = wse->window.data()) {
|
||||
QWindowStateChangeEvent e(window->windowState());
|
||||
QWindowStateChangeEvent e(wse->oldState);
|
||||
window->d_func()->windowState = wse->newState;
|
||||
QGuiApplication::sendSpontaneousEvent(window, &e);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -561,7 +561,8 @@ bool QPlatformWindow::isAlertState() const
|
|||
// Return the effective screen for the initial geometry of a window. In a
|
||||
// multimonitor-setup, try to find the right screen by checking the transient
|
||||
// parent or the mouse cursor for parentless windows (cf QTBUG-34204,
|
||||
// QDialog::adjustPosition()).
|
||||
// QDialog::adjustPosition()), unless a non-primary screen has been set,
|
||||
// in which case we try to respect that.
|
||||
static inline const QScreen *effectiveScreen(const QWindow *window)
|
||||
{
|
||||
if (!window)
|
||||
|
|
@ -569,6 +570,8 @@ static inline const QScreen *effectiveScreen(const QWindow *window)
|
|||
const QScreen *screen = window->screen();
|
||||
if (!screen)
|
||||
return QGuiApplication::primaryScreen();
|
||||
if (screen != QGuiApplication::primaryScreen())
|
||||
return screen;
|
||||
#ifndef QT_NO_CURSOR
|
||||
const QList<QScreen *> siblings = screen->virtualSiblings();
|
||||
if (siblings.size() > 1) {
|
||||
|
|
|
|||
|
|
@ -155,8 +155,17 @@ QWindow::QWindow(QScreen *targetScreen)
|
|||
, QSurface(QSurface::Window)
|
||||
{
|
||||
Q_D(QWindow);
|
||||
d->connectToScreen(targetScreen ? targetScreen : QGuiApplication::primaryScreen());
|
||||
d->init();
|
||||
d->init(targetScreen);
|
||||
}
|
||||
|
||||
static QWindow *nonDesktopParent(QWindow *parent)
|
||||
{
|
||||
if (parent && parent->type() == Qt::Desktop) {
|
||||
qWarning("QWindows can not be reparented into desktop windows");
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return parent;
|
||||
}
|
||||
|
||||
/*!
|
||||
|
|
@ -170,14 +179,8 @@ QWindow::QWindow(QScreen *targetScreen)
|
|||
\sa setParent()
|
||||
*/
|
||||
QWindow::QWindow(QWindow *parent)
|
||||
: QObject(*new QWindowPrivate(), parent)
|
||||
, QSurface(QSurface::Window)
|
||||
: QWindow(*new QWindowPrivate(), parent)
|
||||
{
|
||||
Q_D(QWindow);
|
||||
d->parentWindow = parent;
|
||||
if (!parent)
|
||||
d->connectToScreen(QGuiApplication::primaryScreen());
|
||||
d->init();
|
||||
}
|
||||
|
||||
/*!
|
||||
|
|
@ -193,13 +196,10 @@ QWindow::QWindow(QWindow *parent)
|
|||
\sa setParent()
|
||||
*/
|
||||
QWindow::QWindow(QWindowPrivate &dd, QWindow *parent)
|
||||
: QObject(dd, parent)
|
||||
: QObject(dd, nonDesktopParent(parent))
|
||||
, QSurface(QSurface::Window)
|
||||
{
|
||||
Q_D(QWindow);
|
||||
d->parentWindow = parent;
|
||||
if (!parent)
|
||||
d->connectToScreen(QGuiApplication::primaryScreen());
|
||||
d->init();
|
||||
}
|
||||
|
||||
|
|
@ -215,10 +215,15 @@ QWindow::~QWindow()
|
|||
QGuiApplicationPrivate::instance()->modalWindowList.removeOne(this);
|
||||
}
|
||||
|
||||
void QWindowPrivate::init()
|
||||
void QWindowPrivate::init(QScreen *targetScreen)
|
||||
{
|
||||
Q_Q(QWindow);
|
||||
|
||||
parentWindow = static_cast<QWindow *>(q->QObject::parent());
|
||||
|
||||
if (!parentWindow)
|
||||
connectToScreen(targetScreen ? targetScreen : QGuiApplication::primaryScreen());
|
||||
|
||||
// If your application aborts here, you are probably creating a QWindow
|
||||
// before the screen list is populated.
|
||||
if (Q_UNLIKELY(!parentWindow && !topLevelScreen)) {
|
||||
|
|
@ -532,7 +537,9 @@ void QWindow::setVisible(bool visible)
|
|||
// can defer creation until the parent is created or we're re-parented.
|
||||
if (parent() && !parent()->handle())
|
||||
return;
|
||||
else
|
||||
|
||||
// We only need to create the window if it's being shown
|
||||
if (visible)
|
||||
create();
|
||||
}
|
||||
|
||||
|
|
@ -574,7 +581,8 @@ void QWindow::setVisible(bool visible)
|
|||
d->applyCursor();
|
||||
#endif
|
||||
|
||||
d->platformWindow->setVisible(visible);
|
||||
if (d->platformWindow)
|
||||
d->platformWindow->setVisible(visible);
|
||||
|
||||
if (!visible) {
|
||||
QHideEvent hideEvent;
|
||||
|
|
@ -668,6 +676,8 @@ QWindow *QWindow::parent() const
|
|||
*/
|
||||
void QWindow::setParent(QWindow *parent)
|
||||
{
|
||||
parent = nonDesktopParent(parent);
|
||||
|
||||
Q_D(QWindow);
|
||||
if (d->parentWindow == parent)
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
void init();
|
||||
void init(QScreen *targetScreen = nullptr);
|
||||
|
||||
void maybeQuitOnLastWindowClosed();
|
||||
#ifndef QT_NO_CURSOR
|
||||
|
|
|
|||
|
|
@ -241,11 +241,15 @@ QT_DEFINE_QPA_EVENT_HANDLER(void, handleWindowActivated, QWindow *window, Qt::Fo
|
|||
QWindowSystemInterfacePrivate::handleWindowSystemEvent<Delivery>(e);
|
||||
}
|
||||
|
||||
void QWindowSystemInterface::handleWindowStateChanged(QWindow *window, Qt::WindowState newState)
|
||||
QT_DEFINE_QPA_EVENT_HANDLER(void, handleWindowStateChanged, QWindow *window, Qt::WindowState newState, int oldState)
|
||||
{
|
||||
Q_ASSERT(window);
|
||||
if (oldState < Qt::WindowNoState)
|
||||
oldState = window->windowState();
|
||||
|
||||
QWindowSystemInterfacePrivate::WindowStateChangedEvent *e =
|
||||
new QWindowSystemInterfacePrivate::WindowStateChangedEvent(window, newState);
|
||||
QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);
|
||||
new QWindowSystemInterfacePrivate::WindowStateChangedEvent(window, newState, Qt::WindowState(oldState));
|
||||
QWindowSystemInterfacePrivate::handleWindowSystemEvent<Delivery>(e);
|
||||
}
|
||||
|
||||
void QWindowSystemInterface::handleWindowScreenChanged(QWindow *window, QScreen *screen)
|
||||
|
|
|
|||
|
|
@ -175,7 +175,8 @@ public:
|
|||
template<typename Delivery = QWindowSystemInterface::DefaultDelivery>
|
||||
static void handleWindowActivated(QWindow *window, Qt::FocusReason r = Qt::OtherFocusReason);
|
||||
|
||||
static void handleWindowStateChanged(QWindow *window, Qt::WindowState newState);
|
||||
template<typename Delivery = QWindowSystemInterface::DefaultDelivery>
|
||||
static void handleWindowStateChanged(QWindow *window, Qt::WindowState newState, int oldState = -1);
|
||||
static void handleWindowScreenChanged(QWindow *window, QScreen *newScreen);
|
||||
|
||||
static void handleApplicationStateChanged(Qt::ApplicationState newState, bool forcePropagate = false);
|
||||
|
|
|
|||
|
|
@ -168,12 +168,13 @@ public:
|
|||
|
||||
class WindowStateChangedEvent : public WindowSystemEvent {
|
||||
public:
|
||||
WindowStateChangedEvent(QWindow *_window, Qt::WindowState _newState)
|
||||
: WindowSystemEvent(WindowStateChanged), window(_window), newState(_newState)
|
||||
WindowStateChangedEvent(QWindow *_window, Qt::WindowState _newState, Qt::WindowState _oldState)
|
||||
: WindowSystemEvent(WindowStateChanged), window(_window), newState(_newState), oldState(_oldState)
|
||||
{ }
|
||||
|
||||
QPointer<QWindow> window;
|
||||
Qt::WindowState newState;
|
||||
Qt::WindowState oldState;
|
||||
};
|
||||
|
||||
class WindowScreenChangedEvent : public WindowSystemEvent {
|
||||
|
|
|
|||
|
|
@ -83,17 +83,16 @@ typedef void* GLeglImageOES;
|
|||
|
||||
# else // "uncontrolled" ES2 platforms
|
||||
|
||||
// In "es2" builds (QT_OPENGL_ES_2) additional defines indicate if ES
|
||||
// 3.0 or higher is available. In this case include the corresponding
|
||||
// header. These are backwards compatible and it should be safe to
|
||||
// include headers on top of each other, meaning that applications can
|
||||
// include gl2.h even if gl31.h gets included here.
|
||||
// In "es2" builds (QT_OPENGL_ES_2) additional defines indicate GLES 3.0 or
|
||||
// higher is available *at build time*. In this case include the corresponding
|
||||
// header. These are backwards compatible and it should be safe to include
|
||||
// headers on top of each other, meaning that applications can include gl2.h
|
||||
// even if gl31.h gets included here.
|
||||
|
||||
// NB! This file contains the only usages of the ES_3 and ES_3_1
|
||||
// macros. They are useless for pretty much anything else. The fact
|
||||
// that Qt was built against an SDK with f.ex. ES 2 only does not mean
|
||||
// applications cannot target ES 3. Therefore QOpenGLFunctions and
|
||||
// friends do everything dynamically and never rely on these macros.
|
||||
// NB! The fact that Qt was built against an SDK with GLES 2 only does not mean
|
||||
// applications cannot be deployed on a GLES 3 system. Therefore
|
||||
// QOpenGLFunctions and friends must do everything dynamically and must not rely
|
||||
// on these macros, except in special cases for controlled build/run environments.
|
||||
|
||||
// Some Khronos headers use the ext proto guard in the standard headers as well,
|
||||
// which is bad. Work it around, but avoid spilling over to the ext header.
|
||||
|
|
|
|||
|
|
@ -215,10 +215,12 @@ Q_LOGGING_CATEGORY(DBG_SHADER_CACHE, "qt.opengl.diskcache")
|
|||
#define GL_NUM_PROGRAM_BINARY_FORMATS 0x87FE
|
||||
#endif
|
||||
|
||||
#ifndef QT_OPENGL_ES_2
|
||||
static inline bool isFormatGLES(const QSurfaceFormat &f)
|
||||
{
|
||||
return (f.renderableType() == QSurfaceFormat::OpenGLES);
|
||||
}
|
||||
#endif
|
||||
|
||||
static inline bool supportsGeometry(const QSurfaceFormat &f)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -47,7 +47,11 @@
|
|||
QT_BEGIN_NAMESPACE
|
||||
|
||||
|
||||
QBasicAtomicInt qopengltextureglyphcache_serial_number = Q_BASIC_ATOMIC_INITIALIZER(1);
|
||||
static int next_qopengltextureglyphcache_serial_number()
|
||||
{
|
||||
static QBasicAtomicInt serial = Q_BASIC_ATOMIC_INITIALIZER(0);
|
||||
return 1 + serial.fetchAndAddRelaxed(1);
|
||||
}
|
||||
|
||||
QOpenGLTextureGlyphCache::QOpenGLTextureGlyphCache(QFontEngine::GlyphFormat format, const QTransform &matrix)
|
||||
: QImageTextureGlyphCache(format, matrix)
|
||||
|
|
@ -55,7 +59,7 @@ QOpenGLTextureGlyphCache::QOpenGLTextureGlyphCache(QFontEngine::GlyphFormat form
|
|||
, pex(0)
|
||||
, m_blitProgram(0)
|
||||
, m_filterMode(Nearest)
|
||||
, m_serialNumber(qopengltextureglyphcache_serial_number.fetchAndAddRelaxed(1))
|
||||
, m_serialNumber(next_qopengltextureglyphcache_serial_number())
|
||||
, m_buffer(QOpenGLBuffer::VertexBuffer)
|
||||
{
|
||||
#ifdef QT_GL_TEXTURE_GLYPH_CACHE_DEBUG
|
||||
|
|
|
|||
|
|
@ -1144,6 +1144,11 @@ static QRgba64 *QT_FASTCALL destFetch64uint32(QRgba64 *buffer, QRasterBuffer *ra
|
|||
return const_cast<QRgba64 *>(layout->convertToARGB64PM(buffer, src, length, 0, 0));
|
||||
}
|
||||
|
||||
static QRgba64 * QT_FASTCALL destFetch64Undefined(QRgba64 *buffer, QRasterBuffer *, int, int, int)
|
||||
{
|
||||
return buffer;
|
||||
}
|
||||
|
||||
static DestFetchProc destFetchProc[QImage::NImageFormats] =
|
||||
{
|
||||
0, // Format_Invalid
|
||||
|
|
@ -1176,8 +1181,8 @@ static DestFetchProc destFetchProc[QImage::NImageFormats] =
|
|||
static DestFetchProc64 destFetchProc64[QImage::NImageFormats] =
|
||||
{
|
||||
0, // Format_Invalid
|
||||
destFetch64, // Format_Mono,
|
||||
destFetch64, // Format_MonoLSB
|
||||
0, // Format_Mono,
|
||||
0, // Format_MonoLSB
|
||||
0, // Format_Indexed8
|
||||
destFetch64uint32, // Format_RGB32
|
||||
destFetch64uint32, // Format_ARGB32,
|
||||
|
|
@ -3737,27 +3742,23 @@ static inline Operator getOperator(const QSpanData *data, const QSpan *spans, in
|
|||
|
||||
op.destFetch = destFetchProc[data->rasterBuffer->format];
|
||||
op.destFetch64 = destFetchProc64[data->rasterBuffer->format];
|
||||
if (op.mode == QPainter::CompositionMode_Source) {
|
||||
switch (data->rasterBuffer->format) {
|
||||
case QImage::Format_RGB32:
|
||||
case QImage::Format_ARGB32_Premultiplied:
|
||||
// don't clear destFetch as it sets up the pointer correctly to save one copy
|
||||
break;
|
||||
default: {
|
||||
if (data->type == QSpanData::Texture && data->texture.const_alpha != 256)
|
||||
if (op.mode == QPainter::CompositionMode_Source &&
|
||||
(data->type != QSpanData::Texture || data->texture.const_alpha == 256)) {
|
||||
const QSpan *lastSpan = spans + spanCount;
|
||||
bool alphaSpans = false;
|
||||
while (spans < lastSpan) {
|
||||
if (spans->coverage != 255) {
|
||||
alphaSpans = true;
|
||||
break;
|
||||
const QSpan *lastSpan = spans + spanCount;
|
||||
bool alphaSpans = false;
|
||||
while (spans < lastSpan) {
|
||||
if (spans->coverage != 255) {
|
||||
alphaSpans = true;
|
||||
break;
|
||||
}
|
||||
++spans;
|
||||
}
|
||||
if (!alphaSpans)
|
||||
op.destFetch = 0;
|
||||
++spans;
|
||||
}
|
||||
if (!alphaSpans) {
|
||||
// If all spans are opaque we do not need to fetch dest.
|
||||
// But don't clear passthrough destFetch as they are just as fast and save destStore.
|
||||
if (op.destFetch != destFetchARGB32P)
|
||||
op.destFetch = 0;
|
||||
op.destFetch64 = destFetch64Undefined;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -256,11 +256,12 @@ Q_ALWAYS_INLINE uint16x4_t addWithSaturation(uint16x4_t a, uint16x4_t b)
|
|||
inline QRgba64 rgbBlend(QRgba64 d, QRgba64 s, uint rgbAlpha)
|
||||
{
|
||||
QRgba64 blend;
|
||||
#ifdef __SSE2__
|
||||
#if defined(__SSE2__)
|
||||
__m128i vd = _mm_loadl_epi64((const __m128i *)&d);
|
||||
__m128i vs = _mm_loadl_epi64((const __m128i *)&s);
|
||||
__m128i va = _mm_cvtsi32_si128(rgbAlpha);
|
||||
va = _mm_unpacklo_epi8(va, va);
|
||||
va = _mm_shufflelo_epi16(va, _MM_SHUFFLE(3, 0, 1, 2));
|
||||
__m128i vb = _mm_xor_si128(_mm_set1_epi16(-1), va);
|
||||
|
||||
vs = _mm_unpacklo_epi16(_mm_mullo_epi16(vs, va), _mm_mulhi_epu16(vs, va));
|
||||
|
|
@ -275,7 +276,7 @@ inline QRgba64 rgbBlend(QRgba64 d, QRgba64 s, uint rgbAlpha)
|
|||
#elif defined(__ARM_NEON__)
|
||||
uint16x4_t vd = vreinterpret_u16_u64(vmov_n_u64(d));
|
||||
uint16x4_t vs = vreinterpret_u16_u64(vmov_n_u64(s));
|
||||
uint8x8_t va8 = vreinterpret_u8_u32(vmov_n_u32(rgbAlpha));
|
||||
uint8x8_t va8 = vreinterpret_u8_u32(vmov_n_u32(ARGB2RGBA(rgbAlpha)));
|
||||
uint16x4_t va = vreinterpret_u16_u8(vzip_u8(va8, va8).val[0]);
|
||||
uint16x4_t vb = vdup_n_u16(0xffff);
|
||||
vb = vsub_u16(vb, va);
|
||||
|
|
|
|||
|
|
@ -75,6 +75,10 @@ QT_END_NAMESPACE
|
|||
#if defined(Q_OS_INTEGRITY)
|
||||
# undef Value
|
||||
#endif
|
||||
// Hurd has #define TILDE 0x00080000 from <sys/ioctl.h>
|
||||
#if defined(TILDE)
|
||||
# undef TILDE
|
||||
#endif
|
||||
|
||||
#define QT_CSS_DECLARE_TYPEINFO(Class, Type) \
|
||||
} /* namespace QCss */ \
|
||||
|
|
|
|||
|
|
@ -243,6 +243,8 @@ void QSyntaxHighlighterPrivate::reformatBlock(const QTextBlock &block)
|
|||
|
||||
\snippet code/src_gui_text_qsyntaxhighlighter.cpp 1
|
||||
|
||||
\target QSyntaxHighlighter multiblock
|
||||
|
||||
Some syntaxes can have constructs that span several text
|
||||
blocks. For example, a C++ syntax highlighter should be able to
|
||||
cope with \c{/}\c{*...*}\c{/} multiline comments. To deal with
|
||||
|
|
@ -267,12 +269,12 @@ void QSyntaxHighlighterPrivate::reformatBlock(const QTextBlock &block)
|
|||
\snippet code/src_gui_text_qsyntaxhighlighter.cpp 2
|
||||
|
||||
In the example above, we first set the current block state to
|
||||
0. Then, if the previous block ended within a comment, we higlight
|
||||
0. Then, if the previous block ended within a comment, we highlight
|
||||
from the beginning of the current block (\c {startIndex =
|
||||
0}). Otherwise, we search for the given start expression. If the
|
||||
specified end expression cannot be found in the text block, we
|
||||
change the current block state by calling setCurrentBlockState(),
|
||||
and make sure that the rest of the block is higlighted.
|
||||
and make sure that the rest of the block is highlighted.
|
||||
|
||||
In addition you can query the current formatting and user data
|
||||
using the format() and currentBlockUserData() functions
|
||||
|
|
@ -411,33 +413,12 @@ void QSyntaxHighlighter::rehighlightBlock(const QTextBlock &block)
|
|||
setFormat() as often as necessary to apply any font and color
|
||||
changes that you require. For example:
|
||||
|
||||
\snippet code/src_gui_text_qsyntaxhighlighter.cpp 3
|
||||
\snippet code/src_gui_text_qsyntaxhighlighter.cpp 1
|
||||
|
||||
Some syntaxes can have constructs that span several text
|
||||
blocks. For example, a C++ syntax highlighter should be able to
|
||||
cope with \c{/}\c{*...*}\c{/} multiline comments. To deal with
|
||||
these cases it is necessary to know the end state of the previous
|
||||
text block (e.g. "in comment").
|
||||
|
||||
Inside your highlightBlock() implementation you can query the end
|
||||
state of the previous text block using the previousBlockState()
|
||||
function. After parsing the block you can save the last state
|
||||
using setCurrentBlockState().
|
||||
|
||||
The currentBlockState() and previousBlockState() functions return
|
||||
an int value. If no state is set, the returned value is -1. You
|
||||
can designate any other value to identify any given state using
|
||||
the setCurrentBlockState() function. Once the state is set the
|
||||
QTextBlock keeps that value until it is set set again or until the
|
||||
corresponding paragraph of text gets deleted.
|
||||
|
||||
For example, if you're writing a simple C++ syntax highlighter,
|
||||
you might designate 1 to signify "in comment". For a text block
|
||||
that ended in the middle of a comment you'd set 1 using
|
||||
setCurrentBlockState, and for other paragraphs you'd set 0.
|
||||
In your parsing code if the return value of previousBlockState()
|
||||
is 1, you would highlight the text as a C++ comment until you
|
||||
reached the closing \c{*}\c{/}.
|
||||
See the \l{QSyntaxHighlighter multiblock}{Detailed Description} for
|
||||
examples of using setCurrentBlockState(), currentBlockState()
|
||||
and previousBlockState() to handle syntaxes with constructs that
|
||||
span several text blocks
|
||||
|
||||
\sa previousBlockState(), setFormat(), setCurrentBlockState()
|
||||
*/
|
||||
|
|
@ -581,7 +562,7 @@ void QSyntaxHighlighter::setCurrentBlockState(int newState)
|
|||
and store their relative position and the actual QChar in a simple
|
||||
class derived from QTextBlockUserData:
|
||||
|
||||
\snippet code/src_gui_text_qsyntaxhighlighter.cpp 4
|
||||
\snippet code/src_gui_text_qsyntaxhighlighter.cpp 3
|
||||
|
||||
During cursor navigation in the associated editor, you can ask the
|
||||
current QTextBlock (retrieved using the QTextCursor::block()
|
||||
|
|
|
|||
|
|
@ -246,22 +246,25 @@ public:
|
|||
} data;
|
||||
bool is_ba;
|
||||
|
||||
static QBasicAtomicInt idCounter;
|
||||
};
|
||||
|
||||
QBasicAtomicInt QFtpCommand::idCounter = Q_BASIC_ATOMIC_INITIALIZER(1);
|
||||
static int nextId()
|
||||
{
|
||||
static QBasicAtomicInt counter = Q_BASIC_ATOMIC_INITIALIZER(0);
|
||||
return 1 + counter.fetchAndAddRelaxed(1);
|
||||
}
|
||||
|
||||
QFtpCommand::QFtpCommand(QFtp::Command cmd, const QStringList &raw, const QByteArray &ba)
|
||||
: command(cmd), rawCmds(raw), is_ba(true)
|
||||
{
|
||||
id = idCounter.fetchAndAddRelaxed(1);
|
||||
id = nextId();
|
||||
data.ba = new QByteArray(ba);
|
||||
}
|
||||
|
||||
QFtpCommand::QFtpCommand(QFtp::Command cmd, const QStringList &raw, QIODevice *dev)
|
||||
: command(cmd), rawCmds(raw), is_ba(false)
|
||||
{
|
||||
id = idCounter.fetchAndAddRelaxed(1);
|
||||
id = nextId();
|
||||
data.dev = dev;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -252,6 +252,10 @@ QT_BEGIN_NAMESPACE
|
|||
QNetworkSession::QNetworkSession(const QNetworkConfiguration &connectionConfig, QObject *parent)
|
||||
: QObject(parent), d(0)
|
||||
{
|
||||
qRegisterMetaType<QNetworkSession::State>();
|
||||
qRegisterMetaType<QNetworkSession::SessionError>();
|
||||
qRegisterMetaType<QNetworkSession::UsagePolicies>();
|
||||
|
||||
// invalid configuration
|
||||
if (!connectionConfig.identifier().isEmpty()) {
|
||||
const auto engines = qNetworkConfigurationManagerPrivate()->engines();
|
||||
|
|
@ -277,10 +281,6 @@ QNetworkSession::QNetworkSession(const QNetworkConfiguration &connectionConfig,
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
qRegisterMetaType<QNetworkSession::State>();
|
||||
qRegisterMetaType<QNetworkSession::SessionError>();
|
||||
qRegisterMetaType<QNetworkSession::UsagePolicies>();
|
||||
}
|
||||
|
||||
/*!
|
||||
|
|
|
|||
|
|
@ -183,7 +183,11 @@ void emit_results_ready(const QHostInfo &hostInfo, const QObject *receiver,
|
|||
\sa QAbstractSocket, {http://www.rfc-editor.org/rfc/rfc3492.txt}{RFC 3492}
|
||||
*/
|
||||
|
||||
static QBasicAtomicInt theIdCounter = Q_BASIC_ATOMIC_INITIALIZER(1);
|
||||
static int nextId()
|
||||
{
|
||||
static QBasicAtomicInt counter = Q_BASIC_ATOMIC_INITIALIZER(0);
|
||||
return 1 + counter.fetchAndAddRelaxed(1);
|
||||
}
|
||||
|
||||
/*!
|
||||
Looks up the IP address(es) associated with host name \a name, and
|
||||
|
|
@ -229,7 +233,7 @@ int QHostInfo::lookupHost(const QString &name, QObject *receiver,
|
|||
|
||||
qRegisterMetaType<QHostInfo>();
|
||||
|
||||
int id = theIdCounter.fetchAndAddRelaxed(1); // generate unique ID
|
||||
int id = nextId(); // generate unique ID
|
||||
|
||||
if (name.isEmpty()) {
|
||||
if (!receiver)
|
||||
|
|
@ -596,7 +600,7 @@ int QHostInfo::lookupHostImpl(const QString &name,
|
|||
|
||||
qRegisterMetaType<QHostInfo>();
|
||||
|
||||
int id = theIdCounter.fetchAndAddRelaxed(1); // generate unique ID
|
||||
int id = nextId(); // generate unique ID
|
||||
|
||||
if (Q_UNLIKELY(name.isEmpty())) {
|
||||
QHostInfo hostInfo(id);
|
||||
|
|
|
|||
|
|
@ -1002,13 +1002,17 @@ QSocks5SocketEngine::~QSocks5SocketEngine()
|
|||
delete d->bindData;
|
||||
}
|
||||
|
||||
static QBasicAtomicInt descriptorCounter = Q_BASIC_ATOMIC_INITIALIZER(1);
|
||||
static int nextDescriptor()
|
||||
{
|
||||
static QBasicAtomicInt counter;
|
||||
return 1 + counter.fetchAndAddRelaxed(1);
|
||||
}
|
||||
|
||||
bool QSocks5SocketEngine::initialize(QAbstractSocket::SocketType type, QAbstractSocket::NetworkLayerProtocol protocol)
|
||||
{
|
||||
Q_D(QSocks5SocketEngine);
|
||||
|
||||
d->socketDescriptor = descriptorCounter.fetchAndAddRelaxed(1);
|
||||
d->socketDescriptor = nextDescriptor();
|
||||
|
||||
d->socketType = type;
|
||||
d->socketProtocol = protocol;
|
||||
|
|
|
|||
|
|
@ -45,7 +45,11 @@
|
|||
QT_BEGIN_NAMESPACE
|
||||
|
||||
|
||||
QBasicAtomicInt qgltextureglyphcache_serial_number = Q_BASIC_ATOMIC_INITIALIZER(1);
|
||||
static int next_qgltextureglyphcache_serial_number()
|
||||
{
|
||||
static QBasicAtomicInt serial = Q_BASIC_ATOMIC_INITIALIZER(0);
|
||||
return 1 + serial.fetchAndAddRelaxed(1);
|
||||
}
|
||||
|
||||
QGLTextureGlyphCache::QGLTextureGlyphCache(QFontEngine::GlyphFormat format, const QTransform &matrix)
|
||||
: QImageTextureGlyphCache(format, matrix)
|
||||
|
|
@ -53,7 +57,7 @@ QGLTextureGlyphCache::QGLTextureGlyphCache(QFontEngine::GlyphFormat format, cons
|
|||
, pex(0)
|
||||
, m_blitProgram(0)
|
||||
, m_filterMode(Nearest)
|
||||
, m_serialNumber(qgltextureglyphcache_serial_number.fetchAndAddRelaxed(1))
|
||||
, m_serialNumber(next_qgltextureglyphcache_serial_number())
|
||||
{
|
||||
#ifdef QT_GL_TEXTURE_GLYPH_CACHE_DEBUG
|
||||
qDebug(" -> QGLTextureGlyphCache() %p for context %p.", this, QOpenGLContext::currentContext());
|
||||
|
|
|
|||
|
|
@ -457,7 +457,352 @@ QFunctionPointer QEGLPlatformContext::getProcAddress(const char *procName)
|
|||
#if !defined(Q_OS_WIN) && !defined(Q_OS_INTEGRITY)
|
||||
if (!proc)
|
||||
proc = (QFunctionPointer) dlsym(RTLD_DEFAULT, procName);
|
||||
#elif !defined(QT_OPENGL_DYNAMIC)
|
||||
// On systems without KHR_get_all_proc_addresses and without
|
||||
// dynamic linking there still has to be a way to access the
|
||||
// standard GLES functions. QOpenGL(Extra)Functions never makes
|
||||
// direct GL API calls since Qt 5.7, so all such workarounds are
|
||||
// expected to be handled in the platform plugin.
|
||||
if (!proc) {
|
||||
static struct StdFunc {
|
||||
const char *name;
|
||||
QFunctionPointer func;
|
||||
} standardFuncs[] = {
|
||||
#ifdef QT_OPENGL_ES_2
|
||||
{ "glBindTexture", (QFunctionPointer) ::glBindTexture },
|
||||
{ "glBlendFunc", (QFunctionPointer) ::glBlendFunc },
|
||||
{ "glClear", (QFunctionPointer) ::glClear },
|
||||
{ "glClearColor", (QFunctionPointer) ::glClearColor },
|
||||
{ "glClearStencil", (QFunctionPointer) ::glClearStencil },
|
||||
{ "glColorMask", (QFunctionPointer) ::glColorMask },
|
||||
{ "glCopyTexImage2D", (QFunctionPointer) ::glCopyTexImage2D },
|
||||
{ "glCopyTexSubImage2D", (QFunctionPointer) ::glCopyTexSubImage2D },
|
||||
{ "glCullFace", (QFunctionPointer) ::glCullFace },
|
||||
{ "glDeleteTextures", (QFunctionPointer) ::glDeleteTextures },
|
||||
{ "glDepthFunc", (QFunctionPointer) ::glDepthFunc },
|
||||
{ "glDepthMask", (QFunctionPointer) ::glDepthMask },
|
||||
{ "glDisable", (QFunctionPointer) ::glDisable },
|
||||
{ "glDrawArrays", (QFunctionPointer) ::glDrawArrays },
|
||||
{ "glDrawElements", (QFunctionPointer) ::glDrawElements },
|
||||
{ "glEnable", (QFunctionPointer) ::glEnable },
|
||||
{ "glFinish", (QFunctionPointer) ::glFinish },
|
||||
{ "glFlush", (QFunctionPointer) ::glFlush },
|
||||
{ "glFrontFace", (QFunctionPointer) ::glFrontFace },
|
||||
{ "glGenTextures", (QFunctionPointer) ::glGenTextures },
|
||||
{ "glGetBooleanv", (QFunctionPointer) ::glGetBooleanv },
|
||||
{ "glGetError", (QFunctionPointer) ::glGetError },
|
||||
{ "glGetFloatv", (QFunctionPointer) ::glGetFloatv },
|
||||
{ "glGetIntegerv", (QFunctionPointer) ::glGetIntegerv },
|
||||
{ "glGetString", (QFunctionPointer) ::glGetString },
|
||||
{ "glGetTexParameterfv", (QFunctionPointer) ::glGetTexParameterfv },
|
||||
{ "glGetTexParameteriv", (QFunctionPointer) ::glGetTexParameteriv },
|
||||
{ "glHint", (QFunctionPointer) ::glHint },
|
||||
{ "glIsEnabled", (QFunctionPointer) ::glIsEnabled },
|
||||
{ "glIsTexture", (QFunctionPointer) ::glIsTexture },
|
||||
{ "glLineWidth", (QFunctionPointer) ::glLineWidth },
|
||||
{ "glPixelStorei", (QFunctionPointer) ::glPixelStorei },
|
||||
{ "glPolygonOffset", (QFunctionPointer) ::glPolygonOffset },
|
||||
{ "glReadPixels", (QFunctionPointer) ::glReadPixels },
|
||||
{ "glScissor", (QFunctionPointer) ::glScissor },
|
||||
{ "glStencilFunc", (QFunctionPointer) ::glStencilFunc },
|
||||
{ "glStencilMask", (QFunctionPointer) ::glStencilMask },
|
||||
{ "glStencilOp", (QFunctionPointer) ::glStencilOp },
|
||||
{ "glTexImage2D", (QFunctionPointer) ::glTexImage2D },
|
||||
{ "glTexParameterf", (QFunctionPointer) ::glTexParameterf },
|
||||
{ "glTexParameterfv", (QFunctionPointer) ::glTexParameterfv },
|
||||
{ "glTexParameteri", (QFunctionPointer) ::glTexParameteri },
|
||||
{ "glTexParameteriv", (QFunctionPointer) ::glTexParameteriv },
|
||||
{ "glTexSubImage2D", (QFunctionPointer) ::glTexSubImage2D },
|
||||
{ "glViewport", (QFunctionPointer) ::glViewport },
|
||||
|
||||
{ "glActiveTexture", (QFunctionPointer) ::glActiveTexture },
|
||||
{ "glAttachShader", (QFunctionPointer) ::glAttachShader },
|
||||
{ "glBindAttribLocation", (QFunctionPointer) ::glBindAttribLocation },
|
||||
{ "glBindBuffer", (QFunctionPointer) ::glBindBuffer },
|
||||
{ "glBindFramebuffer", (QFunctionPointer) ::glBindFramebuffer },
|
||||
{ "glBindRenderbuffer", (QFunctionPointer) ::glBindRenderbuffer },
|
||||
{ "glBlendColor", (QFunctionPointer) ::glBlendColor },
|
||||
{ "glBlendEquation", (QFunctionPointer) ::glBlendEquation },
|
||||
{ "glBlendEquationSeparate", (QFunctionPointer) ::glBlendEquationSeparate },
|
||||
{ "glBlendFuncSeparate", (QFunctionPointer) ::glBlendFuncSeparate },
|
||||
{ "glBufferData", (QFunctionPointer) ::glBufferData },
|
||||
{ "glBufferSubData", (QFunctionPointer) ::glBufferSubData },
|
||||
{ "glCheckFramebufferStatus", (QFunctionPointer) ::glCheckFramebufferStatus },
|
||||
{ "glCompileShader", (QFunctionPointer) ::glCompileShader },
|
||||
{ "glCompressedTexImage2D", (QFunctionPointer) ::glCompressedTexImage2D },
|
||||
{ "glCompressedTexSubImage2D", (QFunctionPointer) ::glCompressedTexSubImage2D },
|
||||
{ "glCreateProgram", (QFunctionPointer) ::glCreateProgram },
|
||||
{ "glCreateShader", (QFunctionPointer) ::glCreateShader },
|
||||
{ "glDeleteBuffers", (QFunctionPointer) ::glDeleteBuffers },
|
||||
{ "glDeleteFramebuffers", (QFunctionPointer) ::glDeleteFramebuffers },
|
||||
{ "glDeleteProgram", (QFunctionPointer) ::glDeleteProgram },
|
||||
{ "glDeleteRenderbuffers", (QFunctionPointer) ::glDeleteRenderbuffers },
|
||||
{ "glDeleteShader", (QFunctionPointer) ::glDeleteShader },
|
||||
{ "glDetachShader", (QFunctionPointer) ::glDetachShader },
|
||||
{ "glDisableVertexAttribArray", (QFunctionPointer) ::glDisableVertexAttribArray },
|
||||
{ "glEnableVertexAttribArray", (QFunctionPointer) ::glEnableVertexAttribArray },
|
||||
{ "glFramebufferRenderbuffer", (QFunctionPointer) ::glFramebufferRenderbuffer },
|
||||
{ "glFramebufferTexture2D", (QFunctionPointer) ::glFramebufferTexture2D },
|
||||
{ "glGenBuffers", (QFunctionPointer) ::glGenBuffers },
|
||||
{ "glGenerateMipmap", (QFunctionPointer) ::glGenerateMipmap },
|
||||
{ "glGenFramebuffers", (QFunctionPointer) ::glGenFramebuffers },
|
||||
{ "glGenRenderbuffers", (QFunctionPointer) ::glGenRenderbuffers },
|
||||
{ "glGetActiveAttrib", (QFunctionPointer) ::glGetActiveAttrib },
|
||||
{ "glGetActiveUniform", (QFunctionPointer) ::glGetActiveUniform },
|
||||
{ "glGetAttachedShaders", (QFunctionPointer) ::glGetAttachedShaders },
|
||||
{ "glGetAttribLocation", (QFunctionPointer) ::glGetAttribLocation },
|
||||
{ "glGetBufferParameteriv", (QFunctionPointer) ::glGetBufferParameteriv },
|
||||
{ "glGetFramebufferAttachmentParameteriv", (QFunctionPointer) ::glGetFramebufferAttachmentParameteriv },
|
||||
{ "glGetProgramiv", (QFunctionPointer) ::glGetProgramiv },
|
||||
{ "glGetProgramInfoLog", (QFunctionPointer) ::glGetProgramInfoLog },
|
||||
{ "glGetRenderbufferParameteriv", (QFunctionPointer) ::glGetRenderbufferParameteriv },
|
||||
{ "glGetShaderiv", (QFunctionPointer) ::glGetShaderiv },
|
||||
{ "glGetShaderInfoLog", (QFunctionPointer) ::glGetShaderInfoLog },
|
||||
{ "glGetShaderPrecisionFormat", (QFunctionPointer) ::glGetShaderPrecisionFormat },
|
||||
{ "glGetShaderSource", (QFunctionPointer) ::glGetShaderSource },
|
||||
{ "glGetUniformfv", (QFunctionPointer) ::glGetUniformfv },
|
||||
{ "glGetUniformiv", (QFunctionPointer) ::glGetUniformiv },
|
||||
{ "glGetUniformLocation", (QFunctionPointer) ::glGetUniformLocation },
|
||||
{ "glGetVertexAttribfv", (QFunctionPointer) ::glGetVertexAttribfv },
|
||||
{ "glGetVertexAttribiv", (QFunctionPointer) ::glGetVertexAttribiv },
|
||||
{ "glGetVertexAttribPointerv", (QFunctionPointer) ::glGetVertexAttribPointerv },
|
||||
{ "glIsBuffer", (QFunctionPointer) ::glIsBuffer },
|
||||
{ "glIsFramebuffer", (QFunctionPointer) ::glIsFramebuffer },
|
||||
{ "glIsProgram", (QFunctionPointer) ::glIsProgram },
|
||||
{ "glIsRenderbuffer", (QFunctionPointer) ::glIsRenderbuffer },
|
||||
{ "glIsShader", (QFunctionPointer) ::glIsShader },
|
||||
{ "glLinkProgram", (QFunctionPointer) ::glLinkProgram },
|
||||
{ "glReleaseShaderCompiler", (QFunctionPointer) ::glReleaseShaderCompiler },
|
||||
{ "glRenderbufferStorage", (QFunctionPointer) ::glRenderbufferStorage },
|
||||
{ "glSampleCoverage", (QFunctionPointer) ::glSampleCoverage },
|
||||
{ "glShaderBinary", (QFunctionPointer) ::glShaderBinary },
|
||||
{ "glShaderSource", (QFunctionPointer) ::glShaderSource },
|
||||
{ "glStencilFuncSeparate", (QFunctionPointer) ::glStencilFuncSeparate },
|
||||
{ "glStencilMaskSeparate", (QFunctionPointer) ::glStencilMaskSeparate },
|
||||
{ "glStencilOpSeparate", (QFunctionPointer) ::glStencilOpSeparate },
|
||||
{ "glUniform1f", (QFunctionPointer) ::glUniform1f },
|
||||
{ "glUniform1fv", (QFunctionPointer) ::glUniform1fv },
|
||||
{ "glUniform1i", (QFunctionPointer) ::glUniform1i },
|
||||
{ "glUniform1iv", (QFunctionPointer) ::glUniform1iv },
|
||||
{ "glUniform2f", (QFunctionPointer) ::glUniform2f },
|
||||
{ "glUniform2fv", (QFunctionPointer) ::glUniform2fv },
|
||||
{ "glUniform2i", (QFunctionPointer) ::glUniform2i },
|
||||
{ "glUniform2iv", (QFunctionPointer) ::glUniform2iv },
|
||||
{ "glUniform3f", (QFunctionPointer) ::glUniform3f },
|
||||
{ "glUniform3fv", (QFunctionPointer) ::glUniform3fv },
|
||||
{ "glUniform3i", (QFunctionPointer) ::glUniform3i },
|
||||
{ "glUniform3iv", (QFunctionPointer) ::glUniform3iv },
|
||||
{ "glUniform4f", (QFunctionPointer) ::glUniform4f },
|
||||
{ "glUniform4fv", (QFunctionPointer) ::glUniform4fv },
|
||||
{ "glUniform4i", (QFunctionPointer) ::glUniform4i },
|
||||
{ "glUniform4iv", (QFunctionPointer) ::glUniform4iv },
|
||||
{ "glUniformMatrix2fv", (QFunctionPointer) ::glUniformMatrix2fv },
|
||||
{ "glUniformMatrix3fv", (QFunctionPointer) ::glUniformMatrix3fv },
|
||||
{ "glUniformMatrix4fv", (QFunctionPointer) ::glUniformMatrix4fv },
|
||||
{ "glUseProgram", (QFunctionPointer) ::glUseProgram },
|
||||
{ "glValidateProgram", (QFunctionPointer) ::glValidateProgram },
|
||||
{ "glVertexAttrib1f", (QFunctionPointer) ::glVertexAttrib1f },
|
||||
{ "glVertexAttrib1fv", (QFunctionPointer) ::glVertexAttrib1fv },
|
||||
{ "glVertexAttrib2f", (QFunctionPointer) ::glVertexAttrib2f },
|
||||
{ "glVertexAttrib2fv", (QFunctionPointer) ::glVertexAttrib2fv },
|
||||
{ "glVertexAttrib3f", (QFunctionPointer) ::glVertexAttrib3f },
|
||||
{ "glVertexAttrib3fv", (QFunctionPointer) ::glVertexAttrib3fv },
|
||||
{ "glVertexAttrib4f", (QFunctionPointer) ::glVertexAttrib4f },
|
||||
{ "glVertexAttrib4fv", (QFunctionPointer) ::glVertexAttrib4fv },
|
||||
{ "glVertexAttribPointer", (QFunctionPointer) ::glVertexAttribPointer },
|
||||
|
||||
{ "glClearDepthf", (QFunctionPointer) ::glClearDepthf },
|
||||
{ "glDepthRangef", (QFunctionPointer) ::glDepthRangef },
|
||||
#endif // QT_OPENGL_ES_2
|
||||
|
||||
#ifdef QT_OPENGL_ES_3
|
||||
{ "glBeginQuery", (QFunctionPointer) ::glBeginQuery },
|
||||
{ "glBeginTransformFeedback", (QFunctionPointer) ::glBeginTransformFeedback },
|
||||
{ "glBindBufferBase", (QFunctionPointer) ::glBindBufferBase },
|
||||
{ "glBindBufferRange", (QFunctionPointer) ::glBindBufferRange },
|
||||
{ "glBindSampler", (QFunctionPointer) ::glBindSampler },
|
||||
{ "glBindTransformFeedback", (QFunctionPointer) ::glBindTransformFeedback },
|
||||
{ "glBindVertexArray", (QFunctionPointer) ::glBindVertexArray },
|
||||
{ "glBlitFramebuffer", (QFunctionPointer) ::glBlitFramebuffer },
|
||||
{ "glClearBufferfi", (QFunctionPointer) ::glClearBufferfi },
|
||||
{ "glClearBufferfv", (QFunctionPointer) ::glClearBufferfv },
|
||||
{ "glClearBufferiv", (QFunctionPointer) ::glClearBufferiv },
|
||||
{ "glClearBufferuiv", (QFunctionPointer) ::glClearBufferuiv },
|
||||
{ "glClientWaitSync", (QFunctionPointer) ::glClientWaitSync },
|
||||
{ "glCompressedTexImage3D", (QFunctionPointer) ::glCompressedTexImage3D },
|
||||
{ "glCompressedTexSubImage3D", (QFunctionPointer) ::glCompressedTexSubImage3D },
|
||||
{ "glCopyBufferSubData", (QFunctionPointer) ::glCopyBufferSubData },
|
||||
{ "glCopyTexSubImage3D", (QFunctionPointer) ::glCopyTexSubImage3D },
|
||||
{ "glDeleteQueries", (QFunctionPointer) ::glDeleteQueries },
|
||||
{ "glDeleteSamplers", (QFunctionPointer) ::glDeleteSamplers },
|
||||
{ "glDeleteSync", (QFunctionPointer) ::glDeleteSync },
|
||||
{ "glDeleteTransformFeedbacks", (QFunctionPointer) ::glDeleteTransformFeedbacks },
|
||||
{ "glDeleteVertexArrays", (QFunctionPointer) ::glDeleteVertexArrays },
|
||||
{ "glDrawArraysInstanced", (QFunctionPointer) ::glDrawArraysInstanced },
|
||||
{ "glDrawBuffers", (QFunctionPointer) ::glDrawBuffers },
|
||||
{ "glDrawElementsInstanced", (QFunctionPointer) ::glDrawElementsInstanced },
|
||||
{ "glDrawRangeElements", (QFunctionPointer) ::glDrawRangeElements },
|
||||
{ "glEndQuery", (QFunctionPointer) ::glEndQuery },
|
||||
{ "glEndTransformFeedback", (QFunctionPointer) ::glEndTransformFeedback },
|
||||
{ "glFenceSync", (QFunctionPointer) ::glFenceSync },
|
||||
{ "glFlushMappedBufferRange", (QFunctionPointer) ::glFlushMappedBufferRange },
|
||||
{ "glFramebufferTextureLayer", (QFunctionPointer) ::glFramebufferTextureLayer },
|
||||
{ "glGenQueries", (QFunctionPointer) ::glGenQueries },
|
||||
{ "glGenSamplers", (QFunctionPointer) ::glGenSamplers },
|
||||
{ "glGenTransformFeedbacks", (QFunctionPointer) ::glGenTransformFeedbacks },
|
||||
{ "glGenVertexArrays", (QFunctionPointer) ::glGenVertexArrays },
|
||||
{ "glGetActiveUniformBlockName", (QFunctionPointer) ::glGetActiveUniformBlockName },
|
||||
{ "glGetActiveUniformBlockiv", (QFunctionPointer) ::glGetActiveUniformBlockiv },
|
||||
{ "glGetActiveUniformsiv", (QFunctionPointer) ::glGetActiveUniformsiv },
|
||||
{ "glGetBufferParameteri64v", (QFunctionPointer) ::glGetBufferParameteri64v },
|
||||
{ "glGetBufferPointerv", (QFunctionPointer) ::glGetBufferPointerv },
|
||||
{ "glGetFragDataLocation", (QFunctionPointer) ::glGetFragDataLocation },
|
||||
{ "glGetInteger64i_v", (QFunctionPointer) ::glGetInteger64i_v },
|
||||
{ "glGetInteger64v", (QFunctionPointer) ::glGetInteger64v },
|
||||
{ "glGetIntegeri_v", (QFunctionPointer) ::glGetIntegeri_v },
|
||||
{ "glGetInternalformativ", (QFunctionPointer) ::glGetInternalformativ },
|
||||
{ "glGetProgramBinary", (QFunctionPointer) ::glGetProgramBinary },
|
||||
{ "glGetQueryObjectuiv", (QFunctionPointer) ::glGetQueryObjectuiv },
|
||||
{ "glGetQueryiv", (QFunctionPointer) ::glGetQueryiv },
|
||||
{ "glGetSamplerParameterfv", (QFunctionPointer) ::glGetSamplerParameterfv },
|
||||
{ "glGetSamplerParameteriv", (QFunctionPointer) ::glGetSamplerParameteriv },
|
||||
{ "glGetStringi", (QFunctionPointer) ::glGetStringi },
|
||||
{ "glGetSynciv", (QFunctionPointer) ::glGetSynciv },
|
||||
{ "glGetTransformFeedbackVarying", (QFunctionPointer) ::glGetTransformFeedbackVarying },
|
||||
{ "glGetUniformBlockIndex", (QFunctionPointer) ::glGetUniformBlockIndex },
|
||||
{ "glGetUniformIndices", (QFunctionPointer) ::glGetUniformIndices },
|
||||
{ "glGetUniformuiv", (QFunctionPointer) ::glGetUniformuiv },
|
||||
{ "glGetVertexAttribIiv", (QFunctionPointer) ::glGetVertexAttribIiv },
|
||||
{ "glGetVertexAttribIuiv", (QFunctionPointer) ::glGetVertexAttribIuiv },
|
||||
{ "glInvalidateFramebuffer", (QFunctionPointer) ::glInvalidateFramebuffer },
|
||||
{ "glInvalidateSubFramebuffer", (QFunctionPointer) ::glInvalidateSubFramebuffer },
|
||||
{ "glIsQuery", (QFunctionPointer) ::glIsQuery },
|
||||
{ "glIsSampler", (QFunctionPointer) ::glIsSampler },
|
||||
{ "glIsSync", (QFunctionPointer) ::glIsSync },
|
||||
{ "glIsTransformFeedback", (QFunctionPointer) ::glIsTransformFeedback },
|
||||
{ "glIsVertexArray", (QFunctionPointer) ::glIsVertexArray },
|
||||
{ "glMapBufferRange", (QFunctionPointer) ::glMapBufferRange },
|
||||
{ "glPauseTransformFeedback", (QFunctionPointer) ::glPauseTransformFeedback },
|
||||
{ "glProgramBinary", (QFunctionPointer) ::glProgramBinary },
|
||||
{ "glProgramParameteri", (QFunctionPointer) ::glProgramParameteri },
|
||||
{ "glReadBuffer", (QFunctionPointer) ::glReadBuffer },
|
||||
{ "glRenderbufferStorageMultisample", (QFunctionPointer) ::glRenderbufferStorageMultisample },
|
||||
{ "glResumeTransformFeedback", (QFunctionPointer) ::glResumeTransformFeedback },
|
||||
{ "glSamplerParameterf", (QFunctionPointer) ::glSamplerParameterf },
|
||||
{ "glSamplerParameterfv", (QFunctionPointer) ::glSamplerParameterfv },
|
||||
{ "glSamplerParameteri", (QFunctionPointer) ::glSamplerParameteri },
|
||||
{ "glSamplerParameteriv", (QFunctionPointer) ::glSamplerParameteriv },
|
||||
{ "glTexImage3D", (QFunctionPointer) ::glTexImage3D },
|
||||
{ "glTexStorage2D", (QFunctionPointer) ::glTexStorage2D },
|
||||
{ "glTexStorage3D", (QFunctionPointer) ::glTexStorage3D },
|
||||
{ "glTexSubImage3D", (QFunctionPointer) ::glTexSubImage3D },
|
||||
{ "glTransformFeedbackVaryings", (QFunctionPointer) ::glTransformFeedbackVaryings },
|
||||
{ "glUniform1ui", (QFunctionPointer) ::glUniform1ui },
|
||||
{ "glUniform1uiv", (QFunctionPointer) ::glUniform1uiv },
|
||||
{ "glUniform2ui", (QFunctionPointer) ::glUniform2ui },
|
||||
{ "glUniform2uiv", (QFunctionPointer) ::glUniform2uiv },
|
||||
{ "glUniform3ui", (QFunctionPointer) ::glUniform3ui },
|
||||
{ "glUniform3uiv", (QFunctionPointer) ::glUniform3uiv },
|
||||
{ "glUniform4ui", (QFunctionPointer) ::glUniform4ui },
|
||||
{ "glUniform4uiv", (QFunctionPointer) ::glUniform4uiv },
|
||||
{ "glUniformBlockBinding", (QFunctionPointer) ::glUniformBlockBinding },
|
||||
{ "glUniformMatrix2x3fv", (QFunctionPointer) ::glUniformMatrix2x3fv },
|
||||
{ "glUniformMatrix2x4fv", (QFunctionPointer) ::glUniformMatrix2x4fv },
|
||||
{ "glUniformMatrix3x2fv", (QFunctionPointer) ::glUniformMatrix3x2fv },
|
||||
{ "glUniformMatrix3x4fv", (QFunctionPointer) ::glUniformMatrix3x4fv },
|
||||
{ "glUniformMatrix4x2fv", (QFunctionPointer) ::glUniformMatrix4x2fv },
|
||||
{ "glUniformMatrix4x3fv", (QFunctionPointer) ::glUniformMatrix4x3fv },
|
||||
{ "glUnmapBuffer", (QFunctionPointer) ::glUnmapBuffer },
|
||||
{ "glVertexAttribDivisor", (QFunctionPointer) ::glVertexAttribDivisor },
|
||||
{ "glVertexAttribI4i", (QFunctionPointer) ::glVertexAttribI4i },
|
||||
{ "glVertexAttribI4iv", (QFunctionPointer) ::glVertexAttribI4iv },
|
||||
{ "glVertexAttribI4ui", (QFunctionPointer) ::glVertexAttribI4ui },
|
||||
{ "glVertexAttribI4uiv", (QFunctionPointer) ::glVertexAttribI4uiv },
|
||||
{ "glVertexAttribIPointer", (QFunctionPointer) ::glVertexAttribIPointer },
|
||||
{ "glWaitSync", (QFunctionPointer) ::glWaitSync },
|
||||
#endif // QT_OPENGL_ES_3
|
||||
|
||||
#ifdef QT_OPENGL_ES_3_1
|
||||
{ "glActiveShaderProgram", (QFunctionPointer) ::glActiveShaderProgram },
|
||||
{ "glBindImageTexture", (QFunctionPointer) ::glBindImageTexture },
|
||||
{ "glBindProgramPipeline", (QFunctionPointer) ::glBindProgramPipeline },
|
||||
{ "glBindVertexBuffer", (QFunctionPointer) ::glBindVertexBuffer },
|
||||
{ "glCreateShaderProgramv", (QFunctionPointer) ::glCreateShaderProgramv },
|
||||
{ "glDeleteProgramPipelines", (QFunctionPointer) ::glDeleteProgramPipelines },
|
||||
{ "glDispatchCompute", (QFunctionPointer) ::glDispatchCompute },
|
||||
{ "glDispatchComputeIndirect", (QFunctionPointer) ::glDispatchComputeIndirect },
|
||||
{ "glDrawArraysIndirect", (QFunctionPointer) ::glDrawArraysIndirect },
|
||||
{ "glDrawElementsIndirect", (QFunctionPointer) ::glDrawElementsIndirect },
|
||||
{ "glFramebufferParameteri", (QFunctionPointer) ::glFramebufferParameteri },
|
||||
{ "glGenProgramPipelines", (QFunctionPointer) ::glGenProgramPipelines },
|
||||
{ "glGetBooleani_v", (QFunctionPointer) ::glGetBooleani_v },
|
||||
{ "glGetFramebufferParameteriv", (QFunctionPointer) ::glGetFramebufferParameteriv },
|
||||
{ "glGetMultisamplefv", (QFunctionPointer) ::glGetMultisamplefv },
|
||||
{ "glGetProgramInterfaceiv", (QFunctionPointer) ::glGetProgramInterfaceiv },
|
||||
{ "glGetProgramPipelineInfoLog", (QFunctionPointer) ::glGetProgramPipelineInfoLog },
|
||||
{ "glGetProgramPipelineiv", (QFunctionPointer) ::glGetProgramPipelineiv },
|
||||
{ "glGetProgramResourceIndex", (QFunctionPointer) ::glGetProgramResourceIndex },
|
||||
{ "glGetProgramResourceLocation", (QFunctionPointer) ::glGetProgramResourceLocation },
|
||||
{ "glGetProgramResourceName", (QFunctionPointer) ::glGetProgramResourceName },
|
||||
{ "glGetProgramResourceiv", (QFunctionPointer) ::glGetProgramResourceiv },
|
||||
{ "glGetTexLevelParameterfv", (QFunctionPointer) ::glGetTexLevelParameterfv },
|
||||
{ "glGetTexLevelParameteriv", (QFunctionPointer) ::glGetTexLevelParameteriv },
|
||||
{ "glIsProgramPipeline", (QFunctionPointer) ::glIsProgramPipeline },
|
||||
{ "glMemoryBarrier", (QFunctionPointer) ::glMemoryBarrier },
|
||||
{ "glMemoryBarrierByRegion", (QFunctionPointer) ::glMemoryBarrierByRegion },
|
||||
{ "glProgramUniform1f", (QFunctionPointer) ::glProgramUniform1f },
|
||||
{ "glProgramUniform1fv", (QFunctionPointer) ::glProgramUniform1fv },
|
||||
{ "glProgramUniform1i", (QFunctionPointer) ::glProgramUniform1i },
|
||||
{ "glProgramUniform1iv", (QFunctionPointer) ::glProgramUniform1iv },
|
||||
{ "glProgramUniform1ui", (QFunctionPointer) ::glProgramUniform1ui },
|
||||
{ "glProgramUniform1uiv", (QFunctionPointer) ::glProgramUniform1uiv },
|
||||
{ "glProgramUniform2f", (QFunctionPointer) ::glProgramUniform2f },
|
||||
{ "glProgramUniform2fv", (QFunctionPointer) ::glProgramUniform2fv },
|
||||
{ "glProgramUniform2i", (QFunctionPointer) ::glProgramUniform2i },
|
||||
{ "glProgramUniform2iv", (QFunctionPointer) ::glProgramUniform2iv },
|
||||
{ "glProgramUniform2ui", (QFunctionPointer) ::glProgramUniform2ui },
|
||||
{ "glProgramUniform2uiv", (QFunctionPointer) ::glProgramUniform2uiv },
|
||||
{ "glProgramUniform3f", (QFunctionPointer) ::glProgramUniform3f },
|
||||
{ "glProgramUniform3fv", (QFunctionPointer) ::glProgramUniform3fv },
|
||||
{ "glProgramUniform3i", (QFunctionPointer) ::glProgramUniform3i },
|
||||
{ "glProgramUniform3iv", (QFunctionPointer) ::glProgramUniform3iv },
|
||||
{ "glProgramUniform3ui", (QFunctionPointer) ::glProgramUniform3ui },
|
||||
{ "glProgramUniform3uiv", (QFunctionPointer) ::glProgramUniform3uiv },
|
||||
{ "glProgramUniform4f", (QFunctionPointer) ::glProgramUniform4f },
|
||||
{ "glProgramUniform4fv", (QFunctionPointer) ::glProgramUniform4fv },
|
||||
{ "glProgramUniform4i", (QFunctionPointer) ::glProgramUniform4i },
|
||||
{ "glProgramUniform4iv", (QFunctionPointer) ::glProgramUniform4iv },
|
||||
{ "glProgramUniform4ui", (QFunctionPointer) ::glProgramUniform4ui },
|
||||
{ "glProgramUniform4uiv", (QFunctionPointer) ::glProgramUniform4uiv },
|
||||
{ "glProgramUniformMatrix2fv", (QFunctionPointer) ::glProgramUniformMatrix2fv },
|
||||
{ "glProgramUniformMatrix2x3fv", (QFunctionPointer) ::glProgramUniformMatrix2x3fv },
|
||||
{ "glProgramUniformMatrix2x4fv", (QFunctionPointer) ::glProgramUniformMatrix2x4fv },
|
||||
{ "glProgramUniformMatrix3fv", (QFunctionPointer) ::glProgramUniformMatrix3fv },
|
||||
{ "glProgramUniformMatrix3x2fv", (QFunctionPointer) ::glProgramUniformMatrix3x2fv },
|
||||
{ "glProgramUniformMatrix3x4fv", (QFunctionPointer) ::glProgramUniformMatrix3x4fv },
|
||||
{ "glProgramUniformMatrix4fv", (QFunctionPointer) ::glProgramUniformMatrix4fv },
|
||||
{ "glProgramUniformMatrix4x2fv", (QFunctionPointer) ::glProgramUniformMatrix4x2fv },
|
||||
{ "glProgramUniformMatrix4x3fv", (QFunctionPointer) ::glProgramUniformMatrix4x3fv },
|
||||
{ "glSampleMaski", (QFunctionPointer) ::glSampleMaski },
|
||||
{ "glTexStorage2DMultisample", (QFunctionPointer) ::glTexStorage2DMultisample },
|
||||
{ "glUseProgramStages", (QFunctionPointer) ::glUseProgramStages },
|
||||
{ "glValidateProgramPipeline", (QFunctionPointer) ::glValidateProgramPipeline },
|
||||
{ "glVertexAttribBinding", (QFunctionPointer) ::glVertexAttribBinding },
|
||||
{ "glVertexAttribFormat", (QFunctionPointer) ::glVertexAttribFormat },
|
||||
{ "glVertexAttribIFormat", (QFunctionPointer) ::glVertexAttribIFormat },
|
||||
{ "glVertexBindingDivisor", (QFunctionPointer) ::glVertexBindingDivisor },
|
||||
#endif // QT_OPENGL_ES_3_1
|
||||
};
|
||||
|
||||
for (size_t i = 0; i < sizeof(standardFuncs) / sizeof(StdFunc); ++i) {
|
||||
if (!qstrcmp(procName, standardFuncs[i].name)) {
|
||||
proc = standardFuncs[i].func;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
return proc;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -103,6 +103,11 @@ void QEGLStreamConvenience::initialize(EGLDisplay dpy)
|
|||
stream_consumer_gltexture = reinterpret_cast<PFNEGLSTREAMCONSUMERGLTEXTUREEXTERNALKHRPROC>(eglGetProcAddress("eglStreamConsumerGLTextureExternalKHR"));
|
||||
stream_consumer_acquire = reinterpret_cast<PFNEGLSTREAMCONSUMERACQUIREKHRPROC>(eglGetProcAddress("eglStreamConsumerAcquireKHR"));
|
||||
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_producer_eglsurface = strstr(extensions, "EGL_KHR_stream_producer_eglsurface");
|
||||
|
|
|
|||
|
|
@ -148,6 +148,14 @@ typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMEROUTPUTEXTPROC) (EGLDisplay
|
|||
#define EGL_PLATFORM_X11_KHR 0x31D5
|
||||
#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
|
||||
|
||||
class QEGLStreamConvenience
|
||||
|
|
@ -160,6 +168,11 @@ public:
|
|||
PFNEGLQUERYDEVICESEXTPROC query_devices;
|
||||
PFNEGLQUERYDEVICESTRINGEXTPROC query_device_string;
|
||||
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;
|
||||
PFNEGLSTREAMATTRIBKHRPROC stream_attrib;
|
||||
PFNEGLQUERYSTREAMKHRPROC query_stream;
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
HEADERS += \
|
||||
$$PWD/qbasicfontdatabase_p.h \
|
||||
$$QT_SOURCE_TREE/src/gui/text/qfontengine_ft_p.h
|
||||
$$PWD/qfontengine_ft_p.h
|
||||
|
||||
SOURCES += \
|
||||
$$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>
|
||||
|
||||
#undef QT_NO_FREETYPE
|
||||
#include <QtGui/private/qfontengine_ft_p.h>
|
||||
#include <QtGui/private/qfontengine_p.h>
|
||||
#include <QtFontDatabaseSupport/private/qfontengine_ft_p.h>
|
||||
|
||||
#include <ft2build.h>
|
||||
#include FT_TRUETYPE_TABLES_H
|
||||
|
|
|
|||
|
|
@ -126,13 +126,7 @@ private:
|
|||
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
|
||||
#endif
|
||||
{
|
||||
public:
|
||||
|
||||
|
|
@ -3,4 +3,4 @@ HEADERS += $$PWD/qfontconfigdatabase_p.h \
|
|||
SOURCES += $$PWD/qfontconfigdatabase.cpp \
|
||||
$$PWD/qfontenginemultifontconfig.cpp
|
||||
|
||||
QMAKE_USE += fontconfig
|
||||
QMAKE_USE_PRIVATE += fontconfig
|
||||
|
|
|
|||
|
|
@ -40,6 +40,8 @@
|
|||
#include "qfontconfigdatabase_p.h"
|
||||
#include "qfontenginemultifontconfig_p.h"
|
||||
|
||||
#include <QtFontDatabaseSupport/private/qfontengine_ft_p.h>
|
||||
|
||||
#include <QtCore/QList>
|
||||
#include <QtCore/QElapsedTimer>
|
||||
#include <QtCore/QFile>
|
||||
|
|
@ -49,7 +51,6 @@
|
|||
#include <qpa/qplatformintegration.h>
|
||||
#include <qpa/qplatformservices.h>
|
||||
|
||||
#include <QtGui/private/qfontengine_ft_p.h>
|
||||
#include <QtGui/private/qguiapplication_p.h>
|
||||
#include <QtGui/private/qhighdpiscaling_p.h>
|
||||
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue