summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2013-06-20 16:13:38 +0200
committerFrederik Gladhorn <frederik.gladhorn@digia.com>2013-06-20 16:13:38 +0200
commit533820320c30fca6028415321d1a3b937a261088 (patch)
tree1a0eebcc5f5729f5a9d2f00b080c5fcf1cd15c6f
parent25739bebba0343a8b35775a073c49f0fba080762 (diff)
parent172fa29dffef0eb55378f62b3ea1c18810639b3f (diff)
Merge remote-tracking branch 'origin/release' into stable
-rw-r--r--dist/changes-5.1.011
-rw-r--r--doc/global/manifest-meta.qdocconf102
-rw-r--r--mkspecs/features/create_cmake.prf11
-rw-r--r--mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in54
-rw-r--r--mkspecs/features/qt_functions.prf45
-rw-r--r--mkspecs/features/qt_tool.prf11
-rw-r--r--mkspecs/features/resources.prf4
-rw-r--r--mkspecs/features/testcase.prf2
-rw-r--r--mkspecs/features/uic.prf4
-rw-r--r--qmake/library/qmakeevaluator.cpp4
-rw-r--r--qmake/library/qmakeevaluator.h3
-rw-r--r--qtbase.pro4
-rw-r--r--src/corelib/global/qnamespace.h2
-rw-r--r--src/corelib/global/qnamespace.qdoc1
-rw-r--r--src/corelib/io/qfilesystemengine_unix.cpp11
-rw-r--r--src/corelib/io/qfilesystemengine_win.cpp13
-rw-r--r--src/corelib/plugin/qfactoryloader.cpp19
-rw-r--r--src/gui/Qt5GuiConfigExtras.cmake.in7
-rw-r--r--src/network/access/qnetworkrequest.cpp3
-rw-r--r--src/plugins/platforms/android/src/androidjniinput.cpp11
-rw-r--r--src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm16
-rw-r--r--src/plugins/platforms/xcb/qxcbkeyboard.cpp2
-rw-r--r--src/widgets/dialogs/qcolordialog.cpp6
-rw-r--r--src/widgets/dialogs/qmessagebox.cpp2
-rw-r--r--src/widgets/kernel/qwidget.cpp5
-rw-r--r--src/widgets/kernel/qwidget_qpa.cpp4
-rw-r--r--src/widgets/widgets/qdockwidget.cpp2
-rw-r--r--tests/auto/corelib/io/qdir/tst_qdir.cpp18
-rw-r--r--tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp9
29 files changed, 284 insertions, 102 deletions
diff --git a/dist/changes-5.1.0 b/dist/changes-5.1.0
index cb96c2debe..bc0db0b9c8 100644
--- a/dist/changes-5.1.0
+++ b/dist/changes-5.1.0
@@ -88,7 +88,16 @@ QtGui
QtNetwork
---------
- -
+ - QNetworkAccessManager / QNetworkReply:
+ * Add a new encrypted() signal so that applications can perform
+ additional checks on the certificate chain.
+ - QSslSocket:
+ * Support for sending intermediate certificates when QSslSocket is used
+ as a server, and when using client certificates.
+ - HTTPS internals:
+ * SSL sessions are re-used by default.
+ - QHostInfo:
+ * Allow QHostInfo::lookupHost() with no receiver to warm the DNS cache.
QtWidgets
---------
diff --git a/doc/global/manifest-meta.qdocconf b/doc/global/manifest-meta.qdocconf
index d4b2f9f066..a86f3a14e4 100644
--- a/doc/global/manifest-meta.qdocconf
+++ b/doc/global/manifest-meta.qdocconf
@@ -32,11 +32,10 @@
# manifestmeta.global.names = *
# manifestmeta.global.tags = qt5
-manifestmeta.filters = highlighted webkit1 webkit2
+manifestmeta.filters = highlighted webkit1 webkit2 android
manifestmeta.highlighted.names = "QtQuick/Qt Quick Demo - Same Game" \
"QtQuick/Qt Quick Demo - Photo Surface" \
- "QtQuick/Qt Quick Demo - Tweet Search" \
"QtQuick/Qt Quick Demo - Maroon*" \
"QtQuick/Qt Quick Demo - Calqlatr" \
"QtQuick/Qt Quick Particles Examples - Emitters" \
@@ -70,3 +69,102 @@ manifestmeta.webkit2.names = "QtWebKitExamples/Flickr View Example" \
"QtWebKitExamples/YouTube View Example"
manifestmeta.webkit2.tags = webkit2
+
+manifestmeta.android.names = "QtQuick/Qt Quick Demo - Maroon*" \
+ "QtQuick/Qt Quick Demo - Calqlatr" \
+ "QtWidgets/Application Chooser Example" \
+ "QtWidgets/Stickman Example" \
+ "QtWidgets/Move Blocks Example" \
+ "QtWidgets/Border Layout Example" \
+ "QtWidgets/Dynamic Layouts Example" \
+ "QtWidgets/Flow Layout Example" \
+ "QtWidgets/MDI Example" \
+ "QtWidgets/Dock Widgets Example" \
+ "QtWidgets/Recent Files Example" \
+ "QtWidgets/Menus Example" \
+ "QtWidgets/Concentric Circles Example" \
+ "QtWidgets/Gradients" \
+ "QtWidgets/Font Sampler Example" \
+ "QtWidgets/Path Stroking" \
+ "QtWidgets/Transformations Example" \
+ "QtWidgets/Syntax Highlighter Example" \
+ "QtWidgets/Calendar Example" \
+ "QtWidgets/Movie Example" \
+ "QtWidgets/Validators Example" \
+ "QtWidgets/Analog Clock Example" \
+ "QtWidgets/Calculator Example" \
+ "QtWidgets/Mouse Button Tester" \
+ "QtWidgets/Character Map Example" \
+ "QtWidgets/Wiggly Example" \
+ "QtWidgets/Digital Clock Example" \
+ "QtWidgets/Elided Label Example" \
+ "QtWidgets/Image Viewer Example" \
+ "QtWidgets/Sliders Example" \
+ "QtWidgets/Tetrix Example" \
+ "QtWidgets/Group Box Example" \
+ "QtWidgets/Spin Boxes Example" \
+ "QtWidgets/Undo Framework" \
+ "QtWidgets/Regular Expressions Example" \
+ "QtWidgets/Colliding Mice Example" \
+ "QtWidgets/Basic Graphics Layouts Example" \
+ "QtWidgets/Boxes" \
+ "QtWidgets/40000 Chips" \
+ "QtWidgets/Diagram Scene Example" \
+ "QtWidgets/Drag and Drop Robot Example" \
+ "QtWidgets/Elastic Nodes Example" \
+ "QtWidgets/Pad Navigator Example" \
+ "QtWidgets/Anchor Layout Example" \
+ "QtWidgets/Weather Anchor Layout Example" \
+ "QtConcurrent/Image Scaling Example" \
+ "QtConcurrent/QtConcurrent Progress Dialog Example" \
+ "QtNetwork/Torrent Example" \
+ "QtNetwork/Network Chat Example" \
+ "QtSQL/Master Detail Example" \
+ "QtOpenGL/Cube OpenGL ES 2.0 example" \
+ "QtOpenGL/Textures Example" \
+ "QtLinguist/Arrow Pad Example" \
+ "QtGui/Raster Window Example" \
+ "QtGui/Analog Clock Window Example" \
+ "QtMultimedia/Video Widget Example" \
+ "QtMultimedia/Media Player Example" \
+ "QtSVG/Text Object Example" \
+ "QtQML/Qt Quick Examples - XMLHttpRequest" \
+ "QtQuick/Qt Quick Particles Examples - *" \
+ "QtQuick/Qt Quick Examples - Touch Interaction" \
+ "QtQuick/Scene Graph - *" \
+ "QtQuick/Qt Quick Examples - Image Elements" \
+ "QtQuick/Qt Quick Examples - Key Interaction" \
+ "QtQuick/Qt Quick Examples - Text" \
+ "QtQuick/Qt Quick Examples - Animation" \
+ "QtQuick/Qt Quick Examples - Shader Effects" \
+ "QtQuick/Qt Quick Examples - Canvas" \
+ "QtWidgets/Interview" \
+ "QtWidgets/Spreadsheet" \
+ "QtWidgets/Pixelator Example" \
+ "QtWidgets/Class Wizard Example" \
+ "QtWidgets/Animated Tiles Example" \
+ "QtWidgets/Basic Layouts Example" \
+ "QtWidgets/Application Example" \
+ "QtWidgets/Affine Transformations" \
+ "QtWidgets/Image Composition Example" \
+ "QtWidgets/Basic Drawing Example" \
+ "QtWidgets/Vector Deformation" \
+ "QtWidgets/Painter Paths Example" \
+ "QtWidgets/Text Edit" \
+ "QtWidgets/Style Sheet Example" \
+ "QtWidgets/Code Editor Example" \
+ "QtWidgets/Window Flags Example" \
+ "QtWidgets/Scribble Example" \
+ "QtWidgets/Shaped Clock Example" \
+ "QtWidgets/Line Edits Example" \
+ "QtWidgets/Calendar Widget Example" \
+ "QtWidgets/Completer Example" \
+ "QtWidgets/I18N Example" \
+ "QtQML/Extending QML - Grouped Properties Example" \
+ "QtQML/Extending QML - Methods Example" \
+ "QtQML/Extending QML - Signal Support Example" \
+ "QtQML/Extending QML - Attached Properties Example" \
+ "QtQuick/Qt Quick Examples - Window and Screen" \
+ "QtWidgets/Address Book Example"
+
+manifestmeta.android.tags = android
diff --git a/mkspecs/features/create_cmake.prf b/mkspecs/features/create_cmake.prf
index 3dae3895de..7a200056ae 100644
--- a/mkspecs/features/create_cmake.prf
+++ b/mkspecs/features/create_cmake.prf
@@ -60,6 +60,17 @@ contains(CMAKE_BIN_DIR, "^\\.\\./.*") {
CMAKE_BIN_DIR_IS_ABSOLUTE = True
}
+!isEmpty(DLLDESTDIR):!static:!staticlib {
+ CMAKE_DLL_DIR = $$cmakeRelativePath($$[QT_INSTALL_BINS], $$[QT_INSTALL_PREFIX])
+ contains(CMAKE_DLL_DIR, "^\\.\\./.*") {
+ CMAKE_DLL_DIR = $$[QT_INSTALL_BINS]/
+ CMAKE_DLL_DIR_IS_ABSOLUTE = True
+ }
+} else {
+ CMAKE_DLL_DIR = $$CMAKE_LIB_DIR
+ CMAKE_DLL_DIR_IS_ABSOLUTE = $$CMAKE_LIB_DIR_IS_ABSOLUTE
+}
+
CMAKE_HOST_DATA_DIR = $$cmakeRelativePath($$[QT_HOST_DATA], $$[QT_INSTALL_PREFIX])
contains(CMAKE_HOST_DATA_DIR, "^\\.\\./.*") {
CMAKE_HOST_DATA_DIR = $$[QT_HOST_DATA]/
diff --git a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
index c55b728f1b..1a2bd4a94d 100644
--- a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
+++ b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
@@ -46,10 +46,10 @@ endmacro()
macro(_populate_$${CMAKE_MODULE_NAME}_target_properties Configuration LIB_LOCATION IMPLIB_LOCATION)
set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration})
-!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
- set(imported_location \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}${LIB_LOCATION}\")
+!!IF isEmpty(CMAKE_DLL_DIR_IS_ABSOLUTE)
+ set(imported_location \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_DLL_DIR}${LIB_LOCATION}\")
!!ELSE
- set(imported_location \"IMPORTED_LOCATION_${Configuration}\" \"$${CMAKE_LIB_DIR}${LIB_LOCATION}\")
+ set(imported_location \"IMPORTED_LOCATION_${Configuration}\" \"$${CMAKE_DLL_DIR}${LIB_LOCATION}\")
!!ENDIF
_qt5_$${CMAKE_MODULE_NAME}_check_file_exists(${imported_location})
set_target_properties(Qt5::$${CMAKE_MODULE_NAME} PROPERTIES
@@ -187,22 +187,26 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
!!IF !isEmpty(CMAKE_FIND_OTHER_LIBRARY_BUILD)
!!IF isEmpty(CMAKE_DEBUG_TYPE)
-!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
!!IF !isEmpty(CMAKE_STATIC_WINDOWS_BUILD)
+!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
if (EXISTS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" )
-!!ELSE
- if (EXISTS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_LIB_FILE_LOCATION_DEBUG}\" AND EXISTS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" )
-!!ENDIF // CMAKE_STATIC_WINDOWS_BUILD
-!!ELSE
-!!IF !isEmpty(CMAKE_STATIC_WINDOWS_BUILD)
+!!ELSE // CMAKE_LIB_DIR_IS_ABSOLUTE
if (EXISTS \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" )
+!!ENDIF // CMAKE_LIB_DIR_IS_ABSOLUTE
+ _populate_$${CMAKE_MODULE_NAME}_target_properties(DEBUG \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" \"\" )
+!!ELSE // CMAKE_STATIC_WINDOWS_BUILD
+ if (EXISTS
+!!IF isEmpty(CMAKE_DLL_DIR_IS_ABSOLUTE)
+ \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_DLL_DIR}$${CMAKE_LIB_FILE_LOCATION_DEBUG}\"
!!ELSE
- if (EXISTS \"$${CMAKE_LIB_FILE_LOCATION_DEBUG}\" AND EXISTS \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" )
-!!ENDIF // CMAKE_STATIC_WINDOWS_BUILD
+ \"$${CMAKE_LIB_FILE_LOCATION_DEBUG}\"
!!ENDIF
-!!IF !isEmpty(CMAKE_STATIC_WINDOWS_BUILD)
- _populate_$${CMAKE_MODULE_NAME}_target_properties(DEBUG \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" \"\" )
+ AND EXISTS
+!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
+ \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" )
!!ELSE
+ \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" )
+!!ENDIF
_populate_$${CMAKE_MODULE_NAME}_target_properties(DEBUG \"$${CMAKE_LIB_FILE_LOCATION_DEBUG}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" )
!!ENDIF // CMAKE_STATIC_WINDOWS_BUILD
endif()
@@ -220,22 +224,26 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
!!IF !isEmpty(CMAKE_FIND_OTHER_LIBRARY_BUILD)
!!IF isEmpty(CMAKE_RELEASE_TYPE)
-!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
!!IF !isEmpty(CMAKE_STATIC_WINDOWS_BUILD)
+!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
if (EXISTS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" )
-!!ELSE
- if (EXISTS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_LIB_FILE_LOCATION_RELEASE}\" AND EXISTS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" )
-!!ENDIF // CMAKE_STATIC_WINDOWS_BUILD
-!!ELSE
-!!IF !isEmpty(CMAKE_STATIC_WINDOWS_BUILD)
+!!ELSE // CMAKE_LIB_DIR_IS_ABSOLUTE
if (EXISTS \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" )
+!!ENDIF // CMAKE_LIB_DIR_IS_ABSOLUTE
+ _populate_$${CMAKE_MODULE_NAME}_target_properties(RELEASE \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" \"\" )
+!!ELSE // CMAKE_STATIC_WINDOWS_BUILD
+ if (EXISTS
+!!IF isEmpty(CMAKE_DLL_DIR_IS_ABSOLUTE)
+ \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_DLL_DIR}$${CMAKE_LIB_FILE_LOCATION_RELEASE}\"
!!ELSE
- if (EXISTS \"$${CMAKE_LIB_FILE_LOCATION_RELEASE}\" AND EXISTS \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" )
-!!ENDIF // CMAKE_STATIC_WINDOWS_BUILD
+ \"$${CMAKE_LIB_FILE_LOCATION_RELEASE}\"
!!ENDIF
-!!IF !isEmpty(CMAKE_STATIC_WINDOWS_BUILD)
- _populate_$${CMAKE_MODULE_NAME}_target_properties(RELEASE \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" \"\" )
+ AND EXISTS
+!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
+ \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" )
!!ELSE
+ \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" )
+!!ENDIF
_populate_$${CMAKE_MODULE_NAME}_target_properties(RELEASE \"$${CMAKE_LIB_FILE_LOCATION_RELEASE}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" )
!!ENDIF // CMAKE_STATIC_WINDOWS_BUILD
endif()
diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf
index b043f4dae7..2f5deb8e43 100644
--- a/mkspecs/features/qt_functions.prf
+++ b/mkspecs/features/qt_functions.prf
@@ -187,9 +187,9 @@ defineTest(qtAddRpathLink) {
export(QMAKE_RPATHLINKDIR)
}
-# variable, default
+# variable, default, [suffix for variable for system() use]
defineTest(qtPrepareTool) {
- $$1 = $$eval(QT_TOOL.$${2}.command)
+ $$1 = $$eval(QT_TOOL.$${2}.binary)
isEmpty($$1) {
$$1 = $$[QT_HOST_BINS]/$$2
exists($$eval($$1).pl) {
@@ -202,17 +202,26 @@ defineTest(qtPrepareTool) {
$$1 = $$BUNDLENAME
}
}
- $$1 = $$shell_path($$eval($$1))
}
- export($$1)
+ !isEmpty(3) {
+ $$1$$3 = $$system_path($$eval($$1))
+ qtAddTargetEnv($$1$$3, QT_TOOL.$${2}.depends, system)
+ }
+ $$1 = $$shell_path($$eval($$1))
+ qtAddTargetEnv($$1, QT_TOOL.$${2}.depends, )
}
+# target variable, list of env var names, [non-empty: prepare for system(), not make]
defineTest(qtAddToolEnv) {
+ isEmpty(3): \
+ ds = $$QMAKE_DIR_SEP
+ else: \
+ ds = $$DIR_SEPARATOR
for(env, 2) {
value = $$eval($${env}.value)
!isEmpty(value) {
name = $$eval($${env}.name)
- equals(QMAKE_DIR_SEP, /) {
+ equals(ds, /) {
contains($${env}.CONFIG, prepend): infix = \${$$name:+:\$$$name}
else: infix =
val = "$$name=$$join(value, :)$$infix"
@@ -222,20 +231,27 @@ defineTest(qtAddToolEnv) {
else: infix =
val = "(set $$name=$$join(value, ;)$$infix) &"
}
- contains(MAKEFILE_GENERATOR, MS.*): val ~= s,%,%%,g
- else: val ~= s,\\\$,\$\$,g
+ isEmpty(3): !contains(TEMPLATE, vc.*) {
+ contains(MAKEFILE_GENERATOR, MS.*): val ~= s,%,%%,g
+ val ~= s,\\\$,\$\$,g
+ }
$$1 = "$$val $$eval($$1)"
}
}
export($$1)
}
+# target variable, dependency var name, [non-empty: prepare for system(), not make]
defineTest(qtAddTargetEnv) {
- deps = $$replace(QT, -private$, )
+ deps = $$replace($$2, -private$, )
deps = $$resolve_depends(deps, "QT.", ".depends" ".private_depends" ".run_depends")
!isEmpty(deps) {
- for(dep, deps): \
- deppath += $$shell_path($$eval(QT.$${dep}.libs))
+ for(dep, deps) {
+ isEmpty(3): \
+ deppath += $$shell_path($$eval(QT.$${dep}.libs))
+ else: \
+ deppath += $$system_path($$eval(QT.$${dep}.libs))
+ }
equals(QMAKE_HOST.os, Windows) {
deppath.name = PATH
} else:contains(QMAKE_HOST.os, Linux|FreeBSD|OpenBSD|NetBSD|DragonFly|SunOS|HP-UX|QNX|GNU) {
@@ -256,13 +272,18 @@ defineTest(qtAddTargetEnv) {
pluginpath.value =
for(qmod, QMAKEMODULES) {
qmod = $$section(qmod, /, 0, -3)/plugins
- exists($$qmod): pluginpath.value += $$shell_path($$qmod)
+ exists($$qmod) {
+ isEmpty(3): \
+ pluginpath.value += $$shell_path($$qmod)
+ else: \
+ pluginpath.value += $$system_path($$qmod)
+ }
}
pluginpath.name = QT_PLUGIN_PATH
QT_TOOL_ENV += deppath pluginpath
}
- qtAddToolEnv($$1, $$QT_TOOL_ENV)
+ qtAddToolEnv($$1, $$QT_TOOL_ENV, $$3)
}
defineReplace(pkgConfigExecutable) {
diff --git a/mkspecs/features/qt_tool.prf b/mkspecs/features/qt_tool.prf
index 0a588807c8..9a6b9634e0 100644
--- a/mkspecs/features/qt_tool.prf
+++ b/mkspecs/features/qt_tool.prf
@@ -19,17 +19,17 @@ CONFIG += console
!build_pass:if(!host_build|!force_bootstrap|force_independent) {
isEmpty(MODULE):MODULE = $$TARGET
- MODULE_DEPENDS = $$replace(QT, -private$, )
+ !host_build|!force_bootstrap: MODULE_DEPENDS = $$replace(QT, -private$, )
load(qt_build_paths)
load(resolve_target)
- cmd = $$shell_path($$QMAKE_RESOLVED_TARGET)
- !host_build|!force_bootstrap: qtAddTargetEnv(cmd)
TOOL_PRI = $$MODULE_QMAKE_OUTDIR/mkspecs/modules/qt_tool_$${MODULE}.pri
- TOOL_PRI_CONT = "QT_TOOL.$${MODULE}.command = $$val_escape(cmd)"
+ TOOL_PRI_CONT = \
+ "QT_TOOL.$${MODULE}.binary = $$QMAKE_RESOLVED_TARGET" \
+ "QT_TOOL.$${MODULE}.depends =$$join(MODULE_DEPENDS, " ", " ")"
write_file($$TOOL_PRI, TOOL_PRI_CONT)|error("Aborting.")
# Then, inject the new tool into the current cache state
@@ -39,6 +39,7 @@ CONFIG += console
unset(added)
}
include($$TOOL_PRI)
- cache(QT_TOOL.$${MODULE}.command, transient)
+ for(var, $$list(binary depends)): \
+ cache(QT_TOOL.$${MODULE}.$$var, transient)
}
diff --git a/mkspecs/features/resources.prf b/mkspecs/features/resources.prf
index 34a04b4ee2..68ca4d1442 100644
--- a/mkspecs/features/resources.prf
+++ b/mkspecs/features/resources.prf
@@ -1,4 +1,4 @@
-qtPrepareTool(QMAKE_RCC, rcc)
+qtPrepareTool(QMAKE_RCC, rcc, _DEP)
isEmpty(RCC_DIR):RCC_DIR = .
isEmpty(QMAKE_MOD_RCC):QMAKE_MOD_RCC = qrc
@@ -19,7 +19,7 @@ resource_combine {
}
}
rcc.commands = $$QMAKE_RCC $$QMAKE_RESOURCE_FLAGS ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT}
-rcc.depend_command = $$QMAKE_RCC -list $$QMAKE_RESOURCE_FLAGS ${QMAKE_FILE_IN}
+rcc.depend_command = $$QMAKE_RCC_DEP -list $$QMAKE_RESOURCE_FLAGS ${QMAKE_FILE_IN}
rcc.CONFIG += add_inputs_as_makefile_deps
rcc.input = RESOURCES
rcc.variable_out = SOURCES
diff --git a/mkspecs/features/testcase.prf b/mkspecs/features/testcase.prf
index 15febe2dd5..e31d1f4539 100644
--- a/mkspecs/features/testcase.prf
+++ b/mkspecs/features/testcase.prf
@@ -43,7 +43,7 @@ else: check.commands += $(DESTDIR_TARGET)
check.commands += $(TESTARGS)
# Add environment for non-installed builds
-qtAddTargetEnv(check.commands)
+qtAddTargetEnv(check.commands, QT)
# If the test is marked as insignificant, discard the exit code
insignificant_test:check.commands = -$${check.commands}
diff --git a/mkspecs/features/uic.prf b/mkspecs/features/uic.prf
index 83e579cb3a..c6a64050e0 100644
--- a/mkspecs/features/uic.prf
+++ b/mkspecs/features/uic.prf
@@ -1,10 +1,10 @@
-qtPrepareTool(QMAKE_UIC, uic)
+qtPrepareTool(QMAKE_UIC, uic, _DEP)
isEmpty(UI_DIR):UI_DIR = .
isEmpty(QMAKE_MOD_UIC):QMAKE_MOD_UIC = ui_
uic.commands = $$QMAKE_UIC ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT}
-uic.depend_command = $$QMAKE_UIC -d ${QMAKE_FILE_IN}
+uic.depend_command = $$QMAKE_UIC_DEP -d ${QMAKE_FILE_IN}
uic.output = $$UI_DIR/$${QMAKE_MOD_UIC}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_H)}
uic.input = FORMS
uic.variable_out = GENERATED_FILES
diff --git a/qmake/library/qmakeevaluator.cpp b/qmake/library/qmakeevaluator.cpp
index c60119615f..6fb9c05ae5 100644
--- a/qmake/library/qmakeevaluator.cpp
+++ b/qmake/library/qmakeevaluator.cpp
@@ -1222,7 +1222,7 @@ bool QMakeEvaluator::loadSpec()
m_qmakespec = QDir::cleanPath(qmakespec);
if (!m_superfile.isEmpty()
- && evaluateFile(m_superfile, QMakeHandler::EvalConfigFile, LoadProOnly) != ReturnTrue) {
+ && evaluateFile(m_superfile, QMakeHandler::EvalConfigFile, LoadProOnly|LoadHidden) != ReturnTrue) {
return false;
}
if (!loadSpecInternal())
@@ -1813,7 +1813,7 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateFile(
m_current = m_locationStack.pop();
pro->deref();
#ifdef PROEVALUATOR_FULL
- if (ok == ReturnTrue) {
+ if (ok == ReturnTrue && !(flags & LoadHidden)) {
ProStringList &iif = m_valuemapStack.first()[ProKey("QMAKE_INTERNAL_INCLUDED_FILES")];
ProString ifn(fileName);
if (!iif.contains(ifn))
diff --git a/qmake/library/qmakeevaluator.h b/qmake/library/qmakeevaluator.h
index 59e3295f69..09617ba019 100644
--- a/qmake/library/qmakeevaluator.h
+++ b/qmake/library/qmakeevaluator.h
@@ -102,7 +102,8 @@ public:
LoadPreFiles = 1,
LoadPostFiles = 2,
LoadAll = LoadPreFiles|LoadPostFiles,
- LoadSilent = 0x10
+ LoadSilent = 0x10,
+ LoadHidden = 0x20
};
Q_DECLARE_FLAGS(LoadFlags, LoadFlag)
diff --git a/qtbase.pro b/qtbase.pro
index 5bed630ea9..d6726b5e93 100644
--- a/qtbase.pro
+++ b/qtbase.pro
@@ -90,7 +90,7 @@ prefix_build|!equals(PWD, $$OUT_PWD) {
TOOL_PRI = $$OUT_PWD/mkspecs/modules/qt_tool_syncqt.pri
- TOOL_PRI_CONT = "QT_TOOL.syncqt.command = $$val_escape(cmd)"
+ TOOL_PRI_CONT = "QT_TOOL.syncqt.binary = $$val_escape(cmd)"
write_file($$TOOL_PRI, TOOL_PRI_CONT)|error("Aborting.")
# Then, inject the new tool into the current cache state
@@ -99,7 +99,7 @@ prefix_build|!equals(PWD, $$OUT_PWD) {
cache(QMAKE_INTERNAL_INCLUDED_FILES, add transient, added)
}
include($$TOOL_PRI)
- cache(QT_TOOL.syncqt.command, transient)
+ cache(QT_TOOL.syncqt.binary, transient)
}
diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h
index 74949b86f0..25c47d5d34 100644
--- a/src/corelib/global/qnamespace.h
+++ b/src/corelib/global/qnamespace.h
@@ -980,6 +980,8 @@ public:
Key_TouchpadOn = 0x01000111,
Key_TouchpadOff = 0x01000112,
+ Key_MicMute = 0x01000113,
+
Key_MediaLast = 0x0100ffff,
// Keypad navigation keys
diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc
index 9eb0c6b8f2..f9248eb68d 100644
--- a/src/corelib/global/qnamespace.qdoc
+++ b/src/corelib/global/qnamespace.qdoc
@@ -1621,6 +1621,7 @@
\value Key_TouchpadToggle
\value Key_TouchpadOn
\value Key_TouchpadOff
+ \value Key_MicMute
\value Key_MediaLast
\value Key_unknown
diff --git a/src/corelib/io/qfilesystemengine_unix.cpp b/src/corelib/io/qfilesystemengine_unix.cpp
index b18e32b29a..a7517b4c7f 100644
--- a/src/corelib/io/qfilesystemengine_unix.cpp
+++ b/src/corelib/io/qfilesystemengine_unix.cpp
@@ -510,11 +510,12 @@ bool QFileSystemEngine::createDirectory(const QFileSystemEntry &entry, bool crea
}
if (slash) {
const QByteArray chunk = QFile::encodeName(dirName.left(slash));
- QT_STATBUF st;
- if (QT_STAT(chunk.constData(), &st) != -1) {
- if ((st.st_mode & S_IFMT) != S_IFDIR)
- return false;
- } else if (QT_MKDIR(chunk.constData(), 0777) != 0) {
+ if (QT_MKDIR(chunk.constData(), 0777) != 0) {
+ if (errno == EEXIST) {
+ QT_STATBUF st;
+ if (QT_STAT(chunk.constData(), &st) == 0 && (st.st_mode & S_IFMT) == S_IFDIR)
+ continue;
+ }
return false;
}
}
diff --git a/src/corelib/io/qfilesystemengine_win.cpp b/src/corelib/io/qfilesystemengine_win.cpp
index bee7689535..fdbd6e01e4 100644
--- a/src/corelib/io/qfilesystemengine_win.cpp
+++ b/src/corelib/io/qfilesystemengine_win.cpp
@@ -1044,14 +1044,13 @@ bool QFileSystemEngine::createDirectory(const QFileSystemEntry &entry, bool crea
}
if (slash) {
QString chunk = dirName.left(slash);
- bool existed = false;
- if (!isDirPath(chunk, &existed)) {
- if (!existed) {
- if (!mkDir(chunk))
- return false;
- } else {
- return false;
+ if (!mkDir(chunk)) {
+ if (GetLastError() == ERROR_ALREADY_EXISTS) {
+ bool existed = false;
+ if (isDirPath(chunk, &existed) && existed)
+ continue;
}
+ return false;
}
}
}
diff --git a/src/corelib/plugin/qfactoryloader.cpp b/src/corelib/plugin/qfactoryloader.cpp
index 61c9b40e83..c617325e9e 100644
--- a/src/corelib/plugin/qfactoryloader.cpp
+++ b/src/corelib/plugin/qfactoryloader.cpp
@@ -72,7 +72,6 @@ public:
QByteArray iid;
QList<QLibraryPrivate*> libraryList;
QMap<QString,QLibraryPrivate*> keyMap;
- QStringList keyList;
QString suffix;
Qt::CaseSensitivity cs;
QStringList loadedPaths;
@@ -176,10 +175,8 @@ void QFactoryLoader::update()
metaDataOk = true;
QJsonArray k = object.value(QLatin1String("Keys")).toArray();
- for (int i = 0; i < k.size(); ++i) {
- QString s = k.at(i).toString();
- keys += s;
- }
+ for (int i = 0; i < k.size(); ++i)
+ keys += d->cs ? k.at(i).toString() : k.at(i).toString().toLower();
}
if (qt_debug_component())
qDebug() << "Got keys from plugin meta data" << keys;
@@ -190,15 +187,13 @@ void QFactoryLoader::update()
continue;
}
- d->libraryList += library;
+ int keyUsageCount = 0;
for (int k = 0; k < keys.count(); ++k) {
// first come first serve, unless the first
// library was built with a future Qt version,
// whereas the new one has a Qt version that fits
// better
- QString key = keys.at(k);
- if (!d->cs)
- key = key.toLower();
+ const QString &key = keys.at(k);
QLibraryPrivate *previous = d->keyMap.value(key);
int prev_qt_version = 0;
if (previous) {
@@ -207,9 +202,13 @@ void QFactoryLoader::update()
int qt_version = (int)library->metaData.value(QLatin1String("version")).toDouble();
if (!previous || (prev_qt_version > QT_VERSION && qt_version <= QT_VERSION)) {
d->keyMap[key] = library;
- d->keyList += keys.at(k);
+ ++keyUsageCount;
}
}
+ if (keyUsageCount || keys.isEmpty())
+ d->libraryList += library;
+ else
+ library->release();
}
}
#else
diff --git a/src/gui/Qt5GuiConfigExtras.cmake.in b/src/gui/Qt5GuiConfigExtras.cmake.in
index 83e77280d5..6ad1d679e1 100644
--- a/src/gui/Qt5GuiConfigExtras.cmake.in
+++ b/src/gui/Qt5GuiConfigExtras.cmake.in
@@ -16,11 +16,12 @@ set(Qt5Gui_OPENGL_INCLUDE_DIRS ${Qt5Gui_EGL_INCLUDE_DIRS})
macro(_populate_qt5gui_gl_target_properties TargetName Configuration LIB_LOCATION IMPLIB_LOCATION)
set_property(TARGET Qt5::${TargetName} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration})
-!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
- set(imported_location \"${_qt5Gui_install_prefix}/$${CMAKE_LIB_DIR}${LIB_LOCATION}\")
+!!IF isEmpty(CMAKE_DLL_DIR_IS_ABSOLUTE)
+ set(imported_location \"${_qt5Gui_install_prefix}/$${CMAKE_DLL_DIR}${LIB_LOCATION}\")
!!ELSE
- set(imported_location \"$${CMAKE_LIB_DIR}${LIB_LOCATION}\")
+ set(imported_location \"$${CMAKE_DLL_DIR}${LIB_LOCATION}\")
!!ENDIF
+
!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
set(imported_implib \"${_qt5Gui_install_prefix}/$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\")
!!ELSE
diff --git a/src/network/access/qnetworkrequest.cpp b/src/network/access/qnetworkrequest.cpp
index 3a3e24b80b..00d5b81413 100644
--- a/src/network/access/qnetworkrequest.cpp
+++ b/src/network/access/qnetworkrequest.cpp
@@ -752,7 +752,8 @@ static QByteArray headerValue(QNetworkRequest::KnownHeaders header, const QVaria
static QNetworkRequest::KnownHeaders parseHeaderName(const QByteArray &headerName)
{
- // headerName is not empty here
+ if (headerName.isEmpty())
+ return QNetworkRequest::KnownHeaders(-1);
switch (tolower(headerName.at(0))) {
case 'c':
diff --git a/src/plugins/platforms/android/src/androidjniinput.cpp b/src/plugins/platforms/android/src/androidjniinput.cpp
index 29ccfe0125..75cb617ca8 100644
--- a/src/plugins/platforms/android/src/androidjniinput.cpp
+++ b/src/plugins/platforms/android/src/androidjniinput.cpp
@@ -333,7 +333,7 @@ namespace QtAndroidInput
return Qt::Key_BracketLeft;
case 0x0000005a: // KEYCODE_MEDIA_FAST_FORWARD
- return Qt::Key_Forward;
+ return Qt::Key_AudioForward;
case 0x00000057:
return Qt::Key_MediaNext;
@@ -344,7 +344,7 @@ namespace QtAndroidInput
case 0x00000058:
return Qt::Key_MediaPrevious;
- case 0x00000059:
+ case 0x00000059: // KEYCODE_MEDIA_REWIND
return Qt::Key_AudioRewind;
case 0x00000056:
@@ -356,8 +356,8 @@ namespace QtAndroidInput
case 0x00000045:
return Qt::Key_Minus;
- case 0x0000005b:
- return Qt::Key_VolumeMute;
+ case 0x0000005b: // KEYCODE_MUTE
+ return Qt::Key_MicMute;
case 0x0000004e:
return Qt::Key_NumLock;
@@ -405,6 +405,9 @@ namespace QtAndroidInput
case 0x00000019:
return Qt::Key_VolumeDown;
+ case 0x000000a4: // KEYCODE_VOLUME_MUTE
+ return Qt::Key_VolumeMute;
+
case 0x00000018:
return Qt::Key_VolumeUp;
diff --git a/src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm b/src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm
index a0dac445be..594ad65a18 100644
--- a/src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm
+++ b/src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm
@@ -98,6 +98,11 @@ static NSButton *macCreateButton(const char *text, NSView *superview)
mDialogIsExecuting = false;
mResultSet = false;
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7
+ if (QSysInfo::MacintoshVersion >= QSysInfo::MV_10_7)
+ [mColorPanel setRestorable:NO];
+#endif
+
if (mHelper->options()->testOption(QColorDialogOptions::NoButtons)) {
mStolenContentView = 0;
mOkButton = 0;
@@ -274,6 +279,7 @@ static NSButton *macCreateButton(const char *text, NSView *superview)
- (void)showModelessPanel
{
mDialogIsExecuting = false;
+ mResultSet = false;
[mColorPanel makeKeyAndOrderFront:mColorPanel];
}
@@ -367,10 +373,8 @@ void QCocoaColorDialogHelper::exec()
bool QCocoaColorDialogHelper::show(Qt::WindowFlags, Qt::WindowModality windowModality, QWindow *parent)
{
- if (windowModality == Qt::WindowModal) {
- // Cocoa's shared color panel cannot be shown as a sheet
- return false;
- }
+ if (windowModality == Qt::WindowModal)
+ windowModality = Qt::ApplicationModal;
return showCocoaColorPanel(windowModality, parent);
}
@@ -433,9 +437,9 @@ bool QCocoaColorDialogHelper::showCocoaColorPanel(Qt::WindowModality windowModal
createNSColorPanelDelegate();
QT_MANGLE_NAMESPACE(QNSColorPanelDelegate) *delegate = static_cast<QT_MANGLE_NAMESPACE(QNSColorPanelDelegate) *>(mDelegate);
[delegate->mColorPanel setShowsAlpha:options()->testOption(QColorDialogOptions::ShowAlphaChannel)];
- if (windowModality == Qt::NonModal)
+ if (windowModality != Qt::WindowModal)
[delegate showModelessPanel];
- // no need to show a Qt::ApplicationModal dialog here, since it will be done in _q_platformRunNativeAppModalPanel()
+ // no need to show a Qt::WindowModal dialog here, because it's necessary to call exec() in that case
return true;
}
diff --git a/src/plugins/platforms/xcb/qxcbkeyboard.cpp b/src/plugins/platforms/xcb/qxcbkeyboard.cpp
index f7c473de88..6e5a9ccbb4 100644
--- a/src/plugins/platforms/xcb/qxcbkeyboard.cpp
+++ b/src/plugins/platforms/xcb/qxcbkeyboard.cpp
@@ -248,6 +248,7 @@
#define XF86XK_TouchpadToggle 0x1008FFA9
#define XF86XK_TouchpadOn 0x1008FFB0
#define XF86XK_TouchpadOff 0x1008FFB1
+#define XF86XK_AudioMicMute 0x1008FFB2
// end of XF86keysyms.h
@@ -543,6 +544,7 @@ static const unsigned int KeyTbl[] = {
XF86XK_TouchpadToggle, Qt::Key_TouchpadToggle,
XF86XK_TouchpadOn, Qt::Key_TouchpadOn,
XF86XK_TouchpadOff, Qt::Key_TouchpadOff,
+ XF86XK_AudioMicMute, Qt::Key_MicMute,
XF86XK_Launch0, Qt::Key_Launch2, // ### Qt 6: remap properly
XF86XK_Launch1, Qt::Key_Launch3,
XF86XK_Launch2, Qt::Key_Launch4,
diff --git a/src/widgets/dialogs/qcolordialog.cpp b/src/widgets/dialogs/qcolordialog.cpp
index d6254076c5..79a71599c0 100644
--- a/src/widgets/dialogs/qcolordialog.cpp
+++ b/src/widgets/dialogs/qcolordialog.cpp
@@ -1776,6 +1776,8 @@ void QColorDialog::setOptions(ColorDialogOptions options)
d->options->setOptions(QColorDialogOptions::ColorDialogOptions(int(options)));
d->buttons->setVisible(!(options & NoButtons));
d->showAlpha(options & ShowAlphaChannel);
+ if (options & DontUseNativeDialog)
+ d->nativeDialogInUse = false;
}
QColorDialog::ColorDialogOptions QColorDialog::options() const
@@ -1794,8 +1796,8 @@ QColorDialog::ColorDialogOptions QColorDialog::options() const
\value ShowAlphaChannel Allow the user to select the alpha component of a color.
\value NoButtons Don't display \uicontrol{OK} and \uicontrol{Cancel} buttons. (Useful for "live dialogs".)
- \value DontUseNativeDialog Use Qt's standard color dialog on the Mac instead of Apple's
- native color panel.
+ \value DontUseNativeDialog Use Qt's standard color dialog instead of the operating system
+ native color dialog.
\sa options, setOption(), testOption(), windowModality()
*/
diff --git a/src/widgets/dialogs/qmessagebox.cpp b/src/widgets/dialogs/qmessagebox.cpp
index 4ec828ac83..995d279e13 100644
--- a/src/widgets/dialogs/qmessagebox.cpp
+++ b/src/widgets/dialogs/qmessagebox.cpp
@@ -1392,7 +1392,7 @@ void QMessageBox::keyPressEvent(QKeyEvent *e)
#if !defined(QT_NO_TEXTEDIT)
if (e == QKeySequence::Copy) {
- if (d->detailsText->isVisible() && d->detailsText->copy()) {
+ if (d->detailsText && d->detailsText->isVisible() && d->detailsText->copy()) {
e->setAccepted(true);
return;
}
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp
index cfccce7c41..f67a93c7b5 100644
--- a/src/widgets/kernel/qwidget.cpp
+++ b/src/widgets/kernel/qwidget.cpp
@@ -1546,10 +1546,11 @@ void QWidgetPrivate::createTLExtra()
x->inTopLevelResize = false;
x->inRepaint = false;
x->embedded = 0;
+ x->window = 0;
+ x->screenIndex = 0;
#ifdef Q_WS_MAC
x->wasMaximized = false;
#endif // Q_WS_MAC
- createTLSysExtra();
#ifdef QWIDGET_EXTRA_DEBUG
static int count = 0;
qDebug() << "tlextra" << ++count;
@@ -10109,6 +10110,8 @@ void QWidget::setAttribute(Qt::WidgetAttribute attribute, bool on)
break; }
case Qt::WA_NativeWindow: {
d->createTLExtra();
+ if (on)
+ d->createTLSysExtra();
#ifndef QT_NO_IM
QWidget *focusWidget = d->effectiveFocusWidget();
if (on && !internalWinId() && hasFocus()
diff --git a/src/widgets/kernel/qwidget_qpa.cpp b/src/widgets/kernel/qwidget_qpa.cpp
index 3b6c9ca448..dafe7dc42a 100644
--- a/src/widgets/kernel/qwidget_qpa.cpp
+++ b/src/widgets/kernel/qwidget_qpa.cpp
@@ -890,9 +890,7 @@ void QWidgetPrivate::deleteSysExtra()
void QWidgetPrivate::createTLSysExtra()
{
Q_Q(QWidget);
- extra->topextra->screenIndex = 0;
- extra->topextra->window = 0;
- if (q->testAttribute(Qt::WA_NativeWindow) || q->isWindow()) {
+ if (!extra->topextra->window && (q->testAttribute(Qt::WA_NativeWindow) || q->isWindow())) {
extra->topextra->window = new QWidgetWindow(q);
if (extra->minw || extra->minh)
extra->topextra->window->setMinimumSize(QSize(extra->minw, extra->minh));
diff --git a/src/widgets/widgets/qdockwidget.cpp b/src/widgets/widgets/qdockwidget.cpp
index ae931deb16..7cd7172ef5 100644
--- a/src/widgets/widgets/qdockwidget.cpp
+++ b/src/widgets/widgets/qdockwidget.cpp
@@ -873,7 +873,7 @@ bool QDockWidgetPrivate::mouseMoveEvent(QMouseEvent *event)
QPoint pos = event->globalPos() - state->pressPos;
q->move(pos);
- if (!state->ctrlDrag)
+ if (state && !state->ctrlDrag)
mwlayout->hover(state->widgetItem, event->globalPos());
ret = true;
diff --git a/tests/auto/corelib/io/qdir/tst_qdir.cpp b/tests/auto/corelib/io/qdir/tst_qdir.cpp
index d44ef167b5..fbb21e4e9a 100644
--- a/tests/auto/corelib/io/qdir/tst_qdir.cpp
+++ b/tests/auto/corelib/io/qdir/tst_qdir.cpp
@@ -311,12 +311,28 @@ void tst_QDir::mkdir()
void tst_QDir::makedirReturnCode()
{
QString dirName = QString::fromLatin1("makedirReturnCode");
- QDir::current().rmdir(dirName); // cleanup a previous run.
+ QFile f(QDir::current().filePath(dirName));
+
+ // cleanup a previous run.
+ f.remove();
+ QDir::current().rmdir(dirName);
+
QDir dir(dirName);
QVERIFY(!dir.exists());
QVERIFY(QDir::current().mkdir(dirName));
QVERIFY(!QDir::current().mkdir(dirName)); // calling mkdir on an existing dir will fail.
QVERIFY(QDir::current().mkpath(dirName)); // calling mkpath on an existing dir will pass
+
+ // Remove the directory and create a file with the same path
+ QDir::current().rmdir(dirName);
+ QVERIFY(!f.exists());
+ f.open(QIODevice::WriteOnly);
+ f.write("test");
+ f.close();
+ QVERIFY(f.exists());
+ QVERIFY(!QDir::current().mkdir(dirName)); // calling mkdir on an existing file will fail.
+ QVERIFY(!QDir::current().mkpath(dirName)); // calling mkpath on an existing file will fail.
+ f.remove();
}
void tst_QDir::rmdir_data()
diff --git a/tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp b/tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp
index 8515f8a698..713d0c5c17 100644
--- a/tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp
+++ b/tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp
@@ -279,17 +279,18 @@ void tst_QTemporaryDir::openOnRootDrives()
void tst_QTemporaryDir::stressTest()
{
const int iterations = 1000;
+ QTemporaryDir rootDir;
+ QVERIFY(rootDir.isValid());
QSet<QString> names;
+ const QString pattern = rootDir.path() + QStringLiteral("/XXXXXX");
for (int i = 0; i < iterations; ++i) {
- QTemporaryDir dir;
+ QTemporaryDir dir(pattern);
dir.setAutoRemove(false);
- QVERIFY2(dir.isValid(), qPrintable(QString::number(i)));
+ QVERIFY2(dir.isValid(), qPrintable(QString::fromLatin1("Failed to create #%1 under %2.").arg(i).arg(QDir::toNativeSeparators(pattern))));
QVERIFY(!names.contains(dir.path()));
names.insert(dir.path());
}
- for (QSet<QString>::const_iterator it = names.constBegin(); it != names.constEnd(); ++it)
- QDir(*it).removeRecursively();
}
void tst_QTemporaryDir::rename()