summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2017-07-06 13:52:42 +0200
committerLiang Qi <liang.qi@qt.io>2017-07-06 13:54:25 +0200
commit7f269a5db8b88fbb14ee741f78e726b1a46c7d4d (patch)
treefa63387e6f70187e656dd9e6c4f1cd1b1f96c263
parent9ca3443a37284bedaf74475c26af173b00757178 (diff)
parent03b4838cb51513bd5d2edf76dccc4bc4a1181681 (diff)
Merge remote-tracking branch 'origin/5.9' into dev
Conflicts: .qmake.conf Change-Id: I43531e087bb810889d5c1fbfcdffb29b78804839
-rw-r--r--doc/global/externalsites/external-resources.qdoc2
-rw-r--r--doc/global/externalsites/qtcreator.qdoc4
-rw-r--r--doc/global/qt-html-templates-offline-simple.qdocconf2
-rw-r--r--examples/gui/doc/src/rasterwindow.qdoc11
-rw-r--r--examples/widgets/doc/src/addressbook-tutorial.qdoc1
-rw-r--r--examples/widgets/doc/src/borderlayout.qdoc1
-rw-r--r--examples/widgets/doc/src/calculator.qdoc1
-rw-r--r--examples/widgets/doc/src/calendarwidget.qdoc1
-rw-r--r--examples/widgets/doc/src/echoplugin.qdoc1
-rw-r--r--examples/widgets/doc/src/flowlayout.qdoc1
-rw-r--r--examples/widgets/doc/src/imagecomposition.qdoc1
-rw-r--r--examples/widgets/doc/src/menus.qdoc1
-rw-r--r--examples/widgets/doc/src/simpletreemodel.qdoc1
-rw-r--r--examples/widgets/doc/src/sub-attaq.qdoc1
-rw-r--r--mkspecs/common/msvc-desktop.conf2
-rw-r--r--mkspecs/common/winrt_winphone/manifests/10.0/AppxManifest.xml.in3
-rw-r--r--mkspecs/features/qt_common.prf2
-rw-r--r--mkspecs/features/qt_targets.prf4
-rw-r--r--mkspecs/features/qt_tool.prf3
-rw-r--r--mkspecs/features/winrt/package_manifest.prf35
-rw-r--r--mkspecs/win32-g++/qmake.conf2
-rw-r--r--src/3rdparty/angle/src/libANGLE/renderer/d3d/SurfaceD3D.cpp87
-rw-r--r--src/3rdparty/angle/src/libANGLE/renderer/d3d/SurfaceD3D.h4
-rw-r--r--src/3rdparty/libjpeg.pri6
-rw-r--r--src/3rdparty/zlib.pri1
-rw-r--r--src/angle/patches/0014-ANGLE-Fix-flickering-on-resize-when-D3D9-is-used.patch157
-rw-r--r--src/corelib/global/qglobal.cpp27
-rw-r--r--src/corelib/global/qglobal.h2
-rw-r--r--src/corelib/io/qfilesystementry.cpp30
-rw-r--r--src/corelib/io/qfilesystementry_p.h3
-rw-r--r--src/corelib/mimetypes/qmimedatabase.cpp2
-rw-r--r--src/corelib/tools/qfreelist_p.h6
-rw-r--r--src/corelib/tools/qlocale_tools.cpp2
-rw-r--r--src/dbus/dbus.pro4
-rw-r--r--src/gui/configure.json4
-rw-r--r--src/gui/image/qbmphandler.cpp61
-rw-r--r--src/gui/image/qbmphandler_p.h15
-rw-r--r--src/network/ssl/qsslsocket_mac.cpp4
-rw-r--r--src/plugins/platforms/android/androidjniaccessibility.cpp1
-rw-r--r--src/plugins/platforms/android/androidjniinput.cpp1
-rw-r--r--src/plugins/platforms/android/androidjnimain.cpp52
-rw-r--r--src/plugins/platforms/android/androidjnimain.h2
-rw-r--r--src/plugins/platforms/android/qandroidplatformintegration.cpp9
-rw-r--r--src/plugins/platforms/cocoa/qcocoamenubar.mm18
-rw-r--r--src/plugins/platforms/windows/qwindowscontext.cpp2
-rw-r--r--src/plugins/platforms/xcb/gl_integrations/gl_integrations_plugin_base.pri11
-rw-r--r--src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxintegration.cpp65
-rw-r--r--src/plugins/platforms/xcb/gl_integrations/xcb_glx/xcb_glx.pro7
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection.cpp8
-rw-r--r--src/plugins/platforms/xcb/qxcbimage.cpp4
-rw-r--r--src/plugins/platforms/xcb/qxcbintegration.cpp2
-rw-r--r--src/plugins/platforms/xcb/qxcbintegration.h3
-rw-r--r--src/plugins/platforms/xcb/xcb_qpa_lib.pro9
-rw-r--r--src/plugins/plugins.pro2
-rw-r--r--src/widgets/doc/images/fusion-checkbox.pngbin1648 -> 0 bytes
-rw-r--r--src/widgets/doc/images/fusion-dateedit.pngbin1332 -> 0 bytes
-rw-r--r--src/widgets/doc/images/fusion-datetimeedit.pngbin1940 -> 0 bytes
-rw-r--r--src/widgets/doc/images/fusion-dial.pngbin6559 -> 0 bytes
-rw-r--r--src/widgets/doc/images/fusion-doublespinbox.pngbin1107 -> 0 bytes
-rw-r--r--src/widgets/doc/images/fusion-fontcombobox.pngbin1472 -> 0 bytes
-rw-r--r--src/widgets/doc/images/fusion-frame.pngbin7010 -> 0 bytes
-rw-r--r--src/widgets/doc/images/fusion-groupbox.pngbin5326 -> 0 bytes
-rw-r--r--src/widgets/doc/images/fusion-horizontalscrollbar.pngbin670 -> 0 bytes
-rw-r--r--src/widgets/doc/images/fusion-lcdnumber.pngbin607 -> 0 bytes
-rw-r--r--src/widgets/doc/images/fusion-lineedit.pngbin1642 -> 0 bytes
-rw-r--r--src/widgets/doc/images/fusion-listview.pngbin6974 -> 0 bytes
-rw-r--r--src/widgets/doc/images/fusion-progressbar.pngbin1158 -> 0 bytes
-rw-r--r--src/widgets/doc/images/fusion-pushbutton.pngbin1387 -> 0 bytes
-rw-r--r--src/widgets/doc/images/fusion-radiobutton.pngbin2281 -> 0 bytes
-rw-r--r--src/widgets/doc/images/fusion-slider.pngbin573 -> 0 bytes
-rw-r--r--src/widgets/doc/images/fusion-spinbox.pngbin1103 -> 0 bytes
-rw-r--r--src/widgets/doc/images/fusion-tableview.pngbin6262 -> 0 bytes
-rw-r--r--src/widgets/doc/images/fusion-textedit.pngbin11201 -> 0 bytes
-rw-r--r--src/widgets/doc/images/fusion-timeedit.pngbin1096 -> 0 bytes
-rw-r--r--src/widgets/doc/images/fusion-toolbox.pngbin2651 -> 0 bytes
-rw-r--r--src/widgets/doc/images/fusion-toolbutton.pngbin1557 -> 0 bytes
-rw-r--r--src/widgets/doc/images/fusion-treeview.pngbin8601 -> 0 bytes
-rw-r--r--src/widgets/doc/images/macintosh-calendarwidget.pngbin13560 -> 0 bytes
-rw-r--r--src/widgets/doc/images/macintosh-checkbox.pngbin2473 -> 0 bytes
-rw-r--r--src/widgets/doc/images/macintosh-combobox.pngbin3273 -> 0 bytes
-rw-r--r--src/widgets/doc/images/macintosh-dateedit.pngbin1703 -> 0 bytes
-rw-r--r--src/widgets/doc/images/macintosh-datetimeedit.pngbin2633 -> 0 bytes
-rw-r--r--src/widgets/doc/images/macintosh-dial.pngbin2563 -> 0 bytes
-rw-r--r--src/widgets/doc/images/macintosh-doublespinbox.pngbin2306 -> 0 bytes
-rw-r--r--src/widgets/doc/images/macintosh-fontcombobox.pngbin2967 -> 0 bytes
-rw-r--r--src/widgets/doc/images/macintosh-frame.pngbin6187 -> 0 bytes
-rw-r--r--src/widgets/doc/images/macintosh-groupbox.pngbin6469 -> 0 bytes
-rw-r--r--src/widgets/doc/images/macintosh-horizontalscrollbar.pngbin2242 -> 0 bytes
-rw-r--r--src/widgets/doc/images/macintosh-label.pngbin1450 -> 0 bytes
-rw-r--r--src/widgets/doc/images/macintosh-lcdnumber.pngbin492 -> 0 bytes
-rw-r--r--src/widgets/doc/images/macintosh-lineedit.pngbin1854 -> 0 bytes
-rw-r--r--src/widgets/doc/images/macintosh-listview.pngbin9987 -> 0 bytes
-rw-r--r--src/widgets/doc/images/macintosh-menu.pngbin6891 -> 0 bytes
-rw-r--r--src/widgets/doc/images/macintosh-progressbar.pngbin1127 -> 0 bytes
-rw-r--r--src/widgets/doc/images/macintosh-pushbutton.pngbin2966 -> 0 bytes
-rw-r--r--src/widgets/doc/images/macintosh-radiobutton.pngbin2914 -> 0 bytes
-rw-r--r--src/widgets/doc/images/macintosh-slider.pngbin1694 -> 0 bytes
-rw-r--r--src/widgets/doc/images/macintosh-spinbox.pngbin1964 -> 0 bytes
-rw-r--r--src/widgets/doc/images/macintosh-tableview.pngbin10024 -> 0 bytes
-rw-r--r--src/widgets/doc/images/macintosh-tabwidget.pngbin9562 -> 0 bytes
-rw-r--r--src/widgets/doc/images/macintosh-textedit.pngbin7845 -> 0 bytes
-rw-r--r--src/widgets/doc/images/macintosh-timeedit.pngbin2244 -> 0 bytes
-rw-r--r--src/widgets/doc/images/macintosh-toolbox.pngbin2576 -> 0 bytes
-rw-r--r--src/widgets/doc/images/macintosh-toolbutton.pngbin2003 -> 0 bytes
-rw-r--r--src/widgets/doc/images/macintosh-treeview.pngbin11728 -> 0 bytes
-rw-r--r--src/widgets/doc/images/windowsvista-calendarwidget.pngbin5144 -> 0 bytes
-rw-r--r--src/widgets/doc/images/windowsvista-checkbox.pngbin1115 -> 0 bytes
-rw-r--r--src/widgets/doc/images/windowsvista-combobox.pngbin1457 -> 0 bytes
-rw-r--r--src/widgets/doc/images/windowsvista-dateedit.pngbin855 -> 0 bytes
-rw-r--r--src/widgets/doc/images/windowsvista-datetimeedit.pngbin1034 -> 0 bytes
-rw-r--r--src/widgets/doc/images/windowsvista-dial.pngbin2431 -> 0 bytes
-rw-r--r--src/widgets/doc/images/windowsvista-doublespinbox.pngbin852 -> 0 bytes
-rw-r--r--src/widgets/doc/images/windowsvista-frame.pngbin1800 -> 0 bytes
-rw-r--r--src/widgets/doc/images/windowsvista-groupbox.pngbin1991 -> 0 bytes
-rw-r--r--src/widgets/doc/images/windowsvista-horizontalscrollbar.pngbin1049 -> 0 bytes
-rw-r--r--src/widgets/doc/images/windowsvista-label.pngbin599 -> 0 bytes
-rw-r--r--src/widgets/doc/images/windowsvista-lcdnumber.pngbin491 -> 0 bytes
-rw-r--r--src/widgets/doc/images/windowsvista-lineedit.pngbin873 -> 0 bytes
-rw-r--r--src/widgets/doc/images/windowsvista-listview.pngbin6872 -> 0 bytes
-rw-r--r--src/widgets/doc/images/windowsvista-progressbar.pngbin1437 -> 0 bytes
-rw-r--r--src/widgets/doc/images/windowsvista-slider.pngbin624 -> 0 bytes
-rw-r--r--src/widgets/doc/images/windowsvista-spinbox.pngbin767 -> 0 bytes
-rw-r--r--src/widgets/doc/images/windowsvista-tableview.pngbin3941 -> 0 bytes
-rw-r--r--src/widgets/doc/images/windowsvista-textedit.pngbin3122 -> 0 bytes
-rw-r--r--src/widgets/doc/images/windowsvista-timeedit.pngbin764 -> 0 bytes
-rw-r--r--src/widgets/doc/images/windowsvista-toolbox.pngbin891 -> 0 bytes
-rw-r--r--src/widgets/doc/images/windowsvista-toolbutton.pngbin981 -> 0 bytes
-rw-r--r--src/widgets/doc/images/windowsvista-treeview.pngbin5760 -> 0 bytes
-rw-r--r--src/widgets/doc/src/qtwidgets-index.qdoc4
-rw-r--r--src/widgets/doc/src/widgets-and-layouts/layout.qdoc19
-rw-r--r--src/widgets/itemviews/qdirmodel.cpp10
-rw-r--r--src/widgets/itemviews/qfileiconprovider.cpp8
-rw-r--r--src/widgets/kernel/kernel.pri9
-rw-r--r--src/widgets/widgets/qcalendarwidget.cpp7
-rw-r--r--src/widgets/widgets/qlineedit.cpp3
-rw-r--r--tests/auto/auto.pro1
-rw-r--r--tests/auto/corelib/io/qfileinfo/qfileinfo.pro2
-rw-r--r--tests/auto/corelib/tools/qlocale/tst_qlocale.cpp67
-rw-r--r--tests/auto/gui/image/qimagereader/tst_qimagereader.cpp3
-rw-r--r--tests/auto/gui/kernel/qwindow/BLACKLIST3
-rw-r--r--tests/auto/network/ssl/qssldiffiehellmanparameters/qssldiffiehellmanparameters.pro2
-rw-r--r--tests/auto/other/macgui/BLACKLIST3
-rw-r--r--tests/auto/printsupport/kernel/qprinter/tst_qprinter.cpp59
-rw-r--r--tests/auto/printsupport/printsupport.pro2
-rw-r--r--tests/auto/widgets/itemviews/qdirmodel/qdirmodel.pro10
-rw-r--r--tests/auto/widgets/widgets/qtoolbutton/BLACKLIST2
146 files changed, 632 insertions, 273 deletions
diff --git a/doc/global/externalsites/external-resources.qdoc b/doc/global/externalsites/external-resources.qdoc
index d9859ba295..6019f5013f 100644
--- a/doc/global/externalsites/external-resources.qdoc
+++ b/doc/global/externalsites/external-resources.qdoc
@@ -199,7 +199,7 @@
*/
/*!
- \externalpage http://www.mingw.org/
+ \externalpage https://mingw-w64.org/
\title MinGW
*/
diff --git a/doc/global/externalsites/qtcreator.qdoc b/doc/global/externalsites/qtcreator.qdoc
index bfa467da57..4b9160cea4 100644
--- a/doc/global/externalsites/qtcreator.qdoc
+++ b/doc/global/externalsites/qtcreator.qdoc
@@ -555,3 +555,7 @@
\externalpage http://doc.qt.io/qtcreator/creator-project-creating.html#creating-c-classes
\title Qt Creator: Creating C++ Classes
*/
+/*!
+ \externalpage http://doc.qt.io/qtcreator/creator-writing-program.html
+ \title Creating a Qt Widget Based Application
+*/
diff --git a/doc/global/qt-html-templates-offline-simple.qdocconf b/doc/global/qt-html-templates-offline-simple.qdocconf
index 4a65cc3c57..1fea752a16 100644
--- a/doc/global/qt-html-templates-offline-simple.qdocconf
+++ b/doc/global/qt-html-templates-offline-simple.qdocconf
@@ -6,7 +6,7 @@ qhp.extraFiles += style/offline-simple.css
HTML.headerstyles = \
" <link rel=\"stylesheet\" type=\"text/css\" href=\"style/offline-simple.css\" />\n" \
" <script type=\"text/javascript\">\n" \
- " window.onload = function(){document.getElementsByTagName(\"link\").item(0).setAttribute(\"href\", \"style/offline.css\");};\n" \
+ " document.getElementsByTagName(\"link\").item(0).setAttribute(\"href\", \"style/offline.css\");\n" \
" </script>\n"
HTML.postheader = \
diff --git a/examples/gui/doc/src/rasterwindow.qdoc b/examples/gui/doc/src/rasterwindow.qdoc
index d276925059..36612e1707 100644
--- a/examples/gui/doc/src/rasterwindow.qdoc
+++ b/examples/gui/doc/src/rasterwindow.qdoc
@@ -74,14 +74,9 @@
\snippet rasterwindow/rasterwindow.cpp 1
- The constructor first of all calls \l QWindow::create(). This will
- create the window in the windowing system. Without calling create,
- the window will not get events and will not be visible in the
- windowing system. The call to create does not show the window. We
- then set the geometry to be something reasonable.
-
- Then we create the backingstore and pass it the window instance it
- is supposed to manage.
+ In the constructor we create the backingstore and pass it the window
+ instance it is supposed to manage. We also set the initial window
+ geometry.
\snippet rasterwindow/rasterwindow.cpp 2
diff --git a/examples/widgets/doc/src/addressbook-tutorial.qdoc b/examples/widgets/doc/src/addressbook-tutorial.qdoc
index c3cd06fed5..31d1d64dac 100644
--- a/examples/widgets/doc/src/addressbook-tutorial.qdoc
+++ b/examples/widgets/doc/src/addressbook-tutorial.qdoc
@@ -29,6 +29,7 @@
\page tutorials-addressbook.html
\title Address Book Tutorial
+ \ingroup examples-layout
\brief An introduction to GUI programming, showing how to put together a
simple yet fully-functioning application.
diff --git a/examples/widgets/doc/src/borderlayout.qdoc b/examples/widgets/doc/src/borderlayout.qdoc
index fded69c541..c8f2ae4196 100644
--- a/examples/widgets/doc/src/borderlayout.qdoc
+++ b/examples/widgets/doc/src/borderlayout.qdoc
@@ -28,6 +28,7 @@
/*!
\example layouts/borderlayout
\title Border Layout Example
+ \ingroup examples-layout
\brief Shows how to arrange child widgets along a border.
\e{Border Layout} implements a layout that arranges child widgets to
diff --git a/examples/widgets/doc/src/calculator.qdoc b/examples/widgets/doc/src/calculator.qdoc
index 83d85a7fe8..e8f8030207 100644
--- a/examples/widgets/doc/src/calculator.qdoc
+++ b/examples/widgets/doc/src/calculator.qdoc
@@ -29,6 +29,7 @@
\example widgets/calculator
\title Calculator Example
\ingroup examples-widgets
+ \ingroup examples-layout
\brief The example shows how to use signals and slots to implement the
functionality of a calculator widget, and how to use QGridLayout
to place child widgets in a grid.
diff --git a/examples/widgets/doc/src/calendarwidget.qdoc b/examples/widgets/doc/src/calendarwidget.qdoc
index c2d86d830c..eaf8f547da 100644
--- a/examples/widgets/doc/src/calendarwidget.qdoc
+++ b/examples/widgets/doc/src/calendarwidget.qdoc
@@ -29,6 +29,7 @@
\title Calendar Widget Example
\example widgets/calendarwidget
\ingroup examples-widgets
+ \ingroup examples-layout
\brief The Calendar Widget example shows use of QCalendarWidget.
\borderedimage calendarwidgetexample.png
diff --git a/examples/widgets/doc/src/echoplugin.qdoc b/examples/widgets/doc/src/echoplugin.qdoc
index 512970d3e6..28be789c5c 100644
--- a/examples/widgets/doc/src/echoplugin.qdoc
+++ b/examples/widgets/doc/src/echoplugin.qdoc
@@ -29,6 +29,7 @@
\example tools/echoplugin
\title Echo Plugin Example
\ingroup examples-widgets-tools
+ \ingroup examples-layout
\brief This example shows how to create a Qt plugin.
diff --git a/examples/widgets/doc/src/flowlayout.qdoc b/examples/widgets/doc/src/flowlayout.qdoc
index ebcb1ace84..c907cb3af7 100644
--- a/examples/widgets/doc/src/flowlayout.qdoc
+++ b/examples/widgets/doc/src/flowlayout.qdoc
@@ -28,6 +28,7 @@
/*!
\example layouts/flowlayout
\title Flow Layout Example
+ \ingroup examples-layout
\brief Shows how to arrange widgets for different window sizes.
\e{Flow Layout} implements a layout that handles different window sizes. The
diff --git a/examples/widgets/doc/src/imagecomposition.qdoc b/examples/widgets/doc/src/imagecomposition.qdoc
index 10f3ea9c36..97f3a78264 100644
--- a/examples/widgets/doc/src/imagecomposition.qdoc
+++ b/examples/widgets/doc/src/imagecomposition.qdoc
@@ -29,6 +29,7 @@
\example painting/imagecomposition
\title Image Composition Example
\ingroup examples-painting
+ \ingroup examples-layout
\brief Shows how composition modes work in QPainter.
\brief The Image Composition example lets the user combine images
diff --git a/examples/widgets/doc/src/menus.qdoc b/examples/widgets/doc/src/menus.qdoc
index 77eef6c5c2..0cf74a7dac 100644
--- a/examples/widgets/doc/src/menus.qdoc
+++ b/examples/widgets/doc/src/menus.qdoc
@@ -29,6 +29,7 @@
\example mainwindows/menus
\title Menus Example
\ingroup examples-mainwindow
+ \ingroup examples-layout
\brief The Menus example demonstrates how menus can be used in a main
window application.
diff --git a/examples/widgets/doc/src/simpletreemodel.qdoc b/examples/widgets/doc/src/simpletreemodel.qdoc
index 46a429d16b..a50197b04d 100644
--- a/examples/widgets/doc/src/simpletreemodel.qdoc
+++ b/examples/widgets/doc/src/simpletreemodel.qdoc
@@ -29,6 +29,7 @@
\example itemviews/simpletreemodel
\title Simple Tree Model Example
\ingroup examples-itemviews
+ \ingroup examples-layout
\brief The Simple Tree Model example shows how to use a hierarchical model
with Qt's standard view classes.
diff --git a/examples/widgets/doc/src/sub-attaq.qdoc b/examples/widgets/doc/src/sub-attaq.qdoc
index f09c5ff3a1..994e9d6f90 100644
--- a/examples/widgets/doc/src/sub-attaq.qdoc
+++ b/examples/widgets/doc/src/sub-attaq.qdoc
@@ -28,6 +28,7 @@
/*!
\example animation/sub-attaq
\title Sub-Attaq
+ \ingroup examples-layout
\brief This example shows Qt's ability to combine \l{The Animation Framework}{the animation framework}
and \l{The State Machine Framework}{the state machine framework} to create a game.
diff --git a/mkspecs/common/msvc-desktop.conf b/mkspecs/common/msvc-desktop.conf
index 95db8b93f9..bb10113fe7 100644
--- a/mkspecs/common/msvc-desktop.conf
+++ b/mkspecs/common/msvc-desktop.conf
@@ -12,7 +12,7 @@ MAKEFILE_GENERATOR = MSVC.NET
QMAKE_PLATFORM = win32
QMAKE_COMPILER = msvc
CONFIG += incremental flat precompile_header autogen_precompile_source debug_and_release debug_and_release_target embed_manifest_dll embed_manifest_exe
-DEFINES += UNICODE WIN32
+DEFINES += UNICODE _UNICODE WIN32
QMAKE_COMPILER_DEFINES += _WIN32
contains(QMAKE_TARGET.arch, x86_64) {
DEFINES += WIN64
diff --git a/mkspecs/common/winrt_winphone/manifests/10.0/AppxManifest.xml.in b/mkspecs/common/winrt_winphone/manifests/10.0/AppxManifest.xml.in
index 9c25feb43f..18683e01e3 100644
--- a/mkspecs/common/winrt_winphone/manifests/10.0/AppxManifest.xml.in
+++ b/mkspecs/common/winrt_winphone/manifests/10.0/AppxManifest.xml.in
@@ -4,8 +4,9 @@
xmlns=\"http://schemas.microsoft.com/appx/manifest/foundation/windows10\"
xmlns:mp=\"http://schemas.microsoft.com/appx/2014/phone/manifest\"
xmlns:uap=\"http://schemas.microsoft.com/appx/manifest/uap/windows10\"
+ xmlns:uap3=\"http://schemas.microsoft.com/appx/manifest/uap/windows10/3\"
xmlns:mobile=\"http://schemas.microsoft.com/appx/manifest/mobile/windows10\"
- IgnorableNamespaces=\"uap mp mobile\">
+ IgnorableNamespaces=\"uap uap3 mp mobile\">
<Identity
Name=\"$${WINRT_MANIFEST.identity}\"
diff --git a/mkspecs/features/qt_common.prf b/mkspecs/features/qt_common.prf
index 1e138730b3..e66c24b027 100644
--- a/mkspecs/features/qt_common.prf
+++ b/mkspecs/features/qt_common.prf
@@ -65,6 +65,8 @@ clang {
greaterThan(QT_GCC_MAJOR_VERSION, 4): QMAKE_CXXFLAGS_WARN_ON += -Wdate-time
# GCC 6 introduced these
greaterThan(QT_GCC_MAJOR_VERSION, 5): QMAKE_CXXFLAGS_WARN_ON += -Wshift-overflow=2 -Wduplicated-cond
+ # GCC 7 has a lot of false positives relating to this, so disable completely
+ greaterThan(QT_GCC_MAJOR_VERSION, 6): QMAKE_CXXFLAGS_WARN_ON += -Wno-stringop-overflow
}
warnings_are_errors:warning_clean {
diff --git a/mkspecs/features/qt_targets.prf b/mkspecs/features/qt_targets.prf
index cd76efdaf3..49f7e6bd43 100644
--- a/mkspecs/features/qt_targets.prf
+++ b/mkspecs/features/qt_targets.prf
@@ -1,4 +1,4 @@
-QMAKE_TARGET_COMPANY = The Qt Company Ltd
+QMAKE_TARGET_COMPANY = The Qt Company Ltd.
isEmpty(QMAKE_TARGET_PRODUCT): QMAKE_TARGET_PRODUCT = Qt5
-isEmpty(QMAKE_TARGET_DESCRIPTION): QMAKE_TARGET_DESCRIPTION = C++ application development framework.
+isEmpty(QMAKE_TARGET_DESCRIPTION): QMAKE_TARGET_DESCRIPTION = C++ Application Development Framework
QMAKE_TARGET_COPYRIGHT = Copyright (C) 2017 The Qt Company Ltd.
diff --git a/mkspecs/features/qt_tool.prf b/mkspecs/features/qt_tool.prf
index a8d589f0fa..a516e5ba4b 100644
--- a/mkspecs/features/qt_tool.prf
+++ b/mkspecs/features/qt_tool.prf
@@ -10,6 +10,9 @@
#
CONFIG += no_launch_target
+isEmpty(VERSION): VERSION = $$MODULE_VERSION
+isEmpty(QMAKE_TARGET_DESCRIPTION): QMAKE_TARGET_DESCRIPTION = \
+ "Tool for the Qt Application Development Framework"
load(qt_app)
CONFIG += console
diff --git a/mkspecs/features/winrt/package_manifest.prf b/mkspecs/features/winrt/package_manifest.prf
index a00c84948c..d850254dcf 100644
--- a/mkspecs/features/winrt/package_manifest.prf
+++ b/mkspecs/features/winrt/package_manifest.prf
@@ -116,9 +116,8 @@
INDENT = "$$escape_expand(\\r\\n) "
- # All Windows 10 applications need to have internetClient. It is also not marked as additional
- # capability anymore and is assumed to be standard.
- *-msvc2015|*-msvc2017: WINRT_MANIFEST.capabilities += internetClient
+ # All Windows 10 applications need to have internetClient.
+ WINRT_MANIFEST.capabilities += internetClient
contains(WINRT_MANIFEST.capabilities, defaults) {
WINRT_MANIFEST.capabilities -= defaults
@@ -130,13 +129,39 @@
WINRT_MANIFEST.capabilities_device += $$WINRT_MANIFEST.capabilities_device_default
}
+ UAP_CAPABILITIES += \
+ appointments \
+ blockedChatMessages \
+ chat \
+ contacts \
+ enterpriseAuthentication \
+ # internetClient is special, as it needs to be written without namespace
+ #internetClient \
+ musicLibrary \
+ objects3D \
+ phoneCall \
+ picturesLibrary \
+ removableStorage \
+ sharedUserCertificates \
+ userAccountInformation \
+ videosLibrary \
+ voipCall
+
+ UAP3_CAPABILITIES += backgroundMediaPlayback remoteSystem userNotificationListener
+
# Capabilities are given as a string list and may change with the configuration (network, sensors, etc.)
WINRT_MANIFEST.capabilities = $$unique(WINRT_MANIFEST.capabilities)
WINRT_MANIFEST.capabilities_device = $$unique(WINRT_MANIFEST.capabilities_device)
!isEmpty(WINRT_MANIFEST.capabilities)|!isEmpty(WINRT_MANIFEST.capabilities_device) {
MANIFEST_CAPABILITIES += "<Capabilities>"
- for(CAPABILITY, WINRT_MANIFEST.capabilities): \
- MANIFEST_CAPABILITIES += " <Capability Name=\"$$CAPABILITY\" />"
+ for (CAPABILITY, WINRT_MANIFEST.capabilities) {
+ contains(UAP_CAPABILITIES, $$CAPABILITY): \
+ MANIFEST_CAPABILITIES += " <uap:Capability Name=\"$$CAPABILITY\" />"
+ else:contains(UAP3_CAPABILITIES, $$CAPABILITY): \
+ MANIFEST_CAPABILITIES += " <uap3:Capability Name=\"$$CAPABILITY\" />"
+ else: \
+ MANIFEST_CAPABILITIES += " <Capability Name=\"$$CAPABILITY\" />"
+ }
for(CAPABILITY, WINRT_MANIFEST.capabilities_device): \
MANIFEST_CAPABILITIES += " <DeviceCapability Name=\"$$CAPABILITY\" />"
MANIFEST_CAPABILITIES += "</Capabilities>"
diff --git a/mkspecs/win32-g++/qmake.conf b/mkspecs/win32-g++/qmake.conf
index 394dd7d8bd..105391f6f4 100644
--- a/mkspecs/win32-g++/qmake.conf
+++ b/mkspecs/win32-g++/qmake.conf
@@ -13,7 +13,7 @@ include(../common/g++-base.conf)
MAKEFILE_GENERATOR = MINGW
QMAKE_PLATFORM = win32 mingw
CONFIG += debug_and_release debug_and_release_target precompile_header
-DEFINES += UNICODE
+DEFINES += UNICODE _UNICODE
QMAKE_COMPILER_DEFINES += __GNUC__ WIN32
QMAKE_EXT_OBJ = .o
diff --git a/src/3rdparty/angle/src/libANGLE/renderer/d3d/SurfaceD3D.cpp b/src/3rdparty/angle/src/libANGLE/renderer/d3d/SurfaceD3D.cpp
index 3d27548504..f567f47525 100644
--- a/src/3rdparty/angle/src/libANGLE/renderer/d3d/SurfaceD3D.cpp
+++ b/src/3rdparty/angle/src/libANGLE/renderer/d3d/SurfaceD3D.cpp
@@ -61,16 +61,19 @@ SurfaceD3D::SurfaceD3D(RendererD3D *renderer,
mDepthStencilFormat(config->depthStencilFormat),
mSwapChain(nullptr),
mSwapIntervalDirty(true),
+ mWindowSubclassed(false),
mNativeWindow(window, config, directComposition == EGL_TRUE),
mWidth(width),
mHeight(height),
mSwapInterval(1),
mShareHandle(reinterpret_cast<HANDLE *>(shareHandle))
{
+ subclassWindow();
}
SurfaceD3D::~SurfaceD3D()
{
+ unsubclassWindow();
releaseSwapChain();
}
@@ -243,6 +246,90 @@ egl::Error SurfaceD3D::swapRect(EGLint x, EGLint y, EGLint width, EGLint height)
return egl::Error(EGL_SUCCESS);
}
+#if !defined(ANGLE_ENABLE_WINDOWS_STORE)
+#define kSurfaceProperty _TEXT("Egl::SurfaceOwner")
+#define kParentWndProc _TEXT("Egl::SurfaceParentWndProc")
+
+static LRESULT CALLBACK SurfaceWindowProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam)
+{
+ if (message == WM_SIZE)
+ {
+ SurfaceD3D* surf = reinterpret_cast<SurfaceD3D*>(GetProp(hwnd, kSurfaceProperty));
+ if(surf)
+ {
+ surf->checkForOutOfDateSwapChain();
+ }
+ }
+ WNDPROC prevWndFunc = reinterpret_cast<WNDPROC >(GetProp(hwnd, kParentWndProc));
+ return CallWindowProc(prevWndFunc, hwnd, message, wparam, lparam);
+}
+#endif
+
+void SurfaceD3D::subclassWindow()
+{
+#if !defined(ANGLE_ENABLE_WINDOWS_STORE)
+ HWND window = mNativeWindow.getNativeWindow();
+ if (!window)
+ {
+ return;
+ }
+
+ DWORD processId;
+ DWORD threadId = GetWindowThreadProcessId(window, &processId);
+ if (processId != GetCurrentProcessId() || threadId != GetCurrentThreadId())
+ {
+ return;
+ }
+
+ SetLastError(0);
+ LONG_PTR oldWndProc = SetWindowLongPtr(window, GWLP_WNDPROC, reinterpret_cast<LONG_PTR>(SurfaceWindowProc));
+ if(oldWndProc == 0 && GetLastError() != ERROR_SUCCESS)
+ {
+ mWindowSubclassed = false;
+ return;
+ }
+
+ SetProp(window, kSurfaceProperty, reinterpret_cast<HANDLE>(this));
+ SetProp(window, kParentWndProc, reinterpret_cast<HANDLE>(oldWndProc));
+ mWindowSubclassed = true;
+#endif
+}
+
+void SurfaceD3D::unsubclassWindow()
+{
+ if (!mWindowSubclassed)
+ {
+ return;
+ }
+
+#if !defined(ANGLE_ENABLE_WINDOWS_STORE)
+ HWND window = mNativeWindow.getNativeWindow();
+ if (!window)
+ {
+ return;
+ }
+
+ // un-subclass
+ LONG_PTR parentWndFunc = reinterpret_cast<LONG_PTR>(GetProp(window, kParentWndProc));
+
+ // Check the windowproc is still SurfaceWindowProc.
+ // If this assert fails, then it is likely the application has subclassed the
+ // hwnd as well and did not unsubclass before destroying its EGL context. The
+ // application should be modified to either subclass before initializing the
+ // EGL context, or to unsubclass before destroying the EGL context.
+ if(parentWndFunc)
+ {
+ LONG_PTR prevWndFunc = SetWindowLongPtr(window, GWLP_WNDPROC, parentWndFunc);
+ UNUSED_ASSERTION_VARIABLE(prevWndFunc);
+ ASSERT(prevWndFunc == reinterpret_cast<LONG_PTR>(SurfaceWindowProc));
+ }
+
+ RemoveProp(window, kSurfaceProperty);
+ RemoveProp(window, kParentWndProc);
+#endif
+ mWindowSubclassed = false;
+}
+
bool SurfaceD3D::checkForOutOfDateSwapChain()
{
RECT client;
diff --git a/src/3rdparty/angle/src/libANGLE/renderer/d3d/SurfaceD3D.h b/src/3rdparty/angle/src/libANGLE/renderer/d3d/SurfaceD3D.h
index b925bfc8cc..67d408ddd9 100644
--- a/src/3rdparty/angle/src/libANGLE/renderer/d3d/SurfaceD3D.h
+++ b/src/3rdparty/angle/src/libANGLE/renderer/d3d/SurfaceD3D.h
@@ -82,6 +82,9 @@ class SurfaceD3D : public SurfaceImpl
egl::Error resetSwapChain(int backbufferWidth, int backbufferHeight);
egl::Error resizeSwapChain(int backbufferWidth, int backbufferHeight);
+ void subclassWindow();
+ void unsubclassWindow();
+
RendererD3D *mRenderer;
egl::Display *mDisplay;
@@ -93,6 +96,7 @@ class SurfaceD3D : public SurfaceImpl
SwapChainD3D *mSwapChain;
bool mSwapIntervalDirty;
+ bool mWindowSubclassed; // Indicates whether we successfully subclassed mWindow for WM_RESIZE hooking
NativeWindow mNativeWindow; // Handler for the Window that the surface is created for.
EGLint mWidth;
diff --git a/src/3rdparty/libjpeg.pri b/src/3rdparty/libjpeg.pri
index 62077c99a9..118cc60bcc 100644
--- a/src/3rdparty/libjpeg.pri
+++ b/src/3rdparty/libjpeg.pri
@@ -1,9 +1,3 @@
-wince {
- DEFINES += NO_GETENV
- contains(CE_ARCH,x86):CONFIG -= stl exceptions
- contains(CE_ARCH,x86):CONFIG += exceptions_off
-}
-
winrt: DEFINES += NO_GETENV
#Disable warnings in 3rdparty code due to unused arguments
diff --git a/src/3rdparty/zlib.pri b/src/3rdparty/zlib.pri
index 363461220b..ccddb181e1 100644
--- a/src/3rdparty/zlib.pri
+++ b/src/3rdparty/zlib.pri
@@ -1,4 +1,3 @@
-wince: DEFINES += NO_ERRNO_H
INCLUDEPATH = $$PWD/zlib $$INCLUDEPATH
SOURCES+= \
$$PWD/zlib/adler32.c \
diff --git a/src/angle/patches/0014-ANGLE-Fix-flickering-on-resize-when-D3D9-is-used.patch b/src/angle/patches/0014-ANGLE-Fix-flickering-on-resize-when-D3D9-is-used.patch
new file mode 100644
index 0000000000..e389219976
--- /dev/null
+++ b/src/angle/patches/0014-ANGLE-Fix-flickering-on-resize-when-D3D9-is-used.patch
@@ -0,0 +1,157 @@
+From 0a6fe2a93f451997d01e5e326846e0911d22622b Mon Sep 17 00:00:00 2001
+From: Oliver Wolff <oliver.wolff@qt.io>
+Date: Wed, 31 May 2017 15:50:28 +0200
+Subject: [PATCH] ANGLE: Fix flickering on resize when D3D9 is used
+
+By reverting ANGLE change d3b84ab51db09de238459b0dff2e8420c09aabf3
+we get rid of the flickering that happens on resize when D3D9 is
+used. The issue that was fixed there is not relevant in Qt's
+context so it is safe to revert the change.
+
+Task-number: QTBUG-59893
+Change-Id: I9306314b892612fbd1f7a058a2e606aedc0367bb
+---
+ .../angle/src/libANGLE/renderer/d3d/SurfaceD3D.cpp | 87 ++++++++++++++++++++++
+ .../angle/src/libANGLE/renderer/d3d/SurfaceD3D.h | 4 +
+ 2 files changed, 91 insertions(+)
+
+diff --git a/src/3rdparty/angle/src/libANGLE/renderer/d3d/SurfaceD3D.cpp b/src/3rdparty/angle/src/libANGLE/renderer/d3d/SurfaceD3D.cpp
+index 3d27548..f567f47 100644
+--- a/src/3rdparty/angle/src/libANGLE/renderer/d3d/SurfaceD3D.cpp
++++ b/src/3rdparty/angle/src/libANGLE/renderer/d3d/SurfaceD3D.cpp
+@@ -61,16 +61,19 @@ SurfaceD3D::SurfaceD3D(RendererD3D *renderer,
+ mDepthStencilFormat(config->depthStencilFormat),
+ mSwapChain(nullptr),
+ mSwapIntervalDirty(true),
++ mWindowSubclassed(false),
+ mNativeWindow(window, config, directComposition == EGL_TRUE),
+ mWidth(width),
+ mHeight(height),
+ mSwapInterval(1),
+ mShareHandle(reinterpret_cast<HANDLE *>(shareHandle))
+ {
++ subclassWindow();
+ }
+
+ SurfaceD3D::~SurfaceD3D()
+ {
++ unsubclassWindow();
+ releaseSwapChain();
+ }
+
+@@ -243,6 +246,90 @@ egl::Error SurfaceD3D::swapRect(EGLint x, EGLint y, EGLint width, EGLint height)
+ return egl::Error(EGL_SUCCESS);
+ }
+
++#if !defined(ANGLE_ENABLE_WINDOWS_STORE)
++#define kSurfaceProperty _TEXT("Egl::SurfaceOwner")
++#define kParentWndProc _TEXT("Egl::SurfaceParentWndProc")
++
++static LRESULT CALLBACK SurfaceWindowProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam)
++{
++ if (message == WM_SIZE)
++ {
++ SurfaceD3D* surf = reinterpret_cast<SurfaceD3D*>(GetProp(hwnd, kSurfaceProperty));
++ if(surf)
++ {
++ surf->checkForOutOfDateSwapChain();
++ }
++ }
++ WNDPROC prevWndFunc = reinterpret_cast<WNDPROC >(GetProp(hwnd, kParentWndProc));
++ return CallWindowProc(prevWndFunc, hwnd, message, wparam, lparam);
++}
++#endif
++
++void SurfaceD3D::subclassWindow()
++{
++#if !defined(ANGLE_ENABLE_WINDOWS_STORE)
++ HWND window = mNativeWindow.getNativeWindow();
++ if (!window)
++ {
++ return;
++ }
++
++ DWORD processId;
++ DWORD threadId = GetWindowThreadProcessId(window, &processId);
++ if (processId != GetCurrentProcessId() || threadId != GetCurrentThreadId())
++ {
++ return;
++ }
++
++ SetLastError(0);
++ LONG_PTR oldWndProc = SetWindowLongPtr(window, GWLP_WNDPROC, reinterpret_cast<LONG_PTR>(SurfaceWindowProc));
++ if(oldWndProc == 0 && GetLastError() != ERROR_SUCCESS)
++ {
++ mWindowSubclassed = false;
++ return;
++ }
++
++ SetProp(window, kSurfaceProperty, reinterpret_cast<HANDLE>(this));
++ SetProp(window, kParentWndProc, reinterpret_cast<HANDLE>(oldWndProc));
++ mWindowSubclassed = true;
++#endif
++}
++
++void SurfaceD3D::unsubclassWindow()
++{
++ if (!mWindowSubclassed)
++ {
++ return;
++ }
++
++#if !defined(ANGLE_ENABLE_WINDOWS_STORE)
++ HWND window = mNativeWindow.getNativeWindow();
++ if (!window)
++ {
++ return;
++ }
++
++ // un-subclass
++ LONG_PTR parentWndFunc = reinterpret_cast<LONG_PTR>(GetProp(window, kParentWndProc));
++
++ // Check the windowproc is still SurfaceWindowProc.
++ // If this assert fails, then it is likely the application has subclassed the
++ // hwnd as well and did not unsubclass before destroying its EGL context. The
++ // application should be modified to either subclass before initializing the
++ // EGL context, or to unsubclass before destroying the EGL context.
++ if(parentWndFunc)
++ {
++ LONG_PTR prevWndFunc = SetWindowLongPtr(window, GWLP_WNDPROC, parentWndFunc);
++ UNUSED_ASSERTION_VARIABLE(prevWndFunc);
++ ASSERT(prevWndFunc == reinterpret_cast<LONG_PTR>(SurfaceWindowProc));
++ }
++
++ RemoveProp(window, kSurfaceProperty);
++ RemoveProp(window, kParentWndProc);
++#endif
++ mWindowSubclassed = false;
++}
++
+ bool SurfaceD3D::checkForOutOfDateSwapChain()
+ {
+ RECT client;
+diff --git a/src/3rdparty/angle/src/libANGLE/renderer/d3d/SurfaceD3D.h b/src/3rdparty/angle/src/libANGLE/renderer/d3d/SurfaceD3D.h
+index b925bfc..67d408d 100644
+--- a/src/3rdparty/angle/src/libANGLE/renderer/d3d/SurfaceD3D.h
++++ b/src/3rdparty/angle/src/libANGLE/renderer/d3d/SurfaceD3D.h
+@@ -82,6 +82,9 @@ class SurfaceD3D : public SurfaceImpl
+ egl::Error resetSwapChain(int backbufferWidth, int backbufferHeight);
+ egl::Error resizeSwapChain(int backbufferWidth, int backbufferHeight);
+
++ void subclassWindow();
++ void unsubclassWindow();
++
+ RendererD3D *mRenderer;
+ egl::Display *mDisplay;
+
+@@ -93,6 +96,7 @@ class SurfaceD3D : public SurfaceImpl
+
+ SwapChainD3D *mSwapChain;
+ bool mSwapIntervalDirty;
++ bool mWindowSubclassed; // Indicates whether we successfully subclassed mWindow for WM_RESIZE hooking
+
+ NativeWindow mNativeWindow; // Handler for the Window that the surface is created for.
+ EGLint mWidth;
+--
+2.10.2.windows.1
+
diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp
index 9c05b9650c..0e99daeb56 100644
--- a/src/corelib/global/qglobal.cpp
+++ b/src/corelib/global/qglobal.cpp
@@ -96,6 +96,12 @@
#include "archdetect.cpp"
+#ifdef qFatal
+// the qFatal in this file are just redirections from elsewhere, so
+// don't capture any context again
+# undef qFatal
+#endif
+
QT_BEGIN_NAMESPACE
#if !QT_DEPRECATED_SINCE(5, 0)
@@ -3056,13 +3062,20 @@ QString QSysInfo::machineHostName()
If this macro is used outside a function, the behavior is undefined.
*/
-/*
- The Q_CHECK_PTR macro calls this function if an allocation check
- fails.
+/*!
+ \internal
+ The Q_CHECK_PTR macro calls this function if an allocation check
+ fails.
*/
-void qt_check_pointer(const char *n, int l)
+void qt_check_pointer(const char *n, int l) Q_DECL_NOTHROW
{
- qFatal("In file %s, line %d: Out of memory", n, l);
+ // make separate printing calls so that the first one may flush;
+ // the second one could want to allocate memory (fputs prints a
+ // newline and stderr auto-flushes).
+ fputs("Out of memory", stderr);
+ fprintf(stderr, " in %s, line %d\n", n, l);
+
+ std::terminate();
}
/*
@@ -3092,7 +3105,7 @@ Q_NORETURN void qTerminate() Q_DECL_NOTHROW
*/
void qt_assert(const char *assertion, const char *file, int line) Q_DECL_NOTHROW
{
- qFatal("ASSERT: \"%s\" in file %s, line %d", assertion, file, line);
+ QMessageLogger(file, line, nullptr).fatal("ASSERT: \"%s\" in file %s, line %d", assertion, file, line);
}
/*
@@ -3100,7 +3113,7 @@ void qt_assert(const char *assertion, const char *file, int line) Q_DECL_NOTHROW
*/
void qt_assert_x(const char *where, const char *what, const char *file, int line) Q_DECL_NOTHROW
{
- qFatal("ASSERT failure in %s: \"%s\", file %s, line %d", where, what, file, line);
+ QMessageLogger(file, line, nullptr).fatal("ASSERT failure in %s: \"%s\", file %s, line %d", where, what, file, line);
}
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
index dccbe52ab3..429cd63ab6 100644
--- a/src/corelib/global/qglobal.h
+++ b/src/corelib/global/qglobal.h
@@ -771,7 +771,7 @@ template <> class QStaticAssertFailure<true> {};
#define Q_STATIC_ASSERT_X(Condition, Message) Q_STATIC_ASSERT(Condition)
#endif
-Q_CORE_EXPORT void qt_check_pointer(const char *, int);
+Q_NORETURN Q_CORE_EXPORT void qt_check_pointer(const char *, int) Q_DECL_NOTHROW;
Q_CORE_EXPORT void qBadAlloc();
#ifdef QT_NO_EXCEPTIONS
diff --git a/src/corelib/io/qfilesystementry.cpp b/src/corelib/io/qfilesystementry.cpp
index de4c852068..cbff17d0f1 100644
--- a/src/corelib/io/qfilesystementry.cpp
+++ b/src/corelib/io/qfilesystementry.cpp
@@ -297,23 +297,27 @@ bool QFileSystemEntry::isAbsolute() const
bool QFileSystemEntry::isDriveRoot() const
{
resolveFilePath();
+ return QFileSystemEntry::isDriveRootPath(m_filePath);
+}
+
+bool QFileSystemEntry::isDriveRootPath(const QString &path)
+{
#ifndef Q_OS_WINRT
- return (m_filePath.length() == 3
- && m_filePath.at(0).isLetter() && m_filePath.at(1) == QLatin1Char(':')
- && m_filePath.at(2) == QLatin1Char('/'));
+ return (path.length() == 3
+ && path.at(0).isLetter() && path.at(1) == QLatin1Char(':')
+ && path.at(2) == QLatin1Char('/'));
#else // !Q_OS_WINRT
- return m_filePath == QDir::rootPath();
+ return path == QDir::rootPath();
#endif // !Q_OS_WINRT
}
-#endif
+#endif // Q_OS_WIN
-bool QFileSystemEntry::isRoot() const
+bool QFileSystemEntry::isRootPath(const QString &path)
{
- resolveFilePath();
- if (m_filePath == QLatin1String("/")
+ if (path == QLatin1String("/")
#if defined(Q_OS_WIN)
- || isDriveRoot()
- || isUncRoot(m_filePath)
+ || isDriveRootPath(path)
+ || isUncRoot(path)
#endif
)
return true;
@@ -321,6 +325,12 @@ bool QFileSystemEntry::isRoot() const
return false;
}
+bool QFileSystemEntry::isRoot() const
+{
+ resolveFilePath();
+ return isRootPath(m_filePath);
+}
+
bool QFileSystemEntry::isEmpty() const
{
return m_filePath.isEmpty() && m_nativeFilePath.isEmpty();
diff --git a/src/corelib/io/qfilesystementry_p.h b/src/corelib/io/qfilesystementry_p.h
index 300a375377..700696d09e 100644
--- a/src/corelib/io/qfilesystementry_p.h
+++ b/src/corelib/io/qfilesystementry_p.h
@@ -94,6 +94,7 @@ public:
#if defined(Q_OS_WIN)
bool isDriveRoot() const;
+ static bool isDriveRootPath(const QString &path);
#endif
bool isRoot() const;
@@ -103,6 +104,8 @@ public:
*this = QFileSystemEntry();
}
+ Q_CORE_EXPORT static bool isRootPath(const QString &path);
+
private:
// creates the QString version out of the bytearray version
void resolveFilePath() const;
diff --git a/src/corelib/mimetypes/qmimedatabase.cpp b/src/corelib/mimetypes/qmimedatabase.cpp
index fda9f01643..687f0b3e03 100644
--- a/src/corelib/mimetypes/qmimedatabase.cpp
+++ b/src/corelib/mimetypes/qmimedatabase.cpp
@@ -526,7 +526,7 @@ QMimeType QMimeDatabase::mimeTypeForUrl(const QUrl &url) const
if (scheme.startsWith(QLatin1String("http")) || scheme == QLatin1String("mailto"))
return mimeTypeForName(d->defaultMimeType());
- return mimeTypeForFile(url.path());
+ return mimeTypeForFile(url.path(), MatchExtension);
}
/*!
diff --git a/src/corelib/tools/qfreelist_p.h b/src/corelib/tools/qfreelist_p.h
index a8d1132d06..2f98cf5cc1 100644
--- a/src/corelib/tools/qfreelist_p.h
+++ b/src/corelib/tools/qfreelist_p.h
@@ -207,7 +207,11 @@ public:
template <typename T, typename ConstantsType>
Q_DECL_CONSTEXPR inline QFreeList<T, ConstantsType>::QFreeList()
- : _next(ConstantsType::InitialNextValue)
+ :
+#if defined(Q_COMPILER_CONSTEXPR)
+ _v{}, // uniform initialization required
+#endif
+ _next(ConstantsType::InitialNextValue)
{ }
template <typename T, typename ConstantsType>
diff --git a/src/corelib/tools/qlocale_tools.cpp b/src/corelib/tools/qlocale_tools.cpp
index 762f4f36dc..3e4f37501e 100644
--- a/src/corelib/tools/qlocale_tools.cpp
+++ b/src/corelib/tools/qlocale_tools.cpp
@@ -370,7 +370,7 @@ double asciiToDouble(const char *num, int numLen, bool &ok, int &processed,
// if a digit before any 'e' is not 0, then a non-zero number was intended.
ok = false;
return 0.0;
- } else if (num[i] == 'e') {
+ } else if (num[i] == 'e' || num[i] == 'E') {
break;
}
}
diff --git a/src/dbus/dbus.pro b/src/dbus/dbus.pro
index 3da35b1741..ce799e0951 100644
--- a/src/dbus/dbus.pro
+++ b/src/dbus/dbus.pro
@@ -9,8 +9,8 @@ qtConfig(dbus-linked) {
}
win32 {
- wince: LIBS_PRIVATE += -lws2
- else:LIBS_PRIVATE += -lws2_32 \
+ LIBS_PRIVATE += \
+ -lws2_32 \
-ladvapi32 \
-lnetapi32 \
-luser32
diff --git a/src/gui/configure.json b/src/gui/configure.json
index 5e85d341dd..62bf02bdbb 100644
--- a/src/gui/configure.json
+++ b/src/gui/configure.json
@@ -271,7 +271,7 @@
"label": "XCB Xlib",
"test": "qpa/xcb-xlib",
"sources": [
- { "type": "pkgConfig", "args": "X11-xcb x11 xcb" },
+ { "type": "pkgConfig", "args": "x11-xcb x11 xcb" },
"-lxcb -lX11 -lX11-xcb"
]
},
@@ -457,7 +457,7 @@
"features": {
"accessibility-atspi-bridge": {
"label": "ATSPI Bridge",
- "condition": "features.accessibility && features.xcb && features.dbus && config.atspi",
+ "condition": "features.accessibility && features.xcb && features.dbus && libs.atspi",
"output": [ "privateFeature", "feature" ]
},
"angle": {
diff --git a/src/gui/image/qbmphandler.cpp b/src/gui/image/qbmphandler.cpp
index 324fe01414..4350a5c192 100644
--- a/src/gui/image/qbmphandler.cpp
+++ b/src/gui/image/qbmphandler.cpp
@@ -114,6 +114,15 @@ static QDataStream &operator>>(QDataStream &s, BMP_INFOHDR &bi)
s >> bi.biCompression >> bi.biSizeImage;
s >> bi.biXPelsPerMeter >> bi.biYPelsPerMeter;
s >> bi.biClrUsed >> bi.biClrImportant;
+ if (bi.biSize >= BMP_WIN4) {
+ s >> bi.biRedMask >> bi.biGreenMask >> bi.biBlueMask >> bi.biAlphaMask;
+ s >> bi.biCSType;
+ for (int i = 0; i < 9; ++i)
+ s >> bi.biEndpoints[i];
+ s >> bi.biGammaRed >> bi.biGammaGreen >> bi.biGammaBlue;
+ if (bi.biSize == BMP_WIN5)
+ s >> bi.biIntent >> bi.biProfileData >> bi.biProfileSize >> bi.biReserved;
+ }
}
else { // probably old Windows format
qint16 w, h;
@@ -219,53 +228,20 @@ static bool read_dib_body(QDataStream &s, const BMP_INFOHDR &bi, qint64 offset,
int alpha_scale = 0;
if (!d->isSequential())
- d->seek(startpos + BMP_FILEHDR_SIZE + (bi.biSize >= BMP_WIN4 ? BMP_WIN : bi.biSize)); // goto start of colormap or masks
+ d->seek(startpos + BMP_FILEHDR_SIZE + bi.biSize); // goto start of colormap or masks
- if (bi.biSize >= BMP_WIN4 || (comp == BMP_BITFIELDS && (nbits == 16 || nbits == 32))) {
+ if (bi.biSize >= BMP_WIN4) {
+ red_mask = bi.biRedMask;
+ green_mask = bi.biGreenMask;
+ blue_mask = bi.biBlueMask;
+ alpha_mask = bi.biAlphaMask;
+ } else if (comp == BMP_BITFIELDS && (nbits == 16 || nbits == 32)) {
if (d->read((char *)&red_mask, sizeof(red_mask)) != sizeof(red_mask))
return false;
if (d->read((char *)&green_mask, sizeof(green_mask)) != sizeof(green_mask))
return false;
if (d->read((char *)&blue_mask, sizeof(blue_mask)) != sizeof(blue_mask))
return false;
-
- // Read BMP v4+ header
- if (bi.biSize >= BMP_WIN4) {
- int CSType = 0;
- int gamma_red = 0;
- int gamma_green = 0;
- int gamma_blue = 0;
- int endpoints[9];
-
- if (d->read((char *)&alpha_mask, sizeof(alpha_mask)) != sizeof(alpha_mask))
- return false;
- if (d->read((char *)&CSType, sizeof(CSType)) != sizeof(CSType))
- return false;
- if (d->read((char *)&endpoints, sizeof(endpoints)) != sizeof(endpoints))
- return false;
- if (d->read((char *)&gamma_red, sizeof(gamma_red)) != sizeof(gamma_red))
- return false;
- if (d->read((char *)&gamma_green, sizeof(gamma_green)) != sizeof(gamma_green))
- return false;
- if (d->read((char *)&gamma_blue, sizeof(gamma_blue)) != sizeof(gamma_blue))
- return false;
-
- if (bi.biSize == BMP_WIN5) {
- qint32 intent = 0;
- qint32 profileData = 0;
- qint32 profileSize = 0;
- qint32 reserved = 0;
-
- if (d->read((char *)&intent, sizeof(intent)) != sizeof(intent))
- return false;
- if (d->read((char *)&profileData, sizeof(profileData)) != sizeof(profileData))
- return false;
- if (d->read((char *)&profileSize, sizeof(profileSize)) != sizeof(profileSize))
- return false;
- if (d->read((char *)&reserved, sizeof(reserved)) != sizeof(reserved) || reserved != 0)
- return false;
- }
- }
}
bool transp = (comp == BMP_BITFIELDS) && alpha_mask;
@@ -876,7 +852,10 @@ QVariant QBmpHandler::option(ImageOption option) const
case 32:
case 24:
case 16:
- format = QImage::Format_RGB32;
+ if (infoHeader.biCompression == BMP_BITFIELDS && infoHeader.biSize >= BMP_WIN4 && infoHeader.biAlphaMask)
+ format = QImage::Format_ARGB32;
+ else
+ format = QImage::Format_RGB32;
break;
case 8:
case 4:
diff --git a/src/gui/image/qbmphandler_p.h b/src/gui/image/qbmphandler_p.h
index 3e1fc3d511..56b39dd0f0 100644
--- a/src/gui/image/qbmphandler_p.h
+++ b/src/gui/image/qbmphandler_p.h
@@ -78,6 +78,21 @@ struct BMP_INFOHDR { // BMP information header
qint32 biYPelsPerMeter; // vertical resolution
qint32 biClrUsed; // number of colors used
qint32 biClrImportant; // number of important colors
+ // V4:
+ quint32 biRedMask;
+ quint32 biGreenMask;
+ quint32 biBlueMask;
+ quint32 biAlphaMask;
+ qint32 biCSType;
+ qint32 biEndpoints[9];
+ qint32 biGammaRed;
+ qint32 biGammaGreen;
+ qint32 biGammaBlue;
+ // V5:
+ qint32 biIntent;
+ qint32 biProfileData;
+ qint32 biProfileSize;
+ qint32 biReserved;
};
// BMP-Handler, which is also able to read and write the DIB
diff --git a/src/network/ssl/qsslsocket_mac.cpp b/src/network/ssl/qsslsocket_mac.cpp
index 4216e2a16a..68c8ccff89 100644
--- a/src/network/ssl/qsslsocket_mac.cpp
+++ b/src/network/ssl/qsslsocket_mac.cpp
@@ -929,7 +929,7 @@ bool QSslSocketBackendPrivate::setSessionCertificate(QString &errorDescription,
#endif
QCFType<CFDictionaryRef> options = CFDictionaryCreate(nullptr, keys, values, nKeys,
nullptr, nullptr);
- CFArrayRef items = nullptr;
+ QCFType<CFArrayRef> items;
OSStatus err = SecPKCS12Import(pkcs12, options, &items);
if (err != noErr) {
#ifdef QSSLSOCKET_DEBUG
@@ -970,7 +970,7 @@ bool QSslSocketBackendPrivate::setSessionCertificate(QString &errorDescription,
CFArrayAppendValue(certs, identity);
- QCFType<CFArrayRef> chain((CFArrayRef)CFDictionaryGetValue(import, kSecImportItemCertChain));
+ CFArrayRef chain = (CFArrayRef)CFDictionaryGetValue(import, kSecImportItemCertChain);
if (chain) {
for (CFIndex i = 1, e = CFArrayGetCount(chain); i < e; ++i)
CFArrayAppendValue(certs, CFArrayGetValueAtIndex(chain, i));
diff --git a/src/plugins/platforms/android/androidjniaccessibility.cpp b/src/plugins/platforms/android/androidjniaccessibility.cpp
index eeaecd53b4..06624415d3 100644
--- a/src/plugins/platforms/android/androidjniaccessibility.cpp
+++ b/src/plugins/platforms/android/androidjniaccessibility.cpp
@@ -80,6 +80,7 @@ namespace QtAndroidAccessibility
static void setActive(JNIEnv */*env*/, jobject /*thiz*/, jboolean active)
{
+ QMutexLocker lock(QtAndroid::platformInterfaceMutex());
QAndroidPlatformIntegration *platformIntegration = QtAndroid::androidPlatformIntegration();
if (platformIntegration)
platformIntegration->accessibility()->setActive(active);
diff --git a/src/plugins/platforms/android/androidjniinput.cpp b/src/plugins/platforms/android/androidjniinput.cpp
index 75cffe3854..dabab553c2 100644
--- a/src/plugins/platforms/android/androidjniinput.cpp
+++ b/src/plugins/platforms/android/androidjniinput.cpp
@@ -273,6 +273,7 @@ namespace QtAndroidInput
if (m_touchPoints.isEmpty())
return;
+ QMutexLocker lock(QtAndroid::platformInterfaceMutex());
QAndroidPlatformIntegration *platformIntegration = QtAndroid::androidPlatformIntegration();
if (!platformIntegration)
return;
diff --git a/src/plugins/platforms/android/androidjnimain.cpp b/src/plugins/platforms/android/androidjnimain.cpp
index 4a24f3fb47..8b0b18a846 100644
--- a/src/plugins/platforms/android/androidjnimain.cpp
+++ b/src/plugins/platforms/android/androidjnimain.cpp
@@ -83,7 +83,7 @@ static jmethodID m_setSurfaceGeometryMethodID = nullptr;
static jmethodID m_destroySurfaceMethodID = nullptr;
static int m_pendingApplicationState = -1;
-static QBasicMutex m_pendingAppStateMtx;
+static QBasicMutex m_platformMutex;
static jclass m_bitmapClass = nullptr;
static jmethodID m_createBitmapMethodID = nullptr;
@@ -104,7 +104,7 @@ static sem_t m_exitSemaphore, m_terminateSemaphore;
QHash<int, AndroidSurfaceClient *> m_surfaces;
-static QMutex m_surfacesMutex;
+static QBasicMutex m_surfacesMutex;
static int m_surfaceId = 1;
@@ -123,28 +123,26 @@ static const char m_qtTag[] = "Qt";
static const char m_classErrorMsg[] = "Can't find class \"%s\"";
static const char m_methodErrorMsg[] = "Can't find method \"%s%s\"";
-static void flushPendingApplicationState();
-
namespace QtAndroid
{
+ QBasicMutex *platformInterfaceMutex()
+ {
+ return &m_platformMutex;
+ }
+
void setAndroidPlatformIntegration(QAndroidPlatformIntegration *androidPlatformIntegration)
{
- QMutexLocker lock(&m_surfacesMutex);
m_androidPlatformIntegration = androidPlatformIntegration;
// flush the pending state if necessary.
- if (m_androidPlatformIntegration) {
- flushPendingApplicationState();
- m_androidPlatformIntegration->flushPendingUpdates();
- } else {
- QMutexLocker locker(&m_pendingAppStateMtx);
- m_pendingApplicationState = -1;
- }
+ if (m_androidPlatformIntegration && (m_pendingApplicationState != -1))
+ QWindowSystemInterface::handleApplicationStateChanged(Qt::ApplicationState(m_pendingApplicationState));
+
+ m_pendingApplicationState = -1;
}
QAndroidPlatformIntegration *androidPlatformIntegration()
{
- QMutexLocker locker(&m_surfacesMutex);
return m_androidPlatformIntegration;
}
@@ -443,17 +441,6 @@ namespace QtAndroid
} // namespace QtAndroid
-// Force an update of the pending application state (state set before the platform plugin was created)
-static void flushPendingApplicationState()
-{
- QMutexLocker locker(&m_pendingAppStateMtx);
- if (m_pendingApplicationState == -1)
- return;
-
- QWindowSystemInterface::handleApplicationStateChanged(Qt::ApplicationState(m_pendingApplicationState));
- m_pendingApplicationState = -1;
-}
-
static jboolean startQtAndroidPlugin(JNIEnv* /*env*/, jobject /*object*//*, jobject applicationAssetManager*/)
{
m_androidPlatformIntegration = nullptr;
@@ -628,7 +615,7 @@ static void setDisplayMetrics(JNIEnv */*env*/, jclass /*clazz*/,
m_scaledDensity = scaledDensity;
m_density = density;
- QMutexLocker lock(&m_surfacesMutex);
+ QMutexLocker lock(&m_platformMutex);
if (!m_androidPlatformIntegration) {
QAndroidPlatformIntegration::setDefaultDisplayMetrics(desktopWidthPixels,
desktopHeightPixels,
@@ -670,18 +657,22 @@ static void updateWindow(JNIEnv */*env*/, jobject /*thiz*/)
static void updateApplicationState(JNIEnv */*env*/, jobject /*thiz*/, jint state)
{
- if (!m_main || !QtAndroid::androidPlatformIntegration()) {
- QMutexLocker locker(&m_pendingAppStateMtx);
- m_pendingApplicationState = Qt::ApplicationState(state);
+ QMutexLocker lock(&m_platformMutex);
+ if (!m_main || !m_androidPlatformIntegration) {
+ m_pendingApplicationState = state;
return;
}
- flushPendingApplicationState();
-
+ // We're about to call user code from the Android thread, since we don't know
+ //the side effects we'll unlock first!
+ lock.unlock();
if (state == Qt::ApplicationActive)
QtAndroidPrivate::handleResume();
else if (state == Qt::ApplicationInactive)
QtAndroidPrivate::handlePause();
+ lock.relock();
+ if (!m_androidPlatformIntegration)
+ return;
if (state <= Qt::ApplicationInactive) {
// NOTE: sometimes we will receive two consecutive suspended notifications,
@@ -729,6 +720,7 @@ static void handleOrientationChanged(JNIEnv */*env*/, jobject /*thiz*/, jint new
Qt::ScreenOrientation native = orientations[nativeOrientation - 1];
QAndroidPlatformIntegration::setScreenOrientation(screenOrientation, native);
+ QMutexLocker lock(&m_platformMutex);
if (m_androidPlatformIntegration) {
QPlatformScreen *screen = m_androidPlatformIntegration->screen();
QWindowSystemInterface::handleScreenOrientationChange(screen->screen(),
diff --git a/src/plugins/platforms/android/androidjnimain.h b/src/plugins/platforms/android/androidjnimain.h
index 170596082d..08f1d50fe3 100644
--- a/src/plugins/platforms/android/androidjnimain.h
+++ b/src/plugins/platforms/android/androidjnimain.h
@@ -58,9 +58,11 @@ class QWidget;
class QString;
class QWindow;
class AndroidSurfaceClient;
+class QBasicMutex;
namespace QtAndroid
{
+ QBasicMutex *platformInterfaceMutex();
QAndroidPlatformIntegration *androidPlatformIntegration();
void setAndroidPlatformIntegration(QAndroidPlatformIntegration *androidPlatformIntegration);
void setQtThread(QThread *thread);
diff --git a/src/plugins/platforms/android/qandroidplatformintegration.cpp b/src/plugins/platforms/android/qandroidplatformintegration.cpp
index 3088546148..763b294660 100644
--- a/src/plugins/platforms/android/qandroidplatformintegration.cpp
+++ b/src/plugins/platforms/android/qandroidplatformintegration.cpp
@@ -143,8 +143,13 @@ void *QAndroidPlatformNativeInterface::nativeResourceForWindow(const QByteArray
void QAndroidPlatformNativeInterface::customEvent(QEvent *event)
{
- if (event->type() == QEvent::User)
- QtAndroid::setAndroidPlatformIntegration(static_cast<QAndroidPlatformIntegration *>(QGuiApplicationPrivate::platformIntegration()));
+ if (event->type() != QEvent::User)
+ return;
+
+ QMutexLocker lock(QtAndroid::platformInterfaceMutex());
+ QAndroidPlatformIntegration *api = static_cast<QAndroidPlatformIntegration *>(QGuiApplicationPrivate::platformIntegration());
+ QtAndroid::setAndroidPlatformIntegration(api);
+ api->flushPendingUpdates();
}
QAndroidPlatformIntegration::QAndroidPlatformIntegration(const QStringList &paramList)
diff --git a/src/plugins/platforms/cocoa/qcocoamenubar.mm b/src/plugins/platforms/cocoa/qcocoamenubar.mm
index 82c405baa6..4cdf004dd1 100644
--- a/src/plugins/platforms/cocoa/qcocoamenubar.mm
+++ b/src/plugins/platforms/cocoa/qcocoamenubar.mm
@@ -303,7 +303,23 @@ void QCocoaMenuBar::resetKnownMenuItemsToQt()
// Undo the effect of redirectKnownMenuItemsToFirstResponder():
// set the menu items' actions to itemFired and their targets to
// the QCocoaMenuDelegate.
- updateMenuBarImmediately();
+ foreach (QCocoaMenuBar *mb, static_menubars) {
+ foreach (QCocoaMenu *m, mb->m_menus) {
+ foreach (QCocoaMenuItem *i, m->items()) {
+ switch (i->effectiveRole()) {
+ case QPlatformMenuItem::CutRole:
+ case QPlatformMenuItem::CopyRole:
+ case QPlatformMenuItem::PasteRole:
+ case QPlatformMenuItem::SelectAllRole:
+ [i->nsItem() setTarget:m->nsMenu().delegate];
+ [i->nsItem() setAction:@selector(itemFired:)];
+ break;
+ default:
+ break;
+ }
+ }
+ }
+ }
}
void QCocoaMenuBar::updateMenuBarImmediately()
diff --git a/src/plugins/platforms/windows/qwindowscontext.cpp b/src/plugins/platforms/windows/qwindowscontext.cpp
index ef893f8a63..49c11ba2b7 100644
--- a/src/plugins/platforms/windows/qwindowscontext.cpp
+++ b/src/plugins/platforms/windows/qwindowscontext.cpp
@@ -1118,7 +1118,7 @@ bool QWindowsContext::windowsProc(HWND hwnd, UINT message,
#endif
} break;
case QtWindows::DpiChangedEvent: {
- if (GetWindowLongPtr(hwnd, GWL_STYLE) & WS_DLGFRAME)
+ if (platformWindow->window()->flags().testFlag(Qt::MSWindowsFixedSizeDialogHint))
return false; // Fixed-size window should not be resized
platformWindow->setFlag(QWindowsWindow::WithinDpiChanged);
diff --git a/src/plugins/platforms/xcb/gl_integrations/gl_integrations_plugin_base.pri b/src/plugins/platforms/xcb/gl_integrations/gl_integrations_plugin_base.pri
index e6e352a21d..df471f1105 100644
--- a/src/plugins/platforms/xcb/gl_integrations/gl_integrations_plugin_base.pri
+++ b/src/plugins/platforms/xcb/gl_integrations/gl_integrations_plugin_base.pri
@@ -5,19 +5,10 @@ INCLUDEPATH += $$PWD/../
load(qt_build_paths)
-# build with session management support
-qtConfig(xcb-sm) {
- DEFINES += XCB_USE_SM
-}
-
!qtConfig(system-xcb) {
- DEFINES += XCB_USE_RENDER
QMAKE_USE += xcb-static xcb
} else {
qtConfig(xkb): QMAKE_USE += xcb_xkb
- # to support custom cursors with depth > 1
- qtConfig(xcb-render) {
- DEFINES += XCB_USE_RENDER
- }
+ qtConfig(xcb-render): QMAKE_USE += xcb_render
QMAKE_USE += xcb_syslibs
}
diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxintegration.cpp b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxintegration.cpp
index 40103a42d7..377066df61 100644
--- a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxintegration.cpp
+++ b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxintegration.cpp
@@ -39,7 +39,7 @@
#include "qxcbglxintegration.h"
-#if defined(XCB_HAS_XCB_GLX)
+#if QT_CONFIG(xcb_glx)
#include <xcb/glx.h>
#endif
@@ -56,37 +56,34 @@
QT_BEGIN_NAMESPACE
-#if defined(XCB_HAS_XCB_GLX) && XCB_GLX_MAJOR_VERSION == 1 && XCB_GLX_MINOR_VERSION < 4
-
-#define XCB_GLX_BUFFER_SWAP_COMPLETE 1
-
-typedef struct xcb_glx_buffer_swap_complete_event_t {
- uint8_t response_type;
- uint8_t pad0;
- uint16_t sequence;
- uint16_t event_type;
- uint8_t pad1[2];
- xcb_glx_drawable_t drawable;
- uint32_t ust_hi;
- uint32_t ust_lo;
- uint32_t msc_hi;
- uint32_t msc_lo;
- uint32_t sbc;
-} xcb_glx_buffer_swap_complete_event_t;
-#endif
-
-#if defined(XCB_USE_GLX)
-typedef struct {
- int type;
- unsigned long serial; /* # of last request processed by server */
- Bool send_event; /* true if this came from a SendEvent request */
- Display *display; /* Display the event was read from */
- Drawable drawable; /* drawable on which event was requested in event mask */
- int event_type;
- int64_t ust;
- int64_t msc;
- int64_t sbc;
-} QGLXBufferSwapComplete;
+#if QT_CONFIG(xcb_glx)
+ #if XCB_GLX_MAJOR_VERSION == 1 && XCB_GLX_MINOR_VERSION < 4
+ #define XCB_GLX_BUFFER_SWAP_COMPLETE 1
+ typedef struct xcb_glx_buffer_swap_complete_event_t {
+ uint8_t response_type;
+ uint8_t pad0;
+ uint16_t sequence;
+ uint16_t event_type;
+ uint8_t pad1[2];
+ xcb_glx_drawable_t drawable;
+ uint32_t ust_hi;
+ uint32_t ust_lo;
+ uint32_t msc_hi;
+ uint32_t msc_lo;
+ uint32_t sbc;
+ } xcb_glx_buffer_swap_complete_event_t;
+ #endif
+ typedef struct {
+ int type;
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Drawable drawable; /* drawable on which event was requested in event mask */
+ int event_type;
+ int64_t ust;
+ int64_t msc;
+ int64_t sbc;
+ } QGLXBufferSwapComplete;
#endif
QXcbGlxIntegration::QXcbGlxIntegration()
@@ -103,7 +100,7 @@ QXcbGlxIntegration::~QXcbGlxIntegration()
bool QXcbGlxIntegration::initialize(QXcbConnection *connection)
{
m_connection = connection;
-#ifdef XCB_HAS_XCB_GLX
+#if QT_CONFIG(xcb_glx)
const xcb_query_extension_reply_t *reply = xcb_get_extension_data(m_connection->xcb_connection(), &xcb_glx_id);
if (!reply || !reply->present)
@@ -140,7 +137,7 @@ bool QXcbGlxIntegration::handleXcbEvent(xcb_generic_event_t *event, uint respons
XEvent dummy;
event->sequence = LastKnownRequestProcessed(xdisplay);
if (proc(xdisplay, &dummy, (xEvent*)event)) {
-#ifdef XCB_HAS_XCB_GLX
+#if QT_CONFIG(xcb_glx)
// DRI2 clients don't receive GLXBufferSwapComplete events on the wire.
// Instead the GLX event is synthesized from the DRI2BufferSwapComplete event
// by DRI2WireToEvent(). For an application to be able to see the event
diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/xcb_glx.pro b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/xcb_glx.pro
index 5af6172301..9d537b18f3 100644
--- a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/xcb_glx.pro
+++ b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/xcb_glx.pro
@@ -3,14 +3,9 @@ TARGET = qxcb-glx-integration
include(../gl_integrations_plugin_base.pri)
QT += glx_support-private
-#should be removed from the sources
-DEFINES += XCB_USE_GLX
DEFINES += QT_NO_FOREACH
-qtConfig(xcb-glx) {
- DEFINES += XCB_HAS_XCB_GLX
- QMAKE_USE += xcb_glx
-}
+qtConfig(xcb-glx): QMAKE_USE += xcb_glx
!static:qtConfig(dlopen): QMAKE_USE += libdl
diff --git a/src/plugins/platforms/xcb/qxcbconnection.cpp b/src/plugins/platforms/xcb/qxcbconnection.cpp
index f0c1659b8e..92b8261bae 100644
--- a/src/plugins/platforms/xcb/qxcbconnection.cpp
+++ b/src/plugins/platforms/xcb/qxcbconnection.cpp
@@ -80,7 +80,7 @@
#include <X11/extensions/XI2proto.h>
#endif
-#ifdef XCB_USE_RENDER
+#if QT_CONFIG(xcb_render)
#include <xcb/render.h>
#endif
@@ -566,7 +566,7 @@ QXcbConnection::QXcbConnection(QXcbNativeInterface *nativeInterface, bool canGra
#if QT_CONFIG(xkb)
&xcb_xkb_id,
#endif
-#ifdef XCB_USE_RENDER
+#if QT_CONFIG(xcb_render)
&xcb_render_id,
#endif
0
@@ -1467,7 +1467,7 @@ xcb_window_t QXcbConnection::clientLeader()
1,
&m_clientLeader);
-#if !defined(QT_NO_SESSIONMANAGER) && defined(XCB_USE_SM)
+#if QT_CONFIG(xcb_sm)
// If we are session managed, inform the window manager about it
QByteArray session = qGuiApp->sessionId().toLatin1();
if (!session.isEmpty()) {
@@ -1988,7 +1988,7 @@ void QXcbConnection::initializeXFixes()
void QXcbConnection::initializeXRender()
{
-#ifdef XCB_USE_RENDER
+#if QT_CONFIG(xcb_render)
const xcb_query_extension_reply_t *reply = xcb_get_extension_data(m_connection, &xcb_render_id);
if (!reply || !reply->present)
return;
diff --git a/src/plugins/platforms/xcb/qxcbimage.cpp b/src/plugins/platforms/xcb/qxcbimage.cpp
index 67a959d8a4..f3dfa1916b 100644
--- a/src/plugins/platforms/xcb/qxcbimage.cpp
+++ b/src/plugins/platforms/xcb/qxcbimage.cpp
@@ -41,7 +41,7 @@
#include <QtGui/QColor>
#include <QtGui/private/qimage_p.h>
#include <QtGui/private/qdrawhelper_p.h>
-#ifdef XCB_USE_RENDER
+#if QT_CONFIG(xcb_render)
#include <xcb/render.h>
// 'template' is used as a function argument name in xcb_renderutil.h
#define template template_param
@@ -193,7 +193,7 @@ xcb_pixmap_t qt_xcb_XPixmapFromBitmap(QXcbScreen *screen, const QImage &image)
xcb_cursor_t qt_xcb_createCursorXRender(QXcbScreen *screen, const QImage &image,
const QPoint &spot)
{
-#ifdef XCB_USE_RENDER
+#if QT_CONFIG(xcb_render)
xcb_connection_t *conn = screen->xcb_connection();
const int w = image.width();
const int h = image.height();
diff --git a/src/plugins/platforms/xcb/qxcbintegration.cpp b/src/plugins/platforms/xcb/qxcbintegration.cpp
index 4f78f806be..8ba6834565 100644
--- a/src/plugins/platforms/xcb/qxcbintegration.cpp
+++ b/src/plugins/platforms/xcb/qxcbintegration.cpp
@@ -495,7 +495,7 @@ QByteArray QXcbIntegration::wmClass() const
return m_wmClass;
}
-#if !defined(QT_NO_SESSIONMANAGER) && defined(XCB_USE_SM)
+#if QT_CONFIG(xcb_sm)
QPlatformSessionManager *QXcbIntegration::createPlatformSessionManager(const QString &id, const QString &key) const
{
return new QXcbSessionManager(id, key);
diff --git a/src/plugins/platforms/xcb/qxcbintegration.h b/src/plugins/platforms/xcb/qxcbintegration.h
index 561aa9dce6..186b6c5ddd 100644
--- a/src/plugins/platforms/xcb/qxcbintegration.h
+++ b/src/plugins/platforms/xcb/qxcbintegration.h
@@ -40,6 +40,7 @@
#ifndef QXCBINTEGRATION_H
#define QXCBINTEGRATION_H
+#include <QtGui/private/qtguiglobal_p.h>
#include <qpa/qplatformintegration.h>
#include <qpa/qplatformscreen.h>
@@ -106,7 +107,7 @@ public:
QByteArray wmClass() const;
-#if !defined(QT_NO_SESSIONMANAGER) && defined(XCB_USE_SM)
+#if QT_CONFIG(xcb_sm)
QPlatformSessionManager *createPlatformSessionManager(const QString &id, const QString &key) const override;
#endif
diff --git a/src/plugins/platforms/xcb/xcb_qpa_lib.pro b/src/plugins/platforms/xcb/xcb_qpa_lib.pro
index ba748ea14d..6956d04083 100644
--- a/src/plugins/platforms/xcb/xcb_qpa_lib.pro
+++ b/src/plugins/platforms/xcb/xcb_qpa_lib.pro
@@ -61,9 +61,7 @@ qtConfig(xcb-xlib) {
}
}
-# build with session management support
qtConfig(xcb-sm) {
- DEFINES += XCB_USE_SM
QMAKE_USE += x11sm
SOURCES += qxcbsessionmanager.cpp
HEADERS += qxcbsessionmanager.h
@@ -83,16 +81,11 @@ qtConfig(vulkan) {
}
!qtConfig(system-xcb) {
- DEFINES += XCB_USE_RENDER
QMAKE_USE += xcb-static xcb
} else {
LIBS += -lxcb-xinerama ### there is no configure test for this!
qtConfig(xkb): QMAKE_USE += xcb_xkb
- # to support custom cursors with depth > 1
- qtConfig(xcb-render) {
- DEFINES += XCB_USE_RENDER
- QMAKE_USE += xcb_render
- }
+ qtConfig(xcb-render): QMAKE_USE += xcb_render
QMAKE_USE += xcb_syslibs
}
diff --git a/src/plugins/plugins.pro b/src/plugins/plugins.pro
index 710a6c94c1..cd4d301194 100644
--- a/src/plugins/plugins.pro
+++ b/src/plugins/plugins.pro
@@ -10,5 +10,5 @@ qtHaveModule(gui) {
}
qtHaveModule(widgets): SUBDIRS += styles
-!winrt:!wince:qtHaveModule(printsupport): \
+!winrt:qtHaveModule(printsupport): \
SUBDIRS += printsupport
diff --git a/src/widgets/doc/images/fusion-checkbox.png b/src/widgets/doc/images/fusion-checkbox.png
deleted file mode 100644
index 669c3f8e23..0000000000
--- a/src/widgets/doc/images/fusion-checkbox.png
+++ /dev/null
Binary files differ
diff --git a/src/widgets/doc/images/fusion-dateedit.png b/src/widgets/doc/images/fusion-dateedit.png
deleted file mode 100644
index b8ca972eaa..0000000000
--- a/src/widgets/doc/images/fusion-dateedit.png
+++ /dev/null
Binary files differ
diff --git a/src/widgets/doc/images/fusion-datetimeedit.png b/src/widgets/doc/images/fusion-datetimeedit.png
deleted file mode 100644
index 48b6e320d5..0000000000
--- a/src/widgets/doc/images/fusion-datetimeedit.png
+++ /dev/null
Binary files differ
diff --git a/src/widgets/doc/images/fusion-dial.png b/src/widgets/doc/images/fusion-dial.png
deleted file mode 100644
index cdda89e02a..0000000000
--- a/src/widgets/doc/images/fusion-dial.png
+++ /dev/null
Binary files differ
diff --git a/src/widgets/doc/images/fusion-doublespinbox.png b/src/widgets/doc/images/fusion-doublespinbox.png
deleted file mode 100644
index 4c7548c9be..0000000000
--- a/src/widgets/doc/images/fusion-doublespinbox.png
+++ /dev/null
Binary files differ
diff --git a/src/widgets/doc/images/fusion-fontcombobox.png b/src/widgets/doc/images/fusion-fontcombobox.png
deleted file mode 100644
index 96654b1bfa..0000000000
--- a/src/widgets/doc/images/fusion-fontcombobox.png
+++ /dev/null
Binary files differ
diff --git a/src/widgets/doc/images/fusion-frame.png b/src/widgets/doc/images/fusion-frame.png
deleted file mode 100644
index 09915bba0c..0000000000
--- a/src/widgets/doc/images/fusion-frame.png
+++ /dev/null
Binary files differ
diff --git a/src/widgets/doc/images/fusion-groupbox.png b/src/widgets/doc/images/fusion-groupbox.png
deleted file mode 100644
index de2730b2e6..0000000000
--- a/src/widgets/doc/images/fusion-groupbox.png
+++ /dev/null
Binary files differ
diff --git a/src/widgets/doc/images/fusion-horizontalscrollbar.png b/src/widgets/doc/images/fusion-horizontalscrollbar.png
deleted file mode 100644
index d890b1ce84..0000000000
--- a/src/widgets/doc/images/fusion-horizontalscrollbar.png
+++ /dev/null
Binary files differ
diff --git a/src/widgets/doc/images/fusion-lcdnumber.png b/src/widgets/doc/images/fusion-lcdnumber.png
deleted file mode 100644
index 55ba6d2926..0000000000
--- a/src/widgets/doc/images/fusion-lcdnumber.png
+++ /dev/null
Binary files differ
diff --git a/src/widgets/doc/images/fusion-lineedit.png b/src/widgets/doc/images/fusion-lineedit.png
deleted file mode 100644
index 5fd452db55..0000000000
--- a/src/widgets/doc/images/fusion-lineedit.png
+++ /dev/null
Binary files differ
diff --git a/src/widgets/doc/images/fusion-listview.png b/src/widgets/doc/images/fusion-listview.png
deleted file mode 100644
index 3fcfbce6c4..0000000000
--- a/src/widgets/doc/images/fusion-listview.png
+++ /dev/null
Binary files differ
diff --git a/src/widgets/doc/images/fusion-progressbar.png b/src/widgets/doc/images/fusion-progressbar.png
deleted file mode 100644
index 4cd61eb3c2..0000000000
--- a/src/widgets/doc/images/fusion-progressbar.png
+++ /dev/null
Binary files differ
diff --git a/src/widgets/doc/images/fusion-pushbutton.png b/src/widgets/doc/images/fusion-pushbutton.png
deleted file mode 100644
index 0e5aa1aad3..0000000000
--- a/src/widgets/doc/images/fusion-pushbutton.png
+++ /dev/null
Binary files differ
diff --git a/src/widgets/doc/images/fusion-radiobutton.png b/src/widgets/doc/images/fusion-radiobutton.png
deleted file mode 100644
index 0b7097f2ef..0000000000
--- a/src/widgets/doc/images/fusion-radiobutton.png
+++ /dev/null
Binary files differ
diff --git a/src/widgets/doc/images/fusion-slider.png b/src/widgets/doc/images/fusion-slider.png
deleted file mode 100644
index e5e3d20cf5..0000000000
--- a/src/widgets/doc/images/fusion-slider.png
+++ /dev/null
Binary files differ
diff --git a/src/widgets/doc/images/fusion-spinbox.png b/src/widgets/doc/images/fusion-spinbox.png
deleted file mode 100644
index 0f8d75d372..0000000000
--- a/src/widgets/doc/images/fusion-spinbox.png
+++ /dev/null
Binary files differ
diff --git a/src/widgets/doc/images/fusion-tableview.png b/src/widgets/doc/images/fusion-tableview.png
deleted file mode 100644
index 8aedefccd2..0000000000
--- a/src/widgets/doc/images/fusion-tableview.png
+++ /dev/null
Binary files differ
diff --git a/src/widgets/doc/images/fusion-textedit.png b/src/widgets/doc/images/fusion-textedit.png
deleted file mode 100644
index 73d92feb15..0000000000
--- a/src/widgets/doc/images/fusion-textedit.png
+++ /dev/null
Binary files differ
diff --git a/src/widgets/doc/images/fusion-timeedit.png b/src/widgets/doc/images/fusion-timeedit.png
deleted file mode 100644
index d38a139bc2..0000000000
--- a/src/widgets/doc/images/fusion-timeedit.png
+++ /dev/null
Binary files differ
diff --git a/src/widgets/doc/images/fusion-toolbox.png b/src/widgets/doc/images/fusion-toolbox.png
deleted file mode 100644
index fc4831cf5d..0000000000
--- a/src/widgets/doc/images/fusion-toolbox.png
+++ /dev/null
Binary files differ
diff --git a/src/widgets/doc/images/fusion-toolbutton.png b/src/widgets/doc/images/fusion-toolbutton.png
deleted file mode 100644
index 32d2ca3677..0000000000
--- a/src/widgets/doc/images/fusion-toolbutton.png
+++ /dev/null
Binary files differ
diff --git a/src/widgets/doc/images/fusion-treeview.png b/src/widgets/doc/images/fusion-treeview.png
deleted file mode 100644
index 3aa8bcef54..0000000000
--- a/src/widgets/doc/images/fusion-treeview.png
+++ /dev/null
Binary files differ
diff --git a/src/widgets/doc/images/macintosh-calendarwidget.png b/src/widgets/doc/images/macintosh-calendarwidget.png
deleted file mode 100644
index 2f743501a9..0000000000
--- a/src/widgets/doc/images/macintosh-calendarwidget.png
+++ /dev/null
Binary files differ
diff --git a/src/widgets/doc/images/macintosh-checkbox.png b/src/widgets/doc/images/macintosh-checkbox.png
deleted file mode 100644
index d0130e3f22..0000000000
--- a/src/widgets/doc/images/macintosh-checkbox.png
+++ /dev/null
Binary files differ
diff --git a/src/widgets/doc/images/macintosh-combobox.png b/src/widgets/doc/images/macintosh-combobox.png
deleted file mode 100644
index c1dc3c0c96..0000000000
--- a/src/widgets/doc/images/macintosh-combobox.png
+++ /dev/null
Binary files differ
diff --git a/src/widgets/doc/images/macintosh-dateedit.png b/src/widgets/doc/images/macintosh-dateedit.png
deleted file mode 100644
index 45aee90a9b..0000000000
--- a/src/widgets/doc/images/macintosh-dateedit.png
+++ /dev/null
Binary files differ
diff --git a/src/widgets/doc/images/macintosh-datetimeedit.png b/src/widgets/doc/images/macintosh-datetimeedit.png
deleted file mode 100644
index 62af02d64e..0000000000
--- a/src/widgets/doc/images/macintosh-datetimeedit.png
+++ /dev/null
Binary files differ
diff --git a/src/widgets/doc/images/macintosh-dial.png b/src/widgets/doc/images/macintosh-dial.png
deleted file mode 100644
index df0ffe23a1..0000000000
--- a/src/widgets/doc/images/macintosh-dial.png
+++ /dev/null
Binary files differ
diff --git a/src/widgets/doc/images/macintosh-doublespinbox.png b/src/widgets/doc/images/macintosh-doublespinbox.png
deleted file mode 100644
index a0695ff278..0000000000
--- a/src/widgets/doc/images/macintosh-doublespinbox.png
+++ /dev/null
Binary files differ
diff --git a/src/widgets/doc/images/macintosh-fontcombobox.png b/src/widgets/doc/images/macintosh-fontcombobox.png
deleted file mode 100644
index 8a5a3c78a3..0000000000
--- a/src/widgets/doc/images/macintosh-fontcombobox.png
+++ /dev/null
Binary files differ
diff --git a/src/widgets/doc/images/macintosh-frame.png b/src/widgets/doc/images/macintosh-frame.png
deleted file mode 100644
index fee61a3643..0000000000
--- a/src/widgets/doc/images/macintosh-frame.png
+++ /dev/null
Binary files differ
diff --git a/src/widgets/doc/images/macintosh-groupbox.png b/src/widgets/doc/images/macintosh-groupbox.png
deleted file mode 100644
index f6c7bce580..0000000000
--- a/src/widgets/doc/images/macintosh-groupbox.png
+++ /dev/null
Binary files differ
diff --git a/src/widgets/doc/images/macintosh-horizontalscrollbar.png b/src/widgets/doc/images/macintosh-horizontalscrollbar.png
deleted file mode 100644
index 8b63572a9e..0000000000
--- a/src/widgets/doc/images/macintosh-horizontalscrollbar.png
+++ /dev/null
Binary files differ
diff --git a/src/widgets/doc/images/macintosh-label.png b/src/widgets/doc/images/macintosh-label.png
deleted file mode 100644
index 753aa4d138..0000000000
--- a/src/widgets/doc/images/macintosh-label.png
+++ /dev/null
Binary files differ
diff --git a/src/widgets/doc/images/macintosh-lcdnumber.png b/src/widgets/doc/images/macintosh-lcdnumber.png
deleted file mode 100644
index 2ea9ea0713..0000000000
--- a/src/widgets/doc/images/macintosh-lcdnumber.png
+++ /dev/null
Binary files differ
diff --git a/src/widgets/doc/images/macintosh-lineedit.png b/src/widgets/doc/images/macintosh-lineedit.png
deleted file mode 100644
index 0e992c7ffe..0000000000
--- a/src/widgets/doc/images/macintosh-lineedit.png
+++ /dev/null
Binary files differ
diff --git a/src/widgets/doc/images/macintosh-listview.png b/src/widgets/doc/images/macintosh-listview.png
deleted file mode 100644
index 346e6427ff..0000000000
--- a/src/widgets/doc/images/macintosh-listview.png
+++ /dev/null
Binary files differ
diff --git a/src/widgets/doc/images/macintosh-menu.png b/src/widgets/doc/images/macintosh-menu.png
deleted file mode 100644
index 59bdceaab6..0000000000
--- a/src/widgets/doc/images/macintosh-menu.png
+++ /dev/null
Binary files differ
diff --git a/src/widgets/doc/images/macintosh-progressbar.png b/src/widgets/doc/images/macintosh-progressbar.png
deleted file mode 100644
index 2dfc8aba81..0000000000
--- a/src/widgets/doc/images/macintosh-progressbar.png
+++ /dev/null
Binary files differ
diff --git a/src/widgets/doc/images/macintosh-pushbutton.png b/src/widgets/doc/images/macintosh-pushbutton.png
deleted file mode 100644
index 7ec14910d8..0000000000
--- a/src/widgets/doc/images/macintosh-pushbutton.png
+++ /dev/null
Binary files differ
diff --git a/src/widgets/doc/images/macintosh-radiobutton.png b/src/widgets/doc/images/macintosh-radiobutton.png
deleted file mode 100644
index 8b02f509ff..0000000000
--- a/src/widgets/doc/images/macintosh-radiobutton.png
+++ /dev/null
Binary files differ
diff --git a/src/widgets/doc/images/macintosh-slider.png b/src/widgets/doc/images/macintosh-slider.png
deleted file mode 100644
index bf0c5464e9..0000000000
--- a/src/widgets/doc/images/macintosh-slider.png
+++ /dev/null
Binary files differ
diff --git a/src/widgets/doc/images/macintosh-spinbox.png b/src/widgets/doc/images/macintosh-spinbox.png
deleted file mode 100644
index 4196c37246..0000000000
--- a/src/widgets/doc/images/macintosh-spinbox.png
+++ /dev/null
Binary files differ
diff --git a/src/widgets/doc/images/macintosh-tableview.png b/src/widgets/doc/images/macintosh-tableview.png
deleted file mode 100644
index e6512494de..0000000000
--- a/src/widgets/doc/images/macintosh-tableview.png
+++ /dev/null
Binary files differ
diff --git a/src/widgets/doc/images/macintosh-tabwidget.png b/src/widgets/doc/images/macintosh-tabwidget.png
deleted file mode 100644
index 1d174a47e6..0000000000
--- a/src/widgets/doc/images/macintosh-tabwidget.png
+++ /dev/null
Binary files differ
diff --git a/src/widgets/doc/images/macintosh-textedit.png b/src/widgets/doc/images/macintosh-textedit.png
deleted file mode 100644
index 4f0ce36baf..0000000000
--- a/src/widgets/doc/images/macintosh-textedit.png
+++ /dev/null
Binary files differ
diff --git a/src/widgets/doc/images/macintosh-timeedit.png b/src/widgets/doc/images/macintosh-timeedit.png
deleted file mode 100644
index 4bcfce33f8..0000000000
--- a/src/widgets/doc/images/macintosh-timeedit.png
+++ /dev/null
Binary files differ
diff --git a/src/widgets/doc/images/macintosh-toolbox.png b/src/widgets/doc/images/macintosh-toolbox.png
deleted file mode 100644
index 18d41ea595..0000000000
--- a/src/widgets/doc/images/macintosh-toolbox.png
+++ /dev/null
Binary files differ
diff --git a/src/widgets/doc/images/macintosh-toolbutton.png b/src/widgets/doc/images/macintosh-toolbutton.png
deleted file mode 100644
index f91331cc51..0000000000
--- a/src/widgets/doc/images/macintosh-toolbutton.png
+++ /dev/null
Binary files differ
diff --git a/src/widgets/doc/images/macintosh-treeview.png b/src/widgets/doc/images/macintosh-treeview.png
deleted file mode 100644
index afda6d8372..0000000000
--- a/src/widgets/doc/images/macintosh-treeview.png
+++ /dev/null
Binary files differ
diff --git a/src/widgets/doc/images/windowsvista-calendarwidget.png b/src/widgets/doc/images/windowsvista-calendarwidget.png
deleted file mode 100644
index 3cb1ab78dc..0000000000
--- a/src/widgets/doc/images/windowsvista-calendarwidget.png
+++ /dev/null
Binary files differ
diff --git a/src/widgets/doc/images/windowsvista-checkbox.png b/src/widgets/doc/images/windowsvista-checkbox.png
deleted file mode 100644
index b9bc909988..0000000000
--- a/src/widgets/doc/images/windowsvista-checkbox.png
+++ /dev/null
Binary files differ
diff --git a/src/widgets/doc/images/windowsvista-combobox.png b/src/widgets/doc/images/windowsvista-combobox.png
deleted file mode 100644
index f53192f45a..0000000000
--- a/src/widgets/doc/images/windowsvista-combobox.png
+++ /dev/null
Binary files differ
diff --git a/src/widgets/doc/images/windowsvista-dateedit.png b/src/widgets/doc/images/windowsvista-dateedit.png
deleted file mode 100644
index bb79482849..0000000000
--- a/src/widgets/doc/images/windowsvista-dateedit.png
+++ /dev/null
Binary files differ
diff --git a/src/widgets/doc/images/windowsvista-datetimeedit.png b/src/widgets/doc/images/windowsvista-datetimeedit.png
deleted file mode 100644
index 0a104de084..0000000000
--- a/src/widgets/doc/images/windowsvista-datetimeedit.png
+++ /dev/null
Binary files differ
diff --git a/src/widgets/doc/images/windowsvista-dial.png b/src/widgets/doc/images/windowsvista-dial.png
deleted file mode 100644
index 7081269c31..0000000000
--- a/src/widgets/doc/images/windowsvista-dial.png
+++ /dev/null
Binary files differ
diff --git a/src/widgets/doc/images/windowsvista-doublespinbox.png b/src/widgets/doc/images/windowsvista-doublespinbox.png
deleted file mode 100644
index 6efa9379fd..0000000000
--- a/src/widgets/doc/images/windowsvista-doublespinbox.png
+++ /dev/null
Binary files differ
diff --git a/src/widgets/doc/images/windowsvista-frame.png b/src/widgets/doc/images/windowsvista-frame.png
deleted file mode 100644
index 63b8422d2b..0000000000
--- a/src/widgets/doc/images/windowsvista-frame.png
+++ /dev/null
Binary files differ
diff --git a/src/widgets/doc/images/windowsvista-groupbox.png b/src/widgets/doc/images/windowsvista-groupbox.png
deleted file mode 100644
index 967d8878a7..0000000000
--- a/src/widgets/doc/images/windowsvista-groupbox.png
+++ /dev/null
Binary files differ
diff --git a/src/widgets/doc/images/windowsvista-horizontalscrollbar.png b/src/widgets/doc/images/windowsvista-horizontalscrollbar.png
deleted file mode 100644
index 996865d66c..0000000000
--- a/src/widgets/doc/images/windowsvista-horizontalscrollbar.png
+++ /dev/null
Binary files differ
diff --git a/src/widgets/doc/images/windowsvista-label.png b/src/widgets/doc/images/windowsvista-label.png
deleted file mode 100644
index caef8d8361..0000000000
--- a/src/widgets/doc/images/windowsvista-label.png
+++ /dev/null
Binary files differ
diff --git a/src/widgets/doc/images/windowsvista-lcdnumber.png b/src/widgets/doc/images/windowsvista-lcdnumber.png
deleted file mode 100644
index 911438e2b1..0000000000
--- a/src/widgets/doc/images/windowsvista-lcdnumber.png
+++ /dev/null
Binary files differ
diff --git a/src/widgets/doc/images/windowsvista-lineedit.png b/src/widgets/doc/images/windowsvista-lineedit.png
deleted file mode 100644
index 9fcde3a851..0000000000
--- a/src/widgets/doc/images/windowsvista-lineedit.png
+++ /dev/null
Binary files differ
diff --git a/src/widgets/doc/images/windowsvista-listview.png b/src/widgets/doc/images/windowsvista-listview.png
deleted file mode 100644
index 36a03438ab..0000000000
--- a/src/widgets/doc/images/windowsvista-listview.png
+++ /dev/null
Binary files differ
diff --git a/src/widgets/doc/images/windowsvista-progressbar.png b/src/widgets/doc/images/windowsvista-progressbar.png
deleted file mode 100644
index 0bda010811..0000000000
--- a/src/widgets/doc/images/windowsvista-progressbar.png
+++ /dev/null
Binary files differ
diff --git a/src/widgets/doc/images/windowsvista-slider.png b/src/widgets/doc/images/windowsvista-slider.png
deleted file mode 100644
index be2fffb7b5..0000000000
--- a/src/widgets/doc/images/windowsvista-slider.png
+++ /dev/null
Binary files differ
diff --git a/src/widgets/doc/images/windowsvista-spinbox.png b/src/widgets/doc/images/windowsvista-spinbox.png
deleted file mode 100644
index 4a2293e724..0000000000
--- a/src/widgets/doc/images/windowsvista-spinbox.png
+++ /dev/null
Binary files differ
diff --git a/src/widgets/doc/images/windowsvista-tableview.png b/src/widgets/doc/images/windowsvista-tableview.png
deleted file mode 100644
index 96f4937bc1..0000000000
--- a/src/widgets/doc/images/windowsvista-tableview.png
+++ /dev/null
Binary files differ
diff --git a/src/widgets/doc/images/windowsvista-textedit.png b/src/widgets/doc/images/windowsvista-textedit.png
deleted file mode 100644
index 5e5696623e..0000000000
--- a/src/widgets/doc/images/windowsvista-textedit.png
+++ /dev/null
Binary files differ
diff --git a/src/widgets/doc/images/windowsvista-timeedit.png b/src/widgets/doc/images/windowsvista-timeedit.png
deleted file mode 100644
index e24fdd268a..0000000000
--- a/src/widgets/doc/images/windowsvista-timeedit.png
+++ /dev/null
Binary files differ
diff --git a/src/widgets/doc/images/windowsvista-toolbox.png b/src/widgets/doc/images/windowsvista-toolbox.png
deleted file mode 100644
index 8cfe5f9cab..0000000000
--- a/src/widgets/doc/images/windowsvista-toolbox.png
+++ /dev/null
Binary files differ
diff --git a/src/widgets/doc/images/windowsvista-toolbutton.png b/src/widgets/doc/images/windowsvista-toolbutton.png
deleted file mode 100644
index 0baa9809c1..0000000000
--- a/src/widgets/doc/images/windowsvista-toolbutton.png
+++ /dev/null
Binary files differ
diff --git a/src/widgets/doc/images/windowsvista-treeview.png b/src/widgets/doc/images/windowsvista-treeview.png
deleted file mode 100644
index db211e4b5f..0000000000
--- a/src/widgets/doc/images/windowsvista-treeview.png
+++ /dev/null
Binary files differ
diff --git a/src/widgets/doc/src/qtwidgets-index.qdoc b/src/widgets/doc/src/qtwidgets-index.qdoc
index 6253ae8d7d..c05b16a0a0 100644
--- a/src/widgets/doc/src/qtwidgets-index.qdoc
+++ b/src/widgets/doc/src/qtwidgets-index.qdoc
@@ -133,6 +133,10 @@ interfaces
\section2 Tutorials
\list
\li \l{Widgets Tutorial}
+ \li \l{Getting Started Programming with Qt Widgets}
+ \li \l{Creating a Qt Widget Based Application}
+
+
\li \l{Model/View Tutorial}
\endlist
diff --git a/src/widgets/doc/src/widgets-and-layouts/layout.qdoc b/src/widgets/doc/src/widgets-and-layouts/layout.qdoc
index 0d21d3242d..e507d66451 100644
--- a/src/widgets/doc/src/widgets-and-layouts/layout.qdoc
+++ b/src/widgets/doc/src/widgets-and-layouts/layout.qdoc
@@ -57,15 +57,15 @@
is set on a widget in this way, it takes charge of the following tasks:
\list
- \li Positioning of child widgets.
- \li Sensible default sizes for windows.
- \li Sensible minimum sizes for windows.
- \li Resize handling.
+ \li Positioning of child widgets
+ \li Sensible default sizes for windows
+ \li Sensible minimum sizes for windows
+ \li Resize handling
\li Automatic updates when contents change:
\list
- \li Font size, text or other contents of child widgets.
- \li Hiding or showing a child widget.
- \li Removal of child widgets.
+ \li Font size, text or other contents of child widgets
+ \li Hiding or showing a child widget
+ \li Removal of child widgets
\endlist
\endlist
@@ -392,7 +392,6 @@
Many Qt Widgets \l{Qt Widgets Examples}{examples} already use layouts,
however, several examples exist to showcase various layouts.
- \list
- \li \l{Layout Examples}
- \endlist
+ \annotatedlist examples-layout
+
*/
diff --git a/src/widgets/itemviews/qdirmodel.cpp b/src/widgets/itemviews/qdirmodel.cpp
index 9d2e69dec9..9b54c5c2fe 100644
--- a/src/widgets/itemviews/qdirmodel.cpp
+++ b/src/widgets/itemviews/qdirmodel.cpp
@@ -52,6 +52,7 @@
#include <qstyle.h>
#include <qapplication.h>
#include <private/qabstractitemmodel_p.h>
+#include <private/qfilesystementry_p.h>
#include <qdebug.h>
#include <stack>
@@ -1104,8 +1105,9 @@ QString QDirModel::fileName(const QModelIndex &index) const
if (!d->indexValid(index))
return QString();
QFileInfo info = fileInfo(index);
- if (info.isRoot())
- return info.absoluteFilePath();
+ const QString &path = info.absoluteFilePath();
+ if (QFileSystemEntry::isRootPath(path))
+ return path;
if (d->resolveSymlinks && info.isSymLink())
info = d->resolvedInfo(info);
return info.fileName();
@@ -1280,8 +1282,8 @@ QString QDirModelPrivate::name(const QModelIndex &index) const
{
const QDirNode *n = node(index);
const QFileInfo info = n->info;
- if (info.isRoot()) {
- QString name = info.absoluteFilePath();
+ QString name = info.absoluteFilePath();
+ if (QFileSystemEntry::isRootPath(name)) {
#if defined(Q_OS_WIN)
if (name.startsWith(QLatin1Char('/'))) // UNC host
return info.fileName();
diff --git a/src/widgets/itemviews/qfileiconprovider.cpp b/src/widgets/itemviews/qfileiconprovider.cpp
index 8c3cf3859e..65ae6b9505 100644
--- a/src/widgets/itemviews/qfileiconprovider.cpp
+++ b/src/widgets/itemviews/qfileiconprovider.cpp
@@ -46,6 +46,7 @@
#include <private/qfunctions_p.h>
#include <private/qguiapplication_p.h>
#include <private/qicon_p.h>
+#include <private/qfilesystementry_p.h>
#include <qpa/qplatformintegration.h>
#include <qpa/qplatformservices.h>
#include <qpa/qplatformtheme.h>
@@ -247,10 +248,11 @@ QIcon QFileIconProvider::icon(const QFileInfo &info) const
if (!retIcon.isNull())
return retIcon;
- if (info.isRoot())
+ const QString &path = info.absoluteFilePath();
+ if (path.isEmpty() || QFileSystemEntry::isRootPath(path))
#if defined (Q_OS_WIN) && !defined(Q_OS_WINRT)
{
- UINT type = GetDriveType((wchar_t *)info.absoluteFilePath().utf16());
+ UINT type = GetDriveType(reinterpret_cast<const wchar_t *>(path.utf16()));
switch (type) {
case DRIVE_REMOVABLE:
@@ -298,7 +300,7 @@ QIcon QFileIconProvider::icon(const QFileInfo &info) const
QString QFileIconProvider::type(const QFileInfo &info) const
{
- if (info.isRoot())
+ if (QFileSystemEntry::isRootPath(info.absoluteFilePath()))
return QApplication::translate("QFileDialog", "Drive");
if (info.isFile()) {
if (!info.suffix().isEmpty()) {
diff --git a/src/widgets/kernel/kernel.pri b/src/widgets/kernel/kernel.pri
index 3e3c795839..1bdcecbc81 100644
--- a/src/widgets/kernel/kernel.pri
+++ b/src/widgets/kernel/kernel.pri
@@ -67,15 +67,6 @@ macx: {
SOURCES += kernel/qmacgesturerecognizer.cpp
}
-wince {
- HEADERS += \
- ../corelib/kernel/qfunctions_wince.h \
- kernel/qwidgetsfunctions_wince.h
-
- SOURCES += \
- kernel/qwidgetsfunctions_wince.cpp
-}
-
qtConfig(opengl) {
HEADERS += kernel/qopenglwidget.h
SOURCES += kernel/qopenglwidget.cpp
diff --git a/src/widgets/widgets/qcalendarwidget.cpp b/src/widgets/widgets/qcalendarwidget.cpp
index c5db3a7c9a..b96492d623 100644
--- a/src/widgets/widgets/qcalendarwidget.cpp
+++ b/src/widgets/widgets/qcalendarwidget.cpp
@@ -832,7 +832,12 @@ class StaticDayOfWeekAssociativeArray {
static Q_DECL_CONSTEXPR int day2idx(Qt::DayOfWeek day) Q_DECL_NOTHROW { return int(day) - 1; } // alt: day % 7
public:
Q_DECL_CONSTEXPR StaticDayOfWeekAssociativeArray() Q_DECL_NOEXCEPT_EXPR(noexcept(T()))
- : contained(), data() {}
+#ifdef Q_COMPILER_CONSTEXPR
+ : contained{}, data{} // arrays require uniform initialization
+#else
+ : contained(), data()
+#endif
+ {}
Q_DECL_CONSTEXPR bool contains(Qt::DayOfWeek day) const Q_DECL_NOTHROW { return contained[day2idx(day)]; }
Q_DECL_CONSTEXPR const T &value(Qt::DayOfWeek day) const Q_DECL_NOTHROW { return data[day2idx(day)]; }
diff --git a/src/widgets/widgets/qlineedit.cpp b/src/widgets/widgets/qlineedit.cpp
index 1a4e9ae87b..4ac8118c87 100644
--- a/src/widgets/widgets/qlineedit.cpp
+++ b/src/widgets/widgets/qlineedit.cpp
@@ -950,7 +950,7 @@ QString QLineEdit::selectedText() const
}
/*!
- selectionStart() returns the index of the first selected character in the
+ Returns the index of the first selected character in the
line edit or -1 if no text is selected.
\sa selectedText()
@@ -1181,6 +1181,7 @@ QMargins QLineEdit::textMargins() const
\row \li \c > \li All following alphabetic characters are uppercased.
\row \li \c < \li All following alphabetic characters are lowercased.
\row \li \c ! \li Switch off case conversion.
+ \row \li \c {[ ] { }} \li Reserved.
\row \li \tt{\\} \li Use \tt{\\} to escape the special
characters listed above to use them as
separators.
diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro
index f4ab0d8464..0f8129cb74 100644
--- a/tests/auto/auto.pro
+++ b/tests/auto/auto.pro
@@ -21,7 +21,6 @@ installed_cmake.depends = cmake
uikit: SUBDIRS = corelib gui
-wince: SUBDIRS -= printsupport
cross_compile: SUBDIRS -= tools cmake installed_cmake
else:!qtConfig(process): SUBDIRS -= tools
!qtHaveModule(opengl): SUBDIRS -= opengl
diff --git a/tests/auto/corelib/io/qfileinfo/qfileinfo.pro b/tests/auto/corelib/io/qfileinfo/qfileinfo.pro
index 48673b20a9..496729f9f1 100644
--- a/tests/auto/corelib/io/qfileinfo/qfileinfo.pro
+++ b/tests/auto/corelib/io/qfileinfo/qfileinfo.pro
@@ -5,4 +5,4 @@ SOURCES = tst_qfileinfo.cpp
RESOURCES += qfileinfo.qrc \
testdata.qrc
-win32:!wince:!winrt:LIBS += -ladvapi32 -lnetapi32
+win32:!winrt: LIBS += -ladvapi32 -lnetapi32
diff --git a/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp b/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp
index a08d600d8c..661074ac16 100644
--- a/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp
+++ b/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp
@@ -923,6 +923,18 @@ void tst_QLocale::strtod_data()
QTest::addColumn<int>("processed");
QTest::addColumn<bool>("ok");
+ // plain numbers, success
+ QTest::newRow("0") << QString("0") << 0.0 << 1 << true;
+ QTest::newRow("0.") << QString("0.") << 0.0 << 2 << true;
+ QTest::newRow("0.0") << QString("0.0") << 0.0 << 3 << true;
+ QTest::newRow("0e+0") << QString("0e+0") << 0.0 << 4 << true;
+ QTest::newRow("0e-0") << QString("0e-0") << 0.0 << 4 << true;
+ QTest::newRow("0e+1") << QString("0e+1") << 0.0 << 4 << true;
+ QTest::newRow("0e-1") << QString("0e-1") << 0.0 << 4 << true;
+ QTest::newRow("0E+0") << QString("0E+0") << 0.0 << 4 << true;
+ QTest::newRow("0E-0") << QString("0E-0") << 0.0 << 4 << true;
+ QTest::newRow("0E+1") << QString("0E+1") << 0.0 << 4 << true;
+ QTest::newRow("0E-1") << QString("0E-1") << 0.0 << 4 << true;
QTest::newRow("3.4") << QString("3.4") << 3.4 << 3 << true;
QTest::newRow("0.035003945") << QString("0.035003945") << 0.035003945 << 11 << true;
QTest::newRow("3.5003945e-2") << QString("3.5003945e-2") << 0.035003945 << 12 << true;
@@ -931,6 +943,10 @@ void tst_QLocale::strtod_data()
QTest::newRow("12456789012") << QString("12456789012") << 12456789012.0 << 11 << true;
QTest::newRow("1.2456789012e10") << QString("1.2456789012e10") << 12456789012.0 << 15 << true;
+ // starts with junk, fails
+ QTest::newRow("a0") << QString("a0") << 0.0 << 0 << false;
+ QTest::newRow("a0.") << QString("a0.") << 0.0 << 0 << false;
+ QTest::newRow("a0.0") << QString("a0.0") << 0.0 << 0 << false;
QTest::newRow("a3.4") << QString("a3.4") << 0.0 << 0 << false;
QTest::newRow("b0.035003945") << QString("b0.035003945") << 0.0 << 0 << false;
QTest::newRow("c3.5003945e-2") << QString("c3.5003945e-2") << 0.0 << 0 << false;
@@ -939,7 +955,18 @@ void tst_QLocale::strtod_data()
QTest::newRow("f12456789012") << QString("f12456789012") << 0.0 << 0 << false;
QTest::newRow("g1.2456789012e10") << QString("g1.2456789012e10") << 0.0 << 0 << false;
- QTest::newRow("3.4a") << QString("3.4a") << 3.4 << 3 << true;
+ // ends with junk, success
+ QTest::newRow("0a") << QString("0a") << 0.0 << 1 << true;
+ QTest::newRow("0.a") << QString("0.a") << 0.0 << 2 << true;
+ QTest::newRow("0.0a") << QString("0.0a") << 0.0 << 3 << true;
+ QTest::newRow("0e+0a") << QString("0e+0a") << 0.0 << 4 << true;
+ QTest::newRow("0e-0a") << QString("0e-0a") << 0.0 << 4 << true;
+ QTest::newRow("0e+1a") << QString("0e+1a") << 0.0 << 4 << true;
+ QTest::newRow("0e-1a") << QString("0e-1a") << 0.0 << 4 << true;
+ QTest::newRow("0E+0a") << QString("0E+0a") << 0.0 << 4 << true;
+ QTest::newRow("0E-0a") << QString("0E-0a") << 0.0 << 4 << true;
+ QTest::newRow("0E+1a") << QString("0E+1a") << 0.0 << 4 << true;
+ QTest::newRow("0E-1a") << QString("0E-1a") << 0.0 << 4 << true;
QTest::newRow("0.035003945b") << QString("0.035003945b") << 0.035003945 << 11 << true;
QTest::newRow("3.5003945e-2c") << QString("3.5003945e-2c") << 0.035003945 << 12 << true;
QTest::newRow("0.000003945d") << QString("0.000003945d") << 0.000003945 << 11 << true;
@@ -947,6 +974,10 @@ void tst_QLocale::strtod_data()
QTest::newRow("12456789012f") << QString("12456789012f") << 12456789012.0 << 11 << true;
QTest::newRow("1.2456789012e10g") << QString("1.2456789012e10g") << 12456789012.0 << 15 << true;
+ // "0x" prefix, success but only for the "0" before "x"
+ QTest::newRow("0x0") << QString("0x0") << 0.0 << 1 << true;
+ QTest::newRow("0x0.") << QString("0x0.") << 0.0 << 1 << true;
+ QTest::newRow("0x0.0") << QString("0x0.0") << 0.0 << 1 << true;
QTest::newRow("0x3.4") << QString("0x3.4") << 0.0 << 1 << true;
QTest::newRow("0x0.035003945") << QString("0x0.035003945") << 0.0 << 1 << true;
QTest::newRow("0x3.5003945e-2") << QString("0x3.5003945e-2") << 0.0 << 1 << true;
@@ -954,6 +985,9 @@ void tst_QLocale::strtod_data()
QTest::newRow("0x3.945e-6") << QString("0x3.945e-6") << 0.0 << 1 << true;
QTest::newRow("0x12456789012") << QString("0x12456789012") << 0.0 << 1 << true;
QTest::newRow("0x1.2456789012e10") << QString("0x1.2456789012e10") << 0.0 << 1 << true;
+
+ // hexfloat is not supported (yet)
+ QTest::newRow("0x1.921fb5p+1") << QString("0x1.921fb5p+1") << 0.0 << 1 << true;
}
void tst_QLocale::strtod()
@@ -971,6 +1005,28 @@ void tst_QLocale::strtod()
QCOMPARE(result, num);
QCOMPARE(actualOk, ok);
QCOMPARE(static_cast<int>(end - numData.constData()), processed);
+
+ // make sure neither QByteArray, QString or QLocale also work
+ // (but they don't support incomplete parsing)
+ if (processed == num_str.size() || processed == 0) {
+ actualOk = false;
+ QCOMPARE(num_str.toDouble(&actualOk), num);
+ QCOMPARE(actualOk, ok);
+
+ actualOk = false;
+ QCOMPARE(numData.toDouble(&actualOk), num);
+ QCOMPARE(actualOk, ok);
+
+ actualOk = false;
+ QCOMPARE(QLocale::c().toDouble(num_str, &actualOk), num);
+ QCOMPARE(actualOk, ok);
+ }
+
+ // and QStringRef, but we can limit the length without allocating memory
+ QStringRef num_strref(&num_str, 0, processed);
+ actualOk = false;
+ QCOMPARE(QLocale::c().toDouble(num_strref, &actualOk), num);
+ QCOMPARE(actualOk, ok);
}
void tst_QLocale::long_long_conversion_data()
@@ -1593,10 +1649,9 @@ void tst_QLocale::macDefaultLocale()
// make sure we are using the system to parse them
QCOMPARE(locale.toString(1234.56), systemLocaleFormatNumber(QString("1,234.56")));
- QTime currentTime = QTime::currentTime();
- QTime utcTime = QDateTime::currentDateTime().toUTC().time();
-
- int diff = currentTime.hour() - utcTime.hour();
+ QTime testTime = QTime(1, 2, 3);
+ QTime utcTime = QDateTime(QDate::currentDate(), testTime).toUTC().time();
+ int diff = testTime.hour() - utcTime.hour();
// Check if local time and utc time are on opposite sides of the 24-hour wrap-around.
if (diff < -12)
@@ -1604,7 +1659,7 @@ void tst_QLocale::macDefaultLocale()
if (diff > 12)
diff -= 24;
- const QString timeString = locale.toString(QTime(1,2,3), QLocale::LongFormat);
+ const QString timeString = locale.toString(testTime, QLocale::LongFormat);
QVERIFY(timeString.contains(QString("1:02:03")));
// To run this test make sure "Curreny" is US Dollar in System Preferences->Language & Region->Advanced.
diff --git a/tests/auto/gui/image/qimagereader/tst_qimagereader.cpp b/tests/auto/gui/image/qimagereader/tst_qimagereader.cpp
index 574ad805ca..a908e06498 100644
--- a/tests/auto/gui/image/qimagereader/tst_qimagereader.cpp
+++ b/tests/auto/gui/image/qimagereader/tst_qimagereader.cpp
@@ -519,7 +519,7 @@ void tst_QImageReader::imageFormat_data()
QTest::newRow("xpm") << QString("marble.xpm") << QByteArray("xpm") << QImage::Format_Indexed8;
QTest::newRow("bmp-1") << QString("colorful.bmp") << QByteArray("bmp") << QImage::Format_Indexed8;
QTest::newRow("bmp-2") << QString("font.bmp") << QByteArray("bmp") << QImage::Format_Indexed8;
- QTest::newRow("bmp-3") << QString("test32bfv4.bmp") << QByteArray("bmp") << QImage::Format_RGB32;
+ QTest::newRow("bmp-3") << QString("test32bfv4.bmp") << QByteArray("bmp") << QImage::Format_ARGB32;
QTest::newRow("bmp-4") << QString("test32v5.bmp") << QByteArray("bmp") << QImage::Format_RGB32;
QTest::newRow("png") << QString("kollada.png") << QByteArray("png") << QImage::Format_ARGB32;
QTest::newRow("png-2") << QString("YCbCr_cmyk.png") << QByteArray("png") << QImage::Format_RGB32;
@@ -736,7 +736,6 @@ void tst_QImageReader::imageFormatBeforeRead()
QSize size = reader.size();
QImage image(size, fileFormat);
QVERIFY(reader.read(&image));
- QEXPECT_FAIL("bmp-3", "Semi-transparent BMPs not predicted", Continue);
QCOMPARE(image.format(), fileFormat);
}
}
diff --git a/tests/auto/gui/kernel/qwindow/BLACKLIST b/tests/auto/gui/kernel/qwindow/BLACKLIST
index 19d9262bca..1443359377 100644
--- a/tests/auto/gui/kernel/qwindow/BLACKLIST
+++ b/tests/auto/gui/kernel/qwindow/BLACKLIST
@@ -1,6 +1,9 @@
[positioning:default]
ubuntu-14.04
ubuntu-16.04
+osx-10.12 ci
+[positioning:fake]
+osx-10.12 ci
[modalWindowPosition]
ubuntu-14.04
ubuntu-16.04
diff --git a/tests/auto/network/ssl/qssldiffiehellmanparameters/qssldiffiehellmanparameters.pro b/tests/auto/network/ssl/qssldiffiehellmanparameters/qssldiffiehellmanparameters.pro
index b8053f9eb3..dee95886e0 100644
--- a/tests/auto/network/ssl/qssldiffiehellmanparameters/qssldiffiehellmanparameters.pro
+++ b/tests/auto/network/ssl/qssldiffiehellmanparameters/qssldiffiehellmanparameters.pro
@@ -2,7 +2,7 @@ CONFIG += testcase
CONFIG += parallel_test
SOURCES += tst_qssldiffiehellmanparameters.cpp
-!wince*:win32:LIBS += -lws2_32
+win32: LIBS += -lws2_32
QT = core network testlib
TARGET = tst_qssldiffiehellmanparameters
diff --git a/tests/auto/other/macgui/BLACKLIST b/tests/auto/other/macgui/BLACKLIST
index 2b4bcafe80..2b6a0e2fe8 100644
--- a/tests/auto/other/macgui/BLACKLIST
+++ b/tests/auto/other/macgui/BLACKLIST
@@ -1,2 +1,3 @@
[nonModalOrder]
-osx-10.11
+osx-10.11 ci
+osx-10.12 ci
diff --git a/tests/auto/printsupport/kernel/qprinter/tst_qprinter.cpp b/tests/auto/printsupport/kernel/qprinter/tst_qprinter.cpp
index 3a6102f2fa..16bb0b7c3e 100644
--- a/tests/auto/printsupport/kernel/qprinter/tst_qprinter.cpp
+++ b/tests/auto/printsupport/kernel/qprinter/tst_qprinter.cpp
@@ -39,6 +39,7 @@
#include <qpainter.h>
#include <qprintengine.h>
#include <qpagelayout.h>
+#include <qtemporarydir.h>
#include <math.h>
@@ -70,12 +71,9 @@ class tst_QPrinter : public QObject
{
Q_OBJECT
-public slots:
-#ifdef QT_NO_PRINTER
- void initTestCase();
- void cleanupTestCase();
-#else
private slots:
+ void initTestCase();
+#if QT_CONFIG(printer)
void testPageRectAndPaperRect();
void testPageRectAndPaperRect_data();
void testSetOptions();
@@ -134,19 +132,19 @@ private slots:
void testPageMetrics_data();
void testPageMetrics();
#endif
+private:
+ QTemporaryDir m_tempDir;
};
-#ifdef QT_NO_PRINTER
void tst_QPrinter::initTestCase()
{
+#if !QT_CONFIG(printer)
QSKIP("This test requires printing support");
+#endif
+ QVERIFY2(m_tempDir.isValid(), qPrintable(m_tempDir.errorString()));
}
-void tst_QPrinter::cleanupTestCase()
-{
- QSKIP("This test requires printing support");
-}
-#else
+#if QT_CONFIG(printer)
#define MYCOMPARE(a, b) QCOMPARE(QVariant((int)a), QVariant((int)b))
@@ -248,8 +246,9 @@ void tst_QPrinter::testPageRectAndPaperRect()
QPainter *painter = 0;
QPrinter printer(QPrinter::HighResolution);
printer.setOrientation(QPrinter::Orientation(orientation));
- printer.setOutputFileName("silly");
- TempFileCleanup tmpFile("silly");
+ const QString fileName = m_tempDir.path() + QLatin1String("/silly");
+ printer.setOutputFileName(fileName);
+ TempFileCleanup tmpFile(fileName);
QRect pageRect = doPaperRect ? printer.paperRect() : printer.pageRect();
float inchesX = float(pageRect.width()) / float(printer.resolution());
@@ -421,8 +420,9 @@ void tst_QPrinter::outputFormatFromSuffix()
QSKIP("No printers available.");
QPrinter p;
QCOMPARE(p.outputFormat(), QPrinter::NativeFormat);
- p.setOutputFileName("test.pdf");
- TempFileCleanup tmpFile("test.pdf");
+ const QString fileName = m_tempDir.path() + QLatin1String("/test.pdf");
+ p.setOutputFileName(fileName);
+ TempFileCleanup tmpFile(fileName);
QCOMPARE(p.outputFormat(), QPrinter::PdfFormat);
p.setOutputFileName(QString());
QCOMPARE(p.outputFormat(), QPrinter::NativeFormat);
@@ -510,8 +510,9 @@ void tst_QPrinter::errorReporting()
p.setOutputFileName("/foobar/nonwritable.pdf");
QCOMPARE(painter.begin(&p), false); // it should check the output file is writable
#endif
- p.setOutputFileName("test.pdf");
- TempFileCleanup tmpFile("test.pdf");
+ const QString fileName = m_tempDir.path() + QLatin1String("/test.pdf");
+ p.setOutputFileName(fileName);
+ TempFileCleanup tmpFile(fileName);
QCOMPARE(painter.begin(&p), true); // it should check the output
QCOMPARE(p.isValid(), true);
painter.end();
@@ -626,28 +627,30 @@ static void printPage(QPainter *painter)
void tst_QPrinter::taskQTBUG4497_reusePrinterOnDifferentFiles()
{
- TempFileCleanup tmpFile1("out1.pdf");
- TempFileCleanup tmpFile2("out2.pdf");
+ const QString fileName1 = m_tempDir.path() + QLatin1String("/out1.pdf");
+ const QString fileName2 = m_tempDir.path() + QLatin1String("/out2.pdf");
+ TempFileCleanup tmpFile1(fileName1);
+ TempFileCleanup tmpFile2(fileName2);
QPrinter printer;
{
- printer.setOutputFileName("out1.pdf");
+ printer.setOutputFileName(fileName1);
QPainter painter(&printer);
printPage(&painter);
}
{
- printer.setOutputFileName("out2.pdf");
+ printer.setOutputFileName(fileName2);
QPainter painter(&printer);
printPage(&painter);
}
- QFile file1("out1.pdf");
+ QFile file1(fileName1);
QVERIFY(file1.open(QIODevice::ReadOnly));
- QFile file2("out2.pdf");
+ QFile file2(fileName2);
QVERIFY(file2.open(QIODevice::ReadOnly));
while (!file1.atEnd() && !file2.atEnd()) {
@@ -686,6 +689,8 @@ void tst_QPrinter::testCurrentPage()
void tst_QPrinter::testPdfTitle()
{
+ const QString fileName = m_tempDir.path() + QLatin1String("/file.pdf");
+
// Check the document name is represented correctly in produced pdf
{
QPainter painter;
@@ -693,13 +698,13 @@ void tst_QPrinter::testPdfTitle()
// This string is just the UTF-8 encoding of the string: \()f &oslash; hiragana o
const unsigned char titleBuf[]={0x5c, 0x28, 0x29, 0x66, 0xc3, 0xb8, 0xe3, 0x81, 0x8a, 0x00};
const char *title = reinterpret_cast<const char*>(titleBuf);
- printer.setOutputFileName("file.pdf");
+ printer.setOutputFileName(fileName);
printer.setDocName(QString::fromUtf8(title));
painter.begin(&printer);
painter.end();
}
- TempFileCleanup tmpFile("file.pdf");
- QFile file("file.pdf");
+ TempFileCleanup tmpFile(fileName);
+ QFile file(fileName);
QVERIFY(file.open(QIODevice::ReadOnly));
// The we expect the title to appear in the PDF as:
// ASCII('\title (') UTF16(\\\(\)f &oslash; hiragana o) ASCII(')').
@@ -1955,7 +1960,7 @@ void tst_QPrinter::testPageMetrics()
QCOMPARE(printer.pageRect(QPrinter::Millimeter), QRectF(leftMMf, topMMf, heightMMf - leftMMf - rightMMf, widthMMf - topMMf - bottomMMf));
}
-#endif // QT_NO_PRINTER
+#endif // QT_CONFIG(printer)
QTEST_MAIN(tst_QPrinter)
#include "tst_qprinter.moc"
diff --git a/tests/auto/printsupport/printsupport.pro b/tests/auto/printsupport/printsupport.pro
index 062f46980a..647e48b120 100644
--- a/tests/auto/printsupport/printsupport.pro
+++ b/tests/auto/printsupport/printsupport.pro
@@ -1,4 +1,6 @@
TEMPLATE=subdirs
+QT_FOR_CONFIG += printsupport
+requires(qtConfig(printer))
SUBDIRS=\
dialogs \
kernel \
diff --git a/tests/auto/widgets/itemviews/qdirmodel/qdirmodel.pro b/tests/auto/widgets/itemviews/qdirmodel/qdirmodel.pro
index 61939983e6..3527b424c1 100644
--- a/tests/auto/widgets/itemviews/qdirmodel/qdirmodel.pro
+++ b/tests/auto/widgets/itemviews/qdirmodel/qdirmodel.pro
@@ -6,16 +6,6 @@ SOURCES += tst_qdirmodel.cpp
INCLUDEPATH += ../../../../shared/
HEADERS += ../../../../shared/emulationdetector.h
-wince* {
- addit.files = dirtest\\test1\\*
- addit.path = dirtest\\test1
- tests.files = test\\*
- tests.path = test
- sourceFile.files = tst_qdirmodel.cpp
- sourceFile.path = .
- DEPLOYMENT += addit tests sourceFile
-}
-
android {
DEFINES += SRCDIR=\\\"./\\\"
} else {
diff --git a/tests/auto/widgets/widgets/qtoolbutton/BLACKLIST b/tests/auto/widgets/widgets/qtoolbutton/BLACKLIST
new file mode 100644
index 0000000000..df4fda196f
--- /dev/null
+++ b/tests/auto/widgets/widgets/qtoolbutton/BLACKLIST
@@ -0,0 +1,2 @@
+[task176137_autoRepeatOfAction]
+osx ci