Merge "Merge remote-tracking branch 'origin/5.8' into 5.9" into refs/staging/5.9
This commit is contained in:
commit
63856135da
@ -1,8 +1,10 @@
|
|||||||
Usage: configure [options] [assignments]
|
Usage: configure [options] [assignments]
|
||||||
|
|
||||||
Configure understands variable assignments like VAR=value on the command line.
|
Configure understands variable assignments like VAR=value on the command line.
|
||||||
These override any values possibly obtained from pkg-config. The variables
|
Each uppercased library name (obtainable with -list-libraries) supports the
|
||||||
are mentioned in the descriptions of the options they relate to.
|
suffixes _INCDIR, _LIBDIR, _PREFIX (INCDIR=PREFIX/include, LIBDIR=PREFIX/lib),
|
||||||
|
_LIBS, and - on Windows and Darwin - _LIBS_DEBUG and _LIBS_RELEASE. E.g.,
|
||||||
|
ICU_PREFIX=/opt/icu42 ICU_LIBS="-licui18n -licuuc -licudata".
|
||||||
|
|
||||||
It is also possible to manipulate any QMAKE_* variable, to amend the values
|
It is also possible to manipulate any QMAKE_* variable, to amend the values
|
||||||
from the mkspec for the build of Qt itself, e.g., QMAKE_CXXFLAGS+=-g3.
|
from the mkspec for the build of Qt itself, e.g., QMAKE_CXXFLAGS+=-g3.
|
||||||
@ -62,6 +64,13 @@ Configure meta:
|
|||||||
Use this after installing missing dependencies.
|
Use this after installing missing dependencies.
|
||||||
-recheck-all ......... Discard all cached configure test results.
|
-recheck-all ......... Discard all cached configure test results.
|
||||||
|
|
||||||
|
-feature-<feature> ... Enable <feature>
|
||||||
|
-no-feature-<feature> Disable <feature> [none]
|
||||||
|
-list-features ....... List available features. Note that some features
|
||||||
|
have dedicated command line options as well.
|
||||||
|
|
||||||
|
-list-libraries ...... List possible external dependencies.
|
||||||
|
|
||||||
Build options:
|
Build options:
|
||||||
|
|
||||||
-opensource .......... Build the Open-Source Edition of Qt
|
-opensource .......... Build the Open-Source Edition of Qt
|
||||||
@ -188,9 +197,6 @@ Component selection:
|
|||||||
[default on Android and Windows]
|
[default on Android and Windows]
|
||||||
-dbus-linked ......... Build Qt D-Bus and link to libdbus-1 [auto]
|
-dbus-linked ......... Build Qt D-Bus and link to libdbus-1 [auto]
|
||||||
-dbus-runtime ........ Build Qt D-Bus and dynamically load libdbus-1 [no]
|
-dbus-runtime ........ Build Qt D-Bus and dynamically load libdbus-1 [no]
|
||||||
DBUS_PATH= DBUS_HOST_PATH=
|
|
||||||
-feature-<feature> ... Enable <feature>. The available features are described
|
|
||||||
in src/corelib/global/qfeatures.txt. [all enabled]
|
|
||||||
-accessibility ....... Enable accessibility support [yes]
|
-accessibility ....... Enable accessibility support [yes]
|
||||||
Note: Disabling accessibility is not recommended.
|
Note: Disabling accessibility is not recommended.
|
||||||
-qml-debug ........... Enable QML debugging support [yes]
|
-qml-debug ........... Enable QML debugging support [yes]
|
||||||
@ -210,7 +216,6 @@ Core options:
|
|||||||
-pcre ................ Select used libpcre2 [system/qt]
|
-pcre ................ Select used libpcre2 [system/qt]
|
||||||
-pps ................. Enable PPS support [auto] (QNX only)
|
-pps ................. Enable PPS support [auto] (QNX only)
|
||||||
-zlib ................ Select used zlib [system/qt]
|
-zlib ................ Select used zlib [system/qt]
|
||||||
ZLIB_LIBS=
|
|
||||||
|
|
||||||
Logging backends:
|
Logging backends:
|
||||||
-journald .......... Enable journald support [no] (Unix only)
|
-journald .......... Enable journald support [no] (Unix only)
|
||||||
@ -223,8 +228,6 @@ Network options:
|
|||||||
-no-openssl .......... Do not use OpenSSL [default on Apple and WinRT]
|
-no-openssl .......... Do not use OpenSSL [default on Apple and WinRT]
|
||||||
-openssl-linked ...... Use OpenSSL and link to libssl [no]
|
-openssl-linked ...... Use OpenSSL and link to libssl [no]
|
||||||
-openssl-runtime ..... Use OpenSSL and dynamically load libssl [auto]
|
-openssl-runtime ..... Use OpenSSL and dynamically load libssl [auto]
|
||||||
OPENSSL_PATH= OPENSSL_LIBS=, and on Windows also
|
|
||||||
OPENSSL_LIBS_DEBUG= OPENSSL_LIBS_RELEASE=
|
|
||||||
-securetransport ..... Use SecureTransport [auto] (Apple only)
|
-securetransport ..... Use SecureTransport [auto] (Apple only)
|
||||||
|
|
||||||
-sctp ................ Enable SCTP support [no]
|
-sctp ................ Enable SCTP support [no]
|
||||||
@ -292,5 +295,4 @@ Database options:
|
|||||||
-sql-<driver> ........ Enable SQL <driver> plugin. Supported drivers:
|
-sql-<driver> ........ Enable SQL <driver> plugin. Supported drivers:
|
||||||
db2 ibase mysql oci odbc psql sqlite2 sqlite tds
|
db2 ibase mysql oci odbc psql sqlite2 sqlite tds
|
||||||
[all auto]
|
[all auto]
|
||||||
MYSQL_PATH= PSQL_LIBS= SYBASE= SYBASE_LIBS=
|
|
||||||
-sqlite .............. Select used sqlite3 [system/qt]
|
-sqlite .............. Select used sqlite3 [system/qt]
|
||||||
|
@ -20,8 +20,7 @@
|
|||||||
"commandline": {
|
"commandline": {
|
||||||
"assignments": {
|
"assignments": {
|
||||||
"DBUS_HOST_PATH": "host_dbus.prefix",
|
"DBUS_HOST_PATH": "host_dbus.prefix",
|
||||||
"DBUS_PATH": "dbus.prefix",
|
"DBUS_PATH": "dbus.prefix"
|
||||||
"ZLIB_LIBS": "zlib.libs"
|
|
||||||
},
|
},
|
||||||
"custom": "qmakeArgs",
|
"custom": "qmakeArgs",
|
||||||
"options": {
|
"options": {
|
||||||
@ -990,7 +989,10 @@
|
|||||||
},
|
},
|
||||||
"qml-debug": {
|
"qml-debug": {
|
||||||
"label": "QML debugging",
|
"label": "QML debugging",
|
||||||
"output": [ { "type": "publicQtConfig", "negative": true } ]
|
"output": [
|
||||||
|
"privateFeature",
|
||||||
|
{ "type": "publicQtConfig", "negative": true }
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"compile_examples": {
|
"compile_examples": {
|
||||||
"label": "Compile examples",
|
"label": "Compile examples",
|
||||||
|
@ -30,7 +30,6 @@ qtHaveModule(widgets) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
qtConfig(openssl): SUBDIRS += securesocketclient
|
qtConfig(openssl): SUBDIRS += securesocketclient
|
||||||
qtConfig(openssl-linked): SUBDIRS += securesocketclient
|
|
||||||
qtConfig(sctp): SUBDIRS += multistreamserver multistreamclient
|
qtConfig(sctp): SUBDIRS += multistreamserver multistreamclient
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -12,7 +12,10 @@
|
|||||||
"recheck": { "type": "void", "name": "cache_use", "value": "positive" },
|
"recheck": { "type": "void", "name": "cache_use", "value": "positive" },
|
||||||
"recheck-all": { "type": "void", "name": "cache_use", "value": "none" },
|
"recheck-all": { "type": "void", "name": "cache_use", "value": "none" },
|
||||||
|
|
||||||
"redo": { "type": "redo" }
|
"redo": { "type": "redo" },
|
||||||
|
|
||||||
|
"list-features": "void",
|
||||||
|
"list-libraries": "void"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,7 @@ win32:count(MOC_INCLUDEPATH, 40, >) {
|
|||||||
# QNX's compiler sets "gcc" config, but does not support the -dM option;
|
# QNX's compiler sets "gcc" config, but does not support the -dM option;
|
||||||
# UIKit builds are always multi-arch due to simulator_and_device (unless
|
# UIKit builds are always multi-arch due to simulator_and_device (unless
|
||||||
# -sdk is used) so this feature cannot possibly work.
|
# -sdk is used) so this feature cannot possibly work.
|
||||||
if(gcc|intel_icl|msvc):!rim_qcc:!uikit:if(!macos|count(QMAKE_APPLE_DEVICE_ARCHS, 1)) {
|
if(gcc|intel_icl|msvc):!rim_qcc:!uikit:!no_moc_predefs:if(!macos|count(QMAKE_APPLE_DEVICE_ARCHS, 1)) {
|
||||||
moc_predefs.name = "Generate moc_predefs.h"
|
moc_predefs.name = "Generate moc_predefs.h"
|
||||||
moc_predefs.CONFIG = no_link
|
moc_predefs.CONFIG = no_link
|
||||||
gcc: moc_predefs.commands = $$QMAKE_CXX $$QMAKE_CXXFLAGS -dM -E -o ${QMAKE_FILE_OUT} ${QMAKE_FILE_IN}
|
gcc: moc_predefs.commands = $$QMAKE_CXX $$QMAKE_CXXFLAGS -dM -E -o ${QMAKE_FILE_OUT} ${QMAKE_FILE_IN}
|
||||||
|
@ -5,25 +5,19 @@ for(ever) {
|
|||||||
use = $$split(use, /)
|
use = $$split(use, /)
|
||||||
name = $$take_first(use)
|
name = $$take_first(use)
|
||||||
nu = $$upper($$name)
|
nu = $$upper($$name)
|
||||||
debug: \
|
!defined(QMAKE_LIBS_$$nu, var): \
|
||||||
libs = $$eval(QMAKE_LIBS_$${nu}_DEBUG)
|
|
||||||
else: \
|
|
||||||
libs = $$eval(QMAKE_LIBS_$${nu}_RELEASE)
|
|
||||||
libs += $$eval(QMAKE_LIBS_$$nu)
|
|
||||||
libdir = $$eval(QMAKE_LIBDIR_$$nu)
|
|
||||||
defines = $$eval(QMAKE_DEFINES_$${nu})
|
|
||||||
includes = $$eval(QMAKE_INCDIR_$${nu})
|
|
||||||
|
|
||||||
isEmpty(libs):isEmpty(defines):isEmpty(includes): \
|
|
||||||
error("Library '$$name' is not defined.")
|
error("Library '$$name' is not defined.")
|
||||||
|
|
||||||
!contains(use, nolink) {
|
!contains(use, nolink) {
|
||||||
QMAKE_LIBDIR += $$libdir
|
QMAKE_LIBDIR += $$eval(QMAKE_LIBDIR_$$nu)
|
||||||
LIBS$${suffix} += $$libs
|
debug: \
|
||||||
|
LIBS$${suffix} += $$eval(QMAKE_LIBS_$${nu}_DEBUG) $$eval(QMAKE_LIBS_$$nu)
|
||||||
|
else: \
|
||||||
|
LIBS$${suffix} += $$eval(QMAKE_LIBS_$${nu}_RELEASE) $$eval(QMAKE_LIBS_$$nu)
|
||||||
}
|
}
|
||||||
!contains(use, linkonly) {
|
!contains(use, linkonly) {
|
||||||
DEFINES += $$defines
|
DEFINES += $$eval(QMAKE_DEFINES_$${nu})
|
||||||
INCLUDEPATH += $$includes
|
INCLUDEPATH += $$eval(QMAKE_INCDIR_$${nu})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
!isEmpty(suffix): break()
|
!isEmpty(suffix): break()
|
||||||
|
@ -401,6 +401,7 @@ defineReplace(qtConfPrepareArgs) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
defineTest(qtConfSetupLibraries) {
|
defineTest(qtConfSetupLibraries) {
|
||||||
|
asspfx = $${currentConfig}.commandline.assignments
|
||||||
for (l, $${currentConfig}.libraries._KEYS_) {
|
for (l, $${currentConfig}.libraries._KEYS_) {
|
||||||
lpfx = $${currentConfig}.libraries.$${l}
|
lpfx = $${currentConfig}.libraries.$${l}
|
||||||
# 'export' may be omitted, in which case it falls back to the library's name
|
# 'export' may be omitted, in which case it falls back to the library's name
|
||||||
@ -408,6 +409,15 @@ defineTest(qtConfSetupLibraries) {
|
|||||||
$${lpfx}.export = $$l
|
$${lpfx}.export = $$l
|
||||||
export($${lpfx}.export)
|
export($${lpfx}.export)
|
||||||
}
|
}
|
||||||
|
# 'export' may also be empty, but we need a derived identifier
|
||||||
|
alias = $$eval($${lpfx}.export)
|
||||||
|
isEmpty(alias): alias = $$l
|
||||||
|
$${lpfx}.alias = $$alias
|
||||||
|
export($${lpfx}.alias)
|
||||||
|
# make it easy to refer to the library by its export name.
|
||||||
|
$${currentConfig}.exports._KEYS_ += $$alias
|
||||||
|
$${currentConfig}.exports.$$alias += $$l
|
||||||
|
export($${currentConfig}.exports.$$alias)
|
||||||
isEmpty($${lpfx}.sources._KEYS_): \
|
isEmpty($${lpfx}.sources._KEYS_): \
|
||||||
error("Library $$l defines no sources")
|
error("Library $$l defines no sources")
|
||||||
for (s, $${lpfx}.sources._KEYS_) {
|
for (s, $${lpfx}.sources._KEYS_) {
|
||||||
@ -427,10 +437,33 @@ defineTest(qtConfSetupLibraries) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$${currentConfig}.exports._KEYS_ = $$unique($${currentConfig}.exports._KEYS_)
|
||||||
|
export($${currentConfig}.exports._KEYS_)
|
||||||
|
|
||||||
|
for (alias, $${currentConfig}.exports._KEYS_) {
|
||||||
|
ua = $$upper($$alias)
|
||||||
|
$${asspfx}._KEYS_ += \
|
||||||
|
$${ua}_PREFIX $${ua}_INCDIR $${ua}_LIBDIR \
|
||||||
|
$${ua}_LIBS $${ua}_LIBS_DEBUG $${ua}_LIBS_RELEASE
|
||||||
|
uapfx = $${asspfx}.$${ua}
|
||||||
|
$${uapfx}_PREFIX = $${alias}.prefix
|
||||||
|
$${uapfx}_INCDIR = $${alias}.incdir
|
||||||
|
$${uapfx}_LIBDIR = $${alias}.libdir
|
||||||
|
$${uapfx}_LIBS = $${alias}.libs
|
||||||
|
$${uapfx}_LIBS_DEBUG = $${alias}.libs.debug
|
||||||
|
$${uapfx}_LIBS_RELEASE = $${alias}.libs.release
|
||||||
|
export($${uapfx}_PREFIX)
|
||||||
|
export($${uapfx}_INCDIR)
|
||||||
|
export($${uapfx}_LIBDIR)
|
||||||
|
export($${uapfx}_LIBS)
|
||||||
|
export($${uapfx}_LIBS_DEBUG)
|
||||||
|
export($${uapfx}_LIBS_RELEASE)
|
||||||
|
}
|
||||||
|
export($${asspfx}._KEYS_)
|
||||||
|
|
||||||
# reverse mapping for assignments on command line.
|
# reverse mapping for assignments on command line.
|
||||||
for (a, $${currentConfig}.commandline.assignments._KEYS_) {
|
for (a, $${asspfx}._KEYS_) {
|
||||||
apfx = $${currentConfig}.commandline.assignments.$${a}
|
apfx = $${asspfx}.$${a}
|
||||||
ra = config.commandline.rev_assignments.$$eval($$apfx)
|
ra = config.commandline.rev_assignments.$$eval($$apfx)
|
||||||
$$ra = $$a
|
$$ra = $$a
|
||||||
export($$ra)
|
export($$ra)
|
||||||
@ -444,9 +477,13 @@ defineTest(qtConfLibrary_inline) {
|
|||||||
!defined($${1}.libs, var): \
|
!defined($${1}.libs, var): \
|
||||||
error("'inline' source in library '$$lib' does not specify 'libs'.")
|
error("'inline' source in library '$$lib' does not specify 'libs'.")
|
||||||
|
|
||||||
|
# if multiple libraries provide the same export, it makes sense
|
||||||
|
# to make them recognize the same input variables.
|
||||||
|
input = $$eval($${2}.alias)
|
||||||
|
|
||||||
# direct libs. overwrites inline libs.
|
# direct libs. overwrites inline libs.
|
||||||
defined(config.input.$${lib}.libs, var) {
|
defined(config.input.$${input}.libs, var) {
|
||||||
$${1}.libs = $$eval(config.input.$${lib}.libs)
|
$${1}.libs = $$eval(config.input.$${input}.libs)
|
||||||
export($${1}.libs)
|
export($${1}.libs)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -455,7 +492,7 @@ defineTest(qtConfLibrary_inline) {
|
|||||||
any = false
|
any = false
|
||||||
all = true
|
all = true
|
||||||
for (b, $${1}.builds._KEYS_) {
|
for (b, $${1}.builds._KEYS_) {
|
||||||
iv = $${lib}.libs.$${b}
|
iv = $${input}.libs.$${b}
|
||||||
vars += $$eval(config.commandline.rev_assignments.$${iv})
|
vars += $$eval(config.commandline.rev_assignments.$${iv})
|
||||||
defined(config.input.$${iv}, var) {
|
defined(config.input.$${iv}, var) {
|
||||||
$${1}.builds.$${b}.libs = $$eval(config.input.$${iv})
|
$${1}.builds.$${b}.libs = $$eval(config.input.$${iv})
|
||||||
@ -471,7 +508,7 @@ defineTest(qtConfLibrary_inline) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# prefix. prepends to (possibly overwritten) inline libs.
|
# prefix. prepends to (possibly overwritten) inline libs.
|
||||||
prefix = $$val_escape(config.input.$${lib}.prefix)
|
prefix = $$val_escape(config.input.$${input}.prefix)
|
||||||
!isEmpty(prefix) {
|
!isEmpty(prefix) {
|
||||||
$${1}.includedir = $$prefix/include
|
$${1}.includedir = $$prefix/include
|
||||||
export($${1}.includedir)
|
export($${1}.includedir)
|
||||||
@ -479,6 +516,18 @@ defineTest(qtConfLibrary_inline) {
|
|||||||
export($${1}.libs)
|
export($${1}.libs)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
incdir = $$val_escape(config.input.$${input}.incdir)
|
||||||
|
!isEmpty(incdir) {
|
||||||
|
$${1}.includedir = $$incdir
|
||||||
|
export($${1}.includedir)
|
||||||
|
}
|
||||||
|
|
||||||
|
libdir = $$val_escape(config.input.$${input}.libdir)
|
||||||
|
!isEmpty(libdir) {
|
||||||
|
$${1}.libs = "-L$$libdir $$eval($${1}.libs)"
|
||||||
|
export($${1}.libs)
|
||||||
|
}
|
||||||
|
|
||||||
return(true)
|
return(true)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -562,14 +611,20 @@ defineReplace(qtConfLibraryArgs) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
defineTest(qtConfExportLibrary) {
|
defineTest(qtConfExportLibrary) {
|
||||||
isEmpty(2): return()
|
lpfx = $${currentConfig}.libraries.$$1
|
||||||
!$$qtConfEvaluate($$eval($${1}.export)): return()
|
alias = $$eval($${lpfx}.alias)
|
||||||
|
$${currentConfig}.found.$$alias = $$1
|
||||||
|
export($${currentConfig}.found.$$alias)
|
||||||
|
name = $$eval($${lpfx}.export)
|
||||||
|
isEmpty(name): return()
|
||||||
|
spfx = $${lpfx}.sources.$$eval($${lpfx}.source)
|
||||||
|
!$$qtConfEvaluate($$eval($${spfx}.export)): return()
|
||||||
|
|
||||||
output = privatePro
|
output = privatePro
|
||||||
|
|
||||||
eval(libs = $$eval($${1}.libs))
|
eval(libs = $$eval($${spfx}.libs))
|
||||||
eval(cflags = $$eval($${1}.cflags))
|
eval(cflags = $$eval($${spfx}.cflags))
|
||||||
eval(includes = $$eval($${1}.includedir))
|
eval(includes = $$eval($${spfx}.includedir))
|
||||||
|
|
||||||
# Split $$cflags into stuff that goes into DEFINES, INCLUDEPATH, and other stuff.
|
# Split $$cflags into stuff that goes into DEFINES, INCLUDEPATH, and other stuff.
|
||||||
defines =
|
defines =
|
||||||
@ -588,30 +643,46 @@ defineTest(qtConfExportLibrary) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
!isEmpty(ignored): \
|
!isEmpty(ignored): \
|
||||||
qtConfAddNote("Dropped compiler flags '$$ignored' when detecting library '$$2'.")
|
qtConfAddNote("Dropped compiler flags '$$ignored' when detecting library '$$name'.")
|
||||||
|
|
||||||
NAME = $$upper($$2)
|
NAME = $$upper($$name)
|
||||||
!isEmpty(libs): qtConfOutputVar(assign, $$output, QMAKE_LIBS_$$NAME, $$libs)
|
# LIBS is emitted even if empty, as this allows the library to be "seen".
|
||||||
for (b, $${1}.builds._KEYS_): \
|
qtConfOutputVar(assign, $$output, QMAKE_LIBS_$$NAME, $$libs)
|
||||||
|
for (b, $${spfx}.builds._KEYS_): \
|
||||||
qtConfOutputVar(assign, $$output, QMAKE_LIBS_$${NAME}_$$upper($$b), \
|
qtConfOutputVar(assign, $$output, QMAKE_LIBS_$${NAME}_$$upper($$b), \
|
||||||
$$eval($${1}.builds.$${b}))
|
$$eval($${spfx}.builds.$${b}))
|
||||||
!isEmpty(defines): qtConfOutputVar(assign, $$output, QMAKE_DEFINES_$$NAME, $$defines)
|
!isEmpty(defines): qtConfOutputVar(assign, $$output, QMAKE_DEFINES_$$NAME, $$defines)
|
||||||
!isEmpty(includes): qtConfOutputVar(assign, $$output, QMAKE_INCDIR_$$NAME, $$includes)
|
!isEmpty(includes): qtConfOutputVar(assign, $$output, QMAKE_INCDIR_$$NAME, $$includes)
|
||||||
!isEmpty($${currentConfig}.module): \
|
!isEmpty($${currentConfig}.module): \
|
||||||
qtConfExtendVar($$output, "QT.$${currentModule}_private.libraries", $$2)
|
qtConfExtendVar($$output, "QT.$${currentModule}_private.libraries", $$name)
|
||||||
}
|
}
|
||||||
|
|
||||||
defineTest(qtConfHandleLibrary) {
|
defineTest(qtConfHandleLibrary) {
|
||||||
lpfx = $${currentConfig}.libraries.$$1
|
lpfx = $${currentConfig}.libraries.$$1
|
||||||
defined($${lpfx}.result, var): return()
|
defined($${lpfx}.result, var): return()
|
||||||
|
|
||||||
|
alias = $$eval($${lpfx}.alias)
|
||||||
|
!isEmpty($${currentConfig}.found.$$alias) {
|
||||||
|
# this happening indicates a logic error in the conditions
|
||||||
|
# of the feature(s) referring to this library.
|
||||||
|
# note that this does not look across module boundaries, as
|
||||||
|
# multiple modules may know the same libraries; de-duplication
|
||||||
|
# happens via the cache (obviously, this assumes identical
|
||||||
|
# definitions and logic).
|
||||||
|
error("A library exporting '$$alias' was already found.")
|
||||||
|
}
|
||||||
|
|
||||||
qtConfEnsureTestTypeDeps("library")
|
qtConfEnsureTestTypeDeps("library")
|
||||||
qtConfTestPrepare_compile($$lpfx)
|
!qtConfTestPrepare_compile($$lpfx) {
|
||||||
|
$${lpfx}.result = false
|
||||||
|
export($${lpfx}.result)
|
||||||
|
return()
|
||||||
|
}
|
||||||
use_args = $$eval($${lpfx}.literal_args)
|
use_args = $$eval($${lpfx}.literal_args)
|
||||||
|
|
||||||
qtConfLoadResult($${lpfx}, $$1) {
|
qtConfLoadResult($${lpfx}, $$1) {
|
||||||
$$eval($${lpfx}.result): \
|
$$eval($${lpfx}.result): \
|
||||||
qtConfExportLibrary($${lpfx}.sources.$$eval($${lpfx}.source), $$eval($${lpfx}.export))
|
qtConfExportLibrary($$1)
|
||||||
return()
|
return()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -634,14 +705,14 @@ defineTest(qtConfHandleLibrary) {
|
|||||||
next()
|
next()
|
||||||
}
|
}
|
||||||
|
|
||||||
!$${call}($$spfx) {
|
!$${call}($$spfx, $$lpfx) {
|
||||||
qtLog(" => source produced no result.")
|
qtLog(" => source produced no result.")
|
||||||
next()
|
next()
|
||||||
}
|
}
|
||||||
|
|
||||||
# if the library defines a test, use it to verify the source.
|
# if the library defines a test, use it to verify the source.
|
||||||
!isEmpty($${lpfx}.test) {
|
!isEmpty($${lpfx}.test) {
|
||||||
$${lpfx}.literal_args = $$use_args $$qtConfLibraryArgs($$spfx)
|
$${lpfx}.literal_args = $$qtConfLibraryArgs($$spfx) $$use_args
|
||||||
$${lpfx}.host = $$eval($${spfx}.host)
|
$${lpfx}.host = $$eval($${spfx}.host)
|
||||||
!qtConfTest_compile($$lpfx) {
|
!qtConfTest_compile($$lpfx) {
|
||||||
qtLog(" => source failed verification.")
|
qtLog(" => source failed verification.")
|
||||||
@ -657,11 +728,12 @@ defineTest(qtConfHandleLibrary) {
|
|||||||
for (b, $${spfx}.builds._KEYS_): \
|
for (b, $${spfx}.builds._KEYS_): \
|
||||||
$${lpfx}.cache += sources.$${s}.builds.$${b}
|
$${lpfx}.cache += sources.$${s}.builds.$${b}
|
||||||
|
|
||||||
# immediately output the library as well.
|
|
||||||
qtConfExportLibrary($${spfx}, $$eval($${lpfx}.export))
|
|
||||||
|
|
||||||
$${lpfx}.source = $$s
|
$${lpfx}.source = $$s
|
||||||
export($${lpfx}.source)
|
export($${lpfx}.source)
|
||||||
|
|
||||||
|
# immediately output the library as well.
|
||||||
|
qtConfExportLibrary($$1)
|
||||||
|
|
||||||
result = true
|
result = true
|
||||||
break()
|
break()
|
||||||
}
|
}
|
||||||
@ -679,27 +751,76 @@ defineTest(qtConfTest_library) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
defineTest(qtConfTestPrepare_compile) {
|
defineTest(qtConfTestPrepare_compile) {
|
||||||
for (u, $$list($$eval($${1}.use))) {
|
!isEmpty($${1}.use._KEYS_) {
|
||||||
|
uses =
|
||||||
|
for (k, $${1}.use._KEYS_) {
|
||||||
|
use = $$eval($${1}.use.$${k}.lib)
|
||||||
|
isEmpty(use): \
|
||||||
|
error("'use' entry $$k in test $$1 lacks 'lib' field.")
|
||||||
|
!$$qtConfEvaluate($$eval($${1}.use.$${k}.condition)): \
|
||||||
|
next()
|
||||||
|
uses += $$use
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
uses = $$split($${1}.use)
|
||||||
|
}
|
||||||
|
for (u, uses) {
|
||||||
libConfig =
|
libConfig =
|
||||||
contains($${currentConfig}.libraries._KEYS_, $$u) {
|
exports = $$eval($${currentConfig}.exports.$$u)
|
||||||
libConfig = $${currentConfig}
|
!isEmpty(exports) {
|
||||||
|
# using a local library by exported name.
|
||||||
|
ru = $$eval($${currentConfig}.found.$$u)
|
||||||
|
!isEmpty(ru) {
|
||||||
|
# if it was already found, all is good.
|
||||||
|
u = $$ru
|
||||||
|
} else: count(exports, 1) {
|
||||||
|
# otherwise, if there is only one option, ensure it's resolved.
|
||||||
|
u = $$exports
|
||||||
|
qtConfHandleLibrary($$u)
|
||||||
|
} else {
|
||||||
|
# otherwise, verify that all options were resolved.
|
||||||
|
for (x, exports) {
|
||||||
|
isEmpty($${currentConfig}.libraries.$${x}.result) {
|
||||||
|
# the higher-level logic is in the features, which we cannot
|
||||||
|
# infer from here. so the only option is failing.
|
||||||
|
error("Test $$1 refers to yet unresolved library export '$$u'")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return(false)
|
||||||
|
}
|
||||||
|
libConfig = $$currentConfig
|
||||||
|
} else: contains($${currentConfig}.libraries._KEYS_, $$u) {
|
||||||
|
# using a local library by real name. this should be the exception.
|
||||||
qtConfHandleLibrary($$u)
|
qtConfHandleLibrary($$u)
|
||||||
|
libConfig = $$currentConfig
|
||||||
} else {
|
} else {
|
||||||
for (d, QMAKE_CONFIG_DEPS) {
|
for (d, QMAKE_LIBRARY_DEPS) {
|
||||||
contains($${d}.libraries._KEYS_, $$u) {
|
exports = $$eval($${d}.exports.$$u)
|
||||||
libConfig = $$d
|
!isEmpty(exports) {
|
||||||
break()
|
# using a foreign library by exported name.
|
||||||
|
# foreign libraries may be external (if they are from a different
|
||||||
|
# repository and the build is modular), and using these by real
|
||||||
|
# name is impossible. so for consistency, uses by real name are
|
||||||
|
# limited to local libraries.
|
||||||
|
ru = $$eval($${d}.found.$$u)
|
||||||
|
!isEmpty(ru) {
|
||||||
|
u = $$ru
|
||||||
|
libConfig = $$d
|
||||||
|
break()
|
||||||
|
}
|
||||||
|
for (x, exports) {
|
||||||
|
isEmpty($${d}.libraries.$${x}.result): \
|
||||||
|
error("Test $$1 refers to unresolved library export '$$u' in '$$d'")
|
||||||
|
}
|
||||||
|
return(false)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
isEmpty(libConfig) {
|
isEmpty(libConfig) {
|
||||||
nu = $$upper($$u)
|
nu = $$upper($$u)
|
||||||
libs = $$eval(QMAKE_LIBS_$$nu) $$eval(QMAKE_LIBS_$${nu}_DEBUG) $$eval(QMAKE_LIBS_$${nu}_RELEASE)
|
!defined(QMAKE_LIBS_$$nu, var): \
|
||||||
defines = $$eval(QMAKE_DEFINES_$${nu})
|
|
||||||
includes = $$eval(QMAKE_INCDIR_$${nu})
|
|
||||||
|
|
||||||
isEmpty(libs):isEmpty(defines):isEmpty(includes): \
|
|
||||||
error("Test $$1 tries to use undeclared library '$$u'")
|
error("Test $$1 tries to use undeclared library '$$u'")
|
||||||
|
# using an external library by exported name.
|
||||||
$${1}.literal_args += $$system_quote(QMAKE_USE += $$u)
|
$${1}.literal_args += $$system_quote(QMAKE_USE += $$u)
|
||||||
} else {
|
} else {
|
||||||
lpfx = $${libConfig}.libraries.$${u}
|
lpfx = $${libConfig}.libraries.$${u}
|
||||||
@ -1252,14 +1373,14 @@ defineTest(qtConfProcessFeatures) {
|
|||||||
# reporting
|
# reporting
|
||||||
#
|
#
|
||||||
|
|
||||||
QT_CONF_REPORT_PADDING = "........................................"
|
defineReplace(qtConfPadCols) {
|
||||||
|
pad = $$num_add($$str_size($$2), -$$str_size($${1}))
|
||||||
|
lessThan(pad, 0): pad = 0
|
||||||
|
return("$$1 $$str_member($$2, 0, $$pad) $$3")
|
||||||
|
}
|
||||||
|
|
||||||
defineTest(qtConfReportPadded) {
|
defineTest(qtConfReportPadded) {
|
||||||
pad = $$num_add($$str_size($$QT_CONF_REPORT_PADDING), -$$str_size($${1}))
|
qtConfAddReport($$qtConfPadCols($$1, "........................................", $$2))
|
||||||
lessThan(pad, 0): pad = 0
|
|
||||||
str = "$$1 $$str_member($$QT_CONF_REPORT_PADDING, 0, $$pad)"
|
|
||||||
|
|
||||||
qtConfAddReport("$$str $${2}")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
defineReplace(qtConfCollectFeatures) {
|
defineReplace(qtConfCollectFeatures) {
|
||||||
@ -1749,8 +1870,6 @@ for(ever) {
|
|||||||
jsonFile = $$thisDir/configure.json
|
jsonFile = $$thisDir/configure.json
|
||||||
priFile = $$thisDir/configure.pri
|
priFile = $$thisDir/configure.pri
|
||||||
|
|
||||||
allConfigs += $$currentConfig
|
|
||||||
|
|
||||||
# load configuration data
|
# load configuration data
|
||||||
configure_data = $$cat($$jsonFile, blob)
|
configure_data = $$cat($$jsonFile, blob)
|
||||||
!parseJson(configure_data, $$currentConfig): \
|
!parseJson(configure_data, $$currentConfig): \
|
||||||
@ -1758,25 +1877,88 @@ for(ever) {
|
|||||||
exists($$priFile): \
|
exists($$priFile): \
|
||||||
!include($$priFile): error()
|
!include($$priFile): error()
|
||||||
|
|
||||||
|
# only configs which contain more than just subconfigs are saved for later.
|
||||||
|
$${currentConfig}._KEYS_ -= subconfigs
|
||||||
|
!isEmpty($${currentConfig}._KEYS_) {
|
||||||
|
allConfigs += $$currentConfig
|
||||||
|
contains($${currentConfig}._KEYS_, libraries) {
|
||||||
|
qtConfSetupLibraries()
|
||||||
|
# this ensures that references in QMAKE_LIBRARY_DEPS are unique.
|
||||||
|
qtConfSetModuleName()
|
||||||
|
ex = $$eval(config.modules.$${currentModule})
|
||||||
|
!isEmpty(ex): \
|
||||||
|
error("Module $$currentModule is claimed by both $$currentConfig and $${ex}.")
|
||||||
|
config.modules.$${currentModule} = $$currentConfig
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
# prepend all subconfigs to files to keep a depth first search order
|
# prepend all subconfigs to files to keep a depth first search order
|
||||||
subconfigs =
|
subconfigs =
|
||||||
for(n, $${currentConfig}.subconfigs._KEYS_) {
|
for(n, $${currentConfig}.subconfigs._KEYS_) {
|
||||||
subconfig = $$eval($${currentConfig}.subconfigs.$${n})
|
subconfig = $$eval($${currentConfig}.subconfigs.$${n})
|
||||||
name = $$basename(subconfig)
|
name = $$basename(subconfig)
|
||||||
|
ex = $$eval(config.$${name}.dir)
|
||||||
|
!isEmpty(ex): \
|
||||||
|
error("Basename clash between $$thisDir/$$subconfig and $${ex}.")
|
||||||
config.$${name}.dir = $$thisDir/$$subconfig
|
config.$${name}.dir = $$thisDir/$$subconfig
|
||||||
subconfigs += $$name
|
subconfigs += $$name
|
||||||
}
|
}
|
||||||
configsToProcess = $$subconfigs $$configsToProcess
|
configsToProcess = $$subconfigs $$configsToProcess
|
||||||
}
|
}
|
||||||
|
|
||||||
for (currentConfig, allConfigs): \
|
|
||||||
qtConfSetupLibraries()
|
|
||||||
|
|
||||||
QMAKE_SAVED_ARGS = $$QMAKE_EXTRA_ARGS
|
QMAKE_SAVED_ARGS = $$QMAKE_EXTRA_ARGS
|
||||||
QMAKE_REDO_CONFIG = false
|
QMAKE_REDO_CONFIG = false
|
||||||
qtConfParseCommandLine()
|
qtConfParseCommandLine()
|
||||||
qtConfCheckErrors()
|
qtConfCheckErrors()
|
||||||
|
|
||||||
|
!isEmpty(config.input.list-features) {
|
||||||
|
all_ft =
|
||||||
|
for (currentConfig, allConfigs) {
|
||||||
|
for (k, $${currentConfig}.features._KEYS_) {
|
||||||
|
pp = $$eval($${currentConfig}.features.$${k}.purpose)
|
||||||
|
!isEmpty(pp) {
|
||||||
|
all_ft += $$qtConfPadCols($$k, ".......................", \
|
||||||
|
$$section(pp, $$escape_expand(\\n), 0, 0))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
all_ft = $$sorted(all_ft)
|
||||||
|
logn()
|
||||||
|
for (ft, all_ft): \
|
||||||
|
logn($$ft)
|
||||||
|
error()
|
||||||
|
}
|
||||||
|
|
||||||
|
!isEmpty(config.input.list-libraries) {
|
||||||
|
logn()
|
||||||
|
for (currentConfig, allConfigs) {
|
||||||
|
!isEmpty($${currentConfig}.exports._KEYS_) {
|
||||||
|
!isEmpty($${currentConfig}.module): \
|
||||||
|
logn($$eval($${currentConfig}.module):)
|
||||||
|
else: \
|
||||||
|
logn($$section(currentConfig, ., -1):)
|
||||||
|
all_xp =
|
||||||
|
for (xport, $${currentConfig}.exports._KEYS_) {
|
||||||
|
libs = $$eval($${currentConfig}.exports.$$xport)
|
||||||
|
isEqual($${currentConfig}.libraries.$$first(libs).export, "") { # not isEmpty()!
|
||||||
|
!isEmpty(config.input.verbose): \
|
||||||
|
all_xp += "$$xport!"
|
||||||
|
} else {
|
||||||
|
out = "$$xport"
|
||||||
|
!isEmpty(config.input.verbose):!isEqual(xport, $$libs): \
|
||||||
|
out += "($$libs)"
|
||||||
|
all_xp += "$$out"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
all_xp = $$sorted(all_xp)
|
||||||
|
all_xp ~= s,^([^!]*)!$,(\\1),g
|
||||||
|
for (xp, all_xp): \
|
||||||
|
logn(" $$xp")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
error()
|
||||||
|
}
|
||||||
|
|
||||||
for (currentConfig, allConfigs) {
|
for (currentConfig, allConfigs) {
|
||||||
qtConfSetModuleName()
|
qtConfSetModuleName()
|
||||||
qtConfSetupModuleOutputs()
|
qtConfSetupModuleOutputs()
|
||||||
@ -1833,11 +2015,15 @@ for (currentConfig, allConfigs) {
|
|||||||
|
|
||||||
# correctly setup dependencies
|
# correctly setup dependencies
|
||||||
QMAKE_CONFIG_DEPS = global global_private
|
QMAKE_CONFIG_DEPS = global global_private
|
||||||
|
QMAKE_LIBRARY_DEPS = $$eval(config.modules.global)
|
||||||
!isEmpty($${currentConfig}.module) {
|
!isEmpty($${currentConfig}.module) {
|
||||||
for (d, $${currentConfig}.depends._KEYS_) {
|
for (d, $${currentConfig}.depends._KEYS_) {
|
||||||
dep = $$replace($${currentConfig}.depends.$$d, -private$, _private)
|
dep = $$replace($${currentConfig}.depends.$$d, -private$, _private)
|
||||||
dep *= $$replace(dep, _private$, )
|
gdep = $$replace(dep, _private$, )
|
||||||
|
dep *= $$gdep
|
||||||
QMAKE_CONFIG_DEPS += $$dep
|
QMAKE_CONFIG_DEPS += $$dep
|
||||||
|
!isEqual(gdep, $$dep): \ # libraries are in the private module.
|
||||||
|
QMAKE_LIBRARY_DEPS += $$eval(config.modules.$$gdep)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -42,6 +42,7 @@ THE_TARGET = $$qt5LibraryTarget($$TARGET)
|
|||||||
darwin: MODULE_DEBUG_LIBS = -L$$DESTDIR -l$${TARGET}_debug
|
darwin: MODULE_DEBUG_LIBS = -L$$DESTDIR -l$${TARGET}_debug
|
||||||
MODULE_RELEASE_LIBS = -L$$DESTDIR -l$$TARGET
|
MODULE_RELEASE_LIBS = -L$$DESTDIR -l$$TARGET
|
||||||
MODULE_PRI_CONT += \
|
MODULE_PRI_CONT += \
|
||||||
|
"QMAKE_LIBS_$${ucmodule} =" \ # Needed for the module to be recognized.
|
||||||
"QMAKE_LIBS_$${ucmodule}_DEBUG = $$val_escape(MODULE_DEBUG_LIBS)" \
|
"QMAKE_LIBS_$${ucmodule}_DEBUG = $$val_escape(MODULE_DEBUG_LIBS)" \
|
||||||
"QMAKE_LIBS_$${ucmodule}_RELEASE = $$val_escape(MODULE_RELEASE_LIBS)"
|
"QMAKE_LIBS_$${ucmodule}_RELEASE = $$val_escape(MODULE_RELEASE_LIBS)"
|
||||||
} else {
|
} else {
|
||||||
|
@ -59,7 +59,7 @@ defineReplace(qtExportLibsForModule) {
|
|||||||
QMAKE_LIBS_$$NAME QMAKE_LIBS_$${NAME}_DEBUG QMAKE_LIBS_$${NAME}_RELEASE \
|
QMAKE_LIBS_$$NAME QMAKE_LIBS_$${NAME}_DEBUG QMAKE_LIBS_$${NAME}_RELEASE \
|
||||||
QMAKE_DEFINES_$$NAME QMAKE_INCDIR_$$NAME
|
QMAKE_DEFINES_$$NAME QMAKE_INCDIR_$$NAME
|
||||||
for (var, vars) {
|
for (var, vars) {
|
||||||
!isEmpty($$var): \
|
defined($$var, var): \
|
||||||
result += "$$var = $$val_escape($$var)"
|
result += "$$var = $$val_escape($$var)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,7 @@ QMAKE_CFLAGS_APP = -fPIC
|
|||||||
QMAKE_CFLAGS_DEPS = -M
|
QMAKE_CFLAGS_DEPS = -M
|
||||||
QMAKE_CFLAGS_WARN_ON = -w1 -Wall -Wcheck -wd1572,873,2259,2261,3373
|
QMAKE_CFLAGS_WARN_ON = -w1 -Wall -Wcheck -wd1572,873,2259,2261,3373
|
||||||
QMAKE_CFLAGS_WARN_OFF = -w
|
QMAKE_CFLAGS_WARN_OFF = -w
|
||||||
QMAKE_CFLAGS_RELEASE = -O2 -ansi-alias -fstrict-aliasing
|
QMAKE_CFLAGS_RELEASE = -O2
|
||||||
QMAKE_CFLAGS_DEBUG = -O0 -g
|
QMAKE_CFLAGS_DEBUG = -O0 -g
|
||||||
QMAKE_CFLAGS_SHLIB = -fPIC
|
QMAKE_CFLAGS_SHLIB = -fPIC
|
||||||
QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB
|
QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB
|
||||||
|
@ -16,8 +16,8 @@ QMAKE_CFLAGS =
|
|||||||
QMAKE_CFLAGS_DEPS = -M
|
QMAKE_CFLAGS_DEPS = -M
|
||||||
QMAKE_CFLAGS_WARN_ON = -w1 -Wcheck -wd654,1572,411,873,1125,2259,2261,3280,3373
|
QMAKE_CFLAGS_WARN_ON = -w1 -Wcheck -wd654,1572,411,873,1125,2259,2261,3280,3373
|
||||||
QMAKE_CFLAGS_WARN_OFF = -w
|
QMAKE_CFLAGS_WARN_OFF = -w
|
||||||
QMAKE_CFLAGS_RELEASE =
|
QMAKE_CFLAGS_RELEASE = -O2
|
||||||
QMAKE_CFLAGS_DEBUG = -g
|
QMAKE_CFLAGS_DEBUG = -g -O0
|
||||||
QMAKE_CFLAGS_SHLIB = -fPIC
|
QMAKE_CFLAGS_SHLIB = -fPIC
|
||||||
QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB
|
QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB
|
||||||
QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
|
QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
|
||||||
|
@ -276,6 +276,9 @@ public class QtActivityDelegate
|
|||||||
|
|
||||||
if (m_softInputMode != 0) {
|
if (m_softInputMode != 0) {
|
||||||
m_activity.getWindow().setSoftInputMode(m_softInputMode);
|
m_activity.getWindow().setSoftInputMode(m_softInputMode);
|
||||||
|
final boolean softInputIsHidden = (m_softInputMode & WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN) != 0;
|
||||||
|
if (softInputIsHidden)
|
||||||
|
return;
|
||||||
} else {
|
} else {
|
||||||
if (height > visibleHeight)
|
if (height > visibleHeight)
|
||||||
m_activity.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_UNCHANGED | WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
|
m_activity.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_UNCHANGED | WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
|
||||||
|
@ -192,6 +192,32 @@ QtConcurrent::ConstMemberFunctionWrapper<T, C> createFunctionWrapper(T (C::*func
|
|||||||
return QtConcurrent::ConstMemberFunctionWrapper<T, C>(func);
|
return QtConcurrent::ConstMemberFunctionWrapper<T, C>(func);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(__cpp_noexcept_function_type) && __cpp_noexcept_function_type >= 201510
|
||||||
|
template <typename T, typename U>
|
||||||
|
QtConcurrent::FunctionWrapper1<T, U> createFunctionWrapper(T (*func)(U) noexcept)
|
||||||
|
{
|
||||||
|
return QtConcurrent::FunctionWrapper1<T, U>(func);
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename T, typename C>
|
||||||
|
QtConcurrent::MemberFunctionWrapper<T, C> createFunctionWrapper(T (C::*func)() noexcept)
|
||||||
|
{
|
||||||
|
return QtConcurrent::MemberFunctionWrapper<T, C>(func);
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename T, typename C, typename U>
|
||||||
|
QtConcurrent::MemberFunctionWrapper1<T, C, U> createFunctionWrapper(T (C::*func)(U) noexcept)
|
||||||
|
{
|
||||||
|
return QtConcurrent::MemberFunctionWrapper1<T, C, U>(func);
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename T, typename C>
|
||||||
|
QtConcurrent::ConstMemberFunctionWrapper<T, C> createFunctionWrapper(T (C::*func)() const noexcept)
|
||||||
|
{
|
||||||
|
return QtConcurrent::ConstMemberFunctionWrapper<T, C>(func);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
struct PushBackWrapper
|
struct PushBackWrapper
|
||||||
{
|
{
|
||||||
typedef void result_type;
|
typedef void result_type;
|
||||||
@ -231,6 +257,20 @@ struct ReduceResultType<T(C::*)(U)>
|
|||||||
typedef C ResultType;
|
typedef C ResultType;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#if defined(__cpp_noexcept_function_type) && __cpp_noexcept_function_type >= 201510
|
||||||
|
template <class U, class V>
|
||||||
|
struct ReduceResultType<void(*)(U&,V) noexcept>
|
||||||
|
{
|
||||||
|
typedef U ResultType;
|
||||||
|
};
|
||||||
|
|
||||||
|
template <class T, class C, class U>
|
||||||
|
struct ReduceResultType<T(C::*)(U) noexcept>
|
||||||
|
{
|
||||||
|
typedef C ResultType;
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
template <class InputSequence, class MapFunctor>
|
template <class InputSequence, class MapFunctor>
|
||||||
struct MapResultType
|
struct MapResultType
|
||||||
{
|
{
|
||||||
@ -249,6 +289,20 @@ struct MapResultType<void, T(C::*)() const>
|
|||||||
typedef T ResultType;
|
typedef T ResultType;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#if defined(__cpp_noexcept_function_type) && __cpp_noexcept_function_type >= 201510
|
||||||
|
template <class U, class V>
|
||||||
|
struct MapResultType<void, U (*)(V) noexcept>
|
||||||
|
{
|
||||||
|
typedef U ResultType;
|
||||||
|
};
|
||||||
|
|
||||||
|
template <class T, class C>
|
||||||
|
struct MapResultType<void, T(C::*)() const noexcept>
|
||||||
|
{
|
||||||
|
typedef T ResultType;
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef QT_NO_TEMPLATE_TEMPLATE_PARAMETERS
|
#ifndef QT_NO_TEMPLATE_TEMPLATE_PARAMETERS
|
||||||
|
|
||||||
template <template <typename> class InputSequence, typename MapFunctor, typename T>
|
template <template <typename> class InputSequence, typename MapFunctor, typename T>
|
||||||
@ -269,6 +323,21 @@ struct MapResultType<InputSequence<T>, U(C::*)() const>
|
|||||||
typedef InputSequence<U> ResultType;
|
typedef InputSequence<U> ResultType;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#if defined(__cpp_noexcept_function_type) && __cpp_noexcept_function_type >= 201510
|
||||||
|
|
||||||
|
template <template <typename> class InputSequence, class T, class U, class V>
|
||||||
|
struct MapResultType<InputSequence<T>, U (*)(V) noexcept>
|
||||||
|
{
|
||||||
|
typedef InputSequence<U> ResultType;
|
||||||
|
};
|
||||||
|
|
||||||
|
template <template <typename> class InputSequence, class T, class U, class C>
|
||||||
|
struct MapResultType<InputSequence<T>, U(C::*)() const noexcept>
|
||||||
|
{
|
||||||
|
typedef InputSequence<U> ResultType;
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif // QT_NO_TEMPLATE_TEMPLATE_PARAMETER
|
#endif // QT_NO_TEMPLATE_TEMPLATE_PARAMETER
|
||||||
|
|
||||||
template <class MapFunctor>
|
template <class MapFunctor>
|
||||||
@ -289,6 +358,21 @@ struct MapResultType<QStringList, U(C::*)() const>
|
|||||||
typedef QList<U> ResultType;
|
typedef QList<U> ResultType;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#if defined(__cpp_noexcept_function_type) && __cpp_noexcept_function_type >= 201510
|
||||||
|
|
||||||
|
template <class U, class V>
|
||||||
|
struct MapResultType<QStringList, U (*)(V) noexcept>
|
||||||
|
{
|
||||||
|
typedef QList<U> ResultType;
|
||||||
|
};
|
||||||
|
|
||||||
|
template <class U, class C>
|
||||||
|
struct MapResultType<QStringList, U(C::*)() const noexcept>
|
||||||
|
{
|
||||||
|
typedef QList<U> ResultType;
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
} // namespace QtPrivate.
|
} // namespace QtPrivate.
|
||||||
|
|
||||||
#endif //Q_QDOC
|
#endif //Q_QDOC
|
||||||
|
@ -55,6 +55,6 @@ QRect r2(QPoint(100, 200), QSize(11, 16));
|
|||||||
|
|
||||||
|
|
||||||
//! [1]
|
//! [1]
|
||||||
QRectF r1(100, 200, 11, 16);
|
QRectF r1(100.0, 200.1, 11.2, 16.3);
|
||||||
QRectF r2(QPoint(100, 200), QSize(11, 16));
|
QRectF r2(QPointF(100.0, 200.1), QSizeF(11.2, 16.3));
|
||||||
//! [1]
|
//! [1]
|
||||||
|
@ -1,956 +0,0 @@
|
|||||||
# Generic entry format
|
|
||||||
#Feature: UPPERCASENAME (for the #define)
|
|
||||||
#Description: One sentence description of what this does.
|
|
||||||
#Section: Categorization
|
|
||||||
#Requires: UPPERCASENAME...
|
|
||||||
#Name: CamelCaseName (often a class name)
|
|
||||||
#SeeAlso: UPPERCASENAME... (currently unused)
|
|
||||||
|
|
||||||
# Kernel
|
|
||||||
|
|
||||||
Feature: PROPERTIES
|
|
||||||
Description: Supports scripting Qt-based applications.
|
|
||||||
Section: Kernel
|
|
||||||
Requires:
|
|
||||||
Name: Properties
|
|
||||||
|
|
||||||
Feature: TEXTHTMLPARSER
|
|
||||||
Description: Parser for HTML
|
|
||||||
Section: Kernel
|
|
||||||
Requires:
|
|
||||||
Name: HtmlParser
|
|
||||||
|
|
||||||
Feature: TEXTODFWRITER
|
|
||||||
Description: Provides an ODF writer
|
|
||||||
Section: Kernel
|
|
||||||
Requires: XMLSTREAMWRITER
|
|
||||||
Name: OdfWriter
|
|
||||||
|
|
||||||
Feature: CSSPARSER
|
|
||||||
Description: Parser for Style Sheets
|
|
||||||
Section: Kernel
|
|
||||||
Requires:
|
|
||||||
Name: CssParser
|
|
||||||
|
|
||||||
Feature: REGULAREXPRESSION
|
|
||||||
Description: Perl-compatible regular expression APIs
|
|
||||||
Section: Kernel
|
|
||||||
Requires:
|
|
||||||
Name: QRegularExpression
|
|
||||||
|
|
||||||
Feature: CONCURRENT
|
|
||||||
Description: Provides a high-level multi-threaded APIs
|
|
||||||
Section: Kernel
|
|
||||||
Requires:
|
|
||||||
Name: QtConcurrent
|
|
||||||
|
|
||||||
Feature: DRAGANDDROP
|
|
||||||
Description: Supports the drag and drop mechansim.
|
|
||||||
Section: Kernel
|
|
||||||
Requires: IMAGEFORMAT_XPM
|
|
||||||
Name: Drag and drop
|
|
||||||
|
|
||||||
Feature: SESSIONMANAGER
|
|
||||||
Description: Supports session management.
|
|
||||||
Section: Kernel
|
|
||||||
Requires:
|
|
||||||
Name: Session Manager
|
|
||||||
|
|
||||||
Feature: SHORTCUT
|
|
||||||
Description: Supports keyboard accelerators and shortcuts.
|
|
||||||
Section: Kernel
|
|
||||||
Requires:
|
|
||||||
Name: QShortcut
|
|
||||||
|
|
||||||
Feature: ACTION
|
|
||||||
Description: Supports widget actions.
|
|
||||||
Section: Kernel
|
|
||||||
Requires:
|
|
||||||
Name: QAction
|
|
||||||
|
|
||||||
Feature: CURSOR
|
|
||||||
Description: Supports mouse cursors.
|
|
||||||
Section: Kernel
|
|
||||||
Requires:
|
|
||||||
Name: QCursor
|
|
||||||
|
|
||||||
Feature: CLIPBOARD
|
|
||||||
Description: Supports cut and paste operations.
|
|
||||||
Section: Kernel
|
|
||||||
Requires:
|
|
||||||
Name: QClipboard
|
|
||||||
|
|
||||||
Feature: WHEELEVENT
|
|
||||||
Description: Supports wheel events.
|
|
||||||
Section: Kernel
|
|
||||||
Requires:
|
|
||||||
Name: QWheelEvent
|
|
||||||
|
|
||||||
Feature: TABLETEVENT
|
|
||||||
Description: Supports tablet events.
|
|
||||||
Section: Kernel
|
|
||||||
Requires:
|
|
||||||
Name: QTabletEvent
|
|
||||||
|
|
||||||
Feature: EFFECTS
|
|
||||||
Description: Supports special widget effects (e.g. fading and scrolling).
|
|
||||||
Section: Kernel
|
|
||||||
Requires:
|
|
||||||
Name: Effects
|
|
||||||
|
|
||||||
Feature: SHAREDMEMORY
|
|
||||||
Description: Provides access to a shared memory segment.
|
|
||||||
Section: Kernel
|
|
||||||
Requires:
|
|
||||||
Name: QSharedMemory
|
|
||||||
|
|
||||||
Feature: SYSTEMSEMAPHORE
|
|
||||||
Description: Provides a general counting system semaphore.
|
|
||||||
Section: Kernel
|
|
||||||
Requires: SHAREDMEMORY
|
|
||||||
Name: QSystemSemaphore
|
|
||||||
|
|
||||||
Feature: XMLSTREAM
|
|
||||||
Description: Provides a simple streaming API for XML.
|
|
||||||
Section: Kernel
|
|
||||||
Requires:
|
|
||||||
Name: XML Streaming APIs
|
|
||||||
|
|
||||||
Feature: XMLSTREAMREADER
|
|
||||||
Description: Provides a well-formed XML parser with a simple streaming API.
|
|
||||||
Section: Kernel
|
|
||||||
Requires: XMLSTREAM
|
|
||||||
Name: QXmlStreamReader
|
|
||||||
|
|
||||||
Feature: XMLSTREAMWRITER
|
|
||||||
Description: Provides a XML writer with a simple streaming API.
|
|
||||||
Section: Kernel
|
|
||||||
Requires: XMLSTREAM
|
|
||||||
Name: QXmlStreamWriter
|
|
||||||
|
|
||||||
Feature: IM
|
|
||||||
Description: Inputmethods with QInputContext
|
|
||||||
Section: Kernel
|
|
||||||
Requires: LIBRARY
|
|
||||||
Name: QInputContext
|
|
||||||
|
|
||||||
# Data structures
|
|
||||||
|
|
||||||
Feature: TEXTDATE
|
|
||||||
Description: Supports month and day names in dates.
|
|
||||||
Section: Data structures
|
|
||||||
Requires:
|
|
||||||
Name: Text Date
|
|
||||||
|
|
||||||
Feature: DATESTRING
|
|
||||||
Description: Supports convertion between dates and strings.
|
|
||||||
Section: Data structures
|
|
||||||
Requires: TEXTDATE
|
|
||||||
Name: QDate/QTime/QDateTime
|
|
||||||
|
|
||||||
# File I/O
|
|
||||||
|
|
||||||
Feature: PROCESS
|
|
||||||
Description: Supports external process invocation.
|
|
||||||
Section: File I/O
|
|
||||||
Requires:
|
|
||||||
Name: QProcess
|
|
||||||
|
|
||||||
Feature: TEMPORARYFILE
|
|
||||||
Description: Provides an I/O device that operates on temporary files.
|
|
||||||
Section: File I/O
|
|
||||||
Requires:
|
|
||||||
Name: QTemporaryFile
|
|
||||||
|
|
||||||
Feature: LIBRARY
|
|
||||||
Description: Supports a shared library wrapper.
|
|
||||||
Section: File I/O
|
|
||||||
Requires:
|
|
||||||
Name: QLibrary
|
|
||||||
|
|
||||||
Feature: SETTINGS
|
|
||||||
Description: Supports persistent application settings.
|
|
||||||
Section: File I/O
|
|
||||||
Requires:
|
|
||||||
Name: QSettings
|
|
||||||
|
|
||||||
Feature: DOM
|
|
||||||
Description: Supports the Document Object Model.
|
|
||||||
Section: File I/O
|
|
||||||
Requires:
|
|
||||||
Name: Document Object Model
|
|
||||||
|
|
||||||
Feature: FILESYSTEMMODEL
|
|
||||||
Description: Provides a data model for the local filesystem.
|
|
||||||
Section: File I/O
|
|
||||||
Requires:
|
|
||||||
Name: QFileSystemModel
|
|
||||||
|
|
||||||
Feature: FILESYSTEMWATCHER
|
|
||||||
Description: Provides an interface for monitoring files and directories for modications.
|
|
||||||
Section: File I/O
|
|
||||||
Requires:
|
|
||||||
Name: QFileSystemWatcher
|
|
||||||
|
|
||||||
Feature: FILESYSTEMITERATOR
|
|
||||||
Description: Provides fast file-system iteration.
|
|
||||||
Section: File I/O
|
|
||||||
Requires:
|
|
||||||
Name: QFileSystemIterator
|
|
||||||
|
|
||||||
# Widgets
|
|
||||||
|
|
||||||
Feature: TREEWIDGET
|
|
||||||
Description: Supports views using tree models.
|
|
||||||
Section: Widgets
|
|
||||||
Requires: TREEVIEW
|
|
||||||
Name: QTreeWidget
|
|
||||||
|
|
||||||
Feature: LISTWIDGET
|
|
||||||
Description: Supports item-based list widgets.
|
|
||||||
Section: Widgets
|
|
||||||
Requires: LISTVIEW
|
|
||||||
Name: QListWidget
|
|
||||||
|
|
||||||
Feature: TABLEWIDGET
|
|
||||||
Description: Supports item-based table views.
|
|
||||||
Section: Widgets
|
|
||||||
Requires: TABLEVIEW
|
|
||||||
Name: QTableWidget
|
|
||||||
|
|
||||||
Feature: DATETIMEEDIT
|
|
||||||
Description: Supports editing dates and times.
|
|
||||||
Section: Widgets
|
|
||||||
Requires: CALENDARWIDGET DATESTRING
|
|
||||||
Name: QDateTimeEdit
|
|
||||||
|
|
||||||
Feature: STACKEDWIDGET
|
|
||||||
Description: Supports stacked widgets.
|
|
||||||
Section: Widgets
|
|
||||||
Requires:
|
|
||||||
Name: QStackedWidget
|
|
||||||
|
|
||||||
Feature: TEXTBROWSER
|
|
||||||
Description: Supports HTML document browsing.
|
|
||||||
Section: Widgets
|
|
||||||
Requires: TEXTEDIT
|
|
||||||
Name: QTextBrowser
|
|
||||||
|
|
||||||
Feature: SPLASHSCREEN
|
|
||||||
Description: Supports splash screens that can be shown during application startup.
|
|
||||||
Section: Widgets
|
|
||||||
Requires:
|
|
||||||
Name: Splash screen widget
|
|
||||||
|
|
||||||
Feature: SPLITTER
|
|
||||||
Description: Supports user controlled splitter widgets.
|
|
||||||
Section: Widgets
|
|
||||||
Requires: RUBBERBAND
|
|
||||||
Name: QSplitter
|
|
||||||
|
|
||||||
Feature: LCDNUMBER
|
|
||||||
Description: Supports LCD-like digits.
|
|
||||||
Section: Widgets
|
|
||||||
Requires:
|
|
||||||
Name: QLCDNumber
|
|
||||||
|
|
||||||
Feature: MENU
|
|
||||||
Description: Supports popup-menus.
|
|
||||||
Section: Widgets
|
|
||||||
Requires: ACTION
|
|
||||||
Name: QMenu
|
|
||||||
|
|
||||||
Feature: LINEEDIT
|
|
||||||
Description: Supports single-line edits.
|
|
||||||
Section: Widgets
|
|
||||||
Requires:
|
|
||||||
Name: QLineEdit
|
|
||||||
|
|
||||||
Feature: SPINBOX
|
|
||||||
Description: Supports spin boxes handling integers and discrete sets of values.
|
|
||||||
Section: Widgets
|
|
||||||
Requires: SPINWIDGET LINEEDIT VALIDATOR
|
|
||||||
Name: QSpinBox
|
|
||||||
|
|
||||||
Feature: TABBAR
|
|
||||||
Description: Supports tab bars, e.g. for use in tabbed dialogs.
|
|
||||||
Section: Widgets
|
|
||||||
Requires: TOOLBUTTON
|
|
||||||
Name: QTabBar
|
|
||||||
|
|
||||||
Feature: TABWIDGET
|
|
||||||
Description: Supports stacking tabbed widgets.
|
|
||||||
Section: Widgets
|
|
||||||
Requires: TABBAR STACKEDWIDGET
|
|
||||||
Name: QTabWidget
|
|
||||||
|
|
||||||
Feature: COMBOBOX
|
|
||||||
Description: Supports comboboxes presenting a list of options to the user.
|
|
||||||
Section: Widgets
|
|
||||||
Requires: LINEEDIT STANDARDITEMMODEL LISTVIEW
|
|
||||||
Name: QComboBox
|
|
||||||
|
|
||||||
Feature: FONTCOMBOBOX
|
|
||||||
Description: Supports a combobox that lets the user select a font family.
|
|
||||||
Section: Widgets
|
|
||||||
Requires: COMBOBOX STRINGLISTMODEL
|
|
||||||
Name: QFontComboBox
|
|
||||||
|
|
||||||
Feature: TOOLBUTTON
|
|
||||||
Description: Supports quick-access buttons to commands and options.
|
|
||||||
Section: Widgets
|
|
||||||
Requires: ACTION
|
|
||||||
Name: QToolButton
|
|
||||||
|
|
||||||
Feature: TOOLBAR
|
|
||||||
Description: Supports movable panels containing a set of controls.
|
|
||||||
Section: Widgets
|
|
||||||
Requires: MAINWINDOW
|
|
||||||
Name: QToolBar
|
|
||||||
|
|
||||||
Feature: TOOLBOX
|
|
||||||
Description: Supports columns of tabbed widget items.
|
|
||||||
Section: Widgets
|
|
||||||
Requires: TOOLBUTTON SCROLLAREA
|
|
||||||
Name: QToolBox
|
|
||||||
|
|
||||||
Feature: GROUPBOX
|
|
||||||
Description: Supports group box frames.
|
|
||||||
Section: Widgets
|
|
||||||
Requires:
|
|
||||||
Name: QGroupBox
|
|
||||||
|
|
||||||
Feature: BUTTONGROUP
|
|
||||||
Description: Supports organizing groups of button widgets.
|
|
||||||
Section: Widgets
|
|
||||||
Requires: GROUPBOX
|
|
||||||
Name: QButtonGroup
|
|
||||||
|
|
||||||
Feature: MAINWINDOW
|
|
||||||
Description: Supports main application windows.
|
|
||||||
Section: Widgets
|
|
||||||
Requires: MENU RESIZEHANDLER TOOLBUTTON
|
|
||||||
Name: QMainWindow
|
|
||||||
|
|
||||||
Feature: DOCKWIDGET
|
|
||||||
Description: Supports docking widgets inside a QMainWindow or floated as a top-level window on the desktop.
|
|
||||||
Section: Widgets
|
|
||||||
Requires: RUBBERBAND MAINWINDOW
|
|
||||||
Name: QDockwidget
|
|
||||||
|
|
||||||
Feature: MDIAREA
|
|
||||||
Description: Provides an area in which MDI windows are displayed.
|
|
||||||
Section: Widgets
|
|
||||||
Requires: SCROLLAREA
|
|
||||||
Name: QMdiArea
|
|
||||||
|
|
||||||
Feature: RESIZEHANDLER
|
|
||||||
Description: Supports an internal resize handler.
|
|
||||||
Section: Widgets
|
|
||||||
Requires:
|
|
||||||
Name: Resize Handler
|
|
||||||
|
|
||||||
Feature: STATUSBAR
|
|
||||||
Description: Supports presentation of status information.
|
|
||||||
Section: Widgets
|
|
||||||
Requires:
|
|
||||||
Name: QStatusBar
|
|
||||||
|
|
||||||
Feature: MENUBAR
|
|
||||||
Description: Supports pull-down menu items.
|
|
||||||
Section: Widgets
|
|
||||||
Requires: MENU TOOLBUTTON
|
|
||||||
Name: QMenuBar
|
|
||||||
|
|
||||||
Feature: CONTEXTMENU
|
|
||||||
Description: Supports pop-up menus on right mouse click
|
|
||||||
Section: Widgets
|
|
||||||
Requires: MENU
|
|
||||||
Name: Context menu
|
|
||||||
|
|
||||||
Feature: PROGRESSBAR
|
|
||||||
Description: Supports presentation of operation progress.
|
|
||||||
Section: Widgets
|
|
||||||
Requires:
|
|
||||||
Name: QProgressBar
|
|
||||||
|
|
||||||
Feature: SLIDER
|
|
||||||
Description: Supports sliders controlling a bounded value.
|
|
||||||
Section: Widgets
|
|
||||||
Requires:
|
|
||||||
Name: QSlider
|
|
||||||
|
|
||||||
Feature: SCROLLBAR
|
|
||||||
Description: Supports scrollbars allowing the user access parts of a document that is larger than the widget used to display it.
|
|
||||||
Section: Widgets
|
|
||||||
Requires: SLIDER
|
|
||||||
Name: QScrollBar
|
|
||||||
|
|
||||||
Feature: DIAL
|
|
||||||
Description: Supports rounded range control, e.g. like a speedometer.
|
|
||||||
Section: Widgets
|
|
||||||
Requires: SLIDER
|
|
||||||
Name: QDial
|
|
||||||
|
|
||||||
Feature: SCROLLAREA
|
|
||||||
Description: Supports scrolling views onto widgets.
|
|
||||||
Section: Widgets
|
|
||||||
Requires: SCROLLBAR
|
|
||||||
Name: QScrollArea
|
|
||||||
|
|
||||||
Feature: GRAPHICSVIEW
|
|
||||||
Description: Supports the graphicsview classes.
|
|
||||||
Section: Widgets
|
|
||||||
Requires: SCROLLAREA
|
|
||||||
Name: QGraphicsView
|
|
||||||
|
|
||||||
Feature: GRAPHICSEFFECT
|
|
||||||
Description: Supports the graphicseffect classes.
|
|
||||||
Section: Widgets
|
|
||||||
Requires: GRAPHICSVIEW
|
|
||||||
Name: QGraphicsEffect
|
|
||||||
|
|
||||||
Feature: SPINWIDGET
|
|
||||||
Description: Supports spinbox control widgets.
|
|
||||||
Section: Widgets
|
|
||||||
Requires:
|
|
||||||
Name: Spin Widget
|
|
||||||
|
|
||||||
Feature: TEXTEDIT
|
|
||||||
Description: Supports rich text editing.
|
|
||||||
Section: Widgets
|
|
||||||
Requires: SCROLLAREA PROPERTIES
|
|
||||||
Name: QTextEdit
|
|
||||||
|
|
||||||
Feature: SYNTAXHIGHLIGHTER
|
|
||||||
Description: Supports custom syntax highlighting.
|
|
||||||
Section: Widgets
|
|
||||||
Requires: TEXTEDIT
|
|
||||||
Name: QSyntaxHighlighter
|
|
||||||
|
|
||||||
Feature: RUBBERBAND
|
|
||||||
Description: Supports using rubberbands to indicate selections and boundaries.
|
|
||||||
Section: Widgets
|
|
||||||
Requires:
|
|
||||||
Name: QRubberBand
|
|
||||||
|
|
||||||
Feature: TOOLTIP
|
|
||||||
Description: Supports presentation of tooltips.
|
|
||||||
Section: Widgets
|
|
||||||
Requires:
|
|
||||||
Name: QToolTip
|
|
||||||
|
|
||||||
Feature: STATUSTIP
|
|
||||||
Description: Supports status tip functionality and events.
|
|
||||||
Section: Widgets
|
|
||||||
Requires:
|
|
||||||
Name: Status Tip
|
|
||||||
|
|
||||||
Feature: WHATSTHIS
|
|
||||||
Description: Supports displaying "What's this" help.
|
|
||||||
Section: Widgets
|
|
||||||
Requires: TOOLBUTTON
|
|
||||||
Name: QWhatsThis
|
|
||||||
|
|
||||||
Feature: VALIDATOR
|
|
||||||
Description: Supports validation of input text.
|
|
||||||
Section: Widgets
|
|
||||||
Requires:
|
|
||||||
Name: QValidator
|
|
||||||
|
|
||||||
Feature: SIZEGRIP
|
|
||||||
Description: Supports corner-grips for resizing a top-level windows.
|
|
||||||
Section: Widgets
|
|
||||||
Requires:
|
|
||||||
Name: QSizeGrip
|
|
||||||
|
|
||||||
Feature: CALENDARWIDGET
|
|
||||||
Description: Provides a monthly based calendar widget allowing the user to select a date.
|
|
||||||
Section: Widgets
|
|
||||||
Requires: TABLEVIEW MENU TEXTDATE SPINBOX TOOLBUTTON
|
|
||||||
Name: QCalendarWidget
|
|
||||||
|
|
||||||
Feature: PRINTPREVIEWWIDGET
|
|
||||||
Description: Provides a widget for previewing page layouts for printer output.
|
|
||||||
Section: Widgets
|
|
||||||
Requires: GRAPHICSVIEW PRINTER MAINWINDOW
|
|
||||||
Name: QPrintPreviewWidget
|
|
||||||
|
|
||||||
Feature: KEYSEQUENCEEDIT
|
|
||||||
Description: Provides a widget for editing QKeySequences
|
|
||||||
Section: Widgets
|
|
||||||
Requires: LINEEDIT SHORTCUT
|
|
||||||
Name: QKeySequenceEdit
|
|
||||||
|
|
||||||
# Dialogs
|
|
||||||
|
|
||||||
Feature: MESSAGEBOX
|
|
||||||
Description: Supports message boxes displaying
|
|
||||||
informative messages and simple questions.
|
|
||||||
Section: Dialogs
|
|
||||||
Requires:
|
|
||||||
Name: QMessageBox
|
|
||||||
|
|
||||||
Feature: COLORDIALOG
|
|
||||||
Description: Supports a dialog widget for specifying colors.
|
|
||||||
Section: Dialogs
|
|
||||||
Requires: SPINBOX
|
|
||||||
Name: QColorDialog
|
|
||||||
|
|
||||||
Feature: FILEDIALOG
|
|
||||||
Description: Supports a dialog widget for selecting files or directories.
|
|
||||||
Section: Dialogs
|
|
||||||
Requires: FILESYSTEMMODEL TREEVIEW COMBOBOX TOOLBUTTON BUTTONGROUP TOOLTIP SPLITTER STACKEDWIDGET PROXYMODEL
|
|
||||||
Name: QFileDialog
|
|
||||||
|
|
||||||
Feature: FONTDIALOG
|
|
||||||
Description: Supports a dialog widget for selecting fonts.
|
|
||||||
Section: Dialogs
|
|
||||||
Requires: STRINGLISTMODEL COMBOBOX VALIDATOR GROUPBOX
|
|
||||||
Name: QFontDialog
|
|
||||||
|
|
||||||
Feature: PRINTDIALOG
|
|
||||||
Description: Supports a dialog widget for specifying printer configuration.
|
|
||||||
Section: Dialogs
|
|
||||||
Requires: PRINTER COMBOBOX BUTTONGROUP SPINBOX TABWIDGET
|
|
||||||
Name: QPrintDialog
|
|
||||||
|
|
||||||
Feature: PRINTPREVIEWDIALOG
|
|
||||||
Description: Provides a dialog for previewing and configuring page layouts for printer output.
|
|
||||||
Section: Dialogs
|
|
||||||
Requires: PRINTPREVIEWWIDGET PRINTDIALOG TOOLBAR
|
|
||||||
Name: QPrintPreviewDialog
|
|
||||||
|
|
||||||
Feature: PROGRESSDIALOG
|
|
||||||
Description: Supports feedback on the progress of a slow operation.
|
|
||||||
Section: Dialogs
|
|
||||||
Requires: PROGRESSBAR
|
|
||||||
Name: QProgressDialog
|
|
||||||
|
|
||||||
Feature: INPUTDIALOG
|
|
||||||
Description: Supports a simple convenience dialog to get a single value from the user.
|
|
||||||
Section: Dialogs
|
|
||||||
Requires: COMBOBOX SPINBOX STACKEDWIDGET
|
|
||||||
Name: QInputDialog
|
|
||||||
|
|
||||||
Feature: ERRORMESSAGE
|
|
||||||
Description: Supports an error message display dialog.
|
|
||||||
Section: Dialogs
|
|
||||||
Requires: TEXTEDIT
|
|
||||||
Name: QErrorMessage
|
|
||||||
|
|
||||||
Feature: WIZARD
|
|
||||||
Description: Provides a framework for wizards.
|
|
||||||
Section: Dialogs
|
|
||||||
Requires: PROPERTIES
|
|
||||||
Name: QWizard
|
|
||||||
|
|
||||||
# ItemViews
|
|
||||||
|
|
||||||
Feature: ITEMVIEWS
|
|
||||||
Description: Supports the model/view architecture managing the relationship between data and the way it is presented to the user.
|
|
||||||
Section: ItemViews
|
|
||||||
Requires: RUBBERBAND SCROLLAREA
|
|
||||||
Name: The Model/View Framework
|
|
||||||
|
|
||||||
Feature: DIRMODEL
|
|
||||||
Description: Supports a data model for the local filesystem.
|
|
||||||
Section: ItemViews
|
|
||||||
Requires: ITEMVIEWS FILESYSTEMMODEL
|
|
||||||
Name: QDirModel
|
|
||||||
|
|
||||||
Feature: STANDARDITEMMODEL
|
|
||||||
Description: Supports a generic model for storing custom data.
|
|
||||||
Section: ItemViews
|
|
||||||
Requires: ITEMVIEWS
|
|
||||||
Name: QStandardItemModel
|
|
||||||
|
|
||||||
Feature: PROXYMODEL
|
|
||||||
Description: Supports processing of data passed between another model and a view.
|
|
||||||
Section: ItemViews
|
|
||||||
Requires: ITEMVIEWS
|
|
||||||
Name: QAbstractProxyModel
|
|
||||||
|
|
||||||
Feature: SORTFILTERPROXYMODEL
|
|
||||||
Description: Supports sorting and filtering of data passed between another model and a view.
|
|
||||||
Section: ItemViews
|
|
||||||
Requires: PROXYMODEL
|
|
||||||
Name: QSortFilterProxyModel
|
|
||||||
|
|
||||||
Feature: IDENTITYPROXYMODEL
|
|
||||||
Description: Supports proxying a source model unmodified.
|
|
||||||
Section: ItemViews
|
|
||||||
Requires: PROXYMODEL
|
|
||||||
Name: QIdentityProxyModel
|
|
||||||
|
|
||||||
Feature: STRINGLISTMODEL
|
|
||||||
Description: Supports a model that supplies strings to views.
|
|
||||||
Section: ItemViews
|
|
||||||
Requires: ITEMVIEWS
|
|
||||||
Name: QStringListModel
|
|
||||||
|
|
||||||
Feature: LISTVIEW
|
|
||||||
Description: Supports a list or icon view onto a model.
|
|
||||||
Section: ItemViews
|
|
||||||
Requires: ITEMVIEWS
|
|
||||||
Name: QListView
|
|
||||||
|
|
||||||
Feature: TABLEVIEW
|
|
||||||
Description: Supports a default model/view implementation of a table view.
|
|
||||||
Section: ItemViews
|
|
||||||
Requires: ITEMVIEWS
|
|
||||||
Name: QTableView
|
|
||||||
|
|
||||||
Feature: TREEVIEW
|
|
||||||
Description: Supports a default model/view implementation of a tree view.
|
|
||||||
Section: ItemViews
|
|
||||||
Requires: ITEMVIEWS
|
|
||||||
Name: QTreeView
|
|
||||||
|
|
||||||
Feature: DATAWIDGETMAPPER
|
|
||||||
Description: Provides mapping between a section of a data model to widgets.
|
|
||||||
Section: ItemViews
|
|
||||||
Requires: ITEMVIEWS PROPERTIES
|
|
||||||
Name: QDataWidgetMapper
|
|
||||||
|
|
||||||
Feature: COLUMNVIEW
|
|
||||||
Description: Provides a model/view implementation of a column view.
|
|
||||||
Section: ItemViews
|
|
||||||
Requires: LISTVIEW
|
|
||||||
Name: QColumnView
|
|
||||||
|
|
||||||
# Styles
|
|
||||||
|
|
||||||
Feature: STYLE_WINDOWS
|
|
||||||
Description: Supports a Microsoft Windows-like look and feel.
|
|
||||||
Section: Styles
|
|
||||||
Requires:
|
|
||||||
Name: QWindowsStyle
|
|
||||||
|
|
||||||
Feature: STYLE_FUSION
|
|
||||||
Description: Supports a modern platform independent widget style.
|
|
||||||
Section: Styles
|
|
||||||
Requires: IMAGEFORMAT_XPM
|
|
||||||
Name: QFusionStyle
|
|
||||||
|
|
||||||
Feature: STYLE_WINDOWSXP
|
|
||||||
Description: Supports a Microsoft WindowsXP-like look and feel.
|
|
||||||
Section: Styles
|
|
||||||
Requires: STYLE_WINDOWS
|
|
||||||
Name: QWindowsXPStyle
|
|
||||||
|
|
||||||
Feature: STYLE_WINDOWSVISTA
|
|
||||||
Description: Supports a Microsoft WindowsVista-like look and feel.
|
|
||||||
Section: Styles
|
|
||||||
Requires: STYLE_WINDOWSXP
|
|
||||||
Name: QWindowsVistaStyle
|
|
||||||
|
|
||||||
Feature: STYLE_WINDOWSCE
|
|
||||||
Description: WindowsCE look and feel
|
|
||||||
Section: Styles
|
|
||||||
Requires: STYLE_WINDOWS IMAGEFORMAT_XPM
|
|
||||||
Name: QWindowsCEStyle
|
|
||||||
|
|
||||||
Feature: STYLE_WINDOWSMOBILE
|
|
||||||
Description: WindowsMobile look and feel
|
|
||||||
Section: Styles
|
|
||||||
Requires: STYLE_WINDOWS IMAGEFORMAT_XPM
|
|
||||||
Name: QWindowsMobileStyle
|
|
||||||
|
|
||||||
Feature: STYLE_STYLESHEET
|
|
||||||
Description:
|
|
||||||
Section: Styles
|
|
||||||
Requires: STYLE_WINDOWS PROPERTIES CSSPARSER
|
|
||||||
Name: QStyleSheetStyle
|
|
||||||
|
|
||||||
# Images
|
|
||||||
|
|
||||||
Feature: IMAGEFORMATPLUGIN
|
|
||||||
Description: Supports writing an image format plugin.
|
|
||||||
Section: Images
|
|
||||||
Requires: LIBRARY
|
|
||||||
Name: QImageIOPlugin
|
|
||||||
|
|
||||||
Feature: MOVIE
|
|
||||||
Description: Supports animated images.
|
|
||||||
Section: Images
|
|
||||||
Requires:
|
|
||||||
Name: QMovie
|
|
||||||
|
|
||||||
Feature: IMAGEFORMAT_BMP
|
|
||||||
Description: Supports Microsoft's Bitmap image file format.
|
|
||||||
Section: Images
|
|
||||||
Requires:
|
|
||||||
Name: BMP Image Format
|
|
||||||
|
|
||||||
Feature: IMAGEFORMAT_PPM
|
|
||||||
Description: Supports the Portable Pixmap image file format.
|
|
||||||
Section: Images
|
|
||||||
Requires:
|
|
||||||
Name: PPM Image Format
|
|
||||||
|
|
||||||
Feature: IMAGEFORMAT_XBM
|
|
||||||
Description: Supports the X11 Bitmap image file format.
|
|
||||||
Section: Images
|
|
||||||
Requires:
|
|
||||||
Name: XBM Image Format
|
|
||||||
|
|
||||||
Feature: IMAGEFORMAT_XPM
|
|
||||||
Description: Supports the X11 Pixmap image file format.
|
|
||||||
Section: Images
|
|
||||||
Requires:
|
|
||||||
Name: XPM Image Format
|
|
||||||
|
|
||||||
Feature: IMAGEFORMAT_PNG
|
|
||||||
Description: Supports the Portable Network Graphics image file format.
|
|
||||||
Section: Images
|
|
||||||
Requires:
|
|
||||||
Name: PNG Image Format
|
|
||||||
|
|
||||||
Feature: IMAGEFORMAT_JPEG
|
|
||||||
Description: Supports the Joint Photographic Experts Group image file format.
|
|
||||||
Section: Images
|
|
||||||
Requires:
|
|
||||||
Name: JPEG Image Format
|
|
||||||
|
|
||||||
Feature: IMAGE_HEURISTIC_MASK
|
|
||||||
Description: Supports creating a 1-bpp heuristic mask for images.
|
|
||||||
Section: Images
|
|
||||||
Requires:
|
|
||||||
Name: QImage::createHeuristicMask()
|
|
||||||
|
|
||||||
Feature: IMAGE_TEXT
|
|
||||||
Description: Supports image file text strings.
|
|
||||||
Section: Images
|
|
||||||
Requires:
|
|
||||||
Name: Image Text
|
|
||||||
|
|
||||||
# Painting
|
|
||||||
|
|
||||||
Feature: PICTURE
|
|
||||||
Description: Supports recording and replaying QPainter commands.
|
|
||||||
Section: Painting
|
|
||||||
Requires:
|
|
||||||
Name: QPicture
|
|
||||||
|
|
||||||
Feature: COLORNAMES
|
|
||||||
Description: Supports color names such as "red", used by QColor and by some HTML documents.
|
|
||||||
Section: Painting
|
|
||||||
Requires:
|
|
||||||
Name: Color Names
|
|
||||||
|
|
||||||
Feature: PDF
|
|
||||||
Description: Supports pdf format
|
|
||||||
Section: Painting
|
|
||||||
Requires: TEMPORARYFILE
|
|
||||||
Name: QPdf
|
|
||||||
|
|
||||||
Feature: PRINTER
|
|
||||||
Description: Supports printing
|
|
||||||
Section: Painting
|
|
||||||
Requires: PICTURE TEMPORARYFILE PDF
|
|
||||||
Name: QPrinter
|
|
||||||
|
|
||||||
Feature: CUPS
|
|
||||||
Description Supports the Common UNIX Printing System
|
|
||||||
Section: Painting
|
|
||||||
Requires: PRINTER LIBRARY
|
|
||||||
Name: Common UNIX Printing System
|
|
||||||
|
|
||||||
Feature: PAINT_DEBUG
|
|
||||||
Description: Debug painting with the environment variables QT_FLUSH_UPDATE and QT_FLUSH_PAINT
|
|
||||||
Section: Painting
|
|
||||||
Requires:
|
|
||||||
Name: Painting Debug Utilities
|
|
||||||
|
|
||||||
# Fonts
|
|
||||||
|
|
||||||
Feature: FREETYPE
|
|
||||||
Description: Supports the FreeType 2 font engine (and its supported font formats).
|
|
||||||
Section: Fonts
|
|
||||||
Requires:
|
|
||||||
Name: Freetype Font Engine
|
|
||||||
|
|
||||||
# Internationalization
|
|
||||||
|
|
||||||
Feature: TRANSLATION
|
|
||||||
Description: Supports translations using QObject::tr().
|
|
||||||
Section: Internationalization
|
|
||||||
Requires:
|
|
||||||
Name: Translation
|
|
||||||
|
|
||||||
Feature: TEXTCODEC
|
|
||||||
Description: Supports conversions between text encodings.
|
|
||||||
Section: Internationalization
|
|
||||||
Requires:
|
|
||||||
Name: QTextCodec
|
|
||||||
|
|
||||||
Feature: CODECS
|
|
||||||
Description: Supports non-unicode text conversions.
|
|
||||||
Section: Internationalization
|
|
||||||
Requires: TEXTCODEC
|
|
||||||
Name: Codecs
|
|
||||||
|
|
||||||
Feature: BIG_CODECS
|
|
||||||
Description: Supports big codecs, e.g. CJK.
|
|
||||||
Section: Internationalization
|
|
||||||
Requires: TEXTCODEC
|
|
||||||
Name: Big Codecs
|
|
||||||
|
|
||||||
Feature: ICONV
|
|
||||||
Description: Supports conversions between text encodings using iconv.
|
|
||||||
Section: Internationalization
|
|
||||||
Requires: TEXTCODEC
|
|
||||||
Name: iconv
|
|
||||||
|
|
||||||
# Networking
|
|
||||||
|
|
||||||
Feature: FTP
|
|
||||||
Description: Supports FTP file access.
|
|
||||||
Section: Networking
|
|
||||||
Requires: TEXTDATE
|
|
||||||
Name: File Transfer Protocol
|
|
||||||
|
|
||||||
Feature: HTTP
|
|
||||||
Description: Supports HTTP file access.
|
|
||||||
Section: Networking
|
|
||||||
Requires:
|
|
||||||
Name: Hyper Text Transfer Protocol
|
|
||||||
|
|
||||||
Feature: UDPSOCKET
|
|
||||||
Description: Supports User Datagram Protocol sockets.
|
|
||||||
Section: Networking
|
|
||||||
Requires:
|
|
||||||
Name: QUdpSocket
|
|
||||||
|
|
||||||
Feature: NETWORKPROXY
|
|
||||||
Description: Supports configuring network layer proxy support to the Qt network classes.
|
|
||||||
Section: Networking
|
|
||||||
Requires:
|
|
||||||
Name: QNetworkProxy
|
|
||||||
|
|
||||||
Feature: SOCKS5
|
|
||||||
Description: Supports SOCKS v5 network proxy.
|
|
||||||
Section: Networking
|
|
||||||
Requires: NETWORKPROXY
|
|
||||||
Name: SOCKS5
|
|
||||||
|
|
||||||
Feature: NETWORKINTERFACE
|
|
||||||
Description: Supports listing the host's IP addresses and network interfaces
|
|
||||||
Section: Networking
|
|
||||||
Requires:
|
|
||||||
Name: QNetworkInterface
|
|
||||||
|
|
||||||
Feature: NETWORKDISKCACHE
|
|
||||||
Description: Supports a disk cache for network resources
|
|
||||||
Section: Networking
|
|
||||||
Requires: TEMPORARYFILE
|
|
||||||
Name: QNetworkDiskCache
|
|
||||||
|
|
||||||
Feature: BEARERMANAGEMENT
|
|
||||||
Description: Provides bearer management support
|
|
||||||
Section: Networking
|
|
||||||
Requires: LIBRARY NETWORKINTERFACE PROPERTIES
|
|
||||||
Name: Bearer Management
|
|
||||||
|
|
||||||
Feature: LOCALSERVER
|
|
||||||
Description: Supports a local socket based server
|
|
||||||
Section: Networking
|
|
||||||
Requires: TEMPORARYFILE
|
|
||||||
Name: QLocalServer
|
|
||||||
|
|
||||||
# Utilities
|
|
||||||
|
|
||||||
Feature: COMPLETER
|
|
||||||
Description: Provides completions based on an item model.
|
|
||||||
Section: Utilities
|
|
||||||
Requires: PROXYMODEL
|
|
||||||
Name: QCompleter
|
|
||||||
|
|
||||||
Feature: FSCOMPLETER
|
|
||||||
Description: Provides completions based on an item model.
|
|
||||||
Section: Utilities
|
|
||||||
Requires: FILESYSTEMMODEL COMPLETER
|
|
||||||
Name: QCompleter
|
|
||||||
|
|
||||||
Feature: DESKTOPSERVICES
|
|
||||||
Description: Provides methods for accessing common desktop services.
|
|
||||||
Section: Utilities
|
|
||||||
Requires:
|
|
||||||
Name: QDesktopServices
|
|
||||||
|
|
||||||
Feature: MIMETYPE
|
|
||||||
Description: Describes types of file or data, represented by a MIME type string.
|
|
||||||
Section: Utilities
|
|
||||||
Requires:
|
|
||||||
Name: QMimeType
|
|
||||||
|
|
||||||
Feature: SYSTEMTRAYICON
|
|
||||||
Description: Provides an icon for an application in the system tray.
|
|
||||||
Section: Utilities
|
|
||||||
Requires:
|
|
||||||
Name: QSystemTrayIcon
|
|
||||||
|
|
||||||
Feature: UNDOCOMMAND
|
|
||||||
Description: Applies (redo or) undo of a single change in a document.
|
|
||||||
Section: Utilities
|
|
||||||
Requires:
|
|
||||||
Name: QUndoCommand
|
|
||||||
|
|
||||||
Feature: UNDOSTACK
|
|
||||||
Description: Provides the ability to (redo or) undo a list of changes in a document.
|
|
||||||
Section: Utilities
|
|
||||||
Requires: UNDOCOMMAND
|
|
||||||
Name: QUndoStack
|
|
||||||
|
|
||||||
Feature: UNDOGROUP
|
|
||||||
Description:
|
|
||||||
Section: Utilities
|
|
||||||
Requires: UNDOSTACK
|
|
||||||
Name: QUndoGroup
|
|
||||||
|
|
||||||
Feature: UNDOVIEW
|
|
||||||
Description: A widget which shows the contents of an undo stack.
|
|
||||||
Section: Utilities
|
|
||||||
Requires: UNDOSTACK LISTVIEW
|
|
||||||
Name: QUndoView
|
|
||||||
|
|
||||||
Feature: ACCESSIBILITY
|
|
||||||
Description: Provides accessibility support.
|
|
||||||
Section: Utilities
|
|
||||||
Requires: PROPERTIES MENUBAR
|
|
||||||
Name: Accessibility
|
|
||||||
|
|
||||||
Feature: ANIMATION
|
|
||||||
Description: Provides a framework for animations.
|
|
||||||
Section: Utilities
|
|
||||||
Requires: PROPERTIES
|
|
||||||
Name: Animation
|
|
||||||
|
|
||||||
Feature: STATEMACHINE
|
|
||||||
Description: Provides hierarchical finite state machines.
|
|
||||||
Section: Utilities
|
|
||||||
Requires: PROPERTIES
|
|
||||||
Name: State machine
|
|
||||||
|
|
||||||
Feature: GESTURES
|
|
||||||
Description: Provides a framework for gestures.
|
|
||||||
Section: Utilities
|
|
||||||
Requires:
|
|
||||||
Name: Gesture
|
|
||||||
|
|
||||||
# D-Bus
|
|
||||||
|
|
||||||
Feature: DBUS
|
|
||||||
Description: Provides classes for D-Bus.
|
|
||||||
Section: D-Bus
|
|
||||||
Requires: PROPERTIES XMLSTREAMREADER
|
|
||||||
Name: Qt D-Bus module
|
|
||||||
|
|
||||||
# XML Patterns
|
|
||||||
|
|
||||||
Feature: XMLSCHEMA
|
|
||||||
Description: Provides XML schema validation.
|
|
||||||
Section: Xml Patterns
|
|
||||||
Requires:
|
|
||||||
Name: XML Schema APIs
|
|
@ -553,45 +553,75 @@ bool QFileSystemEngine::fillMetaData(const QFileSystemEntry &entry, QFileSystemM
|
|||||||
return data.hasFlags(what);
|
return data.hasFlags(what);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Note: if \a shouldMkdirFirst is false, we assume the caller did try to mkdir
|
||||||
|
// before calling this function.
|
||||||
|
static bool createDirectoryWithParents(const QByteArray &nativeName, bool shouldMkdirFirst = true)
|
||||||
|
{
|
||||||
|
// helper function to check if a given path is a directory, since mkdir can
|
||||||
|
// fail if the dir already exists (it may have been created by another
|
||||||
|
// thread or another process)
|
||||||
|
const auto isDir = [](const QByteArray &nativeName) {
|
||||||
|
QT_STATBUF st;
|
||||||
|
return QT_STAT(nativeName.constData(), &st) == 0 && (st.st_mode & S_IFMT) == S_IFDIR;
|
||||||
|
};
|
||||||
|
|
||||||
|
if (shouldMkdirFirst && QT_MKDIR(nativeName, 0777) == 0)
|
||||||
|
return true;
|
||||||
|
if (errno == EEXIST)
|
||||||
|
return isDir(nativeName);
|
||||||
|
if (errno != ENOENT)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
// mkdir failed because the parent dir doesn't exist, so try to create it
|
||||||
|
int slash = nativeName.lastIndexOf('/');
|
||||||
|
if (slash < 1)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
QByteArray parentNativeName = nativeName.left(slash);
|
||||||
|
if (!createDirectoryWithParents(parentNativeName))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
// try again
|
||||||
|
if (QT_MKDIR(nativeName, 0777) == 0)
|
||||||
|
return true;
|
||||||
|
return errno == EEXIST && isDir(nativeName);
|
||||||
|
}
|
||||||
|
|
||||||
//static
|
//static
|
||||||
bool QFileSystemEngine::createDirectory(const QFileSystemEntry &entry, bool createParents)
|
bool QFileSystemEngine::createDirectory(const QFileSystemEntry &entry, bool createParents)
|
||||||
{
|
{
|
||||||
QString dirName = entry.filePath();
|
QString dirName = entry.filePath();
|
||||||
if (createParents) {
|
|
||||||
dirName = QDir::cleanPath(dirName);
|
// Darwin doesn't support trailing /'s, so remove for everyone
|
||||||
for (int oldslash = -1, slash=0; slash != -1; oldslash = slash) {
|
while (dirName.size() > 1 && dirName.endsWith(QLatin1Char('/')))
|
||||||
slash = dirName.indexOf(QDir::separator(), oldslash+1);
|
|
||||||
if (slash == -1) {
|
|
||||||
if (oldslash == dirName.length())
|
|
||||||
break;
|
|
||||||
slash = dirName.length();
|
|
||||||
}
|
|
||||||
if (slash) {
|
|
||||||
const QByteArray chunk = QFile::encodeName(dirName.left(slash));
|
|
||||||
if (QT_MKDIR(chunk.constData(), 0777) != 0) {
|
|
||||||
if (errno == EEXIST
|
|
||||||
#if defined(Q_OS_QNX)
|
|
||||||
// On QNX the QNet (VFS paths of other hosts mounted under a directory
|
|
||||||
// such as /net) mountpoint returns ENOENT, despite existing. stat()
|
|
||||||
// on the QNet mountpoint returns successfully and reports S_IFDIR.
|
|
||||||
|| errno == ENOENT
|
|
||||||
#endif
|
|
||||||
) {
|
|
||||||
QT_STATBUF st;
|
|
||||||
if (QT_STAT(chunk.constData(), &st) == 0 && (st.st_mode & S_IFMT) == S_IFDIR)
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
#if defined(Q_OS_DARWIN) // Mac X doesn't support trailing /'s
|
|
||||||
if (dirName.endsWith(QLatin1Char('/')))
|
|
||||||
dirName.chop(1);
|
dirName.chop(1);
|
||||||
#endif
|
|
||||||
return (QT_MKDIR(QFile::encodeName(dirName).constData(), 0777) == 0);
|
// try to mkdir this directory
|
||||||
|
QByteArray nativeName = QFile::encodeName(dirName);
|
||||||
|
if (QT_MKDIR(nativeName, 0777) == 0)
|
||||||
|
return true;
|
||||||
|
if (!createParents)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
// we need the cleaned path in order to create the parents
|
||||||
|
// and we save errno just in case encodeName needs to load codecs
|
||||||
|
int savedErrno = errno;
|
||||||
|
bool pathChanged;
|
||||||
|
{
|
||||||
|
QString cleanName = QDir::cleanPath(dirName);
|
||||||
|
|
||||||
|
// Check if the cleaned name is the same or not. If we were given a
|
||||||
|
// path with resolvable "../" sections, cleanPath will remove them, but
|
||||||
|
// this may change the target dir if one of those segments was a
|
||||||
|
// symlink. This operation depends on cleanPath's optimization of
|
||||||
|
// returning the original string if it didn't modify anything.
|
||||||
|
pathChanged = !dirName.isSharedWith(cleanName);
|
||||||
|
if (pathChanged)
|
||||||
|
nativeName = QFile::encodeName(cleanName);
|
||||||
|
}
|
||||||
|
|
||||||
|
errno = savedErrno;
|
||||||
|
return createDirectoryWithParents(nativeName, pathChanged);
|
||||||
}
|
}
|
||||||
|
|
||||||
//static
|
//static
|
||||||
|
@ -276,10 +276,11 @@ static QVector<QLoggingRule> loadRulesFromFile(const QString &filePath)
|
|||||||
*/
|
*/
|
||||||
void QLoggingRegistry::init()
|
void QLoggingRegistry::init()
|
||||||
{
|
{
|
||||||
|
QVector<QLoggingRule> er, qr, cr;
|
||||||
// get rules from environment
|
// get rules from environment
|
||||||
const QByteArray rulesFilePath = qgetenv("QT_LOGGING_CONF");
|
const QByteArray rulesFilePath = qgetenv("QT_LOGGING_CONF");
|
||||||
if (!rulesFilePath.isEmpty())
|
if (!rulesFilePath.isEmpty())
|
||||||
envRules = loadRulesFromFile(QFile::decodeName(rulesFilePath));
|
er = loadRulesFromFile(QFile::decodeName(rulesFilePath));
|
||||||
|
|
||||||
const QByteArray rulesSrc = qgetenv("QT_LOGGING_RULES").replace(';', '\n');
|
const QByteArray rulesSrc = qgetenv("QT_LOGGING_RULES").replace(';', '\n');
|
||||||
if (!rulesSrc.isEmpty()) {
|
if (!rulesSrc.isEmpty()) {
|
||||||
@ -287,7 +288,7 @@ void QLoggingRegistry::init()
|
|||||||
QLoggingSettingsParser parser;
|
QLoggingSettingsParser parser;
|
||||||
parser.setSection(QStringLiteral("Rules"));
|
parser.setSection(QStringLiteral("Rules"));
|
||||||
parser.setContent(stream);
|
parser.setContent(stream);
|
||||||
envRules += parser.rules();
|
er += parser.rules();
|
||||||
}
|
}
|
||||||
|
|
||||||
const QString configFileName = QStringLiteral("qtlogging.ini");
|
const QString configFileName = QStringLiteral("qtlogging.ini");
|
||||||
@ -296,17 +297,22 @@ void QLoggingRegistry::init()
|
|||||||
// get rules from Qt data configuration path
|
// get rules from Qt data configuration path
|
||||||
const QString qtConfigPath
|
const QString qtConfigPath
|
||||||
= QDir(QLibraryInfo::location(QLibraryInfo::DataPath)).absoluteFilePath(configFileName);
|
= QDir(QLibraryInfo::location(QLibraryInfo::DataPath)).absoluteFilePath(configFileName);
|
||||||
qtConfigRules = loadRulesFromFile(qtConfigPath);
|
qr = loadRulesFromFile(qtConfigPath);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// get rules from user's/system configuration
|
// get rules from user's/system configuration
|
||||||
const QString envPath = QStandardPaths::locate(QStandardPaths::GenericConfigLocation,
|
const QString envPath = QStandardPaths::locate(QStandardPaths::GenericConfigLocation,
|
||||||
QString::fromLatin1("QtProject/") + configFileName);
|
QString::fromLatin1("QtProject/") + configFileName);
|
||||||
if (!envPath.isEmpty())
|
if (!envPath.isEmpty())
|
||||||
configRules = loadRulesFromFile(envPath);
|
cr = loadRulesFromFile(envPath);
|
||||||
|
|
||||||
|
const QMutexLocker locker(®istryMutex);
|
||||||
|
|
||||||
|
envRules = std::move(er);
|
||||||
|
qtConfigRules = std::move(qr);
|
||||||
|
configRules = std::move(cr);
|
||||||
|
|
||||||
if (!envRules.isEmpty() || !qtConfigRules.isEmpty() || !configRules.isEmpty()) {
|
if (!envRules.isEmpty() || !qtConfigRules.isEmpty() || !configRules.isEmpty()) {
|
||||||
QMutexLocker locker(®istryMutex);
|
|
||||||
updateRules();
|
updateRules();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -347,11 +353,11 @@ void QLoggingRegistry::setApiRules(const QString &content)
|
|||||||
parser.setSection(QStringLiteral("Rules"));
|
parser.setSection(QStringLiteral("Rules"));
|
||||||
parser.setContent(content);
|
parser.setContent(content);
|
||||||
|
|
||||||
QMutexLocker locker(®istryMutex);
|
|
||||||
|
|
||||||
if (qtLoggingDebug())
|
if (qtLoggingDebug())
|
||||||
debugMsg("Loading logging rules set by QLoggingCategory::setFilterRules ...");
|
debugMsg("Loading logging rules set by QLoggingCategory::setFilterRules ...");
|
||||||
|
|
||||||
|
const QMutexLocker locker(®istryMutex);
|
||||||
|
|
||||||
apiRules = parser.rules();
|
apiRules = parser.rules();
|
||||||
|
|
||||||
updateRules();
|
updateRules();
|
||||||
@ -405,6 +411,8 @@ QLoggingRegistry *QLoggingRegistry::instance()
|
|||||||
/*!
|
/*!
|
||||||
\internal
|
\internal
|
||||||
Updates category settings according to rules.
|
Updates category settings according to rules.
|
||||||
|
|
||||||
|
As a category filter, it is run with registryMutex held.
|
||||||
*/
|
*/
|
||||||
void QLoggingRegistry::defaultCategoryFilter(QLoggingCategory *cat)
|
void QLoggingRegistry::defaultCategoryFilter(QLoggingCategory *cat)
|
||||||
{
|
{
|
||||||
|
@ -129,6 +129,7 @@ private:
|
|||||||
|
|
||||||
QMutex registryMutex;
|
QMutex registryMutex;
|
||||||
|
|
||||||
|
// protected by mutex:
|
||||||
QVector<QLoggingRule> qtConfigRules;
|
QVector<QLoggingRule> qtConfigRules;
|
||||||
QVector<QLoggingRule> configRules;
|
QVector<QLoggingRule> configRules;
|
||||||
QVector<QLoggingRule> envRules;
|
QVector<QLoggingRule> envRules;
|
||||||
|
@ -844,7 +844,8 @@ static bool startDetachedUacPrompt(const QString &programIn, const QStringList &
|
|||||||
SHELLEXECUTEINFOW shellExecuteExInfo;
|
SHELLEXECUTEINFOW shellExecuteExInfo;
|
||||||
memset(&shellExecuteExInfo, 0, sizeof(SHELLEXECUTEINFOW));
|
memset(&shellExecuteExInfo, 0, sizeof(SHELLEXECUTEINFOW));
|
||||||
shellExecuteExInfo.cbSize = sizeof(SHELLEXECUTEINFOW);
|
shellExecuteExInfo.cbSize = sizeof(SHELLEXECUTEINFOW);
|
||||||
shellExecuteExInfo.fMask = SEE_MASK_NOCLOSEPROCESS | SEE_MASK_UNICODE | SEE_MASK_FLAG_NO_UI;
|
shellExecuteExInfo.fMask = SEE_MASK_NOCLOSEPROCESS | SEE_MASK_UNICODE | SEE_MASK_FLAG_NO_UI | SEE_MASK_CLASSNAME;
|
||||||
|
shellExecuteExInfo.lpClass = L"exefile";
|
||||||
shellExecuteExInfo.lpVerb = L"runas";
|
shellExecuteExInfo.lpVerb = L"runas";
|
||||||
const QString program = QDir::toNativeSeparators(programIn);
|
const QString program = QDir::toNativeSeparators(programIn);
|
||||||
shellExecuteExInfo.lpFile = reinterpret_cast<LPCWSTR>(program.utf16());
|
shellExecuteExInfo.lpFile = reinterpret_cast<LPCWSTR>(program.utf16());
|
||||||
|
@ -4169,10 +4169,10 @@ QUrl QUrl::fromUserInput(const QString &userInput, const QString &workingDirecto
|
|||||||
return url;
|
return url;
|
||||||
}
|
}
|
||||||
|
|
||||||
QUrl url = QUrl(trimmedString, QUrl::TolerantMode);
|
QUrl url = QUrl(userInput, QUrl::TolerantMode);
|
||||||
// Check both QUrl::isRelative (to detect full URLs) and QDir::isAbsolutePath (since on Windows drive letters can be interpreted as schemes)
|
// Check both QUrl::isRelative (to detect full URLs) and QDir::isAbsolutePath (since on Windows drive letters can be interpreted as schemes)
|
||||||
if (url.isRelative() && !QDir::isAbsolutePath(trimmedString)) {
|
if (url.isRelative() && !QDir::isAbsolutePath(userInput)) {
|
||||||
QFileInfo fileInfo(QDir(workingDirectory), trimmedString);
|
QFileInfo fileInfo(QDir(workingDirectory), userInput);
|
||||||
if ((options & AssumeLocalFile) || fileInfo.exists())
|
if ((options & AssumeLocalFile) || fileInfo.exists())
|
||||||
return QUrl::fromLocalFile(fileInfo.absoluteFilePath());
|
return QUrl::fromLocalFile(fileInfo.absoluteFilePath());
|
||||||
}
|
}
|
||||||
|
@ -44,7 +44,6 @@
|
|||||||
#include <QtCore/qthread.h>
|
#include <QtCore/qthread.h>
|
||||||
#include <QtCore/private/qcoreapplication_p.h>
|
#include <QtCore/private/qcoreapplication_p.h>
|
||||||
#include <QtCore/private/qcore_unix_p.h>
|
#include <QtCore/private/qcore_unix_p.h>
|
||||||
#include <QtCore/private/qcore_mac_p.h>
|
|
||||||
#include <QtCore/private/qthread_p.h>
|
#include <QtCore/private/qthread_p.h>
|
||||||
|
|
||||||
#include <limits>
|
#include <limits>
|
||||||
@ -59,11 +58,13 @@
|
|||||||
|
|
||||||
QT_USE_NAMESPACE
|
QT_USE_NAMESPACE
|
||||||
|
|
||||||
@interface RunLoopModeTracker : NSObject {
|
@interface QT_MANGLE_NAMESPACE(RunLoopModeTracker) : NSObject {
|
||||||
QStack<CFStringRef> m_runLoopModes;
|
QStack<CFStringRef> m_runLoopModes;
|
||||||
}
|
}
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
QT_NAMESPACE_ALIAS_OBJC_CLASS(RunLoopModeTracker);
|
||||||
|
|
||||||
@implementation RunLoopModeTracker
|
@implementation RunLoopModeTracker
|
||||||
|
|
||||||
- (id) init
|
- (id) init
|
||||||
|
@ -90,14 +90,11 @@
|
|||||||
#include <QtCore/qabstracteventdispatcher.h>
|
#include <QtCore/qabstracteventdispatcher.h>
|
||||||
#include <QtCore/private/qtimerinfo_unix_p.h>
|
#include <QtCore/private/qtimerinfo_unix_p.h>
|
||||||
#include <QtCore/private/qcfsocketnotifier_p.h>
|
#include <QtCore/private/qcfsocketnotifier_p.h>
|
||||||
|
#include <QtCore/private/qcore_mac_p.h>
|
||||||
#include <QtCore/qdebug.h>
|
#include <QtCore/qdebug.h>
|
||||||
#include <CoreFoundation/CoreFoundation.h>
|
#include <CoreFoundation/CoreFoundation.h>
|
||||||
|
|
||||||
#ifdef __OBJC__
|
Q_FORWARD_DECLARE_OBJC_CLASS(QT_MANGLE_NAMESPACE(RunLoopModeTracker));
|
||||||
@class RunLoopModeTracker;
|
|
||||||
#else
|
|
||||||
typedef struct objc_object RunLoopModeTracker;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
@ -253,7 +250,7 @@ private:
|
|||||||
RunLoopSource<> m_postedEventsRunLoopSource;
|
RunLoopSource<> m_postedEventsRunLoopSource;
|
||||||
RunLoopObserver<> m_runLoopActivityObserver;
|
RunLoopObserver<> m_runLoopActivityObserver;
|
||||||
|
|
||||||
RunLoopModeTracker *m_runLoopModeTracker;
|
QT_MANGLE_NAMESPACE(RunLoopModeTracker) *m_runLoopModeTracker;
|
||||||
|
|
||||||
QTimerInfoList m_timerInfoList;
|
QTimerInfoList m_timerInfoList;
|
||||||
CFRunLoopTimerRef m_runLoopTimer;
|
CFRunLoopTimerRef m_runLoopTimer;
|
||||||
|
@ -296,12 +296,15 @@ QMimeGlobMatchResult QMimeBinaryProvider::findByFileName(const QString &fileName
|
|||||||
const QString lowerFileName = fileName.toLower();
|
const QString lowerFileName = fileName.toLower();
|
||||||
// TODO this parses in the order (local, global). Check that it handles "NOGLOBS" correctly.
|
// TODO this parses in the order (local, global). Check that it handles "NOGLOBS" correctly.
|
||||||
for (CacheFile *cacheFile : qAsConst(m_cacheFiles)) {
|
for (CacheFile *cacheFile : qAsConst(m_cacheFiles)) {
|
||||||
|
// Check literals (e.g. "Makefile")
|
||||||
matchGlobList(result, cacheFile, cacheFile->getUint32(PosLiteralListOffset), fileName);
|
matchGlobList(result, cacheFile, cacheFile->getUint32(PosLiteralListOffset), fileName);
|
||||||
|
// Check complex globs (e.g. "callgrind.out[0-9]*")
|
||||||
matchGlobList(result, cacheFile, cacheFile->getUint32(PosGlobListOffset), fileName);
|
matchGlobList(result, cacheFile, cacheFile->getUint32(PosGlobListOffset), fileName);
|
||||||
|
// Check the very common *.txt cases with the suffix tree
|
||||||
const int reverseSuffixTreeOffset = cacheFile->getUint32(PosReverseSuffixTreeOffset);
|
const int reverseSuffixTreeOffset = cacheFile->getUint32(PosReverseSuffixTreeOffset);
|
||||||
const int numRoots = cacheFile->getUint32(reverseSuffixTreeOffset);
|
const int numRoots = cacheFile->getUint32(reverseSuffixTreeOffset);
|
||||||
const int firstRootOffset = cacheFile->getUint32(reverseSuffixTreeOffset + 4);
|
const int firstRootOffset = cacheFile->getUint32(reverseSuffixTreeOffset + 4);
|
||||||
matchSuffixTree(result, cacheFile, numRoots, firstRootOffset, lowerFileName, fileName.length() - 1, false);
|
matchSuffixTree(result, cacheFile, numRoots, firstRootOffset, lowerFileName, lowerFileName.length() - 1, false);
|
||||||
if (result.m_matchingMimeTypes.isEmpty())
|
if (result.m_matchingMimeTypes.isEmpty())
|
||||||
matchSuffixTree(result, cacheFile, numRoots, firstRootOffset, fileName, fileName.length() - 1, true);
|
matchSuffixTree(result, cacheFile, numRoots, firstRootOffset, fileName, fileName.length() - 1, true);
|
||||||
}
|
}
|
||||||
|
@ -57,11 +57,22 @@
|
|||||||
#include "QtCore/qobject.h"
|
#include "QtCore/qobject.h"
|
||||||
#include "QtCore/qstringlist.h"
|
#include "QtCore/qstringlist.h"
|
||||||
#include "QtCore/qjsonobject.h"
|
#include "QtCore/qjsonobject.h"
|
||||||
|
#include "QtCore/qjsondocument.h"
|
||||||
#include "QtCore/qmap.h"
|
#include "QtCore/qmap.h"
|
||||||
|
#include "QtCore/qendian.h"
|
||||||
#include "private/qlibrary_p.h"
|
#include "private/qlibrary_p.h"
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
|
inline QJsonDocument qJsonFromRawLibraryMetaData(const char *raw)
|
||||||
|
{
|
||||||
|
raw += strlen("QTMETADATA ");
|
||||||
|
// the size of the embedded JSON object can be found 8 bytes into the data (see qjson_p.h),
|
||||||
|
// but doesn't include the size of the header (8 bytes)
|
||||||
|
QByteArray json(raw, qFromLittleEndian<uint>(*(const uint *)(raw + 8)) + 8);
|
||||||
|
return QJsonDocument::fromBinaryData(json);
|
||||||
|
}
|
||||||
|
|
||||||
class QFactoryLoaderPrivate;
|
class QFactoryLoaderPrivate;
|
||||||
class Q_CORE_EXPORT QFactoryLoader : public QObject
|
class Q_CORE_EXPORT QFactoryLoader : public QObject
|
||||||
{
|
{
|
||||||
|
@ -42,6 +42,7 @@
|
|||||||
|
|
||||||
#ifndef QT_NO_LIBRARY
|
#ifndef QT_NO_LIBRARY
|
||||||
|
|
||||||
|
#include "qfactoryloader_p.h"
|
||||||
#include "qlibrary_p.h"
|
#include "qlibrary_p.h"
|
||||||
#include <qstringlist.h>
|
#include <qstringlist.h>
|
||||||
#include <qfile.h>
|
#include <qfile.h>
|
||||||
|
@ -58,25 +58,12 @@
|
|||||||
#include "QtCore/qstringlist.h"
|
#include "QtCore/qstringlist.h"
|
||||||
#include "QtCore/qplugin.h"
|
#include "QtCore/qplugin.h"
|
||||||
#include "QtCore/qsharedpointer.h"
|
#include "QtCore/qsharedpointer.h"
|
||||||
#include "QtCore/qjsonobject.h"
|
|
||||||
#include "QtCore/qjsondocument.h"
|
|
||||||
#include "QtCore/qendian.h"
|
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
# include "QtCore/qt_windows.h"
|
# include "QtCore/qt_windows.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
// Needed also in case of QT_NO_LIBRARY, for static plugin loading.
|
|
||||||
inline QJsonDocument qJsonFromRawLibraryMetaData(const char *raw)
|
|
||||||
{
|
|
||||||
raw += strlen("QTMETADATA ");
|
|
||||||
// the size of the embedded JSON object can be found 8 bytes into the data (see qjson_p.h),
|
|
||||||
// but doesn't include the size of the header (8 bytes)
|
|
||||||
QByteArray json(raw, qFromLittleEndian<uint>(*(const uint *)(raw + 8)) + 8);
|
|
||||||
return QJsonDocument::fromBinaryData(json);
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifndef QT_NO_LIBRARY
|
#ifndef QT_NO_LIBRARY
|
||||||
|
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@
|
|||||||
#include "qcoreapplication.h"
|
#include "qcoreapplication.h"
|
||||||
#include "qpluginloader.h"
|
#include "qpluginloader.h"
|
||||||
#include <qfileinfo.h>
|
#include <qfileinfo.h>
|
||||||
#include "qlibrary_p.h"
|
#include "qfactoryloader_p.h"
|
||||||
#include "qdebug.h"
|
#include "qdebug.h"
|
||||||
#include "qdir.h"
|
#include "qdir.h"
|
||||||
|
|
||||||
|
@ -392,13 +392,13 @@ bool QReadWriteLock::tryLockForWrite(int timeout)
|
|||||||
*/
|
*/
|
||||||
void QReadWriteLock::unlock()
|
void QReadWriteLock::unlock()
|
||||||
{
|
{
|
||||||
QReadWriteLockPrivate *d = d_ptr.load();
|
QReadWriteLockPrivate *d = d_ptr.loadAcquire();
|
||||||
while (true) {
|
while (true) {
|
||||||
Q_ASSERT_X(d, "QReadWriteLock::unlock()", "Cannot unlock an unlocked lock");
|
Q_ASSERT_X(d, "QReadWriteLock::unlock()", "Cannot unlock an unlocked lock");
|
||||||
|
|
||||||
// Fast case: no contention: (no waiters, no other readers)
|
// Fast case: no contention: (no waiters, no other readers)
|
||||||
if (quintptr(d) <= 2) { // 1 or 2 (StateLockedForRead or StateLockedForWrite)
|
if (quintptr(d) <= 2) { // 1 or 2 (StateLockedForRead or StateLockedForWrite)
|
||||||
if (!d_ptr.testAndSetRelease(d, nullptr, d))
|
if (!d_ptr.testAndSetOrdered(d, nullptr, d))
|
||||||
continue;
|
continue;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -407,7 +407,7 @@ void QReadWriteLock::unlock()
|
|||||||
Q_ASSERT(quintptr(d) > (1U<<4)); //otherwise that would be the fast case
|
Q_ASSERT(quintptr(d) > (1U<<4)); //otherwise that would be the fast case
|
||||||
// Just decrease the reader's count.
|
// Just decrease the reader's count.
|
||||||
auto val = reinterpret_cast<QReadWriteLockPrivate *>(quintptr(d) - (1U<<4));
|
auto val = reinterpret_cast<QReadWriteLockPrivate *>(quintptr(d) - (1U<<4));
|
||||||
if (!d_ptr.testAndSetRelease(d, val, d))
|
if (!d_ptr.testAndSetOrdered(d, val, d))
|
||||||
continue;
|
continue;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -237,7 +237,7 @@ inline int QFreeList<T, ConstantsType>::next()
|
|||||||
int id, newid, at;
|
int id, newid, at;
|
||||||
ElementType *v;
|
ElementType *v;
|
||||||
do {
|
do {
|
||||||
id = _next.load();
|
id = _next.loadAcquire();
|
||||||
|
|
||||||
at = id & ConstantsType::IndexMask;
|
at = id & ConstantsType::IndexMask;
|
||||||
const int block = blockfor(at);
|
const int block = blockfor(at);
|
||||||
@ -254,7 +254,7 @@ inline int QFreeList<T, ConstantsType>::next()
|
|||||||
}
|
}
|
||||||
|
|
||||||
newid = v[at].next.load() | (id & ~ConstantsType::IndexMask);
|
newid = v[at].next.load() | (id & ~ConstantsType::IndexMask);
|
||||||
} while (!_next.testAndSetRelaxed(id, newid));
|
} while (!_next.testAndSetRelease(id, newid));
|
||||||
// qDebug("QFreeList::next(): returning %d (_next now %d, serial %d)",
|
// qDebug("QFreeList::next(): returning %d (_next now %d, serial %d)",
|
||||||
// id & ConstantsType::IndexMask,
|
// id & ConstantsType::IndexMask,
|
||||||
// newid & ConstantsType::IndexMask,
|
// newid & ConstantsType::IndexMask,
|
||||||
|
@ -594,7 +594,6 @@ static QLocalePrivate *c_private()
|
|||||||
*/
|
*/
|
||||||
QSystemLocale::QSystemLocale()
|
QSystemLocale::QSystemLocale()
|
||||||
{
|
{
|
||||||
delete _systemLocale;
|
|
||||||
_systemLocale = this;
|
_systemLocale = this;
|
||||||
|
|
||||||
if (system_data)
|
if (system_data)
|
||||||
|
@ -1323,8 +1323,8 @@ QDebug operator<<(QDebug dbg, const QRect &r)
|
|||||||
rendering.
|
rendering.
|
||||||
|
|
||||||
A QRectF can be constructed with a set of left, top, width and
|
A QRectF can be constructed with a set of left, top, width and
|
||||||
height integers, or from a QPoint and a QSize. The following code
|
height coordinates, or from a QPointF and a QSizeF. The following
|
||||||
creates two identical rectangles.
|
code creates two identical rectangles.
|
||||||
|
|
||||||
\snippet code/src_corelib_tools_qrect.cpp 1
|
\snippet code/src_corelib_tools_qrect.cpp 1
|
||||||
|
|
||||||
@ -1344,7 +1344,7 @@ QDebug operator<<(QDebug dbg, const QRect &r)
|
|||||||
translated copy of this rectangle.
|
translated copy of this rectangle.
|
||||||
|
|
||||||
The size() function returns the rectange's dimensions as a
|
The size() function returns the rectange's dimensions as a
|
||||||
QSize. The dimensions can also be retrieved separately using the
|
QSizeF. The dimensions can also be retrieved separately using the
|
||||||
width() and height() functions. To manipulate the dimensions use
|
width() and height() functions. To manipulate the dimensions use
|
||||||
the setSize(), setWidth() or setHeight() functions. Alternatively,
|
the setSize(), setWidth() or setHeight() functions. Alternatively,
|
||||||
the size can be changed by applying either of the functions
|
the size can be changed by applying either of the functions
|
||||||
|
@ -674,9 +674,9 @@ bool QTimeZone::isDaylightTime(const QDateTime &atDateTime) const
|
|||||||
QTimeZone::OffsetData QTimeZone::offsetData(const QDateTime &forDateTime) const
|
QTimeZone::OffsetData QTimeZone::offsetData(const QDateTime &forDateTime) const
|
||||||
{
|
{
|
||||||
if (hasTransitions())
|
if (hasTransitions())
|
||||||
return d->toOffsetData(d->data(forDateTime.toMSecsSinceEpoch()));
|
return QTimeZonePrivate::toOffsetData(d->data(forDateTime.toMSecsSinceEpoch()));
|
||||||
else
|
else
|
||||||
return d->invalidOffsetData();
|
return QTimeZonePrivate::invalidOffsetData();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@ -712,9 +712,9 @@ bool QTimeZone::hasTransitions() const
|
|||||||
QTimeZone::OffsetData QTimeZone::nextTransition(const QDateTime &afterDateTime) const
|
QTimeZone::OffsetData QTimeZone::nextTransition(const QDateTime &afterDateTime) const
|
||||||
{
|
{
|
||||||
if (hasTransitions())
|
if (hasTransitions())
|
||||||
return d->toOffsetData(d->nextTransition(afterDateTime.toMSecsSinceEpoch()));
|
return QTimeZonePrivate::toOffsetData(d->nextTransition(afterDateTime.toMSecsSinceEpoch()));
|
||||||
else
|
else
|
||||||
return d->invalidOffsetData();
|
return QTimeZonePrivate::invalidOffsetData();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@ -733,9 +733,9 @@ QTimeZone::OffsetData QTimeZone::nextTransition(const QDateTime &afterDateTime)
|
|||||||
QTimeZone::OffsetData QTimeZone::previousTransition(const QDateTime &beforeDateTime) const
|
QTimeZone::OffsetData QTimeZone::previousTransition(const QDateTime &beforeDateTime) const
|
||||||
{
|
{
|
||||||
if (hasTransitions())
|
if (hasTransitions())
|
||||||
return d->toOffsetData(d->previousTransition(beforeDateTime.toMSecsSinceEpoch()));
|
return QTimeZonePrivate::toOffsetData(d->previousTransition(beforeDateTime.toMSecsSinceEpoch()));
|
||||||
else
|
else
|
||||||
return d->invalidOffsetData();
|
return QTimeZonePrivate::invalidOffsetData();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@ -755,7 +755,7 @@ QTimeZone::OffsetDataList QTimeZone::transitions(const QDateTime &fromDateTime,
|
|||||||
toDateTime.toMSecsSinceEpoch());
|
toDateTime.toMSecsSinceEpoch());
|
||||||
list.reserve(plist.count());
|
list.reserve(plist.count());
|
||||||
for (const QTimeZonePrivate::Data &pdata : plist)
|
for (const QTimeZonePrivate::Data &pdata : plist)
|
||||||
list.append(d->toOffsetData(pdata));
|
list.append(QTimeZonePrivate::toOffsetData(pdata));
|
||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
@ -146,15 +146,25 @@ public:
|
|||||||
T value(int i, const T &defaultValue) const;
|
T value(int i, const T &defaultValue) const;
|
||||||
|
|
||||||
inline void append(const T &t) {
|
inline void append(const T &t) {
|
||||||
if (s == a) // i.e. s != 0
|
if (s == a) { // i.e. s != 0
|
||||||
|
T copy(t);
|
||||||
realloc(s, s<<1);
|
realloc(s, s<<1);
|
||||||
const int idx = s++;
|
const int idx = s++;
|
||||||
if (QTypeInfo<T>::isComplex) {
|
if (QTypeInfo<T>::isComplex) {
|
||||||
new (ptr + idx) T(t);
|
new (ptr + idx) T(std::move(copy));
|
||||||
|
} else {
|
||||||
|
ptr[idx] = std::move(copy);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
ptr[idx] = t;
|
const int idx = s++;
|
||||||
|
if (QTypeInfo<T>::isComplex) {
|
||||||
|
new (ptr + idx) T(t);
|
||||||
|
} else {
|
||||||
|
ptr[idx] = t;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void append(const T *buf, int size);
|
void append(const T *buf, int size);
|
||||||
inline QVarLengthArray<T, Prealloc> &operator<<(const T &t)
|
inline QVarLengthArray<T, Prealloc> &operator<<(const T &t)
|
||||||
{ append(t); return *this; }
|
{ append(t); return *this; }
|
||||||
|
@ -161,9 +161,10 @@
|
|||||||
"test": "unix/libpng",
|
"test": "unix/libpng",
|
||||||
"sources": [
|
"sources": [
|
||||||
{ "type": "pkgConfig", "args": "libpng" },
|
{ "type": "pkgConfig", "args": "libpng" },
|
||||||
{ "libs": "-llibpng -lzdll", "condition": "config.msvc" },
|
{ "libs": "-llibpng", "condition": "config.msvc" },
|
||||||
{ "libs": "-lpng -lz", "condition": "!config.msvc" }
|
{ "libs": "-lpng", "condition": "!config.msvc" }
|
||||||
]
|
],
|
||||||
|
"use": "zlib"
|
||||||
},
|
},
|
||||||
"mirclient": {
|
"mirclient": {
|
||||||
"label": "Mir client libraries",
|
"label": "Mir client libraries",
|
||||||
|
@ -265,7 +265,7 @@ void QTextDocumentPrivate::clear()
|
|||||||
unreachableCharacterCount = 0;
|
unreachableCharacterCount = 0;
|
||||||
modifiedState = 0;
|
modifiedState = 0;
|
||||||
modified = false;
|
modified = false;
|
||||||
formats = QTextFormatCollection();
|
formats.clear();
|
||||||
int len = fragments.length();
|
int len = fragments.length();
|
||||||
fragments.clear();
|
fragments.clear();
|
||||||
blocks.clear();
|
blocks.clear();
|
||||||
|
@ -3371,24 +3371,17 @@ QTextTableCellFormat::QTextTableCellFormat(const QTextFormat &fmt)
|
|||||||
|
|
||||||
// ------------------------------------------------------
|
// ------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
QTextFormatCollection::QTextFormatCollection(const QTextFormatCollection &rhs)
|
|
||||||
{
|
|
||||||
formats = rhs.formats;
|
|
||||||
objFormats = rhs.objFormats;
|
|
||||||
}
|
|
||||||
|
|
||||||
QTextFormatCollection &QTextFormatCollection::operator=(const QTextFormatCollection &rhs)
|
|
||||||
{
|
|
||||||
formats = rhs.formats;
|
|
||||||
objFormats = rhs.objFormats;
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
QTextFormatCollection::~QTextFormatCollection()
|
QTextFormatCollection::~QTextFormatCollection()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void QTextFormatCollection::clear()
|
||||||
|
{
|
||||||
|
formats.clear();
|
||||||
|
objFormats.clear();
|
||||||
|
hashes.clear();
|
||||||
|
}
|
||||||
|
|
||||||
int QTextFormatCollection::indexForFormat(const QTextFormat &format)
|
int QTextFormatCollection::indexForFormat(const QTextFormat &format)
|
||||||
{
|
{
|
||||||
uint hash = getHash(format.d, format.format_type);
|
uint hash = getHash(format.d, format.format_type);
|
||||||
|
@ -63,8 +63,7 @@ public:
|
|||||||
QTextFormatCollection() {}
|
QTextFormatCollection() {}
|
||||||
~QTextFormatCollection();
|
~QTextFormatCollection();
|
||||||
|
|
||||||
QTextFormatCollection(const QTextFormatCollection &rhs);
|
void clear();
|
||||||
QTextFormatCollection &operator=(const QTextFormatCollection &rhs);
|
|
||||||
|
|
||||||
inline QTextFormat objectFormat(int objectIndex) const
|
inline QTextFormat objectFormat(int objectIndex) const
|
||||||
{ return format(objectFormatIndex(objectIndex)); }
|
{ return format(objectFormatIndex(objectIndex)); }
|
||||||
@ -104,6 +103,8 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
QFont defaultFnt;
|
QFont defaultFnt;
|
||||||
|
|
||||||
|
Q_DISABLE_COPY(QTextFormatCollection)
|
||||||
};
|
};
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
@ -7,9 +7,6 @@
|
|||||||
|
|
||||||
"commandline": {
|
"commandline": {
|
||||||
"assignments": {
|
"assignments": {
|
||||||
"OPENSSL_LIBS": "openssl.libs",
|
|
||||||
"OPENSSL_LIBS_DEBUG": "openssl.libs.debug",
|
|
||||||
"OPENSSL_LIBS_RELEASE": "openssl.libs.release",
|
|
||||||
"OPENSSL_PATH": "openssl.prefix"
|
"OPENSSL_PATH": "openssl.prefix"
|
||||||
},
|
},
|
||||||
"options": {
|
"options": {
|
||||||
@ -46,13 +43,24 @@
|
|||||||
"-lproxy"
|
"-lproxy"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"openssl_headers": {
|
||||||
|
"label": "OpenSSL Headers",
|
||||||
|
"export": "openssl",
|
||||||
|
"test": "unix/openssl",
|
||||||
|
"sources": [
|
||||||
|
{
|
||||||
|
"comment": "placeholder for OPENSSL_PATH",
|
||||||
|
"libs": ""
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
"openssl": {
|
"openssl": {
|
||||||
"label": "OpenSSL Libraries",
|
"label": "OpenSSL",
|
||||||
"export": "",
|
"test": "unix/openssl",
|
||||||
"sources": [
|
"sources": [
|
||||||
{ "type": "openssl" },
|
{ "type": "openssl" },
|
||||||
{
|
{
|
||||||
"comment": "placeholder for OPENSSL_LIBS{,_{DEBUG,RELEASE}}",
|
"comment": "placeholder for OPENSSL_{PATH,LIBS{,_{DEBUG,RELEASE}}}",
|
||||||
"libs": "",
|
"libs": "",
|
||||||
"builds": {
|
"builds": {
|
||||||
"debug": "",
|
"debug": "",
|
||||||
@ -92,11 +100,6 @@
|
|||||||
"test": "unix/ipv6ifname",
|
"test": "unix/ipv6ifname",
|
||||||
"use": "network"
|
"use": "network"
|
||||||
},
|
},
|
||||||
"openssl": {
|
|
||||||
"label": "OpenSSL",
|
|
||||||
"type": "compile",
|
|
||||||
"test": "unix/openssl"
|
|
||||||
},
|
|
||||||
"sctp": {
|
"sctp": {
|
||||||
"label": "SCTP support",
|
"label": "SCTP support",
|
||||||
"type": "compile",
|
"type": "compile",
|
||||||
@ -138,7 +141,7 @@
|
|||||||
"enable": "input.openssl == 'yes' || input.openssl == 'linked' || input.openssl == 'runtime'",
|
"enable": "input.openssl == 'yes' || input.openssl == 'linked' || input.openssl == 'runtime'",
|
||||||
"disable": "input.openssl == 'no' || input.ssl == 'no'",
|
"disable": "input.openssl == 'no' || input.ssl == 'no'",
|
||||||
"autoDetect": "!config.winrt",
|
"autoDetect": "!config.winrt",
|
||||||
"condition": "!features.securetransport && tests.openssl",
|
"condition": "!features.securetransport && (features.openssl-linked || libs.openssl_headers)",
|
||||||
"output": [
|
"output": [
|
||||||
"privateFeature",
|
"privateFeature",
|
||||||
{ "type": "publicQtConfig", "condition": "!features.openssl-linked" },
|
{ "type": "publicQtConfig", "condition": "!features.openssl-linked" },
|
||||||
@ -149,14 +152,9 @@
|
|||||||
"label": " Qt directly linked to OpenSSL",
|
"label": " Qt directly linked to OpenSSL",
|
||||||
"enable": "input.openssl == 'linked'",
|
"enable": "input.openssl == 'linked'",
|
||||||
"disable": "input.openssl != 'linked'",
|
"disable": "input.openssl != 'linked'",
|
||||||
"condition": "features.openssl && libs.openssl",
|
"condition": "!features.securetransport && libs.openssl",
|
||||||
"output": [
|
"output": [
|
||||||
"privateFeature",
|
"privateFeature",
|
||||||
{ "type": "varAssign", "name": "OPENSSL_LIBS", "value": "libs.openssl.libs", "eval": "true" },
|
|
||||||
{ "type": "varAssign", "name": "OPENSSL_LIBS_DEBUG", "value": "libs.openssl.builds.debug.libs",
|
|
||||||
"eval": "true", "condition": "config.win32" },
|
|
||||||
{ "type": "varAssign", "name": "OPENSSL_LIBS_RELEASE", "value": "libs.openssl.builds.release.libs",
|
|
||||||
"eval": "true", "condition": "config.win32" },
|
|
||||||
{ "type": "define", "name": "QT_LINKED_OPENSSL" }
|
{ "type": "define", "name": "QT_LINKED_OPENSSL" }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -679,10 +679,16 @@ static bool multicastMembershipHelper(QNativeSocketEnginePrivate *d,
|
|||||||
|
|
||||||
if (interface.isValid()) {
|
if (interface.isValid()) {
|
||||||
const QList<QNetworkAddressEntry> addressEntries = interface.addressEntries();
|
const QList<QNetworkAddressEntry> addressEntries = interface.addressEntries();
|
||||||
if (!addressEntries.isEmpty()) {
|
bool found = false;
|
||||||
QHostAddress firstIP = addressEntries.first().ip();
|
for (const QNetworkAddressEntry &entry : addressEntries) {
|
||||||
mreq4.imr_interface.s_addr = htonl(firstIP.toIPv4Address());
|
const QHostAddress ip = entry.ip();
|
||||||
} else {
|
if (ip.protocol() == QAbstractSocket::IPv4Protocol) {
|
||||||
|
mreq4.imr_interface.s_addr = htonl(ip.toIPv4Address());
|
||||||
|
found = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!found) {
|
||||||
d->setError(QAbstractSocket::NetworkError,
|
d->setError(QAbstractSocket::NetworkError,
|
||||||
QNativeSocketEnginePrivate::NetworkUnreachableErrorString);
|
QNativeSocketEnginePrivate::NetworkUnreachableErrorString);
|
||||||
return false;
|
return false;
|
||||||
|
@ -955,10 +955,16 @@ static bool multicastMembershipHelper(QNativeSocketEnginePrivate *d,
|
|||||||
|
|
||||||
if (iface.isValid()) {
|
if (iface.isValid()) {
|
||||||
const QList<QNetworkAddressEntry> addressEntries = iface.addressEntries();
|
const QList<QNetworkAddressEntry> addressEntries = iface.addressEntries();
|
||||||
if (!addressEntries.isEmpty()) {
|
bool found = false;
|
||||||
QHostAddress firstIP = addressEntries.first().ip();
|
for (const QNetworkAddressEntry &entry : addressEntries) {
|
||||||
mreq4.imr_interface.s_addr = htonl(firstIP.toIPv4Address());
|
const QHostAddress ip = entry.ip();
|
||||||
} else {
|
if (ip.protocol() == QAbstractSocket::IPv4Protocol) {
|
||||||
|
mreq4.imr_interface.s_addr = htonl(ip.toIPv4Address());
|
||||||
|
found = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!found) {
|
||||||
d->setError(QAbstractSocket::NetworkError,
|
d->setError(QAbstractSocket::NetworkError,
|
||||||
QNativeSocketEnginePrivate::NetworkUnreachableErrorString);
|
QNativeSocketEnginePrivate::NetworkUnreachableErrorString);
|
||||||
return false;
|
return false;
|
||||||
|
@ -56,7 +56,7 @@ qtConfig(ssl) {
|
|||||||
ssl/qsslellipticcurve_dummy.cpp
|
ssl/qsslellipticcurve_dummy.cpp
|
||||||
}
|
}
|
||||||
|
|
||||||
qtConfig(openssl)|qtConfig(openssl-linked) {
|
qtConfig(openssl) {
|
||||||
HEADERS += ssl/qsslcontext_openssl_p.h \
|
HEADERS += ssl/qsslcontext_openssl_p.h \
|
||||||
ssl/qsslsocket_openssl_p.h \
|
ssl/qsslsocket_openssl_p.h \
|
||||||
ssl/qsslsocket_openssl_symbols_p.h
|
ssl/qsslsocket_openssl_symbols_p.h
|
||||||
@ -79,16 +79,10 @@ qtConfig(ssl) {
|
|||||||
# - libs in <OPENSSL_DIR>\lib\VC\static
|
# - libs in <OPENSSL_DIR>\lib\VC\static
|
||||||
# - configure: -openssl -openssl-linked -I <OPENSSL_DIR>\include -L <OPENSSL_DIR>\lib\VC\static OPENSSL_LIBS="-lUser32 -lAdvapi32 -lGdi32" OPENSSL_LIBS_DEBUG="-lssleay32MDd -llibeay32MDd" OPENSSL_LIBS_RELEASE="-lssleay32MD -llibeay32MD"
|
# - configure: -openssl -openssl-linked -I <OPENSSL_DIR>\include -L <OPENSSL_DIR>\lib\VC\static OPENSSL_LIBS="-lUser32 -lAdvapi32 -lGdi32" OPENSSL_LIBS_DEBUG="-lssleay32MDd -llibeay32MDd" OPENSSL_LIBS_RELEASE="-lssleay32MD -llibeay32MD"
|
||||||
|
|
||||||
include($$OUT_PWD/qtnetwork-config.pri)
|
qtConfig(openssl-linked): \
|
||||||
|
QMAKE_USE_FOR_PRIVATE += openssl
|
||||||
CONFIG(debug, debug|release) {
|
else: \
|
||||||
LIBS_PRIVATE += $$OPENSSL_LIBS_DEBUG
|
QMAKE_USE_FOR_PRIVATE += openssl/nolink
|
||||||
} else {
|
|
||||||
LIBS_PRIVATE += $$OPENSSL_LIBS_RELEASE
|
|
||||||
}
|
|
||||||
|
|
||||||
QMAKE_CXXFLAGS += $$OPENSSL_CFLAGS
|
|
||||||
LIBS_PRIVATE += $$OPENSSL_LIBS
|
|
||||||
win32: LIBS_PRIVATE += -lcrypt32
|
win32: LIBS_PRIVATE += -lcrypt32
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -572,7 +572,8 @@ QString QIBusPlatformInputContextPrivate::getSocketPath()
|
|||||||
if (debug)
|
if (debug)
|
||||||
qDebug() << "host=" << host << "displayNumber" << displayNumber;
|
qDebug() << "host=" << host << "displayNumber" << displayNumber;
|
||||||
|
|
||||||
return QDir::homePath() + QLatin1String("/.config/ibus/bus/") +
|
return QStandardPaths::writableLocation(QStandardPaths::ConfigLocation) +
|
||||||
|
QLatin1String("/ibus/bus/") +
|
||||||
QLatin1String(QDBusConnection::localMachineId()) +
|
QLatin1String(QDBusConnection::localMachineId()) +
|
||||||
QLatin1Char('-') + QString::fromLocal8Bit(host) + QLatin1Char('-') + QString::fromLocal8Bit(displayNumber);
|
QLatin1Char('-') + QString::fromLocal8Bit(host) + QLatin1Char('-') + QString::fromLocal8Bit(displayNumber);
|
||||||
}
|
}
|
||||||
|
@ -100,10 +100,6 @@ bool QAndroidPlatformOpenGLContext::makeCurrent(QPlatformSurface *surface)
|
|||||||
bool ret = QEGLPlatformContext::makeCurrent(surface);
|
bool ret = QEGLPlatformContext::makeCurrent(surface);
|
||||||
QOpenGLContextPrivate *ctx_d = QOpenGLContextPrivate::get(context());
|
QOpenGLContextPrivate *ctx_d = QOpenGLContextPrivate::get(context());
|
||||||
|
|
||||||
const char *rendererString = reinterpret_cast<const char *>(glGetString(GL_RENDERER));
|
|
||||||
if (rendererString != 0 && qstrncmp(rendererString, "Android Emulator", 16) == 0)
|
|
||||||
ctx_d->workaround_missingPrecisionQualifiers = true;
|
|
||||||
|
|
||||||
if (!ctx_d->workaround_brokenFBOReadBack && needsFBOReadBackWorkaround())
|
if (!ctx_d->workaround_brokenFBOReadBack && needsFBOReadBackWorkaround())
|
||||||
ctx_d->workaround_brokenFBOReadBack = true;
|
ctx_d->workaround_brokenFBOReadBack = true;
|
||||||
|
|
||||||
|
@ -201,6 +201,10 @@ QPixmap QCocoaDrag::dragPixmap(QDrag *drag, QPoint &hotSpot) const
|
|||||||
dpr = sourceWindow->devicePixelRatio();
|
dpr = sourceWindow->devicePixelRatio();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
else {
|
||||||
|
if (const QWindow *focusWindow = qApp->focusWindow())
|
||||||
|
dpr = focusWindow->devicePixelRatio();
|
||||||
|
}
|
||||||
pm = QPixmap(width * dpr, height * dpr);
|
pm = QPixmap(width * dpr, height * dpr);
|
||||||
pm.setDevicePixelRatio(dpr);
|
pm.setDevicePixelRatio(dpr);
|
||||||
QPainter p(&pm);
|
QPainter p(&pm);
|
||||||
|
@ -142,7 +142,7 @@ void QVncClient::convertPixels(char *dst, const char *src, int count) const
|
|||||||
case 16: {
|
case 16: {
|
||||||
quint16 p = *reinterpret_cast<const quint16*>(src);
|
quint16 p = *reinterpret_cast<const quint16*>(src);
|
||||||
#if Q_BYTE_ORDER == Q_BIG_ENDIAN
|
#if Q_BYTE_ORDER == Q_BIG_ENDIAN
|
||||||
if (swapBytes)
|
if (m_swapBytes)
|
||||||
p = ((p & 0xff) << 8) | ((p & 0xff00) >> 8);
|
p = ((p & 0xff) << 8) | ((p & 0xff00) >> 8);
|
||||||
#endif
|
#endif
|
||||||
r = (p >> 11) & 0x1f;
|
r = (p >> 11) & 0x1f;
|
||||||
@ -484,7 +484,7 @@ void QVncClient::setPixelFormat()
|
|||||||
m_sameEndian = (QSysInfo::ByteOrder == QSysInfo::BigEndian) == !!m_pixelFormat.bigEndian;
|
m_sameEndian = (QSysInfo::ByteOrder == QSysInfo::BigEndian) == !!m_pixelFormat.bigEndian;
|
||||||
m_needConversion = pixelConversionNeeded();
|
m_needConversion = pixelConversionNeeded();
|
||||||
#if Q_BYTE_ORDER == Q_BIG_ENDIAN
|
#if Q_BYTE_ORDER == Q_BIG_ENDIAN
|
||||||
m_swapBytes = qvnc_screen->swapBytes();
|
m_swapBytes = server()->screen()->swapBytes();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -639,7 +639,7 @@ bool QVncClient::pixelConversionNeeded() const
|
|||||||
return true;
|
return true;
|
||||||
|
|
||||||
#if Q_BYTE_ORDER == Q_BIG_ENDIAN
|
#if Q_BYTE_ORDER == Q_BIG_ENDIAN
|
||||||
if (qvnc_screen->swapBytes())
|
if (server()->screen()->swapBytes())
|
||||||
return true;
|
return true;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -43,6 +43,7 @@
|
|||||||
#include <QtFbSupport/private/qfbcursor_p.h>
|
#include <QtFbSupport/private/qfbcursor_p.h>
|
||||||
|
|
||||||
#include <QtGui/QPainter>
|
#include <QtGui/QPainter>
|
||||||
|
#include <QtGui/QScreen>
|
||||||
#include <QtCore/QRegularExpression>
|
#include <QtCore/QRegularExpression>
|
||||||
|
|
||||||
|
|
||||||
@ -172,14 +173,18 @@ QPixmap QVncScreen::grabWindow(WId wid, int x, int y, int width, int height) con
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if Q_BYTE_ORDER == Q_BIG_ENDIAN
|
#if Q_BYTE_ORDER == Q_BIG_ENDIAN
|
||||||
bool QVNCScreen::swapBytes() const
|
bool QVncScreen::swapBytes() const
|
||||||
{
|
{
|
||||||
|
return false;
|
||||||
|
|
||||||
|
/* TODO
|
||||||
if (depth() != 16)
|
if (depth() != 16)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (screen())
|
if (screen())
|
||||||
return screen()->frameBufferLittleEndian();
|
return screen()->frameBufferLittleEndian();
|
||||||
return frameBufferLittleEndian();
|
return frameBufferLittleEndian();
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ public:
|
|||||||
void clearDirty() { dirtyRegion = QRegion(); }
|
void clearDirty() { dirtyRegion = QRegion(); }
|
||||||
|
|
||||||
#if Q_BYTE_ORDER == Q_BIG_ENDIAN
|
#if Q_BYTE_ORDER == Q_BIG_ENDIAN
|
||||||
bool swapBytes() const
|
bool swapBytes() const;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
QStringList mArgs;
|
QStringList mArgs;
|
||||||
|
@ -8,7 +8,6 @@
|
|||||||
"commandline": {
|
"commandline": {
|
||||||
"assignments": {
|
"assignments": {
|
||||||
"MYSQL_PATH": "mysql.prefix",
|
"MYSQL_PATH": "mysql.prefix",
|
||||||
"PSQL_LIBS": "psql.libs",
|
|
||||||
"SYBASE": "tds.prefix",
|
"SYBASE": "tds.prefix",
|
||||||
"SYBASE_LIBS": "tds.libs"
|
"SYBASE_LIBS": "tds.libs"
|
||||||
},
|
},
|
||||||
@ -115,8 +114,10 @@
|
|||||||
"test": "unix/sqlite",
|
"test": "unix/sqlite",
|
||||||
"sources": [
|
"sources": [
|
||||||
{ "type": "pkgConfig", "args": "sqlite3" },
|
{ "type": "pkgConfig", "args": "sqlite3" },
|
||||||
{ "libs": "-lsqlite3", "condition": "config.win32" },
|
"-lsqlite3"
|
||||||
{ "libs": "-lsqlite3 -lz", "condition": "!config.win32" }
|
],
|
||||||
|
"use": [
|
||||||
|
{ "lib": "zlib", "condition": "!config.win32" }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -6669,12 +6669,7 @@ QSize QMacStyle::sizeFromContents(ContentsType ct, const QStyleOption *opt,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case CT_Menu: {
|
case CT_Menu: {
|
||||||
QStyleHintReturnMask menuMask;
|
sz = csz;
|
||||||
QStyleOption myOption = *opt;
|
|
||||||
myOption.rect.setSize(sz);
|
|
||||||
if (proxy()->styleHint(SH_Menu_Mask, &myOption, widget, &menuMask)) {
|
|
||||||
sz = menuMask.region.boundingRect().size();
|
|
||||||
}
|
|
||||||
break; }
|
break; }
|
||||||
case CT_HeaderSection:{
|
case CT_HeaderSection:{
|
||||||
const QStyleOptionHeader *header = qstyleoption_cast<const QStyleOptionHeader *>(opt);
|
const QStyleOptionHeader *header = qstyleoption_cast<const QStyleOptionHeader *>(opt);
|
||||||
|
@ -2092,7 +2092,7 @@ void QDockAreaLayoutInfo::reparentWidgets(QWidget *parent)
|
|||||||
const QDockAreaLayoutItem &item = item_list.at(i);
|
const QDockAreaLayoutItem &item = item_list.at(i);
|
||||||
if (item.flags & QDockAreaLayoutItem::GapItem)
|
if (item.flags & QDockAreaLayoutItem::GapItem)
|
||||||
continue;
|
continue;
|
||||||
if (!item.widgetItem && item.skip())
|
if (item.skip())
|
||||||
continue;
|
continue;
|
||||||
if (item.subinfo)
|
if (item.subinfo)
|
||||||
item.subinfo->reparentWidgets(parent);
|
item.subinfo->reparentWidgets(parent);
|
||||||
|
@ -1026,6 +1026,12 @@ void QDockWidgetPrivate::nonClientAreaMouseEvent(QMouseEvent *event)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void QDockWidgetPrivate::recalculatePressPos(QResizeEvent *event)
|
||||||
|
{
|
||||||
|
qreal ratio = event->oldSize().width() / (1.0 * event->size().width());
|
||||||
|
state->pressPos.setX(state->pressPos.x() / ratio);
|
||||||
|
}
|
||||||
|
|
||||||
/*! \internal
|
/*! \internal
|
||||||
Called when the QDockWidget or the QDockWidgetGroupWindow is moved
|
Called when the QDockWidget or the QDockWidgetGroupWindow is moved
|
||||||
*/
|
*/
|
||||||
@ -1542,6 +1548,13 @@ bool QDockWidget::event(QEvent *event)
|
|||||||
// if the mainwindow is plugging us, we don't want to update undocked geometry
|
// if the mainwindow is plugging us, we don't want to update undocked geometry
|
||||||
if (isFloating() && layout != 0 && layout->pluggingWidget != this)
|
if (isFloating() && layout != 0 && layout->pluggingWidget != this)
|
||||||
d->undockedGeometry = geometry();
|
d->undockedGeometry = geometry();
|
||||||
|
|
||||||
|
// Usually the window won't get resized while it's being moved, but it can happen,
|
||||||
|
// for example on Windows when moving to a screen with bigger scale factor
|
||||||
|
// (and Qt::AA_EnableHighDpiScaling is enabled). If that happens we should
|
||||||
|
// update state->pressPos, otherwise it will be outside the window when the window shrinks.
|
||||||
|
if (d->state && d->state->dragging)
|
||||||
|
d->recalculatePressPos(static_cast<QResizeEvent*>(event));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
@ -118,6 +118,7 @@ public:
|
|||||||
void startDrag(bool group = true);
|
void startDrag(bool group = true);
|
||||||
void endDrag(bool abort = false);
|
void endDrag(bool abort = false);
|
||||||
void moveEvent(QMoveEvent *event);
|
void moveEvent(QMoveEvent *event);
|
||||||
|
void recalculatePressPos(QResizeEvent *event);
|
||||||
|
|
||||||
void unplug(const QRect &rect);
|
void unplug(const QRect &rect);
|
||||||
void plug(const QRect &rect);
|
void plug(const QRect &rect);
|
||||||
|
@ -2195,10 +2195,8 @@ void QMainWindowLayout::animationFinished(QWidget *widget)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (QDockWidget *dw = qobject_cast<QDockWidget*>(widget)) {
|
if (QDockWidget *dw = qobject_cast<QDockWidget*>(widget)) {
|
||||||
if (currentHoveredFloat) {
|
dw->setParent(currentHoveredFloat ? currentHoveredFloat.data() : parentWidget());
|
||||||
dw->setParent(currentHoveredFloat);
|
dw->show();
|
||||||
dw->show();
|
|
||||||
}
|
|
||||||
dw->d_func()->plug(currentGapRect);
|
dw->d_func()->plug(currentGapRect);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -2380,7 +2378,8 @@ QLayoutItem *QMainWindowLayout::unplug(QWidget *widget, bool group)
|
|||||||
// We are unplugging a dock widget from a floating window.
|
// We are unplugging a dock widget from a floating window.
|
||||||
if (QDockWidget *dw = qobject_cast<QDockWidget*>(widget)) {
|
if (QDockWidget *dw = qobject_cast<QDockWidget*>(widget)) {
|
||||||
dw->d_func()->unplug(widget->geometry());
|
dw->d_func()->unplug(widget->geometry());
|
||||||
return 0;
|
int index = widget->parentWidget()->layout()->indexOf(widget);
|
||||||
|
return widget->parentWidget()->layout()->itemAt(index);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,3 +3,6 @@ TARGET = tst_qtconcurrentmap
|
|||||||
QT = core testlib concurrent
|
QT = core testlib concurrent
|
||||||
SOURCES = tst_qtconcurrentmap.cpp
|
SOURCES = tst_qtconcurrentmap.cpp
|
||||||
DEFINES += QT_STRICT_ITERATORS
|
DEFINES += QT_STRICT_ITERATORS
|
||||||
|
|
||||||
|
# Force C++17 if available
|
||||||
|
contains(QT_CONFIG, c++1z): CONFIG += c++1z
|
||||||
|
@ -48,6 +48,7 @@ private slots:
|
|||||||
void blocking_mappedReduced();
|
void blocking_mappedReduced();
|
||||||
void assignResult();
|
void assignResult();
|
||||||
void functionOverloads();
|
void functionOverloads();
|
||||||
|
void noExceptFunctionOverloads();
|
||||||
#ifndef QT_NO_EXCEPTIONS
|
#ifndef QT_NO_EXCEPTIONS
|
||||||
void exceptions();
|
void exceptions();
|
||||||
#endif
|
#endif
|
||||||
@ -2025,6 +2026,16 @@ int fn(int &i)
|
|||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int fnConstNoExcept(const int &i) Q_DECL_NOTHROW
|
||||||
|
{
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
|
||||||
|
int fnNoExcept(int &i) Q_DECL_NOTHROW
|
||||||
|
{
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
|
||||||
QString changeTypeConst(const int &)
|
QString changeTypeConst(const int &)
|
||||||
{
|
{
|
||||||
return QString();
|
return QString();
|
||||||
@ -2035,6 +2046,16 @@ QString changeType(int &)
|
|||||||
return QString();
|
return QString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString changeTypeConstNoExcept(const int &) Q_DECL_NOTHROW
|
||||||
|
{
|
||||||
|
return QString();
|
||||||
|
}
|
||||||
|
|
||||||
|
QString changeTypeNoExcept(int &) Q_DECL_NOTHROW
|
||||||
|
{
|
||||||
|
return QString();
|
||||||
|
}
|
||||||
|
|
||||||
int changeTypeQStringListConst(const QStringList &)
|
int changeTypeQStringListConst(const QStringList &)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
@ -2045,6 +2066,16 @@ int changeTypeQStringList(QStringList &)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int changeTypeQStringListConstNoExcept(const QStringList &) Q_DECL_NOTHROW
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int changeTypeQStringListNoExcept(QStringList &) Q_DECL_NOTHROW
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
class MemFnTester
|
class MemFnTester
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -2069,6 +2100,26 @@ public:
|
|||||||
{
|
{
|
||||||
return QString();
|
return QString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MemFnTester fnNoExcept() Q_DECL_NOTHROW
|
||||||
|
{
|
||||||
|
return MemFnTester();
|
||||||
|
}
|
||||||
|
|
||||||
|
MemFnTester fnConstNoExcept() const Q_DECL_NOTHROW
|
||||||
|
{
|
||||||
|
return MemFnTester();
|
||||||
|
}
|
||||||
|
|
||||||
|
QString changeTypeNoExcept() Q_DECL_NOTHROW
|
||||||
|
{
|
||||||
|
return QString();
|
||||||
|
}
|
||||||
|
|
||||||
|
QString changeTypeConstNoExcept() const Q_DECL_NOTHROW
|
||||||
|
{
|
||||||
|
return QString();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
Q_DECLARE_METATYPE(QVector<MemFnTester>);
|
Q_DECLARE_METATYPE(QVector<MemFnTester>);
|
||||||
@ -2097,6 +2148,29 @@ void tst_QtConcurrentMap::functionOverloads()
|
|||||||
QtConcurrent::blockingMapped<QList<QString> >(constMemFnTesterList, &MemFnTester::changeTypeConst);
|
QtConcurrent::blockingMapped<QList<QString> >(constMemFnTesterList, &MemFnTester::changeTypeConst);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void tst_QtConcurrentMap::noExceptFunctionOverloads()
|
||||||
|
{
|
||||||
|
QList<int> intList;
|
||||||
|
const QList<int> constIntList;
|
||||||
|
QList<MemFnTester> classList;
|
||||||
|
const QList<MemFnTester> constMemFnTesterList;
|
||||||
|
|
||||||
|
QtConcurrent::mapped(intList, fnConstNoExcept);
|
||||||
|
QtConcurrent::mapped(constIntList, fnConstNoExcept);
|
||||||
|
QtConcurrent::mapped(classList, &MemFnTester::fnConstNoExcept);
|
||||||
|
QtConcurrent::mapped(constMemFnTesterList, &MemFnTester::fnConstNoExcept);
|
||||||
|
|
||||||
|
QtConcurrent::blockingMapped<QVector<int> >(intList, fnConstNoExcept);
|
||||||
|
QtConcurrent::blockingMapped<QVector<int> >(constIntList, fnConstNoExcept);
|
||||||
|
QtConcurrent::blockingMapped<QVector<MemFnTester> >(classList, &MemFnTester::fnConstNoExcept);
|
||||||
|
QtConcurrent::blockingMapped<QVector<MemFnTester> >(constMemFnTesterList, &MemFnTester::fnConstNoExcept);
|
||||||
|
|
||||||
|
QtConcurrent::blockingMapped<QList<QString> >(intList, changeTypeConstNoExcept);
|
||||||
|
QtConcurrent::blockingMapped<QList<QString> >(constIntList, changeTypeConstNoExcept);
|
||||||
|
QtConcurrent::blockingMapped<QList<QString> >(classList, &MemFnTester::changeTypeConstNoExcept);
|
||||||
|
QtConcurrent::blockingMapped<QList<QString> >(constMemFnTesterList, &MemFnTester::changeTypeConstNoExcept);
|
||||||
|
}
|
||||||
|
|
||||||
QAtomicInt currentInstanceCount;
|
QAtomicInt currentInstanceCount;
|
||||||
QAtomicInt peakInstanceCount;
|
QAtomicInt peakInstanceCount;
|
||||||
class InstanceCounter
|
class InstanceCounter
|
||||||
|
@ -2,3 +2,6 @@ CONFIG += testcase
|
|||||||
TARGET = tst_qtconcurrentrun
|
TARGET = tst_qtconcurrentrun
|
||||||
QT = core testlib concurrent
|
QT = core testlib concurrent
|
||||||
SOURCES = tst_qtconcurrentrun.cpp
|
SOURCES = tst_qtconcurrentrun.cpp
|
||||||
|
|
||||||
|
# Force C++17 if available
|
||||||
|
contains(QT_CONFIG, c++1z): CONFIG += c++1z
|
||||||
|
@ -123,6 +123,28 @@ public:
|
|||||||
int operator()(int in) const { return in; }
|
int operator()(int in) const { return in; }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class ANoExcept
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
int member0() Q_DECL_NOTHROW { return 10; }
|
||||||
|
int member1(int in) Q_DECL_NOTHROW { return in; }
|
||||||
|
|
||||||
|
typedef int result_type;
|
||||||
|
int operator()() Q_DECL_NOTHROW { return 10; }
|
||||||
|
int operator()(int in) Q_DECL_NOTHROW { return in; }
|
||||||
|
};
|
||||||
|
|
||||||
|
class AConstNoExcept
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
int member0() const Q_DECL_NOTHROW { return 10; }
|
||||||
|
int member1(int in) const Q_DECL_NOTHROW { return in; }
|
||||||
|
|
||||||
|
typedef int result_type;
|
||||||
|
int operator()() const Q_DECL_NOTHROW { return 10; }
|
||||||
|
int operator()(int in) const Q_DECL_NOTHROW { return in; }
|
||||||
|
};
|
||||||
|
|
||||||
void tst_QtConcurrentRun::returnValue()
|
void tst_QtConcurrentRun::returnValue()
|
||||||
{
|
{
|
||||||
QThreadPool pool;
|
QThreadPool pool;
|
||||||
@ -214,6 +236,88 @@ void tst_QtConcurrentRun::returnValue()
|
|||||||
QCOMPARE(f.result(), 20);
|
QCOMPARE(f.result(), 20);
|
||||||
f = run(&pool, &aConst, 20);
|
f = run(&pool, &aConst, 20);
|
||||||
QCOMPARE(f.result(), 20);
|
QCOMPARE(f.result(), 20);
|
||||||
|
|
||||||
|
ANoExcept aNoExcept;
|
||||||
|
f = run(&aNoExcept, &ANoExcept::member0);
|
||||||
|
QCOMPARE(f.result(), 10);
|
||||||
|
f = run(&pool, &aNoExcept, &ANoExcept::member0);
|
||||||
|
QCOMPARE(f.result(), 10);
|
||||||
|
|
||||||
|
f = run(&aNoExcept, &ANoExcept::member1, 20);
|
||||||
|
QCOMPARE(f.result(), 20);
|
||||||
|
f = run(&pool, &aNoExcept, &ANoExcept::member1, 20);
|
||||||
|
QCOMPARE(f.result(), 20);
|
||||||
|
|
||||||
|
f = run(aNoExcept, &ANoExcept::member0);
|
||||||
|
QCOMPARE(f.result(), 10);
|
||||||
|
f = run(&pool, aNoExcept, &ANoExcept::member0);
|
||||||
|
QCOMPARE(f.result(), 10);
|
||||||
|
|
||||||
|
f = run(aNoExcept, &ANoExcept::member1, 20);
|
||||||
|
QCOMPARE(f.result(), 20);
|
||||||
|
f = run(&pool, aNoExcept, &ANoExcept::member1, 20);
|
||||||
|
QCOMPARE(f.result(), 20);
|
||||||
|
|
||||||
|
f = run(aNoExcept);
|
||||||
|
QCOMPARE(f.result(), 10);
|
||||||
|
f = run(&pool, aNoExcept);
|
||||||
|
QCOMPARE(f.result(), 10);
|
||||||
|
|
||||||
|
f = run(&aNoExcept);
|
||||||
|
QCOMPARE(f.result(), 10);
|
||||||
|
f = run(&pool, &aNoExcept);
|
||||||
|
QCOMPARE(f.result(), 10);
|
||||||
|
|
||||||
|
f = run(aNoExcept, 20);
|
||||||
|
QCOMPARE(f.result(), 20);
|
||||||
|
f = run(&pool, aNoExcept, 20);
|
||||||
|
QCOMPARE(f.result(), 20);
|
||||||
|
|
||||||
|
f = run(&aNoExcept, 20);
|
||||||
|
QCOMPARE(f.result(), 20);
|
||||||
|
f = run(&pool, &aNoExcept, 20);
|
||||||
|
QCOMPARE(f.result(), 20);
|
||||||
|
|
||||||
|
const AConstNoExcept aConstNoExcept = AConstNoExcept();
|
||||||
|
f = run(&aConstNoExcept, &AConstNoExcept::member0);
|
||||||
|
QCOMPARE(f.result(), 10);
|
||||||
|
f = run(&pool, &aConstNoExcept, &AConstNoExcept::member0);
|
||||||
|
QCOMPARE(f.result(), 10);
|
||||||
|
|
||||||
|
f = run(&aConstNoExcept, &AConstNoExcept::member1, 20);
|
||||||
|
QCOMPARE(f.result(), 20);
|
||||||
|
f = run(&pool, &aConstNoExcept, &AConstNoExcept::member1, 20);
|
||||||
|
QCOMPARE(f.result(), 20);
|
||||||
|
|
||||||
|
f = run(aConstNoExcept, &AConstNoExcept::member0);
|
||||||
|
QCOMPARE(f.result(), 10);
|
||||||
|
f = run(&pool, aConstNoExcept, &AConstNoExcept::member0);
|
||||||
|
QCOMPARE(f.result(), 10);
|
||||||
|
|
||||||
|
f = run(aConstNoExcept, &AConstNoExcept::member1, 20);
|
||||||
|
QCOMPARE(f.result(), 20);
|
||||||
|
f = run(&pool, aConstNoExcept, &AConstNoExcept::member1, 20);
|
||||||
|
QCOMPARE(f.result(), 20);
|
||||||
|
|
||||||
|
f = run(aConstNoExcept);
|
||||||
|
QCOMPARE(f.result(), 10);
|
||||||
|
f = run(&pool, aConstNoExcept);
|
||||||
|
QCOMPARE(f.result(), 10);
|
||||||
|
|
||||||
|
f = run(&aConstNoExcept);
|
||||||
|
QCOMPARE(f.result(), 10);
|
||||||
|
f = run(&pool, &aConstNoExcept);
|
||||||
|
QCOMPARE(f.result(), 10);
|
||||||
|
|
||||||
|
f = run(aConstNoExcept, 20);
|
||||||
|
QCOMPARE(f.result(), 20);
|
||||||
|
f = run(&pool, aConstNoExcept, 20);
|
||||||
|
QCOMPARE(f.result(), 20);
|
||||||
|
|
||||||
|
f = run(&aConstNoExcept, 20);
|
||||||
|
QCOMPARE(f.result(), 20);
|
||||||
|
f = run(&pool, &aConstNoExcept, 20);
|
||||||
|
QCOMPARE(f.result(), 20);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct TestClass
|
struct TestClass
|
||||||
|
@ -353,7 +353,7 @@ void tst_QDir::mkdir_data()
|
|||||||
<< QDir::currentPath() + "/testdir/two/three";
|
<< QDir::currentPath() + "/testdir/two/three";
|
||||||
QTest::newRow("data0") << dirs.at(0) << true;
|
QTest::newRow("data0") << dirs.at(0) << true;
|
||||||
QTest::newRow("data1") << dirs.at(1) << false;
|
QTest::newRow("data1") << dirs.at(1) << false;
|
||||||
QTest::newRow("data2") << dirs.at(2) << false;
|
QTest::newRow("data2") << dirs.at(2) << false; // note: requires data1 to have been run!
|
||||||
|
|
||||||
// Ensure that none of these directories already exist
|
// Ensure that none of these directories already exist
|
||||||
QDir dir;
|
QDir dir;
|
||||||
|
@ -46,6 +46,7 @@ class tst_QUrl : public QObject
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
|
void initTestCase();
|
||||||
void effectiveTLDs_data();
|
void effectiveTLDs_data();
|
||||||
void effectiveTLDs();
|
void effectiveTLDs();
|
||||||
void getSetCheck();
|
void getSetCheck();
|
||||||
@ -182,8 +183,15 @@ private slots:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
void testThreadingHelper();
|
void testThreadingHelper();
|
||||||
|
|
||||||
|
QTemporaryDir m_tempDir;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
void tst_QUrl::initTestCase()
|
||||||
|
{
|
||||||
|
QVERIFY2(m_tempDir.isValid(), qPrintable(m_tempDir.errorString()));
|
||||||
|
}
|
||||||
|
|
||||||
// Testing get/set functions
|
// Testing get/set functions
|
||||||
void tst_QUrl::getSetCheck()
|
void tst_QUrl::getSetCheck()
|
||||||
{
|
{
|
||||||
@ -3062,49 +3070,59 @@ void tst_QUrl::fromUserInputWithCwd_data()
|
|||||||
// Null
|
// Null
|
||||||
QTest::newRow("null") << QString() << QString() << QUrl() << QUrl();
|
QTest::newRow("null") << QString() << QString() << QUrl() << QUrl();
|
||||||
|
|
||||||
// Existing file
|
// Use a tempdir with files, for testing specific file names
|
||||||
QDirIterator it(QDir::currentPath(), QDir::NoDotDot | QDir::AllEntries);
|
// We use canonicalPath() on the dir path because ::getcwd() canonicalizes,
|
||||||
int c = 0;
|
// so we get a canonical base path for URLs with "." as working directory.
|
||||||
while (it.hasNext()) {
|
const QString base = QDir(m_tempDir.path()).canonicalPath();
|
||||||
it.next();
|
QDir::setCurrent(base); // for the tests that use "." as working dir
|
||||||
QUrl url = QUrl::fromLocalFile(it.filePath());
|
|
||||||
if (it.fileName() == QLatin1String(".")) {
|
// "."
|
||||||
url = QUrl::fromLocalFile(QDir::currentPath()
|
{
|
||||||
|
const QUrl url = QUrl::fromLocalFile(base
|
||||||
#ifdef Q_OS_WINRT
|
#ifdef Q_OS_WINRT
|
||||||
+ QLatin1Char('/')
|
+ QLatin1Char('/')
|
||||||
#endif
|
#endif
|
||||||
); // fromUserInput cleans the path
|
); // fromUserInput cleans the path
|
||||||
}
|
QTest::newRow("dot-in-path") << "." << base << url << url;
|
||||||
QTest::newRow(("file-" + QByteArray::number(c)).constData())
|
QTest::newRow("dot-in-dot") << "." << QStringLiteral(".") << url << url;
|
||||||
<< it.fileName() << QDir::currentPath() << url << url;
|
|
||||||
QTest::newRow(("file-" + QByteArray::number(c) + "-dot").constData())
|
|
||||||
<< it.fileName() << QStringLiteral(".") << url << url;
|
|
||||||
++c;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Existing files
|
||||||
|
for (const char *fileName : {"file.txt", "file#a.txt", "file .txt", "file.txt "}) {
|
||||||
|
const QString filePath = base + '/' + fileName;
|
||||||
|
QFile file(filePath);
|
||||||
|
QVERIFY2(file.open(QIODevice::WriteOnly), qPrintable(filePath));
|
||||||
|
file.write("Hello world\n");
|
||||||
|
|
||||||
|
const QUrl url = QUrl::fromLocalFile(filePath);
|
||||||
|
QTest::newRow(fileName) << fileName << base << url << url;
|
||||||
|
QTest::newRow(QByteArray(fileName) + "-in-dot") << fileName << QStringLiteral(".") << url << url;
|
||||||
|
}
|
||||||
|
|
||||||
#ifndef Q_OS_WINRT // WinRT cannot cd outside current / sandbox
|
#ifndef Q_OS_WINRT // WinRT cannot cd outside current / sandbox
|
||||||
QDir parent = QDir::current();
|
QDir parent(base);
|
||||||
QVERIFY(parent.cdUp());
|
QVERIFY(parent.cdUp());
|
||||||
QUrl parentUrl = QUrl::fromLocalFile(parent.path());
|
QUrl parentUrl = QUrl::fromLocalFile(parent.path());
|
||||||
QTest::newRow("dotdot") << ".." << QDir::currentPath() << parentUrl << parentUrl;
|
QTest::newRow("dotdot") << ".." << base << parentUrl << parentUrl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
QTest::newRow("nonexisting") << "nonexisting" << QDir::currentPath() << QUrl("http://nonexisting") << QUrl::fromLocalFile(QDir::currentPath() + "/nonexisting");
|
QTest::newRow("nonexisting") << "nonexisting" << base << QUrl("http://nonexisting") << QUrl::fromLocalFile(base + "/nonexisting");
|
||||||
QTest::newRow("short-url") << "example.org" << QDir::currentPath() << QUrl("http://example.org") << QUrl::fromLocalFile(QDir::currentPath() + "/example.org");
|
QTest::newRow("short-url") << "example.org" << base << QUrl("http://example.org") << QUrl::fromLocalFile(base + "/example.org");
|
||||||
QTest::newRow("full-url") << "http://example.org" << QDir::currentPath() << QUrl("http://example.org") << QUrl("http://example.org");
|
QTest::newRow("full-url") << "http://example.org" << base << QUrl("http://example.org") << QUrl("http://example.org");
|
||||||
QTest::newRow("absolute") << "/doesnotexist.txt" << QDir::currentPath() << QUrl("file:///doesnotexist.txt") << QUrl("file:///doesnotexist.txt");
|
QTest::newRow("absolute") << "/doesnotexist.txt" << base << QUrl("file:///doesnotexist.txt") << QUrl("file:///doesnotexist.txt");
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
QTest::newRow("windows-absolute") << "c:/doesnotexist.txt" << QDir::currentPath() << QUrl("file:///c:/doesnotexist.txt") << QUrl("file:///c:/doesnotexist.txt");
|
QTest::newRow("windows-absolute") << "c:/doesnotexist.txt" << base << QUrl("file:///c:/doesnotexist.txt") << QUrl("file:///c:/doesnotexist.txt");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// IPv4 & IPv6
|
// IPv4 & IPv6
|
||||||
// same as fromUserInput, but needs retesting
|
// same as fromUserInput, but needs retesting
|
||||||
QTest::newRow("ipv4-1") << "127.0.0.1" << QDir::currentPath() << QUrl("http://127.0.0.1") << QUrl::fromLocalFile(QDir::currentPath() + "/127.0.0.1");
|
QTest::newRow("ipv4-1") << "127.0.0.1" << base << QUrl("http://127.0.0.1") << QUrl::fromLocalFile(base + "/127.0.0.1");
|
||||||
QTest::newRow("ipv6-0") << "::" << QDir::currentPath() << QUrl("http://[::]") << QUrl("http://[::]");
|
QTest::newRow("ipv6-0") << "::" << base << QUrl("http://[::]") << QUrl("http://[::]");
|
||||||
QTest::newRow("ipv6-1") << "::1" << QDir::currentPath() << QUrl("http://[::1]") << QUrl("http://[::1]");
|
QTest::newRow("ipv6-1") << "::1" << base << QUrl("http://[::1]") << QUrl("http://[::1]");
|
||||||
QTest::newRow("ipv6-2") << "1::1" << QDir::currentPath() << QUrl("http://[1::1]") << QUrl("http://[1::1]");
|
QTest::newRow("ipv6-2") << "1::1" << base << QUrl("http://[1::1]") << QUrl("http://[1::1]");
|
||||||
QTest::newRow("ipv6-3") << "1::" << QDir::currentPath() << QUrl("http://[1::]") << QUrl("http://[1::]");
|
QTest::newRow("ipv6-3") << "1::" << base << QUrl("http://[1::]") << QUrl("http://[1::]");
|
||||||
QTest::newRow("ipv6-4") << "c::" << QDir::currentPath() << QUrl("http://[c::]") << QUrl("http://[c::]");
|
QTest::newRow("ipv6-4") << "c::" << base << QUrl("http://[c::]") << QUrl("http://[c::]");
|
||||||
QTest::newRow("ipv6-5") << "c:f00:ba4::" << QDir::currentPath() << QUrl("http://[c:f00:ba4::]") << QUrl("http://[c:f00:ba4::]");
|
QTest::newRow("ipv6-5") << "c:f00:ba4::" << base << QUrl("http://[c:f00:ba4::]") << QUrl("http://[c:f00:ba4::]");
|
||||||
}
|
}
|
||||||
|
|
||||||
void tst_QUrl::fromUserInputWithCwd()
|
void tst_QUrl::fromUserInputWithCwd()
|
||||||
|
@ -307,6 +307,7 @@ void tst_QMimeDatabase::mimeTypesForFileName_data()
|
|||||||
QTest::newRow("txtfoobar, 0 hit") << "foo.foobar" << QStringList();
|
QTest::newRow("txtfoobar, 0 hit") << "foo.foobar" << QStringList();
|
||||||
QTest::newRow("m, 2 hits") << "foo.m" << (QStringList() << "text/x-matlab" << "text/x-objcsrc");
|
QTest::newRow("m, 2 hits") << "foo.m" << (QStringList() << "text/x-matlab" << "text/x-objcsrc");
|
||||||
QTest::newRow("sub, 3 hits") << "foo.sub" << (QStringList() << "text/x-microdvd" << "text/x-mpsub" << "text/x-subviewer");
|
QTest::newRow("sub, 3 hits") << "foo.sub" << (QStringList() << "text/x-microdvd" << "text/x-mpsub" << "text/x-subviewer");
|
||||||
|
QTest::newRow("non_ascii") << QString::fromUtf8("AİİA.pdf") << (QStringList() << "application/pdf");
|
||||||
}
|
}
|
||||||
|
|
||||||
void tst_QMimeDatabase::mimeTypesForFileName()
|
void tst_QMimeDatabase::mimeTypesForFileName()
|
||||||
|
@ -7,6 +7,8 @@ TARGET = $$qtLibraryTarget(plugin1)
|
|||||||
DESTDIR = ../bin
|
DESTDIR = ../bin
|
||||||
winrt:include(../winrt.pri)
|
winrt:include(../winrt.pri)
|
||||||
|
|
||||||
|
!qtConfig(library): DEFINES += QT_STATICPLUGIN
|
||||||
|
|
||||||
# This is testdata for the tst_qpluginloader test.
|
# This is testdata for the tst_qpluginloader test.
|
||||||
target.path = $$[QT_INSTALL_TESTS]/tst_qfactoryloader/bin
|
target.path = $$[QT_INSTALL_TESTS]/tst_qfactoryloader/bin
|
||||||
INSTALLS += target
|
INSTALLS += target
|
||||||
|
@ -7,6 +7,8 @@ TARGET = $$qtLibraryTarget(plugin2)
|
|||||||
DESTDIR = ../bin
|
DESTDIR = ../bin
|
||||||
winrt:include(../winrt.pri)
|
winrt:include(../winrt.pri)
|
||||||
|
|
||||||
|
!qtConfig(library): DEFINES += QT_STATICPLUGIN
|
||||||
|
|
||||||
# This is testdata for the tst_qpluginloader test.
|
# This is testdata for the tst_qpluginloader test.
|
||||||
target.path = $$[QT_INSTALL_TESTS]/tst_qfactoryloader/bin
|
target.path = $$[QT_INSTALL_TESTS]/tst_qfactoryloader/bin
|
||||||
INSTALLS += target
|
INSTALLS += target
|
||||||
|
@ -1033,7 +1033,8 @@ void tst_QDate::fromStringFormat_data()
|
|||||||
QTest::addColumn<QString>("format");
|
QTest::addColumn<QString>("format");
|
||||||
QTest::addColumn<QDate>("expected");
|
QTest::addColumn<QDate>("expected");
|
||||||
|
|
||||||
//get localized names
|
// Undo this (inline the C-locale versions) for ### Qt 6
|
||||||
|
// Get localized names:
|
||||||
QString january = QDate::longMonthName(1);
|
QString january = QDate::longMonthName(1);
|
||||||
QString february = QDate::longMonthName(2);
|
QString february = QDate::longMonthName(2);
|
||||||
QString march = QDate::longMonthName(3);
|
QString march = QDate::longMonthName(3);
|
||||||
|
@ -31,6 +31,9 @@
|
|||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <qdatetime.h>
|
#include <qdatetime.h>
|
||||||
#include <private/qdatetime_p.h>
|
#include <private/qdatetime_p.h>
|
||||||
|
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||||
|
# include <locale.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
# include <qt_windows.h>
|
# include <qt_windows.h>
|
||||||
@ -185,6 +188,14 @@ Q_DECLARE_METATYPE(Qt::DateFormat)
|
|||||||
|
|
||||||
tst_QDateTime::tst_QDateTime()
|
tst_QDateTime::tst_QDateTime()
|
||||||
{
|
{
|
||||||
|
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||||
|
// Some tests depend on C locale - BF&I it with belt *and* braces:
|
||||||
|
qputenv("LC_ALL", "C");
|
||||||
|
setlocale(LC_ALL, "C");
|
||||||
|
// Need to do this as early as possible, before anything accesses the
|
||||||
|
// QSystemLocale singleton; once it exists, there's no changing it.
|
||||||
|
#endif // remove for ### Qt 6
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Due to some jurisdictions changing their zones and rules, it's possible
|
Due to some jurisdictions changing their zones and rules, it's possible
|
||||||
for a non-CET zone to accidentally match CET at a few tested moments but
|
for a non-CET zone to accidentally match CET at a few tested moments but
|
||||||
@ -2332,13 +2343,6 @@ void tst_QDateTime::fromStringStringFormat_data()
|
|||||||
QTest::addColumn<QString>("format");
|
QTest::addColumn<QString>("format");
|
||||||
QTest::addColumn<QDateTime>("expected");
|
QTest::addColumn<QDateTime>("expected");
|
||||||
|
|
||||||
QString january = QDate::longMonthName(1);
|
|
||||||
QString oct = QDate::shortMonthName(10);
|
|
||||||
QString december = QDate::longMonthName(12);
|
|
||||||
QString thu = QDate::shortDayName(4);
|
|
||||||
QString fri = QDate::shortDayName(5);
|
|
||||||
QString date = "10 " + oct + " 10";
|
|
||||||
|
|
||||||
QTest::newRow("data0") << QString("101010") << QString("dMyy") << QDateTime(QDate(1910, 10, 10), QTime());
|
QTest::newRow("data0") << QString("101010") << QString("dMyy") << QDateTime(QDate(1910, 10, 10), QTime());
|
||||||
QTest::newRow("data1") << QString("1020") << QString("sss") << invalidDateTime();
|
QTest::newRow("data1") << QString("1020") << QString("sss") << invalidDateTime();
|
||||||
QTest::newRow("data2") << QString("1010") << QString("sss") << QDateTime(defDate(), QTime(0, 0, 10));
|
QTest::newRow("data2") << QString("1010") << QString("sss") << QDateTime(defDate(), QTime(0, 0, 10));
|
||||||
@ -2349,16 +2353,14 @@ void tst_QDateTime::fromStringStringFormat_data()
|
|||||||
QTest::newRow("data7") << QString("foo") << QString("ap") << invalidDateTime();
|
QTest::newRow("data7") << QString("foo") << QString("ap") << invalidDateTime();
|
||||||
// Day non-conflict should not hide earlier year conflict (1963-03-01 was a
|
// Day non-conflict should not hide earlier year conflict (1963-03-01 was a
|
||||||
// Friday; asking for Thursday moves this, without conflict, to the 7th):
|
// Friday; asking for Thursday moves this, without conflict, to the 7th):
|
||||||
QTest::newRow("data8") << QString("77 03 1963 " + thu) << QString("yy MM yyyy ddd") << invalidDateTime();
|
QTest::newRow("data8") << QString("77 03 1963 Thu") << QString("yy MM yyyy ddd") << invalidDateTime();
|
||||||
QTest::newRow("data9") << QString("101010") << QString("dMyy") << QDateTime(QDate(1910, 10, 10), QTime());
|
QTest::newRow("data9") << QString("101010") << QString("dMyy") << QDateTime(QDate(1910, 10, 10), QTime());
|
||||||
QTest::newRow("data10") << QString("101010") << QString("dMyy") << QDateTime(QDate(1910, 10, 10), QTime());
|
QTest::newRow("data10") << QString("101010") << QString("dMyy") << QDateTime(QDate(1910, 10, 10), QTime());
|
||||||
QTest::newRow("data11") << date << QString("dd MMM yy") << QDateTime(QDate(1910, 10, 10), QTime());
|
QTest::newRow("data11") << QString("10 Oct 10") << QString("dd MMM yy") << QDateTime(QDate(1910, 10, 10), QTime());
|
||||||
date = fri + QLatin1Char(' ') + december + " 3 2004";
|
QTest::newRow("data12") << QString("Fri December 3 2004") << QString("ddd MMMM d yyyy") << QDateTime(QDate(2004, 12, 3), QTime());
|
||||||
QTest::newRow("data12") << date << QString("ddd MMMM d yyyy") << QDateTime(QDate(2004, 12, 3), QTime());
|
|
||||||
QTest::newRow("data13") << QString("30.02.2004") << QString("dd.MM.yyyy") << invalidDateTime();
|
QTest::newRow("data13") << QString("30.02.2004") << QString("dd.MM.yyyy") << invalidDateTime();
|
||||||
QTest::newRow("data14") << QString("32.01.2004") << QString("dd.MM.yyyy") << invalidDateTime();
|
QTest::newRow("data14") << QString("32.01.2004") << QString("dd.MM.yyyy") << invalidDateTime();
|
||||||
date = thu + QLatin1Char(' ') + january + " 2004";
|
QTest::newRow("data15") << QString("Thu January 2004") << QString("ddd MMMM yyyy") << QDateTime(QDate(2004, 1, 1), QTime());
|
||||||
QTest::newRow("data15") << date << QString("ddd MMMM yyyy") << QDateTime(QDate(2004, 1, 1), QTime());
|
|
||||||
QTest::newRow("data16") << QString("2005-06-28T07:57:30.001Z")
|
QTest::newRow("data16") << QString("2005-06-28T07:57:30.001Z")
|
||||||
<< QString("yyyy-MM-ddThh:mm:ss.zZ")
|
<< QString("yyyy-MM-ddThh:mm:ss.zZ")
|
||||||
<< QDateTime(QDate(2005, 06, 28), QTime(07, 57, 30, 1));
|
<< QDateTime(QDate(2005, 06, 28), QTime(07, 57, 30, 1));
|
||||||
|
@ -28,10 +28,26 @@
|
|||||||
|
|
||||||
#include <QtTest/QtTest>
|
#include <QtTest/QtTest>
|
||||||
#include "qdatetime.h"
|
#include "qdatetime.h"
|
||||||
|
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||||
|
# include <locale.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
class tst_QTime : public QObject
|
class tst_QTime : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
|
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||||
|
public:
|
||||||
|
tst_QTime()
|
||||||
|
{
|
||||||
|
// Some tests depend on C locale - BF&I it with belt *and* braces:
|
||||||
|
qputenv("LC_ALL", "C");
|
||||||
|
setlocale(LC_ALL, "C");
|
||||||
|
// Need to instantiate as early as possible, before anything accesses
|
||||||
|
// the QSystemLocale singleton; once it exists, there's no changing it.
|
||||||
|
}
|
||||||
|
#endif // remove for ### Qt 6
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void msecsTo_data();
|
void msecsTo_data();
|
||||||
void msecsTo();
|
void msecsTo();
|
||||||
|
@ -77,8 +77,21 @@ struct Foo
|
|||||||
|
|
||||||
void tst_QVarLengthArray::append()
|
void tst_QVarLengthArray::append()
|
||||||
{
|
{
|
||||||
QVarLengthArray<QString> v;
|
QVarLengthArray<QString, 2> v;
|
||||||
v.append(QString("hello"));
|
v.append(QString("1"));
|
||||||
|
v.append(v.front());
|
||||||
|
QCOMPARE(v.capacity(), 2);
|
||||||
|
// transition from prealloc to heap:
|
||||||
|
v.append(v.front());
|
||||||
|
QVERIFY(v.capacity() > 2);
|
||||||
|
QCOMPARE(v.front(), v.back());
|
||||||
|
while (v.size() < v.capacity())
|
||||||
|
v.push_back(v[0]);
|
||||||
|
QCOMPARE(v.back(), v.front());
|
||||||
|
QCOMPARE(v.size(), v.capacity());
|
||||||
|
// transition from heap to larger heap:
|
||||||
|
v.push_back(v.front());
|
||||||
|
QCOMPARE(v.back(), v.front());
|
||||||
|
|
||||||
QVarLengthArray<int> v2; // rocket!
|
QVarLengthArray<int> v2; // rocket!
|
||||||
v2.append(5);
|
v2.append(5);
|
||||||
|
@ -60,6 +60,7 @@ private slots:
|
|||||||
void setFont();
|
void setFont();
|
||||||
void setFont_collection_data();
|
void setFont_collection_data();
|
||||||
void setFont_collection();
|
void setFont_collection();
|
||||||
|
void clearCollection();
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! \internal
|
/*! \internal
|
||||||
@ -640,5 +641,32 @@ void tst_QTextFormat::setFont_collection()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void tst_QTextFormat::clearCollection()
|
||||||
|
{
|
||||||
|
QTextFormatCollection collection;
|
||||||
|
QFont f;
|
||||||
|
f.setUnderline(true);
|
||||||
|
collection.setDefaultFont(f);
|
||||||
|
QTextCharFormat charFormat;
|
||||||
|
charFormat.setFontStyleHint(QFont::SansSerif);
|
||||||
|
int formatIndex = collection.indexForFormat(charFormat);
|
||||||
|
QCOMPARE(formatIndex, 0);
|
||||||
|
QTextCharFormat charFormat2;
|
||||||
|
charFormat2.setUnderlineStyle(QTextCharFormat::SingleUnderline);
|
||||||
|
int formatIndex2 = collection.indexForFormat(charFormat2);
|
||||||
|
QCOMPARE(formatIndex2, 1);
|
||||||
|
QCOMPARE(collection.formats.count(), 2);
|
||||||
|
QCOMPARE(collection.hashes.count(), 2);
|
||||||
|
QCOMPARE(collection.defaultFont(), f);
|
||||||
|
|
||||||
|
collection.clear();
|
||||||
|
QCOMPARE(collection.formats.count(), 0);
|
||||||
|
QCOMPARE(collection.hashes.count(), 0);
|
||||||
|
QCOMPARE(collection.indexForFormat(charFormat2), 0);
|
||||||
|
QCOMPARE(collection.formats.count(), 1);
|
||||||
|
QCOMPARE(collection.hashes.count(), 1);
|
||||||
|
QCOMPARE(collection.defaultFont(), f); // kept, QTextDocument::clear or setPlainText should not reset the font set by setDefaultFont
|
||||||
|
}
|
||||||
|
|
||||||
QTEST_MAIN(tst_QTextFormat)
|
QTEST_MAIN(tst_QTextFormat)
|
||||||
#include "tst_qtextformat.moc"
|
#include "tst_qtextformat.moc"
|
||||||
|
@ -14,12 +14,6 @@ win32 {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# OpenSSL support
|
|
||||||
qtConfig(openssl)|qtConfig(openssl-linked) {
|
|
||||||
# Add optional SSL libs
|
|
||||||
LIBS += $$OPENSSL_LIBS
|
|
||||||
}
|
|
||||||
|
|
||||||
DEFINES += SRCDIR=\\\"$$PWD/\\\"
|
DEFINES += SRCDIR=\\\"$$PWD/\\\"
|
||||||
|
|
||||||
requires(qtConfig(private_tests))
|
requires(qtConfig(private_tests))
|
||||||
|
@ -54,7 +54,7 @@ dialogs \
|
|||||||
windowtransparency \
|
windowtransparency \
|
||||||
unc
|
unc
|
||||||
|
|
||||||
!qtConfig(openssl):!qtConfig(openssl-linked): SUBDIRS -= qssloptions
|
!qtConfig(openssl): SUBDIRS -= qssloptions
|
||||||
|
|
||||||
qtConfig(opengl) {
|
qtConfig(opengl) {
|
||||||
SUBDIRS += qopengltextureblitter
|
SUBDIRS += qopengltextureblitter
|
||||||
|
Loading…
x
Reference in New Issue
Block a user