summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrederik Gladhorn <[email protected]>2014-02-06 14:21:16 +0100
committerFrederik Gladhorn <[email protected]>2014-02-07 13:07:25 +0100
commita1fe728fa5bd6cb9e50cf317a58efcf4eea4de2c (patch)
tree0798ae897d111147238544826c79243b6f9a48a4
parent57fe9bd2c6a361cf979d17d962abed5db17a1457 (diff)
parent65bd80ebfc1be81a196a861ade40ff874a3554f0 (diff)
Merge remote-tracking branch 'origin/stable' into dev
Conflicts: src/gui/kernel/qguiapplication.cpp src/plugins/platforms/android/androidjnimain.cpp src/plugins/platforms/android/qandroidplatformintegration.cpp src/plugins/platforms/android/qandroidplatformintegration.h src/plugins/platforms/android/qandroidplatformopenglcontext.cpp src/plugins/platforms/cocoa/qcocoawindow.h src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/sql/doc/src/sql-driver.qdoc src/widgets/widgets/qtoolbararealayout.cpp Change-Id: Ifd7e58760c3cb6bd8a7d1dd32ef83b7ec190d41e
-rw-r--r--INSTALL12
-rw-r--r--dist/changes-5.2.1164
-rw-r--r--doc/global/manifest-meta.qdocconf35
-rw-r--r--doc/global/qt-cpp-defines.qdocconf6
-rw-r--r--examples/examples.pro1
-rw-r--r--examples/network/doc/src/fortuneclient.qdoc2
-rw-r--r--examples/network/doc/src/fortuneserver.qdoc2
-rw-r--r--examples/threads/doc/src/mandelbrot.qdoc2
-rw-r--r--examples/widgets/doc/images/basicgraphicslayouts-example.pngbin119062 -> 79461 bytes
-rw-r--r--examples/widgets/doc/images/basiclayouts-example.pngbin28406 -> 28771 bytes
-rw-r--r--examples/widgets/doc/images/draganddroppuzzle-example.pngbin191122 -> 259104 bytes
-rw-r--r--examples/widgets/doc/images/dropsite-example.pngbin118905 -> 36033 bytes
-rw-r--r--examples/widgets/doc/images/echopluginexample.pngbin5921 -> 10610 bytes
-rw-r--r--examples/widgets/doc/images/fridgemagnets-example.pngbin33012 -> 31707 bytes
-rw-r--r--examples/widgets/doc/images/graphicsanchorlayout-example.pngbin11592 -> 24372 bytes
-rw-r--r--examples/widgets/doc/images/graphicsflowlayout-example.pngbin15345 -> 18988 bytes
-rw-r--r--examples/widgets/doc/images/graphicssimpleanchorlayout-example.pngbin13715 -> 16743 bytes
-rw-r--r--examples/widgets/doc/images/itemviewspuzzle-example.pngbin211091 -> 196251 bytes
-rw-r--r--examples/widgets/doc/images/mainwindow-demo.pngbin62759 -> 85771 bytes
-rw-r--r--examples/widgets/doc/images/mousebutton-buttontester.pngbin14492 -> 17428 bytes
-rw-r--r--examples/widgets/doc/src/plugandpaint.qdoc28
-rw-r--r--examples/widgets/gestures/gestures.pro (renamed from examples/gestures/gestures.pro)0
-rw-r--r--examples/widgets/gestures/imagegestures/doc/src/imagegestures.qdoc (renamed from doc/src/examples/imagegestures.qdoc)12
-rw-r--r--examples/widgets/gestures/imagegestures/imagegestures.pro (renamed from examples/gestures/imagegestures/imagegestures.pro)2
-rw-r--r--examples/widgets/gestures/imagegestures/imagewidget.cpp (renamed from examples/gestures/imagegestures/imagewidget.cpp)0
-rw-r--r--examples/widgets/gestures/imagegestures/imagewidget.h (renamed from examples/gestures/imagegestures/imagewidget.h)0
-rw-r--r--examples/widgets/gestures/imagegestures/main.cpp (renamed from examples/gestures/imagegestures/main.cpp)0
-rw-r--r--examples/widgets/gestures/imagegestures/mainwidget.cpp (renamed from examples/gestures/imagegestures/mainwidget.cpp)0
-rw-r--r--examples/widgets/gestures/imagegestures/mainwidget.h (renamed from examples/gestures/imagegestures/mainwidget.h)0
-rw-r--r--examples/widgets/widgets.pro1
-rw-r--r--mkspecs/common/gcc-base-mac.conf4
-rw-r--r--mkspecs/features/qt_module.prf8
-rw-r--r--qmake/doc/src/qmake-manual.qdoc12
-rw-r--r--qmake/generators/mac/pbuilder_pbx.cpp2
-rw-r--r--qmake/generators/unix/unixmake2.cpp4
-rw-r--r--qmake/generators/win32/msbuild_objectmodel.cpp20
-rw-r--r--src/3rdparty/angle/src/libEGL/Display.cpp2
-rw-r--r--src/angle/patches/0001-Fix-compilation-of-ANGLE-with-mingw-tdm64-gcc-4.8.1.patch33
-rw-r--r--src/corelib/animation/qabstractanimation_p.h4
-rw-r--r--src/corelib/doc/qtcore.qdocconf2
-rw-r--r--src/corelib/global/qglobal.cpp8
-rw-r--r--src/corelib/global/qglobal.h8
-rw-r--r--src/corelib/global/qlogging.cpp43
-rw-r--r--src/corelib/io/qdir.cpp9
-rw-r--r--src/corelib/io/qfileselector.cpp18
-rw-r--r--src/corelib/io/qiodevice.cpp5
-rw-r--r--src/corelib/io/qloggingcategory.cpp2
-rw-r--r--src/corelib/itemmodels/qsortfilterproxymodel.cpp17
-rw-r--r--src/corelib/kernel/qobject.h4
-rw-r--r--src/corelib/kernel/qvariant.cpp6
-rw-r--r--src/corelib/plugin/qlibrary.cpp21
-rw-r--r--src/corelib/tools/qalgorithms.qdoc3
-rw-r--r--src/corelib/tools/qbitarray.cpp9
-rw-r--r--src/corelib/tools/qbytearray.cpp30
-rw-r--r--src/corelib/tools/qcommandlineoption.cpp6
-rw-r--r--src/corelib/tools/qrect.h2
-rw-r--r--src/corelib/tools/qstring.cpp2
-rw-r--r--src/corelib/tools/qstring.h8
-rw-r--r--src/corelib/tools/qvector.h7
-rw-r--r--src/dbus/qdbusmetaobject.cpp33
-rw-r--r--src/gui/accessible/qaccessibleplugin.cpp2
-rw-r--r--src/gui/doc/qtgui.qdocconf3
-rw-r--r--src/gui/gui.pro2
-rw-r--r--src/gui/image/qicon.cpp56
-rw-r--r--src/gui/image/qiconloader.cpp7
-rw-r--r--src/gui/image/qpictureformatplugin.cpp2
-rw-r--r--src/gui/kernel/qgenericplugin.cpp2
-rw-r--r--src/gui/kernel/qguiapplication.cpp3
-rw-r--r--src/gui/kernel/qwindow.cpp4
-rw-r--r--src/gui/opengl/qopenglframebufferobject.cpp2
-rw-r--r--src/gui/opengl/qopengltexturecache.cpp29
-rw-r--r--src/gui/text/qfontengine.cpp13
-rw-r--r--src/gui/text/qfontengine_ft.cpp29
-rw-r--r--src/gui/text/qfontengine_p.h5
-rw-r--r--src/gui/text/qharfbuzzng.cpp22
-rw-r--r--src/gui/text/qtextengine.cpp4
-rw-r--r--src/network/access/qnetworkaccessmanager.cpp7
-rw-r--r--src/network/access/qnetworkdiskcache.cpp14
-rw-r--r--src/network/access/qnetworkreplyfileimpl.cpp6
-rw-r--r--src/network/kernel/qdnslookup_unix.cpp2
-rw-r--r--src/network/kernel/qhostinfo_unix.cpp2
-rw-r--r--src/network/socket/qabstractsocket.cpp2
-rw-r--r--src/opengl/doc/src/qtopengl-examples.qdoc5
-rw-r--r--src/opengl/qglframebufferobject.cpp5
-rw-r--r--src/opengl/qglpixelbuffer.cpp2
-rw-r--r--src/platformsupport/devicediscovery/qdevicediscovery_static.cpp28
-rw-r--r--src/platformsupport/input/evdevtouch/qevdevtouch.cpp112
-rw-r--r--src/platformsupport/linuxaccessibility/constant_mappings.cpp27
-rw-r--r--src/platformsupport/themes/genericunix/qgenericunixthemes.cpp10
-rw-r--r--src/plugins/accessible/widgets/main.cpp2
-rw-r--r--src/plugins/accessible/widgets/simplewidgets.cpp35
-rw-r--r--src/plugins/accessible/widgets/simplewidgets.h13
-rw-r--r--src/plugins/accessible/widgets/widgets.json3
-rw-r--r--src/plugins/platforms/android/androidjnimain.cpp12
-rw-r--r--src/plugins/platforms/android/androidjnimain.h1
-rw-r--r--src/plugins/platforms/android/qandroidplatformintegration.cpp47
-rw-r--r--src/plugins/platforms/android/qandroidplatformintegration.h7
-rw-r--r--src/plugins/platforms/android/qandroidplatformopenglcontext.cpp9
-rw-r--r--src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm6
-rw-r--r--src/plugins/platforms/cocoa/qcocoasystemsettings.mm1
-rw-r--r--src/plugins/platforms/cocoa/qcocoawindow.h1
-rw-r--r--src/plugins/platforms/cocoa/qcocoawindow.mm17
-rw-r--r--src/plugins/platforms/cocoa/qnsview.h1
-rw-r--r--src/plugins/platforms/cocoa/qnsview.mm17
-rw-r--r--src/plugins/platforms/minimalegl/main.cpp8
-rw-r--r--src/plugins/platforms/qnx/qqnxeglwindow.cpp7
-rw-r--r--src/plugins/platforms/qnx/qqnxrasterwindow.cpp6
-rw-r--r--src/plugins/platforms/qnx/qqnxscreen.cpp2
-rw-r--r--src/plugins/platforms/windows/qwindowskeymapper.cpp4
-rw-r--r--src/plugins/platforms/xcb/qxcbwindow.cpp6
-rw-r--r--src/sql/doc/src/sql-driver.qdoc67
-rw-r--r--src/testlib/doc/qttestlib.qdocconf2
-rw-r--r--src/testlib/doc/src/qttest-index.qdoc2
-rw-r--r--src/testlib/doc/src/qttestlib-manual.qdoc2
-rw-r--r--src/testlib/qtestresult.cpp6
-rw-r--r--src/tools/qdoc/doc/qdoc-manual-contextcmds.qdoc3
-rw-r--r--src/tools/qdoc/doc/qdoc-manual-intro.qdoc5
-rw-r--r--src/tools/qdoc/generator.cpp11
-rw-r--r--src/tools/qdoc/helpprojectwriter.cpp3
-rw-r--r--src/widgets/doc/qtwidgets.qdocconf2
-rw-r--r--src/widgets/doc/src/gestures.qdoc8
-rw-r--r--src/widgets/itemviews/qlistview.cpp8
-rw-r--r--src/widgets/itemviews/qtableview.cpp4
-rw-r--r--src/widgets/itemviews/qtreeview.cpp6
-rw-r--r--src/widgets/kernel/qaction.cpp2
-rw-r--r--src/widgets/kernel/qwidget.cpp2
-rw-r--r--src/widgets/kernel/qwidget_qpa.cpp15
-rw-r--r--src/widgets/kernel/qwindowcontainer.cpp6
-rw-r--r--src/widgets/kernel/qwindowcontainer_p.h3
-rw-r--r--src/widgets/styles/qcommonstyle.cpp2
-rw-r--r--src/widgets/styles/qmacstyle_mac.mm8
-rw-r--r--src/widgets/styles/qstylesheetstyle.cpp4
-rw-r--r--src/widgets/styles/qwindowsvistastyle.cpp6
-rw-r--r--src/widgets/widgets.pro1
-rw-r--r--src/widgets/widgets/qmainwindow.cpp43
-rw-r--r--src/widgets/widgets/qmenubar.cpp4
-rw-r--r--src/widgets/widgets/qplaintextedit.cpp1
-rw-r--r--src/widgets/widgets/qtabbar.cpp3
-rw-r--r--src/widgets/widgets/qtoolbararealayout.cpp8
-rw-r--r--src/widgets/widgets/widgets.pri9
-rw-r--r--tests/auto/corelib/io/qdir/tst_qdir.cpp4
-rw-r--r--tests/auto/corelib/io/qfileselector/platforms/+darwin/test (renamed from tests/auto/corelib/io/qfileselector/platforms/+unix/+ios/test)0
-rw-r--r--tests/auto/corelib/io/qfileselector/platforms/+darwin/test2 (renamed from tests/auto/corelib/io/qfileselector/platforms/+unix/+mac/test)0
-rw-r--r--tests/auto/corelib/io/qfileselector/platforms/+osx/test20
-rw-r--r--tests/auto/corelib/io/qfileselector/platforms/+unix/+darwin/+mac/+ios/test0
-rw-r--r--tests/auto/corelib/io/qfileselector/platforms/+unix/+darwin/+mac/+osx/test0
-rw-r--r--tests/auto/corelib/io/qfileselector/platforms/+unix/+darwin/+mac/test0
-rw-r--r--tests/auto/corelib/io/qfileselector/platforms/+unix/+darwin/test0
-rw-r--r--tests/auto/corelib/io/qfileselector/qfileselector.qrc10
-rw-r--r--tests/auto/corelib/io/qfileselector/tst_qfileselector.cpp3
-rw-r--r--tests/auto/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp28
-rw-r--r--tests/auto/corelib/tools/qstring/tst_qstring.cpp56
-rw-r--r--tests/auto/gui/image/qicon/tst_qicon.cpp2
-rw-r--r--tests/auto/sql/kernel/qsqldatabase/tst_databases.h5
-rw-r--r--tests/auto/sql/models/qsqlquerymodel/qsqlquerymodel.pro1
-rw-r--r--tests/auto/sql/models/qsqlrelationaltablemodel/qsqlrelationaltablemodel.pro1
-rw-r--r--tests/auto/sql/models/qsqltablemodel/qsqltablemodel.pro1
-rw-r--r--tests/auto/widgets/itemviews/qabstractitemview/tst_qabstractitemview.cpp1
-rw-r--r--tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp2
-rw-r--r--tests/auto/widgets/widgets/qtabwidget/tst_qtabwidget.cpp23
-rw-r--r--tests/manual/dialogs/printdialogpanel.cpp4
-rw-r--r--tools/configure/configureapp.cpp2
162 files changed, 1100 insertions, 500 deletions
diff --git a/INSTALL b/INSTALL
index 400f6fab14c..2021c501a25 100644
--- a/INSTALL
+++ b/INSTALL
@@ -1,10 +1,10 @@
INSTALLING Qt Source Package Version %VERSION%.
-For full installation instructions for each supported platform, please
-see http://qt-project.org/doc/qt-%SHORTVERSION%/qtdoc/installation.html,
+For instructions on building and installing Qt for each supported platform,
+please see http://qt-project.org/doc/qt-%SHORTVERSION%/build-sources.html,
or follow one of these links:
-Mac OS X: http://qt-project.org/doc/qt-%SHORTVERSION%/qtdoc/install-mac.html
-Windows: http://qt-project.org/doc/qt-%SHORTVERSION%/qtdoc/install-win.html
-Windows CE: http://qt-project.org/doc/qt-%SHORTVERSION%/qtdoc/install-wince.html
-X11 Platforms: http://qt-project.org/doc/qt-%SHORTVERSION%/qtdoc/install-x11.html
+Mac OS X: http://qt-project.org/doc/qt-%SHORTVERSION%/macosx-building.html
+Windows: http://qt-project.org/doc/qt-%SHORTVERSION%/windows-building.html
+X11 Platforms: http://qt-project.org/doc/qt-%SHORTVERSION%/linux-building.html
+Windows CE: http://qt-project.org/doc/qt-%SHORTVERSION%/install-wince.html
diff --git a/dist/changes-5.2.1 b/dist/changes-5.2.1
new file mode 100644
index 00000000000..7762952b26c
--- /dev/null
+++ b/dist/changes-5.2.1
@@ -0,0 +1,164 @@
+Qt 5.2.1 is a bug-fix release. It maintains both forward and backward
+compatibility (source and binary) with Qt 5.2.0.
+
+For more details, refer to the online documentation included in this
+distribution. The documentation is also available online:
+
+ http://qt-project.org/doc/qt-5.2
+
+The Qt version 5.2 series is binary compatible with the 5.1.x series.
+Applications compiled for 5.1 will continue to run with 5.2.
+
+Some of the changes listed in this file include issue tracking numbers
+corresponding to tasks in the Qt Bug Tracker:
+
+ http://bugreports.qt-project.org/
+
+Each of these identifiers can be entered in the bug tracker to obtain more
+information about a particular change.
+
+****************************************************************************
+* Important Behavior Changes *
+****************************************************************************
+
+ - [QTBUG-34345][QTBUG-26008][QTBUG-26430] QPrinter no longer allows you to
+ set an invalid printer name.
+ - [QTBUG-34141] Parsing of Qt::ISODate by QDate::fromString() and
+ QDateTime()::fromString() is not as lenient as before, the date
+ component separators are now required to be non-numeric. This means a
+ string like "2000901901" will no longer be recognized as a valid ISO
+ Date, but "2000/01/01" will still be even though it doesn't strictly
+ meet the ISO format of "2000-01-01".
+
+****************************************************************************
+* Library *
+****************************************************************************
+
+QtCore
+------
+
+ - [QTBUG-35069] Fixed a bug that caused negative number input using '-' to
+ be rejected because the current locale uses U+2212. QLocale::toString()
+ as well as QIntValidator and QDoubleValidator now accept both '-' and
+ U+2212, as well as the locale minus sign. QString also accepts '-' and
+ U+2212.
+ - Fixed sign conversion warnings in code using QMetaTypeId.
+
+ - QTemporaryDir:
+ * Fixed a bug in QTemporaryDir name generator that dramatically reduced
+ randomness of the name.
+
+ - QThread:
+ * [QTBUG-34840] Fixed handle leaks on Windows.
+
+QtGui
+-----
+
+ - [QTBUG-35421] Fixed crash when sending accessibility updates when the
+ corresponding widget does not have a corresponding QAccessibleInterface.
+ This showed on Mac for example with QStatusBar.
+ - Qt's generic font database now adds OpenType fonts (.otf).
+
+ - Accessibility
+ * On Linux action names were returned as empty strings in AT-SPI
+ getActions, now returns the proper names.
+
+ - QKeySequence:
+ * [QTBUG-24406] return Qt::Key_unknown with invalid modifiers on OS X
+
+ - Text:
+ * [QTBUG-35740] Fixed regression when shaping some strings containing
+ characters from multiple fonts.
+
+QtPrintSupport
+--------------
+
+ - [QTBUG-34700][QTBUG-35500] Fixed bugs that caused QtPrintSupport
+ not to report the correct the paper sizes on Windows and on OS X.
+
+QtSql
+-----
+
+ - IBase support:
+ * [QTBUG-33345] Custom port numbers are now supported.
+ * [QTBUG-13435] Fixed the internal state of IBase driver after a failed
+ open call.
+
+ - MySQL / MariaDB support:
+ * [QTBUG-31124] Fixed handling of fractions of second.
+
+ - Oracle support:
+ * [QTBUG-34794] Fixed the compilation
+
+ - Sqlite support:
+ * [QTBUG-24200] Fixed handling of fractions of second.
+ * [QTBUG-35186] Fixed evaluation of driver options
+
+QtTestLib
+---------
+
+ - [QTBUG-34630] The (default) plain text logger on Windows now logs to
+ either the system debug log (in case no console is open), or stdout, not
+ both.
+
+QtWidgets
+---------
+
+ - QSpinBox:
+ * [QTBUG-20691] Entering positive values with the '+' prefix is now
+ allowed.
+
+****************************************************************************
+* Platform Specific Changes *
+****************************************************************************
+
+Android
+-------
+
+ - [QTBUG-34984] Added workarounds for OpenGL bugs on Samsung Galaxy
+ Tab 3.
+
+OS X
+----
+
+ - [QTBUG-34411] Implemented QMainWindow::setUnifiedTitleAndToolBarOnMac.
+
+X11 / XCB
+---------
+
+- [QTBUG-32683] Fixed a bug that caused Qt applications to think the
+ screen DPI had changed when it had not, after connecting or
+ disconnecting monitors.
+
+Windows
+-------
+
+ - [QTBUG-8361] Maximizing frameless windows will no longer cover the
+ taskbar
+ - [QTBUG-34799] Updated QWidgetBackingStore and the Windows
+ implementation to support Qt::WA_StaticContents.
+ - [QTBUG-35357] Fixed a regression from Qt4 in QProcess that
+ prevented altering the pipe modes of stdin in the child process.
+
+
+****************************************************************************
+* Tools *
+****************************************************************************
+
+configure & build system
+------------------------
+
+ - [QTBUG-34949] EGL works with desktop OpenGL now
+ - A build from source will not install the Qt DLLs into lib/ any more.
+ The canonical location is bin/.
+
+qmake
+-----
+
+ - [QTBUG-35530] Fixed the detection of multiple VS installations.
+ - [QTBUG-35610] Fixed the generation of VS 2010 project files.
+ - [QTBUG-32412] Numerous fixes to Windows PDB file handling.
+ - [QTBUG-3883] Fixed make distclean not removing static library targets.
+ - Added makespec for clang using libc++ on Linux.
+ - qmake will not look for mkspecs/ directories in project trees any more.
+ Use .qmake.conf and/or .qmake.cache to "anchor" project roots.
diff --git a/doc/global/manifest-meta.qdocconf b/doc/global/manifest-meta.qdocconf
index fb0f5c200b3..516e810c21e 100644
--- a/doc/global/manifest-meta.qdocconf
+++ b/doc/global/manifest-meta.qdocconf
@@ -77,12 +77,9 @@ manifestmeta.android.names = "QtQuick/Qt Quick Demo - Maroon*" \
"QtWidgets/Stickman Example" \
"QtWidgets/Move Blocks Example" \
"QtWidgets/Border Layout Example" \
- "QtWidgets/Dynamic Layouts Example" \
"QtWidgets/Flow Layout Example" \
- "QtWidgets/MDI Example" \
"QtWidgets/Dock Widgets Example" \
"QtWidgets/Recent Files Example" \
- "QtWidgets/Menus Example" \
"QtWidgets/Concentric Circles Example" \
"QtWidgets/Gradients" \
"QtWidgets/Font Sampler Example" \
@@ -90,38 +87,23 @@ manifestmeta.android.names = "QtQuick/Qt Quick Demo - Maroon*" \
"QtWidgets/Transformations Example" \
"QtWidgets/Syntax Highlighter Example" \
"QtWidgets/Calendar Example" \
- "QtWidgets/Movie Example" \
- "QtWidgets/Validators Example" \
"QtWidgets/Analog Clock Example" \
"QtWidgets/Calculator Example" \
"QtWidgets/Mouse Button Tester" \
"QtWidgets/Character Map Example" \
- "QtWidgets/Wiggly Example" \
"QtWidgets/Digital Clock Example" \
"QtWidgets/Elided Label Example" \
- "QtWidgets/Image Viewer Example" \
"QtWidgets/Sliders Example" \
"QtWidgets/Tetrix Example" \
"QtWidgets/Group Box Example" \
- "QtWidgets/Spin Boxes Example" \
"QtWidgets/Undo Framework" \
- "QtWidgets/Regular Expressions Example" \
"QtWidgets/Colliding Mice Example" \
- "QtWidgets/Basic Graphics Layouts Example" \
- "QtWidgets/40000 Chips" \
"QtWidgets/Diagram Scene Example" \
- "QtWidgets/Drag and Drop Robot Example" \
"QtWidgets/Elastic Nodes Example" \
- "QtWidgets/Pad Navigator Example" \
- "QtWidgets/Anchor Layout Example" \
"QtWidgets/Weather Anchor Layout Example" \
- "QtConcurrent/Image Scaling Example" \
- "QtConcurrent/QtConcurrent Progress Dialog Example" \
"QtNetwork/Torrent Example" \
"QtNetwork/Network Chat Example" \
"QtSQL/Master Detail Example" \
- "QtOpenGL/Cube OpenGL ES 2.0 example" \
- "QtOpenGL/Textures Example" \
"QtLinguist/Arrow Pad Example" \
"QtGui/Raster Window Example" \
"QtGui/Analog Clock Window Example" \
@@ -129,12 +111,16 @@ manifestmeta.android.names = "QtQuick/Qt Quick Demo - Maroon*" \
"QtMultimedia/QML Video Shader Effects Example" \
"QtMultimedia/QML Video Example" \
"QtMultimedia/QML Camera Example" \
- "QtMultimedia/Audio Output Example" \
"QtSVG/Text Object Example" \
"QtQML/Qt Quick Examples - XMLHttpRequest" \
"QtQuick/Qt Quick Particles Examples - *" \
"QtQuick/Qt Quick Examples - Touch Interaction" \
- "QtQuick/Scene Graph - *" \
+ "QtQuick/Scene Graph - Custom Geometry" \
+ "QtQuick/Scene Graph - Graph" \
+ "QtQuick/Scene Graph - OpenGL Under QML" \
+ "QtQuick/Scene Graph - Painted Item" \
+ "QtQuick/Scene Graph - Rendering FBOs" \
+ "QtQuick/Scene Graph - Simple Material" \
"QtQuick/Qt Quick Examples - Image Elements" \
"QtQuick/Qt Quick Examples - Key Interaction" \
"QtQuick/Qt Quick Examples - Text" \
@@ -147,21 +133,15 @@ manifestmeta.android.names = "QtQuick/Qt Quick Demo - Maroon*" \
"QtWidgets/Interview" \
"QtWidgets/Spreadsheet" \
"QtWidgets/Pixelator Example" \
- "QtWidgets/Class Wizard Example" \
"QtWidgets/Animated Tiles Example" \
- "QtWidgets/Basic Layouts Example" \
- "QtWidgets/Application Example" \
"QtWidgets/Affine Transformations" \
"QtWidgets/Image Composition Example" \
"QtWidgets/Basic Drawing Example" \
"QtWidgets/Vector Deformation" \
"QtWidgets/Painter Paths Example" \
- "QtWidgets/Text Edit" \
"QtWidgets/Style Sheet Example" \
"QtWidgets/Code Editor Example" \
- "QtWidgets/Window Flags Example" \
"QtWidgets/Scribble Example" \
- "QtWidgets/Shaped Clock Example" \
"QtWidgets/Line Edits Example" \
"QtWidgets/Calendar Widget Example" \
"QtWidgets/Completer Example" \
@@ -169,8 +149,7 @@ manifestmeta.android.names = "QtQuick/Qt Quick Demo - Maroon*" \
"QtQML/Extending QML - Grouped Properties Example" \
"QtQML/Extending QML - Methods Example" \
"QtQML/Extending QML - Signal Support Example" \
- "QtQML/Extending QML - Attached Properties Example" \
- "QtWidgets/Address Book Example"
+ "QtQML/Extending QML - Attached Properties Example"
manifestmeta.android.tags = android
diff --git a/doc/global/qt-cpp-defines.qdocconf b/doc/global/qt-cpp-defines.qdocconf
index 37fa5dbdcf9..bbf1dda2e67 100644
--- a/doc/global/qt-cpp-defines.qdocconf
+++ b/doc/global/qt-cpp-defines.qdocconf
@@ -111,12 +111,6 @@ Cpp.ignoretokens += \
QT_FASTCALL \
QT_MUTEX_LOCK_NOEXCEPT \
QT_WIDGET_PLUGIN_EXPORT \
- QT_BEGIN_NAMESPACE_NFC \
- QT_END_NAMESPACE_NFC \
- QT_USE_NAMESPACE_NFC \
- QT_BEGIN_NAMESPACE_BLUETOOTH \
- QT_END_NAMESPACE_BLUETOOTH \
- QT_USE_NAMESPACE_BLUETOOTH \
QWEBKIT_EXPORT
Cpp.ignoredirectives += \
diff --git a/examples/examples.pro b/examples/examples.pro
index b0f59c2020f..79d8d14fce2 100644
--- a/examples/examples.pro
+++ b/examples/examples.pro
@@ -4,7 +4,6 @@ CONFIG += no_docs_target
SUBDIRS = \
dbus \
embedded \
- gestures \
gui \
ipc \
json \
diff --git a/examples/network/doc/src/fortuneclient.qdoc b/examples/network/doc/src/fortuneclient.qdoc
index bf208475a8c..01acf458375 100644
--- a/examples/network/doc/src/fortuneclient.qdoc
+++ b/examples/network/doc/src/fortuneclient.qdoc
@@ -63,7 +63,7 @@
\endlist
In this example, we will demonstrate the asynchronous approach. The
- \l{blockingfortuneclient}{Blocking Fortune Client} example
+ \l{blockingfortuneclient}{Blocking Fortune Client Example}
illustrates the synchronous approach.
Our class contains some data and a few private slots:
diff --git a/examples/network/doc/src/fortuneserver.qdoc b/examples/network/doc/src/fortuneserver.qdoc
index 022e16a9d70..fd61f864f06 100644
--- a/examples/network/doc/src/fortuneserver.qdoc
+++ b/examples/network/doc/src/fortuneserver.qdoc
@@ -33,7 +33,7 @@
This example is intended to be run alongside the
\l{fortuneclient}{Fortune Client} example or the
- \l{blockingfortuneclient}{Blocking Fortune Client} example.
+ \l{blockingfortuneclient}{Blocking Fortune Client Example}.
\image fortuneserver-example.png Screenshot of the Fortune Server example
diff --git a/examples/threads/doc/src/mandelbrot.qdoc b/examples/threads/doc/src/mandelbrot.qdoc
index 6a9d0da193f..c1393769f12 100644
--- a/examples/threads/doc/src/mandelbrot.qdoc
+++ b/examples/threads/doc/src/mandelbrot.qdoc
@@ -47,7 +47,7 @@
large set of problems, including synchronous network I/O and
database access, where the user interface must remain responsive
while some heavy operation is taking place. The \l
- network/blockingfortuneclient example shows the same principle at
+ {Blocking Fortune Client Example} shows the same principle at
work in a TCP client.
The Mandelbrot application supports zooming and scrolling using
diff --git a/examples/widgets/doc/images/basicgraphicslayouts-example.png b/examples/widgets/doc/images/basicgraphicslayouts-example.png
index 5c8f4cbc5d5..6b8b39090f0 100644
--- a/examples/widgets/doc/images/basicgraphicslayouts-example.png
+++ b/examples/widgets/doc/images/basicgraphicslayouts-example.png
Binary files differ
diff --git a/examples/widgets/doc/images/basiclayouts-example.png b/examples/widgets/doc/images/basiclayouts-example.png
index f293423a8e4..4a1c45dd800 100644
--- a/examples/widgets/doc/images/basiclayouts-example.png
+++ b/examples/widgets/doc/images/basiclayouts-example.png
Binary files differ
diff --git a/examples/widgets/doc/images/draganddroppuzzle-example.png b/examples/widgets/doc/images/draganddroppuzzle-example.png
index 812278210d4..ca6844581e1 100644
--- a/examples/widgets/doc/images/draganddroppuzzle-example.png
+++ b/examples/widgets/doc/images/draganddroppuzzle-example.png
Binary files differ
diff --git a/examples/widgets/doc/images/dropsite-example.png b/examples/widgets/doc/images/dropsite-example.png
index 42b988d7332..2c42c7be69b 100644
--- a/examples/widgets/doc/images/dropsite-example.png
+++ b/examples/widgets/doc/images/dropsite-example.png
Binary files differ
diff --git a/examples/widgets/doc/images/echopluginexample.png b/examples/widgets/doc/images/echopluginexample.png
index 7cb1e4d63bb..24e039714f0 100644
--- a/examples/widgets/doc/images/echopluginexample.png
+++ b/examples/widgets/doc/images/echopluginexample.png
Binary files differ
diff --git a/examples/widgets/doc/images/fridgemagnets-example.png b/examples/widgets/doc/images/fridgemagnets-example.png
index 9adb572afc6..2a890aad4e6 100644
--- a/examples/widgets/doc/images/fridgemagnets-example.png
+++ b/examples/widgets/doc/images/fridgemagnets-example.png
Binary files differ
diff --git a/examples/widgets/doc/images/graphicsanchorlayout-example.png b/examples/widgets/doc/images/graphicsanchorlayout-example.png
index d30d6839d90..3f35fdb6b77 100644
--- a/examples/widgets/doc/images/graphicsanchorlayout-example.png
+++ b/examples/widgets/doc/images/graphicsanchorlayout-example.png
Binary files differ
diff --git a/examples/widgets/doc/images/graphicsflowlayout-example.png b/examples/widgets/doc/images/graphicsflowlayout-example.png
index a5f9b3dc404..953d54086a0 100644
--- a/examples/widgets/doc/images/graphicsflowlayout-example.png
+++ b/examples/widgets/doc/images/graphicsflowlayout-example.png
Binary files differ
diff --git a/examples/widgets/doc/images/graphicssimpleanchorlayout-example.png b/examples/widgets/doc/images/graphicssimpleanchorlayout-example.png
index d073b12c0c7..543670e05c8 100644
--- a/examples/widgets/doc/images/graphicssimpleanchorlayout-example.png
+++ b/examples/widgets/doc/images/graphicssimpleanchorlayout-example.png
Binary files differ
diff --git a/examples/widgets/doc/images/itemviewspuzzle-example.png b/examples/widgets/doc/images/itemviewspuzzle-example.png
index 05ae28be818..aae6a953cab 100644
--- a/examples/widgets/doc/images/itemviewspuzzle-example.png
+++ b/examples/widgets/doc/images/itemviewspuzzle-example.png
Binary files differ
diff --git a/examples/widgets/doc/images/mainwindow-demo.png b/examples/widgets/doc/images/mainwindow-demo.png
index 5799dc0fa37..0e146d156ef 100644
--- a/examples/widgets/doc/images/mainwindow-demo.png
+++ b/examples/widgets/doc/images/mainwindow-demo.png
Binary files differ
diff --git a/examples/widgets/doc/images/mousebutton-buttontester.png b/examples/widgets/doc/images/mousebutton-buttontester.png
index 82fcb7617ff..f8f71db59bb 100644
--- a/examples/widgets/doc/images/mousebutton-buttontester.png
+++ b/examples/widgets/doc/images/mousebutton-buttontester.png
Binary files differ
diff --git a/examples/widgets/doc/src/plugandpaint.qdoc b/examples/widgets/doc/src/plugandpaint.qdoc
index bfb763b7d18..4e48245bd9d 100644
--- a/examples/widgets/doc/src/plugandpaint.qdoc
+++ b/examples/widgets/doc/src/plugandpaint.qdoc
@@ -47,9 +47,9 @@
If you want to learn how to make your own application extensible
through plugins, we recommend that you start by reading this
overview, which explains how to make an application use plugins.
- Afterward, you can read the
+ Afterwards, you can read the
\l{tools/plugandpaintplugins/basictools}{Basic Tools} and
- \l{plugandpaintplugins/extrafilters}{Extra Filters}
+ \l{tools/plugandpaintplugins/extrafilters}{Extra Filters}
overviews, which show how to implement static and dynamic
plugins, respectively.
@@ -126,8 +126,8 @@
a good idea to include a version number in the string, as we did
above.
- The \l{plugandpaintplugins/basictools}{Basic Tools} plugin
- and the \l{plugandpaintplugins/extrafilters}{Extra Filters}
+ The \l{tools/plugandpaintplugins/basictools}{Basic Tools} plugin
+ and the \l{tools/plugandpaintplugins/extrafilters}{Extra Filters}
plugin shows how to derive from \c BrushInterface, \c
ShapeInterface, and \c FilterInterface.
@@ -275,7 +275,7 @@
\section1 Importing Static Plugins
- The \l{plugandpaintplugins/basictools}{Basic Tools} plugin
+ The \l{tools/plugandpaintplugins/basictools}{Basic Tools} plugin
is built as a static plugin, to ensure that it is always
available to the application. This requires using the
Q_IMPORT_PLUGIN() macro somewhere in the application (in a \c
@@ -307,7 +307,7 @@
This completes our review of the Plug & Paint application. At
this point, you might want to take a look at the
- \l{plugandpaintplugins/basictools}{Basic Tools} example
+ \l{tools/plugandpaintplugins/basictools}{Basic Tools} example
plugin.
*/
@@ -316,7 +316,7 @@
\title Plug & Paint Basic Tools Example
The Basic Tools example is a static plugin for the
- \l{plugandpaint}{Plug & Paint} example. It provides a set
+ \l{tools/plugandpaint}{Plug & Paint} example. It provides a set
of basic brushes, shapes, and filters. Through the Basic Tools
example, we will review the four steps involved in writing a Qt
plugin:
@@ -333,7 +333,7 @@
\snippet tools/plugandpaintplugins/basictools/basictoolsplugin.h 0
We start by including \c interfaces.h, which defines the plugin
- interfaces for the \l{plugandpaint}{Plug & Paint}
+ interfaces for the \l{tools/plugandpaint}{Plug & Paint}
application. For the \c #include to work, we need to add an \c
INCLUDEPATH entry to the \c .pro file with the path to Qt's \c
examples/tools directory.
@@ -344,7 +344,7 @@
The \c Q_INTERFACES() macro is necessary to tell \l{moc}, Qt's
meta-object compiler, that the base classes are plugin
interfaces. Without the \c Q_INTERFACES() macro, we couldn't use
- \l qobject_cast() in the \l{plugandpaint}{Plug & Paint}
+ \l qobject_cast() in the \l{tools/plugandpaint}{Plug & Paint}
application to detect interfaces.
For an explanation for the \c Q_PLUGIN_METADATA() macro see
\l {Exporting the Plugin}.
@@ -473,7 +473,7 @@
To make the plugin a static plugin, all that is required is to
specify \c static in addition to \c plugin. The
- \l{plugandpaintplugins/extrafilters}{Extra Filters} plugin,
+ \l{tools/plugandpaintplugins/extrafilters}{Extra Filters} plugin,
which is compiled as a dynamic plugin, doesn't specify \c static
in its \c .pro file.
@@ -501,15 +501,15 @@
\title Plug & Paint Extra Filters Example
The Extra Filters example is a plugin for the
- \l{plugandpaint}{Plug & Paint} example. It provides a set
+ \l{tools/plugandpaint}{Plug & Paint} example. It provides a set
of filters in addition to those provided by the
- \l{plugandpaintplugins/basictools}{Basic Tools} plugin.
+ \l{tools/plugandpaintplugins/basictools}{Basic Tools} plugin.
Since the approach is identical to
- \l{plugandpaintplugins/basictools}{Basic Tools}, we won't
+ \l{tools/plugandpaintplugins/basictools}{Basic Tools}, we won't
review the code here. The only part of interest is the
\c .pro file, since Extra Filters is a dynamic plugin
- (\l{plugandpaintplugins/basictools}{Basic Tools} is
+ (\l{tools/plugandpaintplugins/basictools}{Basic Tools} is
linked statically into the Plug & Paint executable).
Here's the project file for building the Extra Filters plugin:
diff --git a/examples/gestures/gestures.pro b/examples/widgets/gestures/gestures.pro
index ecbcf074806..ecbcf074806 100644
--- a/examples/gestures/gestures.pro
+++ b/examples/widgets/gestures/gestures.pro
diff --git a/doc/src/examples/imagegestures.qdoc b/examples/widgets/gestures/imagegestures/doc/src/imagegestures.qdoc
index cb76ee83b15..d6d215d6bdd 100644
--- a/doc/src/examples/imagegestures.qdoc
+++ b/examples/widgets/gestures/imagegestures/doc/src/imagegestures.qdoc
@@ -43,9 +43,9 @@
The \c ImageWidget class is a simple QWidget subclass that reimplements the general
QWidget::event() handler function in addition to several more specific event handlers:
- \snippet examples/gestures/imagegestures/imagewidget.h class definition begin
+ \snippet gestures/imagegestures/imagewidget.h class definition begin
\dots
- \snippet examples/gestures/imagegestures/imagewidget.h class definition end
+ \snippet gestures/imagegestures/imagewidget.h class definition end
We also implement a private helper function, \c gestureEvent(), to help manage
gesture events delivered to the widget, and three functions to perform actions
@@ -56,7 +56,7 @@
In the widget's constructor, we begin by setting up various parameters that will
be used to control the way images are displayed.
- \snippet examples/gestures/imagegestures/imagewidget.cpp constructor
+ \snippet gestures/imagegestures/imagewidget.cpp constructor
We enable three of the standard gestures for the widget by calling QWidget::grabGesture()
with the types of gesture we need. These will be recognized by the application's
@@ -65,7 +65,7 @@
Since QWidget does not define a specific event handler for gestures, the widget
needs to reimplement the general QWidget::event() to receive gesture events.
- \snippet examples/gestures/imagegestures/imagewidget.cpp event handler
+ \snippet gestures/imagegestures/imagewidget.cpp event handler
We implement the event handler to delegate gesture events to a private function
specifically written for the task, and pass all other events to QWidget's
@@ -76,7 +76,7 @@
used on a widget at any particular time, we can check for each gesture type
using the QGestureEvent::gesture() function:
- \snippet examples/gestures/imagegestures/imagewidget.cpp gesture event handler
+ \snippet gestures/imagegestures/imagewidget.cpp gesture event handler
If a QGesture object is supplied for a certain type of gesture, we call a special
purpose function to deal with it, casting the gesture object to the appropriate
@@ -87,7 +87,7 @@
gesture associated with a brushing or swiping motion on the user's display or
input device:
- \snippet examples/gestures/imagegestures/imagewidget.cpp swipe function
+ \snippet gestures/imagegestures/imagewidget.cpp swipe function
The QSwipeGesture class provides specialized functions and defines a enum
to make it more convenient for developers to discover which direction, if
diff --git a/examples/gestures/imagegestures/imagegestures.pro b/examples/widgets/gestures/imagegestures/imagegestures.pro
index c40c29564f3..0d5b2f286c9 100644
--- a/examples/gestures/imagegestures/imagegestures.pro
+++ b/examples/widgets/gestures/imagegestures/imagegestures.pro
@@ -7,6 +7,6 @@ SOURCES = imagewidget.cpp \
mainwidget.cpp
# install
-target.path = $$[QT_INSTALL_EXAMPLES]/gestures/imagegestures
+target.path = $$[QT_INSTALL_EXAMPLES]/widgets/gestures/imagegestures
INSTALLS += target
diff --git a/examples/gestures/imagegestures/imagewidget.cpp b/examples/widgets/gestures/imagegestures/imagewidget.cpp
index aad40afc266..aad40afc266 100644
--- a/examples/gestures/imagegestures/imagewidget.cpp
+++ b/examples/widgets/gestures/imagegestures/imagewidget.cpp
diff --git a/examples/gestures/imagegestures/imagewidget.h b/examples/widgets/gestures/imagegestures/imagewidget.h
index 7aaf554117e..7aaf554117e 100644
--- a/examples/gestures/imagegestures/imagewidget.h
+++ b/examples/widgets/gestures/imagegestures/imagewidget.h
diff --git a/examples/gestures/imagegestures/main.cpp b/examples/widgets/gestures/imagegestures/main.cpp
index aec32149f00..aec32149f00 100644
--- a/examples/gestures/imagegestures/main.cpp
+++ b/examples/widgets/gestures/imagegestures/main.cpp
diff --git a/examples/gestures/imagegestures/mainwidget.cpp b/examples/widgets/gestures/imagegestures/mainwidget.cpp
index 105cdf184ec..105cdf184ec 100644
--- a/examples/gestures/imagegestures/mainwidget.cpp
+++ b/examples/widgets/gestures/imagegestures/mainwidget.cpp
diff --git a/examples/gestures/imagegestures/mainwidget.h b/examples/widgets/gestures/imagegestures/mainwidget.h
index 5135466fdef..5135466fdef 100644
--- a/examples/gestures/imagegestures/mainwidget.h
+++ b/examples/widgets/gestures/imagegestures/mainwidget.h
diff --git a/examples/widgets/widgets.pro b/examples/widgets/widgets.pro
index 9c82ad0bb77..d7d3dbc4455 100644
--- a/examples/widgets/widgets.pro
+++ b/examples/widgets/widgets.pro
@@ -9,6 +9,7 @@ SUBDIRS = \
dialogs \
draganddrop \
effects \
+ gestures \
graphicsview \
itemviews \
layouts \
diff --git a/mkspecs/common/gcc-base-mac.conf b/mkspecs/common/gcc-base-mac.conf
index e0469f31cca..cb1e17bc903 100644
--- a/mkspecs/common/gcc-base-mac.conf
+++ b/mkspecs/common/gcc-base-mac.conf
@@ -12,10 +12,6 @@ include(gcc-base.conf)
QMAKE_COMPILER_DEFINES += __APPLE__ __GNUC__=4
-QMAKE_CFLAGS_DEBUG += -gdwarf-2
-
-QMAKE_CXXFLAGS_DEBUG += -gdwarf-2
-
QMAKE_OBJECTIVE_CFLAGS = $$QMAKE_CFLAGS
QMAKE_OBJECTIVE_CFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
QMAKE_OBJECTIVE_CFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
diff --git a/mkspecs/features/qt_module.prf b/mkspecs/features/qt_module.prf
index 32a722fb539..2134077ed39 100644
--- a/mkspecs/features/qt_module.prf
+++ b/mkspecs/features/qt_module.prf
@@ -119,6 +119,14 @@ DEFINES += QT_BUILDING_QT
win32 {
INCLUDEPATH += tmp
CONFIG += skip_target_version_ext
+ # If the code is really "unsafe" then it is unsafe on
+ # other platforms as well; so fixing these warnings just
+ # for MSVC builds, would clutter the code and wouldn't help
+ # in fixing issues that might exist on other platforms.
+ # Using the same functions across all supported platforms
+ # keeps the code clean and helps in writing code that is
+ # safe across all platforms.
+ DEFINES *= _CRT_SECURE_NO_WARNINGS
}
aix-g++* {
diff --git a/qmake/doc/src/qmake-manual.qdoc b/qmake/doc/src/qmake-manual.qdoc
index 7ffdd9da0c7..958550ce91c 100644
--- a/qmake/doc/src/qmake-manual.qdoc
+++ b/qmake/doc/src/qmake-manual.qdoc
@@ -716,7 +716,7 @@
and \l{QMAKE_FRAMEWORK_VERSION} variables. By default, the values used for
these variables are obtained from the \l{TARGET} and \l{VERSION} variables.
- See \l{Deploying an Application on Mac OS X} for more information about
+ See \l{Qt for Mac OS X - Deployment} for more information about
deploying applications and libraries.
\section2 Creating and Moving Xcode Projects
@@ -810,7 +810,7 @@
\snippet code/doc_src_qmake-manual.pro 23
This is discussed in more detail in the
- \l{Deploying an Application on Windows#Manifest files}
+ \l{Qt for Windows - Deployment#Manifest files}
{deployment guide for Windows}.
*/
@@ -1999,7 +1999,7 @@
platform, the variable will be forwarded to the MACOSX_DEPLOYMENT_TARGET
environment variable, which is interpreted by the compiler or linker.
For more information, see the
- \l{Deploying an Application on Mac OS X#Mac OS X Version Dependencies}{Deploying
+ \l{Qt for Mac OS X - Deployment#Mac OS X Version Dependencies}{Deploying
an Application on Mac OS X} document.
\section1 QMAKE_MAKEFILE
@@ -2092,7 +2092,6 @@
\row \li dbus \li \l{Qt D-Bus}
\row \li declarative \li \l{Qt Quick 1} (deprecated)
\row \li designer \li \l{Qt Designer}
- \row \li designercomponents \li \l{Qt Designer Components}
\row \li gui (included by default) \li \l{Qt GUI}
\row \li help \li \l{Qt Help}
\row \li multimedia \li \l{Qt Multimedia}
@@ -3273,7 +3272,7 @@
\li \l{QMAKE_EXT_UI} modifies the extension used for \QD UI files
(usually in \l{FORMS}).
\li \l{QMAKE_EXT_PRL} modifies the extension placed on
- \l{#LibDepend}{library dependency files}.
+ \l{LibDepend}{library dependency files}.
\li \l{QMAKE_EXT_LEX} changes the suffix used in Lex files (usually in
\l{LEXSOURCES}).
\li \l{QMAKE_EXT_YACC} changes the suffix used in Yacc files (usually in
@@ -4335,8 +4334,7 @@
them uses project-specific variables to customize output files.
Platform-specific variables are not described here. For more information,
- see \l{Deploying an Application on Windows} and
- \l{Developing Qt Applications for Mac OS X}.
+ see \l{Qt for Windows - Deployment} and \l{Qt for Mac OS X}.
\target Application
\section1 Building an Application
diff --git a/qmake/generators/mac/pbuilder_pbx.cpp b/qmake/generators/mac/pbuilder_pbx.cpp
index fa4a844a5d9..da64c33cf22 100644
--- a/qmake/generators/mac/pbuilder_pbx.cpp
+++ b/qmake/generators/mac/pbuilder_pbx.cpp
@@ -795,7 +795,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
mkt << "\\\n\t";
++added;
const QString file_name = fileFixify(fn, Option::output_dir, Option::output_dir);
- mkt << " " << replaceExtraCompilerVariables(tmp_out.first().toQString(), file_name, QString());
+ mkt << " " << replaceExtraCompilerVariables(Option::fixPathToTargetOS(tmp_out.first().toQString(), false), file_name, QString());
}
}
}
diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp
index 2ee9110b019..89593052381 100644
--- a/qmake/generators/unix/unixmake2.cpp
+++ b/qmake/generators/unix/unixmake2.cpp
@@ -729,11 +729,15 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
QString::fromLatin1("????") : project->first("QMAKE_PKGINFO_TYPEINFO").left(4)) << ",g\" ";
if(project->first("TEMPLATE") == "app") {
QString icon = fileFixify(var("ICON"));
+ QString bundleIdentifier = "com.yourcompany." + var("QMAKE_BUNDLE");
+ if (bundleIdentifier.endsWith(".app"))
+ bundleIdentifier.chop(4);
t << "@$(DEL_FILE) " << info_plist_out << "\n\t"
<< "@sed ";
foreach (const ProString &arg, commonSedArgs)
t << arg;
t << "-e \"s,@ICON@," << icon.section(Option::dir_sep, -1) << ",g\" "
+ << "-e \"s,@BUNDLEIDENTIFIER@," << bundleIdentifier << ",g\" "
<< "-e \"s,@EXECUTABLE@," << var("QMAKE_ORIG_TARGET") << ",g\" "
<< "-e \"s,@TYPEINFO@,"<< (project->isEmpty("QMAKE_PKGINFO_TYPEINFO") ?
QString::fromLatin1("????") : project->first("QMAKE_PKGINFO_TYPEINFO").left(4)) << ",g\" "
diff --git a/qmake/generators/win32/msbuild_objectmodel.cpp b/qmake/generators/win32/msbuild_objectmodel.cpp
index 75d3c4fa9cc..f37c3180f44 100644
--- a/qmake/generators/win32/msbuild_objectmodel.cpp
+++ b/qmake/generators/win32/msbuild_objectmodel.cpp
@@ -949,13 +949,15 @@ static inline QString toString(compileAsManagedOptions option)
return QString();
}
-static inline QString toString(debugOption option)
+static inline QString toString(debugOption option, DotNET compilerVersion)
{
switch (option) {
case debugUnknown:
case debugLineInfoOnly:
break;
case debugDisabled:
+ if (compilerVersion <= NET2010)
+ break;
return "None";
case debugOldStyleInfo:
return "OldStyle";
@@ -1421,6 +1423,17 @@ static inline triState toTriState(termSvrAwarenessType option)
return unset;
}
+static XmlOutput::xml_output fixedProgramDataBaseFileNameOutput(const VCCLCompilerTool &tool)
+{
+ if (tool.config->CompilerVersion >= NET2012
+ && tool.DebugInformationFormat == debugDisabled
+ && tool.ProgramDataBaseFileName.isEmpty()) {
+ // Force the creation of an empty tag to work-around Visual Studio bug. See QTBUG-35570.
+ return tagValue(_ProgramDataBaseFileName, tool.ProgramDataBaseFileName);
+ }
+ return attrTagS(_ProgramDataBaseFileName, tool.ProgramDataBaseFileName);
+}
+
void VCXProjectWriter::write(XmlOutput &xml, const VCCLCompilerTool &tool)
{
xml
@@ -1440,7 +1453,8 @@ void VCXProjectWriter::write(XmlOutput &xml, const VCCLCompilerTool &tool)
<< attrTagS(_CompileAsManaged, toString(tool.CompileAsManaged))
<< attrTagT(_CompileAsWinRT, tool.CompileAsWinRT)
<< attrTagT(_CreateHotpatchableImage, tool.CreateHotpatchableImage)
- << attrTagS(_DebugInformationFormat, toString(tool.DebugInformationFormat))
+ << attrTagS(_DebugInformationFormat, toString(tool.DebugInformationFormat,
+ tool.config->CompilerVersion))
<< attrTagT(_DisableLanguageExtensions, tool.DisableLanguageExtensions)
<< attrTagX(_DisableSpecificWarnings, tool.DisableSpecificWarnings, ";")
<< attrTagS(_EnableEnhancedInstructionSet, toString(tool.EnableEnhancedInstructionSet))
@@ -1476,7 +1490,7 @@ void VCXProjectWriter::write(XmlOutput &xml, const VCCLCompilerTool &tool)
<< attrTagS(_PreprocessOutputPath, tool.PreprocessOutputPath)
<< attrTagT(_PreprocessSuppressLineNumbers, tool.PreprocessSuppressLineNumbers)
<< attrTagT(_PreprocessToFile, toTriState(tool.GeneratePreprocessedFile))
- << attrTagS(_ProgramDataBaseFileName, tool.ProgramDataBaseFileName)
+ << fixedProgramDataBaseFileNameOutput(tool)
<< attrTagS(_ProcessorNumber, tool.MultiProcessorCompilationProcessorCount)
<< attrTagS(_RuntimeLibrary, toString(tool.RuntimeLibrary))
<< attrTagT(_RuntimeTypeInfo, tool.RuntimeTypeInfo)
diff --git a/src/3rdparty/angle/src/libEGL/Display.cpp b/src/3rdparty/angle/src/libEGL/Display.cpp
index 14973aff308..b18a876a558 100644
--- a/src/3rdparty/angle/src/libEGL/Display.cpp
+++ b/src/3rdparty/angle/src/libEGL/Display.cpp
@@ -525,7 +525,7 @@ void Display::initVendorString()
if (mRenderer && mRenderer->getLUID(&adapterLuid))
{
char adapterLuidString[64];
- sprintf_s(adapterLuidString, sizeof(adapterLuidString), " (adapter LUID: %08x%08x)", adapterLuid.HighPart, adapterLuid.LowPart);
+ snprintf(adapterLuidString, sizeof(adapterLuidString), " (adapter LUID: %08l%08l)", adapterLuid.HighPart, adapterLuid.LowPart);
mVendorString += adapterLuidString;
}
diff --git a/src/angle/patches/0001-Fix-compilation-of-ANGLE-with-mingw-tdm64-gcc-4.8.1.patch b/src/angle/patches/0001-Fix-compilation-of-ANGLE-with-mingw-tdm64-gcc-4.8.1.patch
new file mode 100644
index 00000000000..498cce1b7c5
--- /dev/null
+++ b/src/angle/patches/0001-Fix-compilation-of-ANGLE-with-mingw-tdm64-gcc-4.8.1.patch
@@ -0,0 +1,33 @@
+From 58a797397378aff3aa039a8b2a2d7011fe788737 Mon Sep 17 00:00:00 2001
+From: Kai Koehne <[email protected]>
+Date: Tue, 21 Jan 2014 10:23:38 +0100
+Subject: [PATCH] Fix compilation of ANGLE with mingw-tdm64 gcc 4.8.1
+
+Do not rely on sprintf_s being declared/defined. This also fixes
+deployment to Windows XP.
+
+See https://chromium-review.googlesource.com/#/c/182975/ for a similar
+commit proposed upstream.
+
+Task-number: QTBUG-36242
+Change-Id: I520e2f61aeab34963e7a57baafd413c7db93f110
+---
+ src/3rdparty/angle/src/libEGL/Display.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/3rdparty/angle/src/libEGL/Display.cpp b/src/3rdparty/angle/src/libEGL/Display.cpp
+index a382c3b..82b48ce 100644
+--- a/src/3rdparty/angle/src/libEGL/Display.cpp
++++ b/src/3rdparty/angle/src/libEGL/Display.cpp
+@@ -523,7 +523,7 @@ void Display::initVendorString()
+ if (mRenderer && mRenderer->getLUID(&adapterLuid))
+ {
+ char adapterLuidString[64];
+- sprintf_s(adapterLuidString, sizeof(adapterLuidString), " (adapter LUID: %08x%08x)", adapterLuid.HighPart, adapterLuid.LowPart);
++ snprintf(adapterLuidString, sizeof(adapterLuidString), " (adapter LUID: %08l%08l)", adapterLuid.HighPart, adapterLuid.LowPart);
+
+ mVendorString += adapterLuidString;
+ }
+--
+1.8.5.2.msysgit.0
+
diff --git a/src/corelib/animation/qabstractanimation_p.h b/src/corelib/animation/qabstractanimation_p.h
index 322de22cafe..39d9cf0fe67 100644
--- a/src/corelib/animation/qabstractanimation_p.h
+++ b/src/corelib/animation/qabstractanimation_p.h
@@ -46,8 +46,8 @@
// W A R N I N G
// -------------
//
-// This file is not part of the Qt API. It exists for the convenience
-// of QIODevice. This header file may change from version to
+// This file is not part of the Qt API.
+// This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
diff --git a/src/corelib/doc/qtcore.qdocconf b/src/corelib/doc/qtcore.qdocconf
index fa5afb033c7..18fdfb18f31 100644
--- a/src/corelib/doc/qtcore.qdocconf
+++ b/src/corelib/doc/qtcore.qdocconf
@@ -26,7 +26,7 @@ qhp.QtCore.subprojects.classes.sortPages = true
tagfile = ../../../doc/qtcore/qtcore.tags
-depends += qtgui qtwidgets qtnetwork qtdoc qtquick qtlinguist qtdesigner qtconcurrent qtxml qmake
+depends += qtgui qtwidgets qtnetwork qtdoc qtmacextras qtquick qtlinguist qtdesigner qtconcurrent qtxml qmake
headerdirs += ..
diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp
index e84c31eecff..fe10c493a7b 100644
--- a/src/corelib/global/qglobal.cpp
+++ b/src/corelib/global/qglobal.cpp
@@ -1988,7 +1988,7 @@ const QSysInfo::WinVersion QSysInfo::WindowsVersion = QSysInfo::windowsVersion()
conditions that it would not otherwise know about. However, there is no
guarantee that the compiler will actually use those hints.
- This macro could be considered a "lighter" version of \l{Q_ASSERT}. While
+ This macro could be considered a "lighter" version of \l{Q_ASSERT()}. While
Q_ASSERT will abort the program's execution if the condition is false,
Q_ASSUME will tell the compiler not to generate code for those conditions.
Therefore, it is important that the assumptions always hold, otherwise
@@ -3359,7 +3359,7 @@ bool QInternal::activateCallbacks(Callback cb, void **parameters)
If you need C++11 noexcept semantics, don't use this macro, use
Q_DECL_NOEXCEPT/Q_DECL_NOEXCEPT_EXPR instead.
- \sa Q_DECL_NOEXCEPT, Q_DECL_NOEXCEPT_EXPR
+ \sa Q_DECL_NOEXCEPT, Q_DECL_NOEXCEPT_EXPR()
*/
/*!
@@ -3413,7 +3413,7 @@ bool QInternal::activateCallbacks(Callback cb, void **parameters)
function can't possibly throw, don't use this macro, use
Q_DECL_NOTHROW instead.
- \sa Q_DECL_NOTHROW, Q_DECL_NOEXCEPT_EXPR
+ \sa Q_DECL_NOTHROW, Q_DECL_NOEXCEPT_EXPR()
*/
/*!
@@ -3435,7 +3435,7 @@ bool QInternal::activateCallbacks(Callback cb, void **parameters)
function can't possibly throw, don't use this macro, use
Q_DECL_NOTHROW instead.
- \sa Q_DECL_NOTHROW, Q_DECL_NOEXCEPT_EXPR
+ \sa Q_DECL_NOTHROW, Q_DECL_NOEXCEPT
*/
/*!
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
index 1e9b20757dd..6a6656a6f68 100644
--- a/src/corelib/global/qglobal.h
+++ b/src/corelib/global/qglobal.h
@@ -838,9 +838,13 @@ Q_CORE_EXPORT void qFreeAligned(void *ptr);
# pragma warning(disable: 4800) /* 'type' : forcing value to bool 'true' or 'false' (performance warning) */
# pragma warning(disable: 4097) /* typedef-name 'identifier1' used as synonym for class-name 'identifier2' */
# pragma warning(disable: 4706) /* assignment within conditional expression */
-# pragma warning(disable: 4786) /* 'identifier' : identifier was truncated to 'number' characters in the debug information */
+# if _MSC_VER <= 1310 // MSVC 2003
+# pragma warning(disable: 4786) /* 'identifier' : identifier was truncated to 'number' characters in the debug information */
+# endif
# pragma warning(disable: 4355) /* 'this' : used in base member initializer list */
-# pragma warning(disable: 4231) /* nonstandard extension used : 'identifier' before template explicit instantiation */
+# if _MSC_VER < 1800 // MSVC 2013
+# pragma warning(disable: 4231) /* nonstandard extension used : 'identifier' before template explicit instantiation */
+# endif
# pragma warning(disable: 4710) /* function not inlined */
# pragma warning(disable: 4530) /* C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc */
# elif defined(Q_CC_BOR)
diff --git a/src/corelib/global/qlogging.cpp b/src/corelib/global/qlogging.cpp
index dbe28da120c..10b0d63fb0c 100644
--- a/src/corelib/global/qlogging.cpp
+++ b/src/corelib/global/qlogging.cpp
@@ -1244,6 +1244,32 @@ static void qDefaultMsgHandler(QtMsgType type, const char *buf)
qDefaultMessageHandler(type, emptyContext, QString::fromLocal8Bit(buf));
}
+#if defined(Q_COMPILER_THREAD_LOCAL) || (defined(Q_CC_MSVC) && !defined(Q_OS_WINCE))
+#if defined(Q_CC_MSVC)
+static __declspec(thread) bool msgHandlerGrabbed = false;
+#else
+static thread_local bool msgHandlerGrabbed = false;
+#endif
+
+static bool grabMessageHandler()
+{
+ if (msgHandlerGrabbed)
+ return false;
+
+ msgHandlerGrabbed = true;
+ return true;
+}
+
+static void ungrabMessageHandler()
+{
+ msgHandlerGrabbed = false;
+}
+
+#else
+static bool grabMessageHandler() { return true; }
+static void ungrabMessageHandler() { }
+#endif // (Q_COMPILER_THREAD_LOCAL) || ((Q_CC_MSVC) && !(Q_OS_WINCE))
+
static void qt_message_print(QtMsgType msgType, const QMessageLogContext &context, const QString &message)
{
#ifndef QT_BOOTSTRAPPED
@@ -1261,12 +1287,19 @@ static void qt_message_print(QtMsgType msgType, const QMessageLogContext &contex
if (!messageHandler)
messageHandler = qDefaultMessageHandler;
- // prefer new message handler over the old one
- if (msgHandler == qDefaultMsgHandler
- || messageHandler != qDefaultMessageHandler) {
- (*messageHandler)(msgType, context, message);
+ // prevent recursion in case the message handler generates messages
+ // itself, e.g. by using Qt API
+ if (grabMessageHandler()) {
+ // prefer new message handler over the old one
+ if (msgHandler == qDefaultMsgHandler
+ || messageHandler != qDefaultMessageHandler) {
+ (*messageHandler)(msgType, context, message);
+ } else {
+ (*msgHandler)(msgType, message.toLocal8Bit().constData());
+ }
+ ungrabMessageHandler();
} else {
- (*msgHandler)(msgType, message.toLocal8Bit().constData());
+ fprintf(stderr, "%s", message.toLocal8Bit().constData());
}
}
diff --git a/src/corelib/io/qdir.cpp b/src/corelib/io/qdir.cpp
index 3075e0fb12c..909143ecf3b 100644
--- a/src/corelib/io/qdir.cpp
+++ b/src/corelib/io/qdir.cpp
@@ -716,11 +716,12 @@ QString QDir::absoluteFilePath(const QString &fileName) const
return fileName;
d->resolveAbsoluteEntry();
+ const QString absoluteDirPath = d->absoluteDirEntry.filePath();
if (fileName.isEmpty())
- return d->absoluteDirEntry.filePath();
- if (!d->absoluteDirEntry.isRoot())
- return d->absoluteDirEntry.filePath() % QLatin1Char('/') % fileName;
- return d->absoluteDirEntry.filePath() % fileName;
+ return absoluteDirPath;
+ if (!absoluteDirPath.endsWith(QLatin1Char('/')))
+ return absoluteDirPath % QLatin1Char('/') % fileName;
+ return absoluteDirPath % fileName;
}
/*!
diff --git a/src/corelib/io/qfileselector.cpp b/src/corelib/io/qfileselector.cpp
index 92d3564a0f4..b4021c060f2 100644
--- a/src/corelib/io/qfileselector.cpp
+++ b/src/corelib/io/qfileselector.cpp
@@ -102,7 +102,7 @@ QFileSelectorPrivate::QFileSelectorPrivate()
your code might look something like this:
\code
QString defaultsPath = "data/defaults.conf";
-#if defined(Q_OS_LINUX_ANDROID)
+#if defined(Q_OS_ANDROID)
defaultsPath = "data/android/defaults.conf";
#elif defined(Q_OS_BLACKBERRY)
defaultsPath = "data/blackberry/defaults.conf";
@@ -157,7 +157,7 @@ QFileSelectorPrivate::QFileSelectorPrivate()
Selectors normally available are
\list
\li platform, any of the following strings which match the platform the application is running
- on: android, blackberry, ios, mac, linux, wince, unix, windows.
+ on: android, blackberry, ios, osx, darwin, mac, linux, wince, unix, windows.
\li locale, same as QLocale::system().name().
\endlist
@@ -368,18 +368,22 @@ QStringList QFileSelectorPrivate::platformSelectors()
# endif
#elif defined(Q_OS_UNIX)
ret << QStringLiteral("unix");
-# if defined(Q_OS_LINUX_ANDROID)
+# if defined(Q_OS_ANDROID)
ret << QStringLiteral("android");
# elif defined(Q_OS_BLACKBERRY)
ret << QStringLiteral("blackberry");
# elif defined(Q_OS_QNX)
ret << QStringLiteral("qnx");
-# elif defined(Q_OS_IOS)
- ret << QStringLiteral("ios");
# elif defined(Q_OS_LINUX)
ret << QStringLiteral("linux");
-# elif defined(Q_OS_MAC)
- ret << QStringLiteral("mac");
+# elif defined(Q_OS_DARWIN)
+ ret << QStringLiteral("darwin");
+ ret << QStringLiteral("mac"); // compatibility synonym
+# if defined(Q_OS_IOS)
+ ret << QStringLiteral("ios");
+# elif defined(Q_OS_OSX)
+ ret << QStringLiteral("osx");
+# endif
# else
struct utsname u;
if (uname(&u) != -1)
diff --git a/src/corelib/io/qiodevice.cpp b/src/corelib/io/qiodevice.cpp
index a81b8580c4b..53019e1ff40 100644
--- a/src/corelib/io/qiodevice.cpp
+++ b/src/corelib/io/qiodevice.cpp
@@ -259,9 +259,10 @@ QIODevicePrivate::~QIODevicePrivate()
\value NotOpen The device is not open.
\value ReadOnly The device is open for reading.
- \value WriteOnly The device is open for writing.
+ \value WriteOnly The device is open for writing. Note that this mode implies
+ Truncate.
\value ReadWrite The device is open for reading and writing.
- \value Append The device is opened in append mode, so that all data is
+ \value Append The device is opened in append mode so that all data is
written to the end of the file.
\value Truncate If possible, the device is truncated before it is opened.
All earlier contents of the device are lost.
diff --git a/src/corelib/io/qloggingcategory.cpp b/src/corelib/io/qloggingcategory.cpp
index 8c3ca5fd652..de77dd9a6ed 100644
--- a/src/corelib/io/qloggingcategory.cpp
+++ b/src/corelib/io/qloggingcategory.cpp
@@ -72,7 +72,7 @@ Q_GLOBAL_STATIC_WITH_ARGS(QLoggingCategory, qtDefaultCategory,
\section1 Checking category configuration
QLoggingCategory provides \l isDebugEnabled(), \l isWarningEnabled(),
- \l isCriticalEnabled(), \l isTraceEnabled(), as well as \l isEnabled()
+ \l isCriticalEnabled(), as well as \l isEnabled()
to check whether messages for the given message type should be logged.
\note The qCDebug(), qCWarning(), qCCritical() macros prevent arguments
diff --git a/src/corelib/itemmodels/qsortfilterproxymodel.cpp b/src/corelib/itemmodels/qsortfilterproxymodel.cpp
index 68f6c2ebf2e..ebc97ca2d91 100644
--- a/src/corelib/itemmodels/qsortfilterproxymodel.cpp
+++ b/src/corelib/itemmodels/qsortfilterproxymodel.cpp
@@ -458,10 +458,21 @@ void QSortFilterProxyModelPrivate::sort()
*/
bool QSortFilterProxyModelPrivate::update_source_sort_column()
{
- Q_Q(QSortFilterProxyModel);
- QModelIndex proxy_index = q->index(0, proxy_sort_column, QModelIndex());
int old_source_sort_column = source_sort_column;
- source_sort_column = q->mapToSource(proxy_index).column();
+
+ if (proxy_sort_column == -1) {
+ source_sort_column = -1;
+ } else {
+ // We cannot use index mapping here because in case of a still-empty
+ // proxy model there's no valid proxy index we could map to source.
+ // So always use the root mapping directly instead.
+ Mapping *m = create_mapping(QModelIndex()).value();
+ if (proxy_sort_column < m->source_columns.size())
+ source_sort_column = m->source_columns.at(proxy_sort_column);
+ else
+ source_sort_column = -1;
+ }
+
return old_source_sort_column != source_sort_column;
}
diff --git a/src/corelib/kernel/qobject.h b/src/corelib/kernel/qobject.h
index 5197d98f192..ee6ef23139c 100644
--- a/src/corelib/kernel/qobject.h
+++ b/src/corelib/kernel/qobject.h
@@ -206,9 +206,9 @@ public:
const char *member, Qt::ConnectionType type = Qt::AutoConnection) const;
#ifdef Q_QDOC
- static QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type);
+ static QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type = Qt::AutoConnection);
static QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor);
- static QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type);
+ static QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type = Qt::AutoConnection);
#else
//Connect a signal to a pointer to qobject member function
template <typename Func1, typename Func2>
diff --git a/src/corelib/kernel/qvariant.cpp b/src/corelib/kernel/qvariant.cpp
index 91ccf3996ea..dd9a7693ca7 100644
--- a/src/corelib/kernel/qvariant.cpp
+++ b/src/corelib/kernel/qvariant.cpp
@@ -2833,8 +2833,8 @@ static bool canConvertMetaObject(int fromId, int toId, QObject *fromObject)
\snippet code/src_corelib_kernel_qvariant.cpp 10
- \sa convert(), QSequentialIterable, qRegisterSequentialConverter(), QAssociativeIterable,
- qRegisterAssociativeConverter()
+ \sa convert(), QSequentialIterable, Q_DECLARE_SEQUENTIAL_CONTAINER_METATYPE(), QAssociativeIterable,
+ Q_DECLARE_ASSOCIATIVE_CONTAINER_METATYPE()
*/
bool QVariant::canConvert(int targetTypeId) const
{
@@ -3334,7 +3334,7 @@ QDebug operator<<(QDebug dbg, const QVariant::Type p)
\snippet code/src_corelib_kernel_qvariant.cpp 9
- \sa setValue(), fromValue(), canConvert(), qRegisterSequentialConverter()
+ \sa setValue(), fromValue(), canConvert(), Q_DECLARE_SEQUENTIAL_CONTAINER_METATYPE()
*/
/*! \fn bool QVariant::canConvert() const
diff --git a/src/corelib/plugin/qlibrary.cpp b/src/corelib/plugin/qlibrary.cpp
index 468f7591890..9736950c894 100644
--- a/src/corelib/plugin/qlibrary.cpp
+++ b/src/corelib/plugin/qlibrary.cpp
@@ -374,6 +374,7 @@ private:
static QBasicMutex qt_library_mutex;
static QLibraryStore *qt_library_data = 0;
+static bool qt_library_data_once;
QLibraryStore::~QLibraryStore()
{
@@ -429,8 +430,11 @@ Q_DESTRUCTOR_FUNCTION(qlibraryCleanup)
// must be called with a locked mutex
QLibraryStore *QLibraryStore::instance()
{
- if (Q_UNLIKELY(!qt_library_data))
+ if (Q_UNLIKELY(!qt_library_data_once && !qt_library_data)) {
+ // only create once per process lifetime
qt_library_data = new QLibraryStore;
+ qt_library_data_once = true;
+ }
return qt_library_data;
}
@@ -440,12 +444,15 @@ inline QLibraryPrivate *QLibraryStore::findOrCreate(const QString &fileName, con
QLibraryStore *data = instance();
// check if this library is already loaded
- QLibraryPrivate *lib = data->libraryMap.value(fileName);
+ QLibraryPrivate *lib = 0;
+ if (Q_LIKELY(data))
+ lib = data->libraryMap.value(fileName);
if (!lib)
lib = new QLibraryPrivate(fileName, version);
// track this library
- data->libraryMap.insert(fileName, lib);
+ if (Q_LIKELY(data))
+ data->libraryMap.insert(fileName, lib);
lib->libraryRefCount.ref();
return lib;
@@ -464,9 +471,11 @@ inline void QLibraryStore::releaseLibrary(QLibraryPrivate *lib)
// no one else is using
Q_ASSERT(lib->libraryUnloadCount.load() == 0);
- QLibraryPrivate *that = data->libraryMap.take(lib->fileName);
- Q_ASSERT(lib == that);
- Q_UNUSED(that);
+ if (Q_LIKELY(data)) {
+ QLibraryPrivate *that = data->libraryMap.take(lib->fileName);
+ Q_ASSERT(lib == that);
+ Q_UNUSED(that);
+ }
delete lib;
}
diff --git a/src/corelib/tools/qalgorithms.qdoc b/src/corelib/tools/qalgorithms.qdoc
index 40eb2ed41d7..8feb180248c 100644
--- a/src/corelib/tools/qalgorithms.qdoc
+++ b/src/corelib/tools/qalgorithms.qdoc
@@ -662,9 +662,6 @@
This function requires the item type (in the example above,
QString) to implement \c operator<().
- See the \l{<QtAlgorithms>#binaryFind example}{detailed
- description} for an example usage.
-
\sa qLowerBound(), qUpperBound(), {random access iterators}
*/
diff --git a/src/corelib/tools/qbitarray.cpp b/src/corelib/tools/qbitarray.cpp
index 2e22cf8340b..a6f22abce8a 100644
--- a/src/corelib/tools/qbitarray.cpp
+++ b/src/corelib/tools/qbitarray.cpp
@@ -119,14 +119,6 @@ QT_BEGIN_NAMESPACE
\since 5.2
*/
-/*!
- \fn QBitArray &QBitArray::operator=(QBitArray &&other)
-
- Move-assigns \a other to this QBitArray instance.
-
- \since 5.2
-*/
-
/*! \fn QBitArray::QBitArray()
Constructs an empty bit array.
@@ -464,6 +456,7 @@ void QBitArray::fill(bool value, int begin, int end)
*/
/*! \fn QBitArray &QBitArray::operator=(QBitArray &&other)
+ \since 5.2
Moves \a other to this bit array and returns a reference to
this bit array.
diff --git a/src/corelib/tools/qbytearray.cpp b/src/corelib/tools/qbytearray.cpp
index a9cfd604c7e..ab1167d0f67 100644
--- a/src/corelib/tools/qbytearray.cpp
+++ b/src/corelib/tools/qbytearray.cpp
@@ -1303,12 +1303,10 @@ void QByteArray::chop(int n)
returns a reference to this byte array. The Unicode data is
converted into 8-bit characters using QString::toUtf8().
- If the QString contains non-ASCII Unicode characters, using this
- operator can lead to loss of information. You can disable this
- operator by defining \c QT_NO_CAST_TO_ASCII when you compile your
- applications. You then need to call QString::toUtf8() (or
- QString::toLatin1() or QString::toUtf8() or QString::toLocal8Bit())
- explicitly if you want to convert the data to \c{const char *}.
+ You can disable this function by defining \c QT_NO_CAST_TO_ASCII when you
+ compile your applications. You then need to call QString::toUtf8() (or
+ QString::toLatin1() or QString::toLocal8Bit()) explicitly if you want to
+ convert the data to \c{const char *}.
*/
/*! \fn QByteArray &QByteArray::operator+=(const char *str)
@@ -1667,12 +1665,10 @@ QByteArray &QByteArray::append(const QByteArray &ba)
Appends the string \a str to this byte array. The Unicode data is
converted into 8-bit characters using QString::toUtf8().
- If the QString contains non-ASCII Unicode characters, using this
- function can lead to loss of information. You can disable this
- function by defining \c QT_NO_CAST_TO_ASCII when you compile your
- applications. You then need to call QString::toUtf8() (or
- QString::toLatin1() or QString::toUtf8() or QString::toLocal8Bit())
- explicitly if you want to convert the data to \c{const char *}.
+ You can disable this function by defining \c QT_NO_CAST_TO_ASCII when you
+ compile your applications. You then need to call QString::toUtf8() (or
+ QString::toLatin1() or QString::toLocal8Bit()) explicitly if you want to
+ convert the data to \c{const char *}.
*/
/*!
@@ -2148,12 +2144,10 @@ QByteArray &QByteArray::replace(char before, const QByteArray &after)
string \a after. The Unicode data is converted into 8-bit
characters using QString::toUtf8().
- If the QString contains non-ASCII Unicode characters, using this
- function can lead to loss of information. You can disable this
- function by defining \c QT_NO_CAST_TO_ASCII when you compile your
- applications. You then need to call QString::toUtf8() (or
- QString::toLatin1() or QString::toUtf8() or QString::toLocal8Bit())
- explicitly if you want to convert the data to \c{const char *}.
+ You can disable this function by defining \c QT_NO_CAST_TO_ASCII when you
+ compile your applications. You then need to call QString::toUtf8() (or
+ QString::toLatin1() or QString::toLocal8Bit()) explicitly if you want to
+ convert the data to \c{const char *}.
*/
/*! \fn QByteArray &QByteArray::replace(char before, const char *after)
diff --git a/src/corelib/tools/qcommandlineoption.cpp b/src/corelib/tools/qcommandlineoption.cpp
index 86f087674b0..ccf9211b52a 100644
--- a/src/corelib/tools/qcommandlineoption.cpp
+++ b/src/corelib/tools/qcommandlineoption.cpp
@@ -79,7 +79,7 @@ public:
This class is used to describe an option on the command line. It allows
different ways of defining the same option with multiple aliases possible.
It is also used to describe how the option is used - it may be a flag (e.g. \c{-v})
- or take an argument (e.g. \c{-o file}).
+ or take a value (e.g. \c{-o file}).
Examples:
\snippet code/src_corelib_tools_qcommandlineoption.cpp 0
@@ -232,8 +232,8 @@ void QCommandLineOptionPrivate::setNames(const QStringList &nameList)
for the documentation of the option in the help output. An option with names \c{o} and \c{output},
and a value name of \c{file} will appear as \c{-o, --output <file>}.
- Call QCommandLineParser::argument() if you expect the option to be present
- only once, and QCommandLineParser::arguments() if you expect that option
+ Call QCommandLineParser::value() if you expect the option to be present
+ only once, and QCommandLineParser::values() if you expect that option
to be present multiple times.
\sa valueName()
diff --git a/src/corelib/tools/qrect.h b/src/corelib/tools/qrect.h
index 62ebdd10cd7..22696f9edf4 100644
--- a/src/corelib/tools/qrect.h
+++ b/src/corelib/tools/qrect.h
@@ -512,7 +512,7 @@ public:
Q_DECL_CONSTEXPR inline QRectF translated(qreal dx, qreal dy) const;
Q_DECL_CONSTEXPR inline QRectF translated(const QPointF &p) const;
- inline void moveTo(qreal x, qreal t);
+ inline void moveTo(qreal x, qreal y);
inline void moveTo(const QPointF &p);
inline void setRect(qreal x, qreal y, qreal w, qreal h);
diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp
index 390a65aa232..f5e25f1de94 100644
--- a/src/corelib/tools/qstring.cpp
+++ b/src/corelib/tools/qstring.cpp
@@ -7845,7 +7845,7 @@ QString &QString::setRawData(const QChar *unicode, int size)
\snippet code/src_corelib_tools_qstring.cpp 6
- \sa QString, QLatin1Char, QStringLiteral
+ \sa QString, QLatin1Char, {QStringLiteral()}{QStringLiteral}
*/
/*! \fn QLatin1String::QLatin1String(const char *str)
diff --git a/src/corelib/tools/qstring.h b/src/corelib/tools/qstring.h
index 4432759b039..0b7ca1f444a 100644
--- a/src/corelib/tools/qstring.h
+++ b/src/corelib/tools/qstring.h
@@ -1062,13 +1062,13 @@ inline QT_ASCII_CAST_WARN bool operator==(const char *s1, const QString &s2)
inline QT_ASCII_CAST_WARN bool operator!=(const char *s1, const QString &s2)
{ return QString::compare_helper(s2.constData(), s2.size(), s1, -1) != 0; }
inline QT_ASCII_CAST_WARN bool operator<(const char *s1, const QString &s2)
-{ return QString::compare_helper(s2.constData(), s2.size(), s1, -1) < 0; }
-inline QT_ASCII_CAST_WARN bool operator>(const char *s1, const QString &s2)
{ return QString::compare_helper(s2.constData(), s2.size(), s1, -1) > 0; }
+inline QT_ASCII_CAST_WARN bool operator>(const char *s1, const QString &s2)
+{ return QString::compare_helper(s2.constData(), s2.size(), s1, -1) < 0; }
inline QT_ASCII_CAST_WARN bool operator<=(const char *s1, const QString &s2)
-{ return QString::compare_helper(s2.constData(), s2.size(), s1, -1) <= 0; }
-inline QT_ASCII_CAST_WARN bool operator>=(const char *s1, const QString &s2)
{ return QString::compare_helper(s2.constData(), s2.size(), s1, -1) >= 0; }
+inline QT_ASCII_CAST_WARN bool operator>=(const char *s1, const QString &s2)
+{ return QString::compare_helper(s2.constData(), s2.size(), s1, -1) <= 0; }
inline QT_ASCII_CAST_WARN bool operator==(const char *s1, QLatin1String s2)
{ return QString::fromUtf8(s1) == s2; }
diff --git a/src/corelib/tools/qvector.h b/src/corelib/tools/qvector.h
index 505e1a32e4c..075e8e83e87 100644
--- a/src/corelib/tools/qvector.h
+++ b/src/corelib/tools/qvector.h
@@ -254,7 +254,10 @@ private:
};
#ifdef Q_CC_MSVC
-# pragma warning ( disable : 4345 ) // behavior change: an object of POD type constructed with an initializer of the form () will be default-initialized
+// behavior change: an object of POD type constructed with an initializer of the form ()
+// will be default-initialized
+# pragma warning ( push )
+# pragma warning ( disable : 4345 )
#endif
template <typename T>
@@ -270,7 +273,7 @@ void QVector<T>::defaultConstruct(T *from, T *to)
}
#ifdef Q_CC_MSVC
-# pragma warning ( default: 4345 )
+# pragma warning ( pop )
#endif
template <typename T>
diff --git a/src/dbus/qdbusmetaobject.cpp b/src/dbus/qdbusmetaobject.cpp
index 13c538bb594..392eac60810 100644
--- a/src/dbus/qdbusmetaobject.cpp
+++ b/src/dbus/qdbusmetaobject.cpp
@@ -128,12 +128,7 @@ QDBusMetaObjectGenerator::QDBusMetaObjectGenerator(const QString &interfaceName,
}
}
-Q_DBUS_EXPORT bool qt_dbus_metaobject_skip_annotations = false;
-
-QDBusMetaObjectGenerator::Type
-QDBusMetaObjectGenerator::findType(const QByteArray &signature,
- const QDBusIntrospection::Annotations &annotations,
- const char *direction, int id)
+static int registerComplexDBusType(const char *typeName)
{
struct QDBusRawTypeHandler {
static void destroy(void *)
@@ -159,6 +154,22 @@ QDBusMetaObjectGenerator::findType(const QByteArray &signature,
}
};
+ return QMetaType::registerNormalizedType(typeName, QDBusRawTypeHandler::destroy,
+ QDBusRawTypeHandler::create,
+ QDBusRawTypeHandler::destruct,
+ QDBusRawTypeHandler::construct,
+ sizeof(void *),
+ QMetaType::MovableType,
+ 0);
+}
+
+Q_DBUS_EXPORT bool qt_dbus_metaobject_skip_annotations = false;
+
+QDBusMetaObjectGenerator::Type
+QDBusMetaObjectGenerator::findType(const QByteArray &signature,
+ const QDBusIntrospection::Annotations &annotations,
+ const char *direction, int id)
+{
Type result;
result.id = QVariant::Invalid;
@@ -195,13 +206,7 @@ QDBusMetaObjectGenerator::findType(const QByteArray &signature,
// type is still unknown or doesn't match back to the signature that it
// was expected to, so synthesize a fake type
typeName = "QDBusRawType<0x" + signature.toHex() + ">*";
- type = QMetaType::registerType(typeName, QDBusRawTypeHandler::destroy,
- QDBusRawTypeHandler::create,
- QDBusRawTypeHandler::destruct,
- QDBusRawTypeHandler::construct,
- sizeof(void *),
- QMetaType::MovableType,
- 0);
+ type = registerComplexDBusType(typeName);
}
result.name = typeName;
@@ -217,7 +222,7 @@ QDBusMetaObjectGenerator::findType(const QByteArray &signature,
type = QVariant::Map;
} else {
result.name = "QDBusRawType::" + signature;
- type = -1;
+ type = registerComplexDBusType(result.name);
}
} else {
result.name = QMetaType::typeName(type);
diff --git a/src/gui/accessible/qaccessibleplugin.cpp b/src/gui/accessible/qaccessibleplugin.cpp
index 8cdbca6767c..17b3f52805d 100644
--- a/src/gui/accessible/qaccessibleplugin.cpp
+++ b/src/gui/accessible/qaccessibleplugin.cpp
@@ -87,8 +87,6 @@ QAccessiblePlugin::~QAccessiblePlugin()
Creates and returns a QAccessibleInterface implementation for the
class \a key and the object \a object. Keys are case sensitive.
-
- \sa keys()
*/
QT_END_NAMESPACE
diff --git a/src/gui/doc/qtgui.qdocconf b/src/gui/doc/qtgui.qdocconf
index a963f55dc8f..e3ec216f9b1 100644
--- a/src/gui/doc/qtgui.qdocconf
+++ b/src/gui/doc/qtgui.qdocconf
@@ -29,6 +29,9 @@ tagfile = ../../../doc/qtgui/qtgui.tags
depends += \
qtcore \
+ qtimageformats \
+ qtmacextras \
+ qtmultimedia \
qtnetwork \
qtopengl \
qtsvg \
diff --git a/src/gui/gui.pro b/src/gui/gui.pro
index 3203b413628..f4c35a36c56 100644
--- a/src/gui/gui.pro
+++ b/src/gui/gui.pro
@@ -81,7 +81,7 @@ contains(QT_CONFIG, angle) {
!isEmpty(QMAKE_LIBDIR_OPENGL_ES2): CMAKE_OPENGL_LIBDIR = $$cmakePortablePaths($$QMAKE_LIBDIR_OPENGL_ES2)
CMAKE_GL_HEADER_NAME = GLES2/gl2.h
CMAKE_QT_OPENGL_IMPLEMENTATION = GLESv2
- } else {
+ } else:contains(QT_CONFIG, opengl) {
!isEmpty(QMAKE_INCDIR_OPENGL): CMAKE_GL_INCDIRS = $$cmakeTargetPaths($$QMAKE_INCDIR_OPENGL)
CMAKE_OPENGL_INCDIRS = $$cmakePortablePaths($$QMAKE_INCDIR_OPENGL)
CMAKE_OPENGL_LIBS = $$cmakeProcessLibs($$QMAKE_LIBS_OPENGL)
diff --git a/src/gui/image/qicon.cpp b/src/gui/image/qicon.cpp
index c1a8cfaa1e4..0a4b50bbea1 100644
--- a/src/gui/image/qicon.cpp
+++ b/src/gui/image/qicon.cpp
@@ -43,6 +43,7 @@
#include "qicon_p.h"
#include "qiconengine.h"
#include "qiconengineplugin.h"
+#include "qimagereader.h"
#include "private/qfactoryloader_p.h"
#include "private/qiconloader_p.h"
#include "qpainter.h"
@@ -365,37 +366,40 @@ void QPixmapIconEngine::addPixmap(const QPixmap &pixmap, QIcon::Mode mode, QIcon
void QPixmapIconEngine::addFile(const QString &fileName, const QSize &_size, QIcon::Mode mode, QIcon::State state)
{
if (!fileName.isEmpty()) {
- QSize size = _size;
- QPixmap pixmap;
-
QString abs = fileName;
if (fileName.at(0) != QLatin1Char(':'))
abs = QFileInfo(fileName).absoluteFilePath();
-
- for (int i = 0; i < pixmaps.count(); ++i) {
- if (pixmaps.at(i).mode == mode && pixmaps.at(i).state == state) {
- QPixmapIconEngineEntry *pe = &pixmaps[i];
- if(size == QSize()) {
- pixmap = QPixmap(abs);
- size = pixmap.size();
- }
- if (pe->size == QSize() && pe->pixmap.isNull()) {
- pe->pixmap = QPixmap(pe->fileName);
- // Reset the devicePixelRatio. The pixmap may be loaded from a @2x file,
- // but be used as a 1x pixmap by QIcon.
- pe->pixmap.setDevicePixelRatio(1.0);
- pe->size = pe->pixmap.size();
- }
- if(pe->size == size) {
- pe->pixmap = pixmap;
- pe->fileName = abs;
- return;
+ QImageReader reader(abs);
+
+ do {
+ QSize size = _size;
+ QPixmap pixmap;
+
+ for (int i = 0; i < pixmaps.count(); ++i) {
+ if (pixmaps.at(i).mode == mode && pixmaps.at(i).state == state) {
+ QPixmapIconEngineEntry *pe = &pixmaps[i];
+ if (size == QSize()) {
+ pixmap.convertFromImage(reader.read());
+ size = pixmap.size();
+ }
+ if (pe->size == QSize() && pe->pixmap.isNull()) {
+ pe->pixmap = QPixmap(pe->fileName);
+ // Reset the devicePixelRatio. The pixmap may be loaded from a @2x file,
+ // but be used as a 1x pixmap by QIcon.
+ pe->pixmap.setDevicePixelRatio(1.0);
+ pe->size = pe->pixmap.size();
+ }
+ if (pe->size == size) {
+ pe->pixmap = pixmap;
+ pe->fileName = abs;
+ return;
+ }
}
}
- }
- QPixmapIconEngineEntry e(abs, size, mode, state);
- e.pixmap = pixmap;
- pixmaps += e;
+ QPixmapIconEngineEntry e(abs, size, mode, state);
+ e.pixmap = pixmap;
+ pixmaps += e;
+ } while (reader.jumpToNextImage());
}
}
diff --git a/src/gui/image/qiconloader.cpp b/src/gui/image/qiconloader.cpp
index d202d629572..9e979023cd8 100644
--- a/src/gui/image/qiconloader.cpp
+++ b/src/gui/image/qiconloader.cpp
@@ -519,10 +519,11 @@ QPixmap PixmapEntry::pixmap(const QSize &size, QIcon::Mode mode, QIcon::State st
return cachedPixmap;
} else {
if (basePixmap.size() != actualSize)
- basePixmap = basePixmap.scaled(actualSize, Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
- cachedPixmap = basePixmap;
+ cachedPixmap = basePixmap.scaled(actualSize, Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
+ else
+ cachedPixmap = basePixmap;
if (QGuiApplication *guiApp = qobject_cast<QGuiApplication *>(qApp))
- cachedPixmap = static_cast<QGuiApplicationPrivate*>(QObjectPrivate::get(guiApp))->applyQIconStyleHelper(mode, basePixmap);
+ cachedPixmap = static_cast<QGuiApplicationPrivate*>(QObjectPrivate::get(guiApp))->applyQIconStyleHelper(mode, cachedPixmap);
QPixmapCache::insert(key, cachedPixmap);
}
return cachedPixmap;
diff --git a/src/gui/image/qpictureformatplugin.cpp b/src/gui/image/qpictureformatplugin.cpp
index c87b9ba6acc..69c3d9ccece 100644
--- a/src/gui/image/qpictureformatplugin.cpp
+++ b/src/gui/image/qpictureformatplugin.cpp
@@ -79,8 +79,6 @@ QT_BEGIN_NAMESPACE
Installs a QPictureIO picture I/O handler for the picture format \a
format. Returns \c true on success.
-
- \sa keys()
*/
diff --git a/src/gui/kernel/qgenericplugin.cpp b/src/gui/kernel/qgenericplugin.cpp
index 98709804de0..6939087e59d 100644
--- a/src/gui/kernel/qgenericplugin.cpp
+++ b/src/gui/kernel/qgenericplugin.cpp
@@ -95,8 +95,6 @@ QGenericPlugin::~QGenericPlugin()
Implement this function to create a driver matching the type
specified by the given \a key and \a specification parameters. Note that
keys are case-insensitive.
-
- \sa keys()
*/
QT_END_NAMESPACE
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp
index 5cfe034dbeb..76cebcb00cd 100644
--- a/src/gui/kernel/qguiapplication.cpp
+++ b/src/gui/kernel/qguiapplication.cpp
@@ -60,6 +60,7 @@
#include <QtCore/private/qthread_p.h>
#include <QtCore/qdir.h>
#include <QtCore/qlibraryinfo.h>
+#include <QtCore/qnumeric.h>
#include <QtDebug>
#ifndef QT_NO_ACCESSIBILITY
#include "qaccessible.h"
@@ -111,7 +112,7 @@ Q_GUI_EXPORT bool qt_is_gui_used = true;
Qt::MouseButtons QGuiApplicationPrivate::mouse_buttons = Qt::NoButton;
Qt::KeyboardModifiers QGuiApplicationPrivate::modifier_buttons = Qt::NoModifier;
-QPointF QGuiApplicationPrivate::lastCursorPosition(0.0, 0.0);
+QPointF QGuiApplicationPrivate::lastCursorPosition(qInf(), qInf());
bool QGuiApplicationPrivate::tabletState = false;
QWindow *QGuiApplicationPrivate::tabletPressTarget = 0;
diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp
index 4c74a0b834e..8ec74fdf31b 100644
--- a/src/gui/kernel/qwindow.cpp
+++ b/src/gui/kernel/qwindow.cpp
@@ -79,8 +79,8 @@ QT_BEGIN_NAMESPACE
QWindow directly. Still, it is possible to render directly to a QWindow
with QBackingStore or QOpenGLContext, when wanting to keep dependencies to
a minimum or when wanting to use OpenGL directly. The
- \l{gui/rasterwindow}{Raster Window} and \l{gui/openglwindow}{OpenGL Window}
- examples are useful reference examples for how to render to a QWindow using
+ \l{Raster Window Example} and \l{OpenGL Window Example}
+ are useful reference examples for how to render to a QWindow using
either approach.
\section1 Resource management
diff --git a/src/gui/opengl/qopenglframebufferobject.cpp b/src/gui/opengl/qopenglframebufferobject.cpp
index a1c4cf2a295..d67524810de 100644
--- a/src/gui/opengl/qopenglframebufferobject.cpp
+++ b/src/gui/opengl/qopenglframebufferobject.cpp
@@ -432,9 +432,11 @@ void QOpenGLFramebufferObjectPrivate::init(QOpenGLFramebufferObject *, const QSi
samples = 0;
}
+#ifndef QT_OPENGL_ES_2
GLint maxSamples;
glGetIntegerv(GL_MAX_SAMPLES, &maxSamples);
samples = qBound(0, int(samples), int(maxSamples));
+#endif
size = sz;
target = texture_target;
diff --git a/src/gui/opengl/qopengltexturecache.cpp b/src/gui/opengl/qopengltexturecache.cpp
index 4238f63cd87..750264935b2 100644
--- a/src/gui/opengl/qopengltexturecache.cpp
+++ b/src/gui/opengl/qopengltexturecache.cpp
@@ -40,6 +40,7 @@
****************************************************************************/
#include "qopengltexturecache_p.h"
+#include <qopenglfunctions.h>
#include <private/qopenglcontext_p.h>
#include <private/qimagepixmapcleanuphooks_p.h>
#include <qpa/qplatformpixmap.h>
@@ -128,6 +129,20 @@ GLuint QOpenGLTextureCache::bindTexture(QOpenGLContext *context, const QPixmap &
return id;
}
+// returns the highest number closest to v, which is a power of 2
+// NB! assumes 32 bit ints
+static int qt_next_power_of_two(int v)
+{
+ v--;
+ v |= v >> 1;
+ v |= v >> 2;
+ v |= v >> 4;
+ v |= v >> 8;
+ v |= v >> 16;
+ ++v;
+ return v;
+}
+
GLuint QOpenGLTextureCache::bindTexture(QOpenGLContext *context, const QImage &image)
{
if (image.isNull())
@@ -144,7 +159,19 @@ GLuint QOpenGLTextureCache::bindTexture(QOpenGLContext *context, const QImage &i
}
}
- GLuint id = bindTexture(context, key, image);
+ QImage img = image;
+ if (!context->functions()->hasOpenGLFeature(QOpenGLFunctions::NPOTTextures)) {
+ // Scale the pixmap if needed. GL textures needs to have the
+ // dimensions 2^n+2(border) x 2^m+2(border), unless we're using GL
+ // 2.0 or use the GL_TEXTURE_RECTANGLE texture target
+ int tx_w = qt_next_power_of_two(image.width());
+ int tx_h = qt_next_power_of_two(image.height());
+ if (tx_w != image.width() || tx_h != image.height()) {
+ img = img.scaled(tx_w, tx_h);
+ }
+ }
+
+ GLuint id = bindTexture(context, key, img);
if (id > 0)
QImagePixmapCleanupHooks::enableCleanupHooks(image);
diff --git a/src/gui/text/qfontengine.cpp b/src/gui/text/qfontengine.cpp
index 32225750e48..71866119d4c 100644
--- a/src/gui/text/qfontengine.cpp
+++ b/src/gui/text/qfontengine.cpp
@@ -198,7 +198,8 @@ static const HB_FontClass hb_fontClass = {
static HB_Error hb_getSFntTable(void *font, HB_Tag tableTag, HB_Byte *buffer, HB_UInt *length)
{
QFontEngine *fe = (QFontEngine *)font;
- if (!fe->getSfntTableData(tableTag, buffer, length))
+ Q_ASSERT(fe->faceData.get_font_table);
+ if (!fe->faceData.get_font_table(fe->faceData.user_data, tableTag, buffer, length))
return HB_Err_Invalid_Argument;
return HB_Err_Ok;
}
@@ -209,6 +210,13 @@ static void hb_freeFace(void *face)
}
+static bool qt_get_font_table_default(void *user_data, uint tag, uchar *buffer, uint *length)
+{
+ QFontEngine *fe = (QFontEngine *)user_data;
+ return fe->getSfntTableData(tag, buffer, length);
+}
+
+
#ifdef QT_BUILD_INTERNAL
// for testing purpose only, not thread-safe!
static QList<QFontEngine *> *enginesCollector = 0;
@@ -237,6 +245,9 @@ QFontEngine::QFontEngine()
font_(0), font_destroy_func(0),
face_(0), face_destroy_func(0)
{
+ faceData.user_data = this;
+ faceData.get_font_table = qt_get_font_table_default;
+
cache_cost = 0;
fsType = 0;
symbol = false;
diff --git a/src/gui/text/qfontengine_ft.cpp b/src/gui/text/qfontengine_ft.cpp
index 438c7b2141d..5499757c3bc 100644
--- a/src/gui/text/qfontengine_ft.cpp
+++ b/src/gui/text/qfontengine_ft.cpp
@@ -116,6 +116,21 @@ QT_BEGIN_NAMESPACE
#define TRUNC(x) ((x) >> 6)
#define ROUND(x) (((x)+32) & -64)
+static bool ft_getSfntTable(void *user_data, uint tag, uchar *buffer, uint *length)
+{
+ FT_Face face = (FT_Face)user_data;
+
+ bool result = false;
+ if (FT_IS_SFNT(face)) {
+ FT_ULong len = *length;
+ result = FT_Load_Sfnt_Table(face, tag, 0, buffer, &len) == FT_Err_Ok;
+ *length = len;
+ }
+
+ return result;
+}
+
+
// -------------------------- Freetype support ------------------------------
class QtFreetypeData
@@ -408,15 +423,7 @@ QFontEngine::Properties QFreetypeFace::properties() const
bool QFreetypeFace::getSfntTable(uint tag, uchar *buffer, uint *length) const
{
- bool result = false;
-#if (FREETYPE_MAJOR*10000 + FREETYPE_MINOR*100 + FREETYPE_PATCH) > 20103
- if (FT_IS_SFNT(face)) {
- FT_ULong len = *length;
- result = FT_Load_Sfnt_Table(face, tag, 0, buffer, &len) == FT_Err_Ok;
- *length = len;
- }
-#endif
- return result;
+ return ft_getSfntTable(face, tag, buffer, length);
}
/* Some fonts (such as MingLiu rely on hinting to scale different
@@ -761,6 +768,8 @@ bool QFontEngineFT::init(FaceId faceId, bool antialias, GlyphFormat format,
fontDef.styleName = QString::fromUtf8(face->style_name);
if (!freetype->hbFace) {
+ faceData.user_data = face;
+ faceData.get_font_table = ft_getSfntTable;
freetype->hbFace = harfbuzzFace();
freetype->hbFace_destroy_func = face_destroy_func;
} else {
@@ -1179,7 +1188,7 @@ QFixed QFontEngineFT::emSquareSize() const
bool QFontEngineFT::getSfntTableData(uint tag, uchar *buffer, uint *length) const
{
- return freetype->getSfntTable(tag, buffer, length);
+ return ft_getSfntTable(freetype->face, tag, buffer, length);
}
int QFontEngineFT::synthesized() const
diff --git a/src/gui/text/qfontengine_p.h b/src/gui/text/qfontengine_p.h
index 9bc1900b997..532ebaf8ffc 100644
--- a/src/gui/text/qfontengine_p.h
+++ b/src/gui/text/qfontengine_p.h
@@ -85,6 +85,7 @@ enum HB_Compat_Error {
};
typedef void (*qt_destroy_func_t) (void *user_data);
+typedef bool (*qt_get_font_table_func_t) (void *user_data, uint tag, uchar *buffer, uint *length);
class Q_GUI_EXPORT QFontEngine
{
@@ -279,6 +280,10 @@ public:
mutable qt_destroy_func_t font_destroy_func;
mutable void *face_;
mutable qt_destroy_func_t face_destroy_func;
+ struct FaceData {
+ void *user_data;
+ qt_get_font_table_func_t get_font_table;
+ } faceData;
uint cache_cost; // amount of mem used in kb by the font
uint fsType : 16;
diff --git a/src/gui/text/qharfbuzzng.cpp b/src/gui/text/qharfbuzzng.cpp
index bf34c74b497..010f955c609 100644
--- a/src/gui/text/qharfbuzzng.cpp
+++ b/src/gui/text/qharfbuzzng.cpp
@@ -619,19 +619,22 @@ hb_font_funcs_t *hb_qt_get_font_funcs()
static hb_blob_t *
-_hb_qt_get_font_table(hb_face_t * /*face*/, hb_tag_t tag, void *user_data)
+_hb_qt_reference_table(hb_face_t * /*face*/, hb_tag_t tag, void *user_data)
{
- QFontEngine *fe = (QFontEngine *)user_data;
- Q_ASSERT(fe);
+ QFontEngine::FaceData *data = (QFontEngine::FaceData *)user_data;
+ Q_ASSERT(data);
+
+ qt_get_font_table_func_t get_font_table = data->get_font_table;
+ Q_ASSERT(get_font_table);
uint length = 0;
- if (Q_UNLIKELY(!fe->getSfntTableData(tag, 0, &length) || length == 0))
+ if (Q_UNLIKELY(!get_font_table(data->user_data, tag, 0, &length) || length == 0))
return hb_blob_get_empty();
char *buffer = (char *)malloc(length);
Q_CHECK_PTR(buffer);
- if (Q_UNLIKELY(!fe->getSfntTableData(tag, reinterpret_cast<uchar *>(buffer), &length)))
+ if (Q_UNLIKELY(!get_font_table(data->user_data, tag, reinterpret_cast<uchar *>(buffer), &length)))
length = 0;
return hb_blob_create(const_cast<const char *>(buffer), length,
@@ -642,9 +645,14 @@ _hb_qt_get_font_table(hb_face_t * /*face*/, hb_tag_t tag, void *user_data)
static inline hb_face_t *
_hb_qt_face_create(QFontEngine *fe)
{
- hb_face_t *face;
+ Q_ASSERT(fe);
+
+ QFontEngine::FaceData *data = (QFontEngine::FaceData *)malloc(sizeof(QFontEngine::FaceData));
+ Q_CHECK_PTR(data);
+ data->user_data = fe->faceData.user_data;
+ data->get_font_table = fe->faceData.get_font_table;
- face = hb_face_create_for_tables(_hb_qt_get_font_table, (void *)fe, NULL);
+ hb_face_t *face = hb_face_create_for_tables(_hb_qt_reference_table, (void *)data, free);
if (Q_UNLIKELY(hb_face_is_immutable(face))) {
hb_face_destroy(face);
return NULL;
diff --git a/src/gui/text/qtextengine.cpp b/src/gui/text/qtextengine.cpp
index 14bdc3167e1..2893d8b9b23 100644
--- a/src/gui/text/qtextengine.cpp
+++ b/src/gui/text/qtextengine.cpp
@@ -1880,8 +1880,10 @@ QFontEngine *QTextEngine::fontEngine(const QScriptItem &si, QFixed *ascent, QFix
feCache.prevFontEngine = engine;
feCache.prevScript = script;
engine->ref.ref();
- if (feCache.prevScaledFontEngine)
+ if (feCache.prevScaledFontEngine) {
releaseCachedFontEngine(feCache.prevScaledFontEngine);
+ feCache.prevScaledFontEngine = 0;
+ }
}
if (si.analysis.flags & QFont::SmallCaps) {
if (feCache.prevScaledFontEngine) {
diff --git a/src/network/access/qnetworkaccessmanager.cpp b/src/network/access/qnetworkaccessmanager.cpp
index 980b19b7e4a..c89419091f5 100644
--- a/src/network/access/qnetworkaccessmanager.cpp
+++ b/src/network/access/qnetworkaccessmanager.cpp
@@ -224,12 +224,7 @@ static void ensureInitialized()
\note The network and roaming support in QNetworkAccessManager is conditional
upon the platform supporting connection management. The
\l QNetworkConfigurationManager::NetworkSessionRequired can be used to
- detect whether QNetworkAccessManager utilizes this feature. Currently only
- Meego/Harmattan platforms provide connection management support.
-
- \note This feature cannot be used in combination with the Bearer Management
- API as provided by QtMobility. Applications have to migrate to the Qt version
- of Bearer Management.
+ detect whether QNetworkAccessManager utilizes this feature.
\sa QNetworkRequest, QNetworkReply, QNetworkProxy
*/
diff --git a/src/network/access/qnetworkdiskcache.cpp b/src/network/access/qnetworkdiskcache.cpp
index d64d697013f..2f2d1ab9a91 100644
--- a/src/network/access/qnetworkdiskcache.cpp
+++ b/src/network/access/qnetworkdiskcache.cpp
@@ -559,6 +559,20 @@ qint64 QNetworkDiskCache::expire()
break;
QString name = i.value();
QFile file(name);
+
+ if (name.contains(PREPARED_SLASH)) {
+ QHashIterator<QIODevice*, QCacheItem*> iterator(d->inserting);
+ while (iterator.hasNext()) {
+ iterator.next();
+ QCacheItem *item = iterator.value();
+ if (item && item->file && item->file->fileName() == name) {
+ delete item->file;
+ item->file = 0;
+ break;
+ }
+ }
+ }
+
qint64 size = file.size();
file.remove();
totalSize -= size;
diff --git a/src/network/access/qnetworkreplyfileimpl.cpp b/src/network/access/qnetworkreplyfileimpl.cpp
index f7555f8fc37..2724a54309a 100644
--- a/src/network/access/qnetworkreplyfileimpl.cpp
+++ b/src/network/access/qnetworkreplyfileimpl.cpp
@@ -161,6 +161,8 @@ void QNetworkReplyFileImpl::abort()
qint64 QNetworkReplyFileImpl::bytesAvailable() const
{
Q_D(const QNetworkReplyFileImpl);
+ if (!d->realFile.isOpen())
+ return QNetworkReply::bytesAvailable();
return QNetworkReply::bytesAvailable() + d->realFile.bytesAvailable();
}
@@ -181,7 +183,11 @@ qint64 QNetworkReplyFileImpl::size() const
qint64 QNetworkReplyFileImpl::readData(char *data, qint64 maxlen)
{
Q_D(QNetworkReplyFileImpl);
+ if (!d->realFile.isOpen())
+ return -1;
qint64 ret = d->realFile.read(data, maxlen);
+ if (bytesAvailable() == 0 && d->realFile.isOpen())
+ d->realFile.close();
if (ret == 0 && bytesAvailable() == 0)
return -1;
else
diff --git a/src/network/kernel/qdnslookup_unix.cpp b/src/network/kernel/qdnslookup_unix.cpp
index 052c492f070..9fb488cee60 100644
--- a/src/network/kernel/qdnslookup_unix.cpp
+++ b/src/network/kernel/qdnslookup_unix.cpp
@@ -52,7 +52,7 @@
#include <arpa/nameser_compat.h>
#include <resolv.h>
-#ifdef __GNU_LIBRARY__
+#if defined(__GNU_LIBRARY__) && !defined(__UCLIBC__)
# include <gnu/lib-names.h>
#endif
diff --git a/src/network/kernel/qhostinfo_unix.cpp b/src/network/kernel/qhostinfo_unix.cpp
index 9c7712800d9..df8c8b145a6 100644
--- a/src/network/kernel/qhostinfo_unix.cpp
+++ b/src/network/kernel/qhostinfo_unix.cpp
@@ -63,7 +63,7 @@
# include <resolv.h>
#endif
-#ifdef __GNU_LIBRARY__
+#if defined(__GNU_LIBRARY__) && !defined(__UCLIBC__)
# include <gnu/lib-names.h>
#endif
diff --git a/src/network/socket/qabstractsocket.cpp b/src/network/socket/qabstractsocket.cpp
index 1906166257e..0345537d1cc 100644
--- a/src/network/socket/qabstractsocket.cpp
+++ b/src/network/socket/qabstractsocket.cpp
@@ -2221,7 +2221,7 @@ bool QAbstractSocket::waitForBytesWritten(int msecs)
if (readyToWrite) {
if (d->canWriteNotification()) {
#if defined (QABSTRACTSOCKET_DEBUG)
- qDebug("QAbstractSocket::waitForBytesWritten returns \c true");
+ qDebug("QAbstractSocket::waitForBytesWritten returns true");
#endif
return true;
}
diff --git a/src/opengl/doc/src/qtopengl-examples.qdoc b/src/opengl/doc/src/qtopengl-examples.qdoc
index 67c6aa3c0d2..68adcda173d 100644
--- a/src/opengl/doc/src/qtopengl-examples.qdoc
+++ b/src/opengl/doc/src/qtopengl-examples.qdoc
@@ -33,9 +33,8 @@
\image opengl-examples.png
- These examples describe how to use the Qt OpenGL Module. For new code,
- please use the OpenGL classes in the \l {Qt GUI Module}.
-
+ These examples describe how to use the \l {Qt OpenGL} module. For new code,
+ please use the OpenGL classes in the \l {Qt GUI} module.
Qt provides support for integration with OpenGL implementations on all
platforms, giving developers the opportunity to display hardware accelerated
diff --git a/src/opengl/qglframebufferobject.cpp b/src/opengl/qglframebufferobject.cpp
index ae50366fc77..66e1aca9bcb 100644
--- a/src/opengl/qglframebufferobject.cpp
+++ b/src/opengl/qglframebufferobject.cpp
@@ -554,7 +554,6 @@ void QGLFramebufferObjectPrivate::init(QGLFramebufferObject *q, const QSize &sz,
&& funcs.hasOpenGLExtension(QOpenGLExtensions::PackedDepthStencil)) {
// depth and stencil buffer needs another extension
funcs.glGenRenderbuffers(1, &depth_buffer);
- Q_ASSERT(!funcs.glIsRenderbuffer(depth_buffer));
funcs.glBindRenderbuffer(GL_RENDERBUFFER, depth_buffer);
Q_ASSERT(funcs.glIsRenderbuffer(depth_buffer));
if (samples != 0 && funcs.hasOpenGLExtension(QOpenGLExtensions::FramebufferMultisample))
@@ -581,7 +580,6 @@ void QGLFramebufferObjectPrivate::init(QGLFramebufferObject *q, const QSize &sz,
|| (attachment == QGLFramebufferObject::Depth)))
{
funcs.glGenRenderbuffers(1, &depth_buffer);
- Q_ASSERT(!funcs.glIsRenderbuffer(depth_buffer));
funcs.glBindRenderbuffer(GL_RENDERBUFFER, depth_buffer);
Q_ASSERT(funcs.glIsRenderbuffer(depth_buffer));
if (samples != 0 && funcs.hasOpenGLExtension(QOpenGLExtensions::FramebufferMultisample)) {
@@ -621,7 +619,6 @@ void QGLFramebufferObjectPrivate::init(QGLFramebufferObject *q, const QSize &sz,
if (stencil_buffer == 0 && (attachment == QGLFramebufferObject::CombinedDepthStencil)) {
funcs.glGenRenderbuffers(1, &stencil_buffer);
- Q_ASSERT(!funcs.glIsRenderbuffer(stencil_buffer));
funcs.glBindRenderbuffer(GL_RENDERBUFFER, stencil_buffer);
Q_ASSERT(funcs.glIsRenderbuffer(stencil_buffer));
if (samples != 0 && funcs.hasOpenGLExtension(QOpenGLExtensions::FramebufferMultisample)) {
@@ -779,7 +776,7 @@ void QGLFramebufferObjectPrivate::init(QGLFramebufferObject *q, const QSize &sz,
\note This class has been deprecated in favor of QOpenGLFramebufferObject.
- \sa {Framebuffer Object Example}
+ \sa {Framebuffer Object 2 Example}
*/
diff --git a/src/opengl/qglpixelbuffer.cpp b/src/opengl/qglpixelbuffer.cpp
index bcb2dd53db8..ebc9f296eb1 100644
--- a/src/opengl/qglpixelbuffer.cpp
+++ b/src/opengl/qglpixelbuffer.cpp
@@ -90,7 +90,7 @@
Pbuffers are provided by the OpenGL \c pbuffer extension; call
hasOpenGLPbuffer() to find out if the system provides pbuffers.
- \sa {opengl/pbuffers}{Pbuffers Example}
+ \sa {Pixel Buffers Example}
*/
#include <private/qopenglextensions_p.h>
diff --git a/src/platformsupport/devicediscovery/qdevicediscovery_static.cpp b/src/platformsupport/devicediscovery/qdevicediscovery_static.cpp
index a333d2c0c7b..cbcc0ff5b15 100644
--- a/src/platformsupport/devicediscovery/qdevicediscovery_static.cpp
+++ b/src/platformsupport/devicediscovery/qdevicediscovery_static.cpp
@@ -102,23 +102,27 @@ QDeviceDiscovery::~QDeviceDiscovery()
QStringList QDeviceDiscovery::scanConnectedDevices()
{
QStringList devices;
-
- // check for input devices
- QDir dir(QString::fromLatin1(QT_EVDEV_DEVICE_PATH));
+ QDir dir;
dir.setFilter(QDir::System);
- foreach (const QString &deviceFile, dir.entryList()) {
- QString absoluteFilePath = dir.absolutePath() + QString::fromLatin1("/") + deviceFile;
- if (checkDeviceType(absoluteFilePath))
- devices << absoluteFilePath;
+ // check for input devices
+ if (m_types & Device_InputMask) {
+ dir.setPath(QString::fromLatin1(QT_EVDEV_DEVICE_PATH));
+ foreach (const QString &deviceFile, dir.entryList()) {
+ QString absoluteFilePath = dir.absolutePath() + QString::fromLatin1("/") + deviceFile;
+ if (checkDeviceType(absoluteFilePath))
+ devices << absoluteFilePath;
+ }
}
// check for drm devices
- dir.setPath(QString::fromLatin1(QT_DRM_DEVICE_PATH));
- foreach (const QString &deviceFile, dir.entryList()) {
- QString absoluteFilePath = dir.absolutePath() + QString::fromLatin1("/") + deviceFile;
- if (checkDeviceType(absoluteFilePath))
- devices << absoluteFilePath;
+ if (m_types & Device_VideoMask) {
+ dir.setPath(QString::fromLatin1(QT_DRM_DEVICE_PATH));
+ foreach (const QString &deviceFile, dir.entryList()) {
+ QString absoluteFilePath = dir.absolutePath() + QString::fromLatin1("/") + deviceFile;
+ if (checkDeviceType(absoluteFilePath))
+ devices << absoluteFilePath;
+ }
}
#ifdef QT_QPA_DEVICE_DISCOVERY_DEBUG
diff --git a/src/platformsupport/input/evdevtouch/qevdevtouch.cpp b/src/platformsupport/input/evdevtouch/qevdevtouch.cpp
index d9468ae1b8f..563edf4fd7a 100644
--- a/src/platformsupport/input/evdevtouch/qevdevtouch.cpp
+++ b/src/platformsupport/input/evdevtouch/qevdevtouch.cpp
@@ -157,10 +157,12 @@ void QEvdevTouchScreenData::registerDevice()
#define LONG_BITS (sizeof(long) << 3)
#define NUM_LONGS(bits) (((bits) + LONG_BITS - 1) / LONG_BITS)
+#if defined(QT_NO_MTDEV)
static inline bool testBit(long bit, const long *array)
{
return (array[bit / LONG_BITS] >> bit % LONG_BITS) & 1;
}
+#endif
QEvdevTouchScreenHandler::QEvdevTouchScreenHandler(const QString &specification, QObject *parent)
: QObject(parent), m_notify(0), m_fd(-1), d(0)
@@ -345,40 +347,61 @@ QEvdevTouchScreenHandler::~QEvdevTouchScreenHandler()
void QEvdevTouchScreenHandler::readData()
{
::input_event buffer[32];
- int n = 0;
- for (; ;) {
+ int events = 0;
+
#if !defined(QT_NO_MTDEV)
- int result = mtdev_get(m_mtdev, m_fd, buffer, sizeof(buffer) / sizeof(::input_event));
- if (result > 0)
- result *= sizeof(::input_event);
+ forever {
+ do {
+ events = mtdev_get(m_mtdev, m_fd, buffer, sizeof(buffer) / sizeof(::input_event));
+ // keep trying mtdev_get if we get interrupted. note that we do not
+ // (and should not) handle EAGAIN; EAGAIN means that reading would
+ // block and we'll get back here later to try again anyway.
+ } while (events == -1 && errno == EINTR);
+
+ // 0 events is EOF, -1 means error, handle both in the same place
+ if (events <= 0)
+ goto err;
+
+ // process our shiny new events
+ for (int i = 0; i < events; ++i)
+ d->processInputEvent(&buffer[i]);
+
+ // and try to get more
+ }
#else
- int result = QT_READ(m_fd, reinterpret_cast<char*>(buffer) + n, sizeof(buffer) - n);
-#endif
- if (!result) {
- qWarning("evdevtouch: Got EOF from input device");
- return;
- } else if (result < 0) {
- if (errno != EINTR && errno != EAGAIN) {
- qErrnoWarning(errno, "evdevtouch: Could not read from input device");
- if (errno == ENODEV) { // device got disconnected -> stop reading
- delete m_notify;
- m_notify = 0;
- QT_CLOSE(m_fd);
- m_fd = -1;
- }
- return;
- }
- } else {
- n += result;
- if (n % sizeof(::input_event) == 0)
- break;
- }
+ int n = 0;
+ for (; ;) {
+ events = QT_READ(m_fd, reinterpret_cast<char*>(buffer) + n, sizeof(buffer) - n);
+ if (events <= 0)
+ goto err;
+ n += events;
+ if (n % sizeof(::input_event) == 0)
+ break;
}
n /= sizeof(::input_event);
for (int i = 0; i < n; ++i)
d->processInputEvent(&buffer[i]);
+#endif
+ return;
+
+err:
+ if (!events) {
+ qWarning("evdevtouch: Got EOF from input device");
+ return;
+ } else if (events < 0) {
+ if (errno != EINTR && errno != EAGAIN) {
+ qErrnoWarning(errno, "evdevtouch: Could not read from input device");
+ if (errno == ENODEV) { // device got disconnected -> stop reading
+ delete m_notify;
+ m_notify = 0;
+ QT_CLOSE(m_fd);
+ m_fd = -1;
+ }
+ return;
+ }
+ }
}
void QEvdevTouchScreenData::addTouchPoint(const Contact &contact, Qt::TouchPointStates *combinedStates)
@@ -412,19 +435,31 @@ void QEvdevTouchScreenData::processInputEvent(input_event *data)
if (data->code == ABS_MT_POSITION_X || (m_singleTouch && data->code == ABS_X)) {
m_currentData.x = qBound(hw_range_x_min, data->value, hw_range_x_max);
- if (m_typeB || m_singleTouch)
+ if (m_singleTouch)
+ m_contacts[m_currentSlot].x = m_currentData.x;
+ if (m_typeB) {
m_contacts[m_currentSlot].x = m_currentData.x;
+ if (m_contacts[m_currentSlot].state == Qt::TouchPointStationary)
+ m_contacts[m_currentSlot].state = Qt::TouchPointMoved;
+ }
} else if (data->code == ABS_MT_POSITION_Y || (m_singleTouch && data->code == ABS_Y)) {
m_currentData.y = qBound(hw_range_y_min, data->value, hw_range_y_max);
- if (m_typeB || m_singleTouch)
+ if (m_singleTouch)
m_contacts[m_currentSlot].y = m_currentData.y;
+ if (m_typeB) {
+ m_contacts[m_currentSlot].y = m_currentData.y;
+ if (m_contacts[m_currentSlot].state == Qt::TouchPointStationary)
+ m_contacts[m_currentSlot].state = Qt::TouchPointMoved;
+ }
} else if (data->code == ABS_MT_TRACKING_ID) {
m_currentData.trackingId = data->value;
if (m_typeB) {
- if (m_currentData.trackingId == -1)
+ if (m_currentData.trackingId == -1) {
m_contacts[m_currentSlot].state = Qt::TouchPointReleased;
- else
+ } else {
+ m_contacts[m_currentSlot].state = Qt::TouchPointPressed;
m_contacts[m_currentSlot].trackingId = m_currentData.trackingId;
+ }
}
} else if (data->code == ABS_MT_TOUCH_MAJOR) {
m_currentData.maj = data->value;
@@ -468,8 +503,11 @@ void QEvdevTouchScreenData::processInputEvent(input_event *data)
it.next();
Contact &contact(it.value());
+ if (!contact.state)
+ continue;
+
int key = m_typeB ? it.key() : contact.trackingId;
- if (m_lastContacts.contains(key)) {
+ if (!m_typeB && m_lastContacts.contains(key)) {
const Contact &prev(m_lastContacts.value(key));
if (contact.state == Qt::TouchPointReleased) {
// Copy over the previous values for released points, just in case.
@@ -483,7 +521,7 @@ void QEvdevTouchScreenData::processInputEvent(input_event *data)
}
// Avoid reporting a contact in released state more than once.
- if (contact.state == Qt::TouchPointReleased
+ if (!m_typeB && contact.state == Qt::TouchPointReleased
&& !m_lastContacts.contains(key)) {
it.remove();
continue;
@@ -509,8 +547,14 @@ void QEvdevTouchScreenData::processInputEvent(input_event *data)
while (it.hasNext()) {
it.next();
Contact &contact(it.value());
- if (contact.state == Qt::TouchPointReleased)
- it.remove();
+ if (contact.state == Qt::TouchPointReleased) {
+ if (m_typeB)
+ contact.state = static_cast<Qt::TouchPointState>(0);
+ else
+ it.remove();
+ } else {
+ contact.state = Qt::TouchPointStationary;
+ }
}
m_lastContacts = m_contacts;
diff --git a/src/platformsupport/linuxaccessibility/constant_mappings.cpp b/src/platformsupport/linuxaccessibility/constant_mappings.cpp
index 3524fca052c..f8bfaf47536 100644
--- a/src/platformsupport/linuxaccessibility/constant_mappings.cpp
+++ b/src/platformsupport/linuxaccessibility/constant_mappings.cpp
@@ -61,17 +61,12 @@ quint64 spiStatesFromQState(QAccessible::State state)
{
quint64 spiState = 0;
- setSpiStateBit(&spiState, ATSPI_STATE_EDITABLE);
- setSpiStateBit(&spiState, ATSPI_STATE_ENABLED);
- setSpiStateBit(&spiState, ATSPI_STATE_SHOWING);
- setSpiStateBit(&spiState, ATSPI_STATE_VISIBLE);
- setSpiStateBit(&spiState, ATSPI_STATE_SENSITIVE);
-
- if (state.disabled) {
- unsetSpiStateBit(&spiState, ATSPI_STATE_ENABLED);
- unsetSpiStateBit(&spiState, ATSPI_STATE_SENSITIVE);
+ if (state.editable)
+ setSpiStateBit(&spiState, ATSPI_STATE_EDITABLE);
+ if (!state.disabled) {
+ setSpiStateBit(&spiState, ATSPI_STATE_ENABLED);
+ setSpiStateBit(&spiState, ATSPI_STATE_SENSITIVE);
}
-
if (state.selected)
setSpiStateBit(&spiState, ATSPI_STATE_SELECTED);
if (state.focused)
@@ -95,9 +90,9 @@ quint64 spiStatesFromQState(QAccessible::State state)
setSpiStateBit(&spiState, ATSPI_STATE_BUSY);
if (state.marqueed || state.animated)
setSpiStateBit(&spiState, ATSPI_STATE_ANIMATED);
- if (state.invisible || state.offscreen) {
- unsetSpiStateBit(&spiState, ATSPI_STATE_SHOWING);
- unsetSpiStateBit(&spiState, ATSPI_STATE_VISIBLE);
+ if (!state.invisible && !state.offscreen) {
+ setSpiStateBit(&spiState, ATSPI_STATE_SHOWING);
+ setSpiStateBit(&spiState, ATSPI_STATE_VISIBLE);
}
if (state.sizeable)
setSpiStateBit(&spiState, ATSPI_STATE_RESIZABLE);
@@ -118,10 +113,8 @@ quint64 spiStatesFromQState(QAccessible::State state)
// if (state.HasPopup)
if (state.modal)
setSpiStateBit(&spiState, ATSPI_STATE_MODAL);
-
- // Not implemented in Qt
- // if (state.singleLine)
- // setSpiStateBit(&spiState, ATSPI_STATE_SINGLE_LINE);
+ if (state.multiLine)
+ setSpiStateBit(&spiState, ATSPI_STATE_MULTI_LINE);
return spiState;
}
diff --git a/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp b/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp
index 42b3d64a472..c72815ca1b4 100644
--- a/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp
+++ b/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp
@@ -318,19 +318,23 @@ void QKdeThemePrivate::readKdeSystemPalette(const QSettings &kdeSettings, QPalet
const QBrush buttonBrushDark = QBrush(button.darker(v > 128 ? 200 : 50));
const QBrush buttonBrushDark150 = QBrush(button.darker(v > 128 ? 150 : 75));
const QBrush buttonBrushLight150 = QBrush(button.lighter(v > 128 ? 150 : 75));
+ const QBrush buttonBrushLight = QBrush(button.lighter(v > 128 ? 200 : 50));
pal->setBrush(QPalette::Disabled, QPalette::WindowText, buttonBrushDark);
pal->setBrush(QPalette::Disabled, QPalette::ButtonText, buttonBrushDark);
pal->setBrush(QPalette::Disabled, QPalette::Button, buttonBrush);
- pal->setBrush(QPalette::Disabled, QPalette::Light, buttonBrushLight150);
- pal->setBrush(QPalette::Disabled, QPalette::Dark, buttonBrushDark);
- pal->setBrush(QPalette::Disabled, QPalette::Mid, buttonBrushDark150);
pal->setBrush(QPalette::Disabled, QPalette::Text, buttonBrushDark);
pal->setBrush(QPalette::Disabled, QPalette::BrightText, whiteBrush);
pal->setBrush(QPalette::Disabled, QPalette::Base, buttonBrush);
pal->setBrush(QPalette::Disabled, QPalette::Window, buttonBrush);
pal->setBrush(QPalette::Disabled, QPalette::Highlight, buttonBrushDark150);
pal->setBrush(QPalette::Disabled, QPalette::HighlightedText, buttonBrushLight150);
+
+ // set calculated colors for all groups
+ pal->setBrush(QPalette::Light, buttonBrushLight);
+ pal->setBrush(QPalette::Midlight, buttonBrushLight150);
+ pal->setBrush(QPalette::Mid, buttonBrushDark150);
+ pal->setBrush(QPalette::Dark, buttonBrushDark);
}
/*!
diff --git a/src/plugins/accessible/widgets/main.cpp b/src/plugins/accessible/widgets/main.cpp
index 36ee784aacb..717c15edd19 100644
--- a/src/plugins/accessible/widgets/main.cpp
+++ b/src/plugins/accessible/widgets/main.cpp
@@ -247,6 +247,8 @@ QAccessibleInterface *AccessibleFactory::create(const QString &classname, QObjec
iface = 0;
} else if (classname == QLatin1String("QWidget")) {
iface = new QAccessibleWidget(widget);
+ } else if (classname == QLatin1String("QWindowContainer")) {
+ iface = new QAccessibleWindowContainer(widget);
}
return iface;
diff --git a/src/plugins/accessible/widgets/simplewidgets.cpp b/src/plugins/accessible/widgets/simplewidgets.cpp
index 1dac199a095..c275ec071d0 100644
--- a/src/plugins/accessible/widgets/simplewidgets.cpp
+++ b/src/plugins/accessible/widgets/simplewidgets.cpp
@@ -57,6 +57,8 @@
#include <qstyle.h>
#include <qstyleoption.h>
#include <qtextdocument.h>
+#include <qwindow.h>
+#include <private/qwindowcontainer_p.h>
#include <QtCore/qvarlengtharray.h>
#ifdef Q_OS_MAC
@@ -845,7 +847,38 @@ QProgressBar *QAccessibleProgressBar::progressBar() const
}
#endif
+
+QAccessibleWindowContainer::QAccessibleWindowContainer(QWidget *w)
+ : QAccessibleWidget(w)
+{
+}
+
+int QAccessibleWindowContainer::childCount() const
+{
+ if (container()->containedWindow())
+ return 1;
+ return 0;
+}
+
+int QAccessibleWindowContainer::indexOfChild(const QAccessibleInterface *child) const
+{
+ if (child->object() == container()->containedWindow())
+ return 0;
+ return -1;
+}
+
+QAccessibleInterface *QAccessibleWindowContainer::child(int i) const
+{
+ if (i == 0)
+ return QAccessible::queryAccessibleInterface(container()->containedWindow());
+ return 0;
+}
+
+QWindowContainer *QAccessibleWindowContainer::container() const
+{
+ return static_cast<QWindowContainer *>(widget());
+}
+
#endif // QT_NO_ACCESSIBILITY
QT_END_NAMESPACE
-
diff --git a/src/plugins/accessible/widgets/simplewidgets.h b/src/plugins/accessible/widgets/simplewidgets.h
index 60247880488..be19d8324f4 100644
--- a/src/plugins/accessible/widgets/simplewidgets.h
+++ b/src/plugins/accessible/widgets/simplewidgets.h
@@ -195,6 +195,19 @@ protected:
};
#endif
+class QWindowContainer;
+class QAccessibleWindowContainer : public QAccessibleWidget
+{
+public:
+ QAccessibleWindowContainer(QWidget *w);
+ int childCount() const Q_DECL_OVERRIDE;
+ int indexOfChild(const QAccessibleInterface *child) const Q_DECL_OVERRIDE;
+ QAccessibleInterface *child(int i) const Q_DECL_OVERRIDE;
+
+private:
+ QWindowContainer *container() const;
+};
+
#endif // QT_NO_ACCESSIBILITY
QT_END_NAMESPACE
diff --git a/src/plugins/accessible/widgets/widgets.json b/src/plugins/accessible/widgets/widgets.json
index 3969fcd527b..9ebcc89d35b 100644
--- a/src/plugins/accessible/widgets/widgets.json
+++ b/src/plugins/accessible/widgets/widgets.json
@@ -48,6 +48,7 @@
"QScrollArea",
"QCalendarWidget",
"QDockWidget",
- "QDesktopScreenWidget"
+ "QDesktopScreenWidget",
+ "QWindowContainer"
]
}
diff --git a/src/plugins/platforms/android/androidjnimain.cpp b/src/plugins/platforms/android/androidjnimain.cpp
index 1653c0ffdd4..e997a49a258 100644
--- a/src/plugins/platforms/android/androidjnimain.cpp
+++ b/src/plugins/platforms/android/androidjnimain.cpp
@@ -325,6 +325,14 @@ namespace QtAndroid
return m_qtTag;
}
+ QString deviceName()
+ {
+ QString manufacturer = QJNIObjectPrivate::getStaticObjectField("android/os/Build", "MANUFACTURER", "Ljava/lang/String;").toString();
+ QString model = QJNIObjectPrivate::getStaticObjectField("android/os/Build", "MODEL", "Ljava/lang/String;").toString();
+
+ return manufacturer + QStringLiteral(" ") + model;
+ }
+
int createSurface(AndroidSurfaceClient *client, const QRect &geometry, bool onTop)
{
QJNIEnvironmentPrivate env;
@@ -369,6 +377,7 @@ namespace QtAndroid
x, y, w, h);
}
+
void destroySurface(int surfaceId)
{
QMutexLocker lock(&m_surfacesMutex);
@@ -385,7 +394,8 @@ namespace QtAndroid
m_destroySurfaceMethodID,
surfaceId);
}
-}
+} // namespace QtAndroid
+
static jboolean startQtAndroidPlugin(JNIEnv* /*env*/, jobject /*object*//*, jobject applicationAssetManager*/)
{
diff --git a/src/plugins/platforms/android/androidjnimain.h b/src/plugins/platforms/android/androidjnimain.h
index 24287df474c..eb8dd87ae03 100644
--- a/src/plugins/platforms/android/androidjnimain.h
+++ b/src/plugins/platforms/android/androidjnimain.h
@@ -116,5 +116,6 @@ namespace QtAndroid
const char *methodErrorMsgFmt();
const char *qtTagText();
+ QString deviceName();
}
#endif // ANDROID_APP_H
diff --git a/src/plugins/platforms/android/qandroidplatformintegration.cpp b/src/plugins/platforms/android/qandroidplatformintegration.cpp
index 8925f048185..3dc86323740 100644
--- a/src/plugins/platforms/android/qandroidplatformintegration.cpp
+++ b/src/plugins/platforms/android/qandroidplatformintegration.cpp
@@ -47,20 +47,21 @@
#include <QtPlatformSupport/private/qgenericunixeventdispatcher_p.h>
-#include <qpa/qplatformwindow.h>
#include <qpa/qwindowsysteminterface.h>
+#include <qpa/qplatformwindow.h>
+#warning sort the headers
#include "androidjnimain.h"
#include "qabstracteventdispatcher.h"
-#include "qandroidplatformaccessibility.h"
-#include "qandroidplatformclipboard.h"
-#include "qandroidplatformfontdatabase.h"
+#include "qandroidplatformrasterwindow.h"
+#include "qandroidplatformopenglwindow.h"
#include "qandroidplatformbackingstore.h"
+#include "qandroidplatformservices.h"
+#include "qandroidplatformfontdatabase.h"
+#include "qandroidplatformclipboard.h"
+#include "qandroidplatformaccessibility.h"
#include "qandroidplatformopenglcontext.h"
-#include "qandroidplatformopenglwindow.h"
-#include "qandroidplatformrasterwindow.h"
#include "qandroidplatformscreen.h"
-#include "qandroidplatformservices.h"
#include "qandroidplatformtheme.h"
#include "qandroidsystemlocale.h"
@@ -85,6 +86,10 @@ void *QAndroidPlatformNativeInterface::nativeResourceForIntegration(const QByteA
return &m_palettes;
if (resource == "AndroidStyleFonts")
return &m_fonts;
+ if (resource == "AndroidDeviceName") {
+ static QString deviceName = QtAndroid::deviceName();
+ return &deviceName;
+ }
return 0;
}
@@ -119,11 +124,23 @@ QAndroidPlatformIntegration::QAndroidPlatformIntegration(const QStringList &para
m_androidFDB = new QAndroidPlatformFontDatabase();
m_androidPlatformServices = new QAndroidPlatformServices();
+
+#ifndef QT_NO_CLIPBOARD
m_androidPlatformClipboard = new QAndroidPlatformClipboard();
+#endif
m_androidSystemLocale = new QAndroidSystemLocale;
}
+bool QAndroidPlatformIntegration::needsWorkaround()
+{
+ static bool needsWorkaround =
+ QtAndroid::deviceName().compare(QStringLiteral("samsung SM-T211"), Qt::CaseInsensitive) == 0
+ || QtAndroid::deviceName().compare(QStringLiteral("samsung SM-T210"), Qt::CaseInsensitive) == 0
+ || QtAndroid::deviceName().compare(QStringLiteral("samsung SM-T215"), Qt::CaseInsensitive) == 0;
+ return needsWorkaround;
+}
+
bool QAndroidPlatformIntegration::hasCapability(Capability cap) const
{
switch (cap) {
@@ -131,7 +148,10 @@ bool QAndroidPlatformIntegration::hasCapability(Capability cap) const
case ApplicationState: return true;
case NativeWidgets: return true;
case OpenGL: return true;
- case ThreadedOpenGL: return true;
+ case ThreadedOpenGL:
+ if (needsWorkaround())
+ return false;
+ // fall through
default:
return QPlatformIntegration::hasCapability(cap);
}
@@ -173,6 +193,11 @@ QAndroidPlatformIntegration::~QAndroidPlatformIntegration()
delete m_androidPlatformNativeInterface;
delete m_androidFDB;
delete m_androidSystemLocale;
+
+#ifndef QT_NO_CLIPBOARD
+ delete m_androidPlatformClipboard;
+#endif
+
QtAndroid::setAndroidPlatformIntegration(NULL);
}
@@ -184,11 +209,7 @@ QPlatformFontDatabase *QAndroidPlatformIntegration::fontDatabase() const
#ifndef QT_NO_CLIPBOARD
QPlatformClipboard *QAndroidPlatformIntegration::clipboard() const
{
-static QAndroidPlatformClipboard *clipboard = 0;
- if (!clipboard)
- clipboard = new QAndroidPlatformClipboard;
-
- return clipboard;
+ return m_androidPlatformClipboard;
}
#endif
diff --git a/src/plugins/platforms/android/qandroidplatformintegration.h b/src/plugins/platforms/android/qandroidplatformintegration.h
index a6cba7ac163..0dc24153378 100644
--- a/src/plugins/platforms/android/qandroidplatformintegration.h
+++ b/src/plugins/platforms/android/qandroidplatformintegration.h
@@ -121,8 +121,9 @@ public:
QTouchDevice *touchDevice() const { return m_touchDevice; }
void setTouchDevice(QTouchDevice *touchDevice) { m_touchDevice = touchDevice; }
-private:
+ static bool needsWorkaround();
EGLDisplay m_eglDisplay;
+private:
QTouchDevice *m_touchDevice;
@@ -143,7 +144,11 @@ private:
QPainter *m_compositePainter;
QAndroidPlatformNativeInterface *m_androidPlatformNativeInterface;
QAndroidPlatformServices *m_androidPlatformServices;
+
+#ifndef QT_NO_CLIPBOARD
QPlatformClipboard *m_androidPlatformClipboard;
+#endif
+
QAndroidSystemLocale *m_androidSystemLocale;
#ifndef QT_NO_ACCESSIBILITY
mutable QPlatformAccessibility *m_accessibility;
diff --git a/src/plugins/platforms/android/qandroidplatformopenglcontext.cpp b/src/plugins/platforms/android/qandroidplatformopenglcontext.cpp
index d99cafe6b7d..59ca69c004c 100644
--- a/src/plugins/platforms/android/qandroidplatformopenglcontext.cpp
+++ b/src/plugins/platforms/android/qandroidplatformopenglcontext.cpp
@@ -42,6 +42,7 @@
#include "qandroidplatformopenglcontext.h"
#include "qandroidplatformopenglwindow.h"
+#include "qandroidplatformintegration.h"
#include <QSurface>
#include <QtGui/private/qopenglcontext_p.h>
@@ -64,12 +65,14 @@ void QAndroidPlatformOpenGLContext::swapBuffers(QPlatformSurface *surface)
bool QAndroidPlatformOpenGLContext::makeCurrent(QPlatformSurface *surface)
{
bool ret = QEGLPlatformContext::makeCurrent(surface);
+ QOpenGLContextPrivate *ctx_d = QOpenGLContextPrivate::get(context());
const char *rendererString = reinterpret_cast<const char *>(glGetString(GL_RENDERER));
- if (rendererString != 0 && qstrncmp(rendererString, "Android Emulator", 16) == 0) {
- QOpenGLContextPrivate *ctx_d = QOpenGLContextPrivate::get(context());
+ if (rendererString != 0 && qstrncmp(rendererString, "Android Emulator", 16) == 0)
ctx_d->workaround_missingPrecisionQualifiers = true;
- }
+
+ if (!ctx_d->workaround_brokenFBOReadBack && QAndroidPlatformIntegration::needsWorkaround())
+ ctx_d->workaround_brokenFBOReadBack = true;
return ret;
}
diff --git a/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm b/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm
index 08505d91a28..f401459cc3b 100644
--- a/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm
+++ b/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm
@@ -665,8 +665,10 @@ void QCocoaFileDialogHelper::selectNameFilter(const QString &filter)
const int index = options()->nameFilters().indexOf(filter);
if (index != -1) {
QNSOpenSavePanelDelegate *delegate = static_cast<QNSOpenSavePanelDelegate *>(mDelegate);
- if (!delegate)
+ if (!delegate) {
+ options()->setInitiallySelectedNameFilter(filter);
return;
+ }
[delegate->mPopUpButton selectItemAtIndex:index];
[delegate filterChanged:nil];
}
@@ -676,7 +678,7 @@ QString QCocoaFileDialogHelper::selectedNameFilter() const
{
QNSOpenSavePanelDelegate *delegate = static_cast<QNSOpenSavePanelDelegate *>(mDelegate);
if (!delegate)
- return QString();
+ return options()->initiallySelectedNameFilter();
int index = [delegate->mPopUpButton indexOfSelectedItem];
if (index >= options()->nameFilters().count())
return QString();
diff --git a/src/plugins/platforms/cocoa/qcocoasystemsettings.mm b/src/plugins/platforms/cocoa/qcocoasystemsettings.mm
index 194394d11a0..1c08d4bcb7d 100644
--- a/src/plugins/platforms/cocoa/qcocoasystemsettings.mm
+++ b/src/plugins/platforms/cocoa/qcocoasystemsettings.mm
@@ -254,6 +254,7 @@ QHash<QPlatformTheme::Font, QFont *> qt_mac_createRoleFonts()
fonts.insert(QPlatformTheme::ListBoxFont, qt_mac_qfontForThemeFont(kThemeViewsFont));
fonts.insert(QPlatformTheme::TitleBarFont, qt_mac_qfontForThemeFont(kThemeWindowTitleFont));
fonts.insert(QPlatformTheme::MenuFont, qt_mac_qfontForThemeFont(kThemeMenuItemFont));
+ fonts.insert(QPlatformTheme::MenuBarFont, qt_mac_qfontForThemeFont(kThemeMenuItemFont));
fonts.insert(QPlatformTheme::ComboMenuItemFont, qt_mac_qfontForThemeFont(kThemeSystemFont));
fonts.insert(QPlatformTheme::HeaderViewFont, qt_mac_qfontForThemeFont(kThemeSmallSystemFont));
fonts.insert(QPlatformTheme::TipLabelFont, qt_mac_qfontForThemeFont(kThemeSmallSystemFont));
diff --git a/src/plugins/platforms/cocoa/qcocoawindow.h b/src/plugins/platforms/cocoa/qcocoawindow.h
index 9fbd10dea5f..7b9768fcd9f 100644
--- a/src/plugins/platforms/cocoa/qcocoawindow.h
+++ b/src/plugins/platforms/cocoa/qcocoawindow.h
@@ -219,7 +219,6 @@ public: // for QNSView
QRect m_exposedGeometry;
int m_registerTouchCount;
bool m_resizableTransientParent;
- bool m_overrideBecomeKey;
bool m_hiddenByClipping;
bool m_hiddenByAncestor;
diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm
index 8becfb1cc26..70a08bbea50 100644
--- a/src/plugins/platforms/cocoa/qcocoawindow.mm
+++ b/src/plugins/platforms/cocoa/qcocoawindow.mm
@@ -125,8 +125,7 @@ static bool isMouseEvent(NSEvent *ev)
// Only tool or dialog windows should become key:
if (m_cocoaPlatformWindow && m_cocoaPlatformWindow->windowShouldBehaveAsPanel()) {
Qt::WindowType type = m_cocoaPlatformWindow->window()->type();
- if (m_cocoaPlatformWindow->m_overrideBecomeKey
- || type == Qt::Tool || type == Qt::Dialog)
+ if (type == Qt::Tool || type == Qt::Dialog)
return YES;
return NO;
}
@@ -224,7 +223,6 @@ QCocoaWindow::QCocoaWindow(QWindow *tlw)
, m_isExposed(false)
, m_registerTouchCount(0)
, m_resizableTransientParent(false)
- , m_overrideBecomeKey(false)
, m_hiddenByClipping(false)
, m_hiddenByAncestor(false)
, m_alertRequest(NoAlertRequest)
@@ -290,6 +288,7 @@ QCocoaWindow::~QCocoaWindow()
[m_contentView release];
[m_nsWindow release];
[m_nsWindowDelegate release];
+ [m_windowCursor release];
}
QSurfaceFormat QCocoaWindow::format() const
@@ -583,7 +582,7 @@ NSInteger QCocoaWindow::windowLevel(Qt::WindowFlags flags)
// StayOnTop window should appear above Tool windows.
if (flags & Qt::WindowStaysOnTopHint)
- windowLevel = NSPopUpMenuWindowLevel;
+ windowLevel = NSModalPanelWindowLevel;
// Tooltips should appear above StayOnTop windows.
if (type == Qt::ToolTip)
windowLevel = NSScreenSaverWindowLevel;
@@ -882,8 +881,6 @@ bool QCocoaWindow::setKeyboardGrabEnabled(bool grab)
if (!m_nsWindow)
return false;
- m_overrideBecomeKey = grab;
-
if (grab && ![m_nsWindow isKeyWindow])
[m_nsWindow makeKeyWindow];
else if (!grab && [m_nsWindow isKeyWindow])
@@ -896,8 +893,6 @@ bool QCocoaWindow::setMouseGrabEnabled(bool grab)
if (!m_nsWindow)
return false;
- m_overrideBecomeKey = grab;
-
if (grab && ![m_nsWindow isKeyWindow])
[m_nsWindow makeKeyWindow];
else if (!grab && [m_nsWindow isKeyWindow])
@@ -1313,8 +1308,10 @@ void QCocoaWindow::setWindowCursor(NSCursor *cursor)
// for a popup window.) Qt expects the set cursor to "stick":
// it should be accociated with the window until a different
// cursor is set.
-
- m_windowCursor = cursor;
+ if (m_windowCursor != cursor) {
+ [m_windowCursor release];
+ m_windowCursor = [cursor retain];
+ }
// Use the built in cursor rect API if the QCocoaWindow has a NSWindow.
// Othervise, set the cursor if this window is under the mouse. In
diff --git a/src/plugins/platforms/cocoa/qnsview.h b/src/plugins/platforms/cocoa/qnsview.h
index 403f8dc78a3..7e146c5f583 100644
--- a/src/plugins/platforms/cocoa/qnsview.h
+++ b/src/plugins/platforms/cocoa/qnsview.h
@@ -71,6 +71,7 @@ QT_END_NAMESPACE
bool m_subscribesForGlobalFrameNotifications;
QCocoaGLContext *m_glContext;
bool m_shouldSetGLContextinDrawRect;
+ NSString *m_inputSource;
}
- (id)init;
diff --git a/src/plugins/platforms/cocoa/qnsview.mm b/src/plugins/platforms/cocoa/qnsview.mm
index b272b4920b0..58c732de985 100644
--- a/src/plugins/platforms/cocoa/qnsview.mm
+++ b/src/plugins/platforms/cocoa/qnsview.mm
@@ -90,6 +90,7 @@ static QTouchDevice *touchDevice = 0;
m_shouldSetGLContextinDrawRect = false;
currentCustomDragTypes = 0;
m_sendUpAsRightButton = false;
+ m_inputSource = 0;
if (!touchDevice) {
touchDevice = new QTouchDevice;
@@ -108,6 +109,7 @@ static QTouchDevice *touchDevice = 0;
m_maskData = 0;
m_window = 0;
m_subscribesForGlobalFrameNotifications = false;
+ [m_inputSource release];
[[NSNotificationCenter defaultCenter] removeObserver:self];
delete currentCustomDragTypes;
@@ -859,6 +861,12 @@ Q_GLOBAL_STATIC(QCocoaTabletDeviceDataHash, tabletDeviceDataHash)
uint deviceId = [theEvent deviceID];
if (!tabletDeviceDataHash->contains(deviceId)) {
+ // 10.6 sends tablet events for trackpad interaction, but
+ // not proximity events. Silence the warning to prevent
+ // flooding the console.
+ if (QSysInfo::QSysInfo::MacintoshVersion == QSysInfo::MV_10_6)
+ return;
+
qWarning("QNSView handleTabletEvent: This tablet device is unknown"
" (received no proximity event for it). Discarding event.");
return;
@@ -1245,6 +1253,10 @@ static QTabletEvent::TabletDevice wacomTabletDevice(NSEvent *theEvent)
Qt::KeyboardModifiers modifiers = [QNSView convertKeyModifiers: nativeModifiers];
NSString *charactersIgnoringModifiers = [nsevent charactersIgnoringModifiers];
NSString *characters = [nsevent characters];
+ if (m_inputSource != characters) {
+ [m_inputSource release];
+ m_inputSource = [characters retain];
+ }
// There is no way to get the scan code from carbon/cocoa. But we cannot
// use the value 0, since it indicates that the event originates from somewhere
@@ -1375,6 +1387,11 @@ static QTabletEvent::TabletDevice wacomTabletDevice(NSEvent *theEvent)
{
Q_UNUSED(replacementRange)
+ if (m_sendKeyEvent && m_composingText.isEmpty() && [aString isEqualToString:m_inputSource]) {
+ // don't send input method events for simple text input (let handleKeyEvent send key events instead)
+ return;
+ }
+
QString commitString;
if ([aString length]) {
if ([aString isKindOfClass:[NSAttributedString class]]) {
diff --git a/src/plugins/platforms/minimalegl/main.cpp b/src/plugins/platforms/minimalegl/main.cpp
index be85fa082e8..ce8838ced02 100644
--- a/src/plugins/platforms/minimalegl/main.cpp
+++ b/src/plugins/platforms/minimalegl/main.cpp
@@ -49,17 +49,9 @@ class QMinimalEglIntegrationPlugin : public QPlatformIntegrationPlugin
Q_OBJECT
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.2" FILE "minimalegl.json")
public:
- QStringList keys() const;
QPlatformIntegration *create(const QString&, const QStringList&);
};
-QStringList QMinimalEglIntegrationPlugin::keys() const
-{
- QStringList list;
- list << "MinimalEgl";
- return list;
-}
-
QPlatformIntegration* QMinimalEglIntegrationPlugin::create(const QString& system, const QStringList& paramList)
{
Q_UNUSED(paramList);
diff --git a/src/plugins/platforms/qnx/qqnxeglwindow.cpp b/src/plugins/platforms/qnx/qqnxeglwindow.cpp
index 931fe0b2888..45a7bab8717 100644
--- a/src/plugins/platforms/qnx/qqnxeglwindow.cpp
+++ b/src/plugins/platforms/qnx/qqnxeglwindow.cpp
@@ -63,6 +63,13 @@ QQnxEglWindow::QQnxEglWindow(QWindow *window, screen_context_t context, bool nee
m_eglSurface(EGL_NO_SURFACE)
{
initWindow();
+
+ // Set window usage
+ const int val = SCREEN_USAGE_OPENGL_ES2;
+ const int result = screen_set_window_property_iv(nativeHandle(), SCREEN_PROPERTY_USAGE, &val);
+ if (result != 0)
+ qFatal("QQnxEglWindow: failed to set window alpha usage, errno=%d", errno);
+
m_requestedBufferSize = screen()->rootWindow() == this ?
screen()->geometry().size() : window->geometry().size();
}
diff --git a/src/plugins/platforms/qnx/qqnxrasterwindow.cpp b/src/plugins/platforms/qnx/qqnxrasterwindow.cpp
index e5d78462534..2c0639e8e32 100644
--- a/src/plugins/platforms/qnx/qqnxrasterwindow.cpp
+++ b/src/plugins/platforms/qnx/qqnxrasterwindow.cpp
@@ -62,6 +62,12 @@ QQnxRasterWindow::QQnxRasterWindow(QWindow *window, screen_context_t context, bo
m_previousBufferIndex(-1)
{
initWindow();
+
+ // Set window usage
+ const int val = SCREEN_USAGE_NATIVE | SCREEN_USAGE_READ | SCREEN_USAGE_WRITE;
+ const int result = screen_set_window_property_iv(nativeHandle(), SCREEN_PROPERTY_USAGE, &val);
+ if (result != 0)
+ qFatal("QQnxEglWindow: failed to set window alpha usage, errno=%d", errno);
}
void QQnxRasterWindow::post(const QRegion &dirty)
diff --git a/src/plugins/platforms/qnx/qqnxscreen.cpp b/src/plugins/platforms/qnx/qqnxscreen.cpp
index 1bffeca1542..a6c69164c73 100644
--- a/src/plugins/platforms/qnx/qqnxscreen.cpp
+++ b/src/plugins/platforms/qnx/qqnxscreen.cpp
@@ -564,7 +564,7 @@ void QQnxScreen::updateHierarchy()
// After a hierarchy update, we need to force a flush on all screens.
// Right now, all screens share a context.
- screen_flush_context( m_screenContext, 0 );
+ screen_flush_context(m_screenContext, 0);
}
void QQnxScreen::adjustOrientation()
diff --git a/src/plugins/platforms/windows/qwindowskeymapper.cpp b/src/plugins/platforms/windows/qwindowskeymapper.cpp
index 00782ed0509..0b257cc48fd 100644
--- a/src/plugins/platforms/windows/qwindowskeymapper.cpp
+++ b/src/plugins/platforms/windows/qwindowskeymapper.cpp
@@ -747,10 +747,10 @@ bool QWindowsKeyMapper::translateKeyEvent(QWindow *widget, HWND hwnd,
return true;
}
- // WM_CHAR messages already contain the character in question so there is
+ // WM_(IME_)CHAR messages already contain the character in question so there is
// no need to fiddle with our key map. In any other case add this key to the
// keymap if it is not present yet.
- if (msg.message != WM_CHAR)
+ if (msg.message != WM_CHAR && msg.message != WM_IME_CHAR)
updateKeyMap(msg);
MSG peekedMsg;
diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp
index 433d6d5948c..3d79f742b35 100644
--- a/src/plugins/platforms/xcb/qxcbwindow.cpp
+++ b/src/plugins/platforms/xcb/qxcbwindow.cpp
@@ -1548,7 +1548,7 @@ void QXcbWindow::handleClientMessageEvent(const xcb_client_message_event_t *even
handleXEmbedMessage(event);
} else if (event->type == atom(QXcbAtom::_NET_ACTIVE_WINDOW)) {
connection()->setFocusWindow(this);
- QWindowSystemInterface::handleWindowActivated(window());
+ QWindowSystemInterface::handleWindowActivated(window(), Qt::ActiveWindowFocusReason);
} else if (event->type == atom(QXcbAtom::MANAGER)
|| event->type == atom(QXcbAtom::_NET_WM_STATE)
|| event->type == atom(QXcbAtom::WM_CHANGE_STATE)) {
@@ -1865,14 +1865,14 @@ void QXcbWindow::handleFocusInEvent(const xcb_focus_in_event_t *)
QWindow *w = window();
w = static_cast<QWindowPrivate *>(QObjectPrivate::get(w))->eventReceiver();
connection()->setFocusWindow(static_cast<QXcbWindow *>(w->handle()));
- QWindowSystemInterface::handleWindowActivated(w);
+ QWindowSystemInterface::handleWindowActivated(w, Qt::ActiveWindowFocusReason);
}
static bool focusInPeeker(QXcbConnection *connection, xcb_generic_event_t *event)
{
if (!event) {
// FocusIn event is not in the queue, proceed with FocusOut normally.
- QWindowSystemInterface::handleWindowActivated(0);
+ QWindowSystemInterface::handleWindowActivated(0, Qt::ActiveWindowFocusReason);
return true;
}
uint response_type = event->response_type & ~0x80;
diff --git a/src/sql/doc/src/sql-driver.qdoc b/src/sql/doc/src/sql-driver.qdoc
index b7617792f8c..9858e30ff95 100644
--- a/src/sql/doc/src/sql-driver.qdoc
+++ b/src/sql/doc/src/sql-driver.qdoc
@@ -175,73 +175,6 @@
built in release mode only. If you are expecting a debug version
to be built as well, don't use the \c{"-o Makefile"} option.
- \section3 How to build the MySQL driver for MinGW users
-
- The following steps have been used successfully for WinXP SP3. In
- this example, Qt 4.6.2 is shown.
-
- \list
-
- \li Download the following components:
- \list
- \li \c{MinGW-5.1.6.exe}
- \li \c{mingw-utils-0.3.tar.gz}
- \li Qt sources, e.g. \c{qt-everywhere-opensource-src-4.6.2.zip}
- \li \c{mysql-5.1.35-win32.msi}
- \endlist
-
- \li Install \c{MinGW-5.1.6.exe} in, e.g. \c{C:\MinGW}.
-
- \li Extract \c{mingw-utils-0.3.tar.gz} into, e.g. \c{C:\MinGW}.
-
- \li Add the path for \c{MinGW-5.1.6.exe} to your \c{PATH} variable,
- e.g. \c{C:\MinGW\bin;}
-
- \li Extract the Qt sources, (\c{qt-everywhere-opensource-src-4.6.2.zip}),
- into, e.g. \c{C:\Qt}.
-
- \li Add the path for the eventual Qt binary to your \c{PATH} variable,
- e.g. \c{C:\Qt\4.6.2\bin;}.
-
- \li Install MySQL (\c{mysql-5.1.35-win32.msi}), customizing the
- components. Select only the headers and libraries. Install in,
- e.g. \c{C:\MySQL\MySQL51}.
-
- \li Open the DOS prompt, go to \c{C:\MySQL\MySQL51\lib\opt}, and run
- the following commands:
- \list
- \li \c{reimp -d libmysql.lib}
- \li \c{dlltool -k -d libmysql.def -l libmysql.a}
- \endlist
-
- \li Open the DOS prompt, go to \c{C:\Qt\4.6.2} and run the following commands:
- \list
- \li \c{configure.exe -debug-and-release -platform win32-g++ -qt-sql-mysql
- -l mysql -I C:\MySQL\MySQL51\include -L C:\MySQL\MySQL51\lib\opt}
- \li \c{mingw32-make sub-src}
- \endlist
- This step takes a long time.
-
- \li Open the DOS prompt, go to
- \c{C:\Qt\4.6.2\src\plugins\sqldrivers\mysql} and run the
- following command:
- \list
- \li \c{qmake "INCLUDEPATH+=C:/MySQL/MySQL51/include" "LIBS+=-L. mysql" mysql.pro}
- \endlist
-
- \li Now the following libraries are ready in \c{C:\Qt\4.6.2\plugins\sqldrivers}.
- \list
- \li \c{libqsqlmysql4.a}
- \li \c{libqsqlmysqld4.a}
- \li \c{qsqlmysql4.dll}
- \li \c{qsqlmysqld4.dll}
- \endlist
- To use the SDK and QtCreator directly, copy these libraries to
- your \c{C:\Qt\...\qt\plugins\sqldrivers\}, and copy
- \c{C:\MySQL\MySQL51\lib\opt\libmysql.dll} to your \c{C:\Qt\...\qt\bin\}.
-
- \endlist
-
\target QOCI
\section2 QOCI for the Oracle Call Interface (OCI)
diff --git a/src/testlib/doc/qttestlib.qdocconf b/src/testlib/doc/qttestlib.qdocconf
index 250d237f129..92e5c97aab4 100644
--- a/src/testlib/doc/qttestlib.qdocconf
+++ b/src/testlib/doc/qttestlib.qdocconf
@@ -27,7 +27,7 @@ qhp.QtTestLib.subprojects.classes.sortPages = true
tagfile = ../../../doc/qttestlib/qttestlib.tags
-depends += qtcore qtdoc qtwidgets qtgui qtquick
+depends += qtcore qtdoc qtwidgets qtgui qmake qtquick
headerdirs += ..
diff --git a/src/testlib/doc/src/qttest-index.qdoc b/src/testlib/doc/src/qttest-index.qdoc
index 4cf0726429f..8dc51f86967 100644
--- a/src/testlib/doc/src/qttest-index.qdoc
+++ b/src/testlib/doc/src/qttest-index.qdoc
@@ -56,7 +56,7 @@
\list
\li \l{Qt Test C++ Classes}{C++ Classes}
- \li \l{Qt Quick Test}{QML Types}
+ \li \l{Qt Quick Test QML Types}{QML Types}
\endlist
*/
diff --git a/src/testlib/doc/src/qttestlib-manual.qdoc b/src/testlib/doc/src/qttestlib-manual.qdoc
index 613d2c220cd..bdd9769175a 100644
--- a/src/testlib/doc/src/qttestlib-manual.qdoc
+++ b/src/testlib/doc/src/qttestlib-manual.qdoc
@@ -120,7 +120,7 @@
\snippet code/doc_src_qtestlib.pro 2
- See \l{qmake Common Projects#building-a-testcase}{the qmake manual} for
+ See the \l{Building a Testcase}{qmake manual} for
more information about \c{make check}.
If you are using other build tools, make sure that you add the location
diff --git a/src/testlib/qtestresult.cpp b/src/testlib/qtestresult.cpp
index d94b2bf85c2..a9abca0ef82 100644
--- a/src/testlib/qtestresult.cpp
+++ b/src/testlib/qtestresult.cpp
@@ -46,8 +46,10 @@
#include <QtTest/qtestdata.h>
#include <QtTest/qtestassert.h>
+#include <stdlib.h>
#include <stdio.h>
#include <string.h>
+#include <wchar.h>
QT_BEGIN_NAMESPACE
@@ -268,8 +270,8 @@ bool QTestResult::compare(bool success, const char *failureMsg,
if (success && QTest::expectFailMode) {
qsnprintf(msg, 1024, "QCOMPARE(%s, %s) returned TRUE unexpectedly.", actual, expected);
} else if (val1 || val2) {
- size_t len1 = strlen(actual);
- size_t len2 = strlen(expected);
+ size_t len1 = mbstowcs(NULL, actual, 0);
+ size_t len2 = mbstowcs(NULL, expected, 0);
qsnprintf(msg, 1024, "%s\n Actual (%s)%*s %s\n Expected (%s)%*s %s",
failureMsg,
actual, qMax(len1, len2) - len1 + 1, ":", val1 ? val1 : "<null>",
diff --git a/src/tools/qdoc/doc/qdoc-manual-contextcmds.qdoc b/src/tools/qdoc/doc/qdoc-manual-contextcmds.qdoc
index 1f777ea4416..446b441675e 100644
--- a/src/tools/qdoc/doc/qdoc-manual-contextcmds.qdoc
+++ b/src/tools/qdoc/doc/qdoc-manual-contextcmds.qdoc
@@ -314,8 +314,7 @@
\endcode
See how QDoc renders this property on the reference page for the
- \l {changes-prop} {State}
- type.
+ \l {State::changes}{State} type.
\target obsolete-command
\section1 \\obsolete
diff --git a/src/tools/qdoc/doc/qdoc-manual-intro.qdoc b/src/tools/qdoc/doc/qdoc-manual-intro.qdoc
index ad3779048ac..f681c0a574e 100644
--- a/src/tools/qdoc/doc/qdoc-manual-intro.qdoc
+++ b/src/tools/qdoc/doc/qdoc-manual-intro.qdoc
@@ -79,9 +79,8 @@
* /
\endcode
- From the QDoc comment above, QDoc generates the HTML page
- \l {details}
- {QObject Class Reference}.
+ From the QDoc comment above, QDoc generates the HTML \l {QObject}
+ {QObject class reference} page.
This manual explains how to use the QDoc commands in QDoc comments
to embed good documentation in your source files. It also explains
diff --git a/src/tools/qdoc/generator.cpp b/src/tools/qdoc/generator.cpp
index 3cbba788c87..b14a79dfab9 100644
--- a/src/tools/qdoc/generator.cpp
+++ b/src/tools/qdoc/generator.cpp
@@ -1013,12 +1013,13 @@ void Generator::generateInnerNode(InnerNode* node)
}
}
- NodeList::ConstIterator c = node->childNodes().constBegin();
- while (c != node->childNodes().constEnd()) {
- if ((*c)->isInnerNode() && (*c)->access() != Node::Private) {
- generateInnerNode((InnerNode*)*c);
+ int i = 0;
+ while (i < node->childNodes().count()) {
+ Node *c = node->childNodes().at(i);
+ if (c->isInnerNode() && c->access() != Node::Private) {
+ generateInnerNode((InnerNode*)c);
}
- ++c;
+ ++i;
}
}
diff --git a/src/tools/qdoc/helpprojectwriter.cpp b/src/tools/qdoc/helpprojectwriter.cpp
index 44292f84bbc..d46f887518e 100644
--- a/src/tools/qdoc/helpprojectwriter.cpp
+++ b/src/tools/qdoc/helpprojectwriter.cpp
@@ -657,7 +657,8 @@ void HelpProjectWriter::generateProject(HelpProject &project)
if (node == 0)
node = qdb_->findNode(QStringList("index.html"));
QString indexPath;
- if (node)
+ // Never use a collision node as a landing page
+ if (node && !node->isCollisionNode())
indexPath = gen_->fullDocumentLocation(node,Generator::useOutputSubdirs());
else
indexPath = "index.html";
diff --git a/src/widgets/doc/qtwidgets.qdocconf b/src/widgets/doc/qtwidgets.qdocconf
index b742856892d..508a257fa50 100644
--- a/src/widgets/doc/qtwidgets.qdocconf
+++ b/src/widgets/doc/qtwidgets.qdocconf
@@ -27,7 +27,7 @@ qhp.QtWidgets.subprojects.classes.sortPages = true
tagfile = ../../../doc/qtwidgets/qtwidgets.tags
-depends += qtcore qtgui qtdoc qtsql qtdesigner
+depends += qtcore qtgui qtdoc qtsql qtdesigner qtquick
headerdirs += ..
diff --git a/src/widgets/doc/src/gestures.qdoc b/src/widgets/doc/src/gestures.qdoc
index ed7e78ec5a4..9126152c429 100644
--- a/src/widgets/doc/src/gestures.qdoc
+++ b/src/widgets/doc/src/gestures.qdoc
@@ -67,7 +67,7 @@
required gesture type. The standard types are defined by the Qt::GestureType
enum and include many commonly used gestures.
- \snippet ../../../examples/gestures/imagegestures/imagewidget.cpp enable gestures
+ \snippet gestures/imagegestures/imagewidget.cpp enable gestures
In the above code, the gestures are set up in the constructor of the target object
itself.
@@ -124,18 +124,18 @@
\l{QWidget::}{event()} handler function and delegates gesture events to a
specialized gestureEvent() function:
- \snippet ../../../examples/gestures/imagegestures/imagewidget.cpp event handler
+ \snippet gestures/imagegestures/imagewidget.cpp event handler
The gesture events delivered to the target object can be examined individually
and dealt with appropriately:
- \snippet ../../../examples/gestures/imagegestures/imagewidget.cpp gesture event handler
+ \snippet gestures/imagegestures/imagewidget.cpp gesture event handler
Responding to a gesture is simply a matter of obtaining the QGesture object
delivered in the QGestureEvent sent to the target object and examining the
information it contains.
- \snippet ../../../examples/gestures/imagegestures/imagewidget.cpp swipe function
+ \snippet gestures/imagegestures/imagewidget.cpp swipe function
Here, we examine the direction in which the user swiped the widget and modify
its contents accordingly.
diff --git a/src/widgets/itemviews/qlistview.cpp b/src/widgets/itemviews/qlistview.cpp
index 8238e5f6d4a..135f89d4ac2 100644
--- a/src/widgets/itemviews/qlistview.cpp
+++ b/src/widgets/itemviews/qlistview.cpp
@@ -1842,18 +1842,18 @@ void QCommonListViewBase::paintDragDrop(QPainter *painter)
}
#endif
-void QCommonListViewBase::updateHorizontalScrollBar(const QSize & /*step*/)
+void QCommonListViewBase::updateHorizontalScrollBar(const QSize &step)
{
+ horizontalScrollBar()->setSingleStep(step.width() + spacing());
horizontalScrollBar()->setPageStep(viewport()->width());
horizontalScrollBar()->setRange(0, contentsSize.width() - viewport()->width());
- // we do not want to overwrite (a possible user set) single step
}
-void QCommonListViewBase::updateVerticalScrollBar(const QSize & /*step*/)
+void QCommonListViewBase::updateVerticalScrollBar(const QSize &step)
{
+ verticalScrollBar()->setSingleStep(step.height() + spacing());
verticalScrollBar()->setPageStep(viewport()->height());
verticalScrollBar()->setRange(0, contentsSize.height() - viewport()->height());
- // we do not want to overwrite (a possible user set) single step
}
void QCommonListViewBase::scrollContentsBy(int dx, int dy, bool /*scrollElasticBand*/)
diff --git a/src/widgets/itemviews/qtableview.cpp b/src/widgets/itemviews/qtableview.cpp
index 08600b3ef78..a252428a81b 100644
--- a/src/widgets/itemviews/qtableview.cpp
+++ b/src/widgets/itemviews/qtableview.cpp
@@ -2170,7 +2170,7 @@ void QTableView::updateGeometries()
} else { // ScrollPerPixel
horizontalScrollBar()->setPageStep(vsize.width());
horizontalScrollBar()->setRange(0, horizontalLength - vsize.width());
- // here we do not want to overwrite (a possible user set) single step
+ horizontalScrollBar()->setSingleStep(qMax(vsize.width() / (columnsInViewport + 1), 2));
}
// vertical scroll bar
@@ -2198,7 +2198,7 @@ void QTableView::updateGeometries()
} else { // ScrollPerPixel
verticalScrollBar()->setPageStep(vsize.height());
verticalScrollBar()->setRange(0, verticalLength - vsize.height());
- // here we do not want to overwrite (a possible user set) single step
+ verticalScrollBar()->setSingleStep(qMax(vsize.height() / (rowsInViewport + 1), 2));
}
d->geometryRecursionBlock = false;
diff --git a/src/widgets/itemviews/qtreeview.cpp b/src/widgets/itemviews/qtreeview.cpp
index 624408289e4..dd430435f32 100644
--- a/src/widgets/itemviews/qtreeview.cpp
+++ b/src/widgets/itemviews/qtreeview.cpp
@@ -1586,7 +1586,7 @@ int QTreeViewPrivate::widthHintForIndex(const QModelIndex &index, int hint, cons
/*!
Draws the row in the tree view that contains the model item \a index,
- using the \a painter given. The \a option control how the item is
+ using the \a painter given. The \a option controls how the item is
displayed.
\sa setAlternatingRowColors()
@@ -3685,7 +3685,7 @@ void QTreeViewPrivate::updateScrollBars()
}
vbar->setRange(0, contentsHeight - viewportSize.height());
vbar->setPageStep(viewportSize.height());
- // here we do not want to overwrite (a possible user set) single step
+ vbar->setSingleStep(qMax(viewportSize.height() / (itemsInViewport + 1), 2));
}
const int columnCount = header->count();
@@ -3711,7 +3711,7 @@ void QTreeViewPrivate::updateScrollBars()
viewportSize = maxSize;
hbar->setPageStep(viewportSize.width());
hbar->setRange(0, qMax(horizontalLength - viewportSize.width(), 0));
- // here we do not want to overwrite (a possible user set) single step
+ hbar->setSingleStep(qMax(viewportSize.width() / (columnsInViewport + 1), 2));
}
}
diff --git a/src/widgets/kernel/qaction.cpp b/src/widgets/kernel/qaction.cpp
index 3e76699acaf..c0e3e98ae14 100644
--- a/src/widgets/kernel/qaction.cpp
+++ b/src/widgets/kernel/qaction.cpp
@@ -270,7 +270,7 @@ void QActionPrivate::setShortcutEnabled(bool enable, QShortcutMap &map)
\value AboutQtRole This action matches handles the "About Qt" menu item.
\value AboutRole This action should be placed where the "About" menu item is in the application menu. The text of
the menu item will be set to "About <application name>". The application name is fetched from the
- \c{Info.plist} file in the application's bundle (See \l{Deploying an Application on Mac OS X}).
+ \c{Info.plist} file in the application's bundle (See \l{Qt for Mac OS X - Deployment}).
\value PreferencesRole This action should be placed where the "Preferences..." menu item is in the application menu.
\value QuitRole This action should be placed where the Quit menu item is in the application menu.
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp
index dbeaef5beed..def3589d9ad 100644
--- a/src/widgets/kernel/qwidget.cpp
+++ b/src/widgets/kernel/qwidget.cpp
@@ -7004,7 +7004,7 @@ void QWidget::setUpdatesEnabled(bool enable)
depending on the platform's default behavior for the window flags.
\sa raise(), showEvent(), hide(), setVisible(), showMinimized(), showMaximized(),
- showNormal(), isVisible(), windowFlags(), flags()
+ showNormal(), isVisible(), windowFlags()
*/
void QWidget::show()
{
diff --git a/src/widgets/kernel/qwidget_qpa.cpp b/src/widgets/kernel/qwidget_qpa.cpp
index 0fd794cc021..0a4bc990e6d 100644
--- a/src/widgets/kernel/qwidget_qpa.cpp
+++ b/src/widgets/kernel/qwidget_qpa.cpp
@@ -768,7 +768,10 @@ void QWidgetPrivate::setGeometry_sys(int x, int y, int w, int h, bool isMove)
}
}
- if (isMove) {
+ // generate a move event for QWidgets without window handles. QWidgets with native
+ // window handles already receive a move event from
+ // QGuiApplicationPrivate::processGeometryChangeEvent.
+ if (isMove && (!q->windowHandle() || q->testAttribute(Qt::WA_DontShowOnScreen))) {
QMoveEvent e(q->pos(), oldPos);
QApplication::sendEvent(q, &e);
}
@@ -876,9 +879,15 @@ int QWidget::metric(PaintDeviceMetric m) const
}
/*!
- \preliminary
+ If this is a native widget, return the associated QWindow.
+ Otherwise return null.
- Returns the QPlatformWindow this widget will be drawn into.
+ Native widgets include toplevel widgets, QGLWidget, and child widgets
+ on which winId() was called.
+
+ \since 5.0
+
+ \sa winId()
*/
QWindow *QWidget::windowHandle() const
{
diff --git a/src/widgets/kernel/qwindowcontainer.cpp b/src/widgets/kernel/qwindowcontainer.cpp
index 399f089e0ff..a4b3caf78d2 100644
--- a/src/widgets/kernel/qwindowcontainer.cpp
+++ b/src/widgets/kernel/qwindowcontainer.cpp
@@ -200,7 +200,11 @@ QWindowContainer::QWindowContainer(QWindow *embeddedWindow, QWidget *parent, Qt:
connect(QGuiApplication::instance(), SIGNAL(focusWindowChanged(QWindow *)), this, SLOT(focusWindowChanged(QWindow *)));
}
-
+QWindow *QWindowContainer::containedWindow() const
+{
+ Q_D(const QWindowContainer);
+ return d->window;
+}
/*!
\internal
diff --git a/src/widgets/kernel/qwindowcontainer_p.h b/src/widgets/kernel/qwindowcontainer_p.h
index a21f9bd35af..014b163f973 100644
--- a/src/widgets/kernel/qwindowcontainer_p.h
+++ b/src/widgets/kernel/qwindowcontainer_p.h
@@ -48,7 +48,7 @@ QT_BEGIN_NAMESPACE
class QWindowContainerPrivate;
-class QWindowContainer : public QWidget
+class Q_WIDGETS_EXPORT QWindowContainer : public QWidget
{
Q_OBJECT
Q_DECLARE_PRIVATE(QWindowContainer)
@@ -56,6 +56,7 @@ class QWindowContainer : public QWidget
public:
explicit QWindowContainer(QWindow *embeddedWindow, QWidget *parent = 0, Qt::WindowFlags f = 0);
~QWindowContainer();
+ QWindow *containedWindow() const;
static void toplevelAboutToBeDestroyed(QWidget *parent);
static void parentWasChanged(QWidget *parent);
diff --git a/src/widgets/styles/qcommonstyle.cpp b/src/widgets/styles/qcommonstyle.cpp
index 2d7107598f6..9c2163ac8fe 100644
--- a/src/widgets/styles/qcommonstyle.cpp
+++ b/src/widgets/styles/qcommonstyle.cpp
@@ -1598,7 +1598,7 @@ void QCommonStyle::drawControl(ControlElement element, const QStyleOption *opt,
if (toolbutton->toolButtonStyle == Qt::ToolButtonTextUnderIcon) {
pr.setHeight(pmSize.height() + 6);
- tr.adjust(0, pr.height() - 1, 0, -2);
+ tr.adjust(0, pr.height() - 1, 0, -1);
pr.translate(shiftX, shiftY);
if (!hasArrow) {
proxy()->drawItemPixmap(p, pr, Qt::AlignCenter, pm);
diff --git a/src/widgets/styles/qmacstyle_mac.mm b/src/widgets/styles/qmacstyle_mac.mm
index d13339b555a..fa49bcb884f 100644
--- a/src/widgets/styles/qmacstyle_mac.mm
+++ b/src/widgets/styles/qmacstyle_mac.mm
@@ -2077,6 +2077,10 @@ int QMacStyle::pixelMetric(PixelMetric metric, const QStyleOption *opt, const QW
ret = 0;
break;
+ case PM_MenuBarPanelWidth:
+ ret = 0;
+ break;
+
case QStyle::PM_MenuDesktopFrameWidth:
ret = 5;
break;
@@ -6259,6 +6263,10 @@ QSize QMacStyle::sizeFromContents(ContentsType ct, const QStyleOption *opt,
sz = QSize(w, h);
}
break;
+ case CT_MenuBarItem:
+ if (!sz.isEmpty())
+ sz += QSize(12, 4); // Constants from QWindowsStyle
+ break;
case CT_ToolButton:
sz.rwidth() += 10;
sz.rheight() += 10;
diff --git a/src/widgets/styles/qstylesheetstyle.cpp b/src/widgets/styles/qstylesheetstyle.cpp
index 2f36e0e53c6..6bd0ba37c8f 100644
--- a/src/widgets/styles/qstylesheetstyle.cpp
+++ b/src/widgets/styles/qstylesheetstyle.cpp
@@ -4710,7 +4710,9 @@ int QStyleSheetStyle::pixelMetric(PixelMetric m, const QStyleOption *opt, const
break;
case PM_TabBarBaseOverlap: {
- const QWidget *tabWidget = qobject_cast<const QTabWidget *>(w) ? w : w->parentWidget();
+ const QWidget *tabWidget = qobject_cast<const QTabWidget *>(w);
+ if (!tabWidget && w)
+ tabWidget = w->parentWidget();
if (hasStyleRule(tabWidget, PseudoElement_TabWidgetPane)) {
return 0;
}
diff --git a/src/widgets/styles/qwindowsvistastyle.cpp b/src/widgets/styles/qwindowsvistastyle.cpp
index 5827a011514..6c7b71bd741 100644
--- a/src/widgets/styles/qwindowsvistastyle.cpp
+++ b/src/widgets/styles/qwindowsvistastyle.cpp
@@ -1879,7 +1879,11 @@ void QWindowsVistaStyle::drawComplexControl(ComplexControl control, const QStyle
XPThemeData ftheme(widget, painter,
QWindowsXPStylePrivate::EditTheme,
partId, stateId, r);
- ftheme.noContent = true;
+ // The spinbox in Windows QStyle is drawn with frameless QLineEdit inside it
+ // That however breaks with QtQuickControls where this results in transparent
+ // spinbox background, so if there's no "widget" passed (QtQuickControls case),
+ // let ftheme.noContent be false, which fixes the spinbox rendering in QQC
+ ftheme.noContent = (widget != NULL);
d->drawBackground(ftheme);
}
if (sub & SC_SpinBoxUp) {
diff --git a/src/widgets/widgets.pro b/src/widgets/widgets.pro
index e3222b49e8e..0b289c75ae1 100644
--- a/src/widgets/widgets.pro
+++ b/src/widgets/widgets.pro
@@ -1,4 +1,5 @@
TARGET = QtWidgets
+wince*:ORIG_TARGET = $$TARGET
QT = core-private gui-private
MODULE_CONFIG = uic
diff --git a/src/widgets/widgets/qmainwindow.cpp b/src/widgets/widgets/qmainwindow.cpp
index 0638981a9ce..07db78c06cb 100644
--- a/src/widgets/widgets/qmainwindow.cpp
+++ b/src/widgets/widgets/qmainwindow.cpp
@@ -60,6 +60,9 @@
#include <private/qwidget_p.h>
#include "qtoolbar_p.h"
#include "qwidgetanimator_p.h"
+#ifdef Q_OS_OSX
+#include <qpa/qplatformnativeinterface.h>
+#endif
#ifdef Q_WS_MAC
#include <private/qt_mac_p.h>
#include <private/qt_cocoa_helpers_mac_p.h>
@@ -76,6 +79,9 @@ class QMainWindowPrivate : public QWidgetPrivate
public:
inline QMainWindowPrivate()
: layout(0), explicitIconSize(false), toolButtonStyle(Qt::ToolButtonIconOnly)
+#ifdef Q_OS_OSX
+ , useUnifiedToolBar(false)
+#endif
#ifdef Q_WS_MAC
, useHIToolBar(false)
, activateUnifiedToolbarAfterFullScreen(false)
@@ -88,6 +94,9 @@ public:
QSize iconSize;
bool explicitIconSize;
Qt::ToolButtonStyle toolButtonStyle;
+#ifdef Q_OS_OSX
+ bool useUnifiedToolBar;
+#endif
#ifdef Q_WS_MAC
bool useHIToolBar;
bool activateUnifiedToolbarAfterFullScreen;
@@ -1492,16 +1501,29 @@ bool QMainWindow::event(QEvent *event)
/*!
\property QMainWindow::unifiedTitleAndToolBarOnMac
\brief whether the window uses the unified title and toolbar look on Mac OS X
- \since 4.3
- \obsolete
-
- This property is not implemented in Qt 5. Setting it has no effect.
-
- A replacement API (QtMacUnifiedToolBar) is available in QtMacExtras at
- http://qt.gitorious.org/qtplayground/qtmacextras
+ \since 5.2
*/
void QMainWindow::setUnifiedTitleAndToolBarOnMac(bool set)
{
+#ifdef Q_OS_OSX
+ Q_D(QMainWindow);
+ if (isWindow()) {
+ QPlatformNativeInterface *nativeInterface = QGuiApplication::platformNativeInterface();
+ QPlatformNativeInterface::NativeResourceForIntegrationFunction function =
+ nativeInterface->nativeResourceFunctionForIntegration("setContentBorderThickness");
+ if (!function)
+ return; // Not Cocoa platform plugin.
+
+ createWinId();
+
+ d->useUnifiedToolBar = set;
+
+ const int toolBarHeight = 50;
+ typedef void (*SetContentBorderThicknessFunction)(QWindow *window, int topThickness, int bottomThickness);
+ (reinterpret_cast<SetContentBorderThicknessFunction>(function))(window()->windowHandle(), toolBarHeight, 0);
+ }
+#endif
+
#ifdef Q_WS_MAC
Q_D(QMainWindow);
if (!isWindow() || d->useHIToolBar == set || QSysInfo::MacintoshVersion < QSysInfo::MV_10_3)
@@ -1534,6 +1556,9 @@ void QMainWindow::setUnifiedTitleAndToolBarOnMac(bool set)
bool QMainWindow::unifiedTitleAndToolBarOnMac() const
{
+#ifdef Q_OS_OSX
+ return d_func()->useUnifiedToolBar;
+#endif
#ifdef Q_WS_MAC
return d_func()->useHIToolBar && !testAttribute(Qt::WA_MacBrushedMetal) && !(windowFlags() & Qt::FramelessWindowHint);
#endif
@@ -1655,9 +1680,7 @@ QMenu *QMainWindow::createPopupMenu()
for (int i = 0; i < toolbars.size(); ++i) {
QToolBar *toolBar = toolbars.at(i);
if (toolBar->parentWidget() == this
- && (!d->layout->layoutState.toolBarAreaLayout.indexOf(toolBar).isEmpty()
- || (unifiedTitleAndToolBarOnMac()
- && toolBarArea(toolBar) == Qt::TopToolBarArea))) {
+ && (!d->layout->layoutState.toolBarAreaLayout.indexOf(toolBar).isEmpty())) {
menu->addAction(toolbars.at(i)->toggleViewAction());
}
}
diff --git a/src/widgets/widgets/qmenubar.cpp b/src/widgets/widgets/qmenubar.cpp
index 189f4c456bd..03ab490823d 100644
--- a/src/widgets/widgets/qmenubar.cpp
+++ b/src/widgets/widgets/qmenubar.cpp
@@ -666,8 +666,8 @@ void QMenuBar::initStyleOption(QStyleOptionMenuItem *option, const QAction *acti
\b{Note:} The text used for the application name in the menu
bar is obtained from the value set in the \c{Info.plist} file in
- the application's bundle. See \l{Deploying an Application on
- Mac OS X} for more information.
+ the application's bundle. See \l{Qt for Mac OS X - Deployment}
+ for more information.
\section1 QMenuBar on Windows CE
diff --git a/src/widgets/widgets/qplaintextedit.cpp b/src/widgets/widgets/qplaintextedit.cpp
index 6b9e2640db9..89374b1c416 100644
--- a/src/widgets/widgets/qplaintextedit.cpp
+++ b/src/widgets/widgets/qplaintextedit.cpp
@@ -803,6 +803,7 @@ void QPlainTextEditPrivate::init(const QString &txt)
q->setFocusPolicy(Qt::WheelFocus);
q->setAttribute(Qt::WA_KeyCompression);
q->setAttribute(Qt::WA_InputMethodEnabled);
+ q->setInputMethodHints(Qt::ImhMultiLine);
#ifndef QT_NO_CURSOR
viewport->setCursor(Qt::IBeamCursor);
diff --git a/src/widgets/widgets/qtabbar.cpp b/src/widgets/widgets/qtabbar.cpp
index dfd1f1022cb..b47d65f5617 100644
--- a/src/widgets/widgets/qtabbar.cpp
+++ b/src/widgets/widgets/qtabbar.cpp
@@ -1681,6 +1681,7 @@ void QTabBar::moveTab(int from, int to)
d->tabList[i].lastTab = d->calculateNewPosition(from, to, d->tabList[i].lastTab);
// update external variables
+ int previousIndex = d->currentIndex;
d->currentIndex = d->calculateNewPosition(from, to, d->currentIndex);
// If we are in the middle of a drag update the dragStartPosition
@@ -1699,6 +1700,8 @@ void QTabBar::moveTab(int from, int to)
d->layoutWidgets(start);
update();
emit tabMoved(from, to);
+ if (previousIndex != d->currentIndex)
+ emit currentChanged(d->currentIndex);
emit tabLayoutChange();
}
diff --git a/src/widgets/widgets/qtoolbararealayout.cpp b/src/widgets/widgets/qtoolbararealayout.cpp
index afb4244d0c8..5ec76569aad 100644
--- a/src/widgets/widgets/qtoolbararealayout.cpp
+++ b/src/widgets/widgets/qtoolbararealayout.cpp
@@ -655,9 +655,7 @@ QRect QToolBarAreaLayout::fitLayout()
docks[QInternal::BottomDock].rect = QRect(rect.left(), center.bottom() + 1,
rect.width(), bottom_hint.height());
- if (!mainWindow->unifiedTitleAndToolBarOnMac()) {
- docks[QInternal::TopDock].fitLayout();
- }
+ docks[QInternal::TopDock].fitLayout();
docks[QInternal::LeftDock].fitLayout();
docks[QInternal::RightDock].fitLayout();
docks[QInternal::BottomDock].fitLayout();
@@ -1307,8 +1305,6 @@ bool QToolBarAreaLayout::restoreState(QDataStream &stream, const QList<QToolBar*
QList<QToolBar*> toolBars = _toolBars;
int lines;
stream >> lines;
- if (!testing)
- testing = mainWindow->unifiedTitleAndToolBarOnMac();
for (int j = 0; j < lines; ++j) {
int pos;
@@ -1319,7 +1315,7 @@ bool QToolBarAreaLayout::restoreState(QDataStream &stream, const QList<QToolBar*
stream >> cnt;
QToolBarAreaLayoutInfo &dock = docks[pos];
- const bool applyingLayout = !testing && !(pos == QInternal::TopDock && mainWindow->unifiedTitleAndToolBarOnMac());
+ const bool applyingLayout = !testing;
QToolBarAreaLayoutLine line(dock.o);
for (int k = 0; k < cnt; ++k) {
diff --git a/src/widgets/widgets/widgets.pri b/src/widgets/widgets/widgets.pri
index 1bae87ebcc1..a924ba9acc0 100644
--- a/src/widgets/widgets/widgets.pri
+++ b/src/widgets/widgets/widgets.pri
@@ -160,4 +160,13 @@ wince*: {
HEADERS += widgets/qmenu_wince_resource_p.h
RC_FILE = widgets/qmenu_wince.rc
!static: QMAKE_WRITE_DEFAULT_RC = 1
+ !isEmpty(QT_LIBINFIX) {
+ ORIG_RCFILE = $${TARGET}_resource.rc
+ copyrcc.commands = $$QMAKE_COPY ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT}
+ copyrcc.input = ORIG_RCFILE
+ CONFIG(debug, debug|release):copyrcc.output = $${ORIG_TARGET}d_resource.rc
+ else:copyrcc.output = $${ORIG_TARGET}_resource.rc
+ copyrcc.CONFIG = target_predeps no_link
+ QMAKE_EXTRA_COMPILERS += copyrcc
+ }
}
diff --git a/tests/auto/corelib/io/qdir/tst_qdir.cpp b/tests/auto/corelib/io/qdir/tst_qdir.cpp
index 96be5065d62..2bac6f58348 100644
--- a/tests/auto/corelib/io/qdir/tst_qdir.cpp
+++ b/tests/auto/corelib/io/qdir/tst_qdir.cpp
@@ -1098,6 +1098,10 @@ void tst_QDir::absoluteFilePath_data()
QTest::newRow("2") << "/" << "passwd" << "/passwd";
QTest::newRow("3") << "relative" << "path" << QDir::currentPath() + "/relative/path";
QTest::newRow("4") << "" << "" << QDir::currentPath();
+#ifdef Q_OS_WIN
+ QTest::newRow("5") << "//machine" << "share" << "//machine/share";
+#endif
+
QTest::newRow("resource") << ":/prefix" << "foo.bar" << ":/prefix/foo.bar";
}
diff --git a/tests/auto/corelib/io/qfileselector/platforms/+unix/+ios/test b/tests/auto/corelib/io/qfileselector/platforms/+darwin/test
index e69de29bb2d..e69de29bb2d 100644
--- a/tests/auto/corelib/io/qfileselector/platforms/+unix/+ios/test
+++ b/tests/auto/corelib/io/qfileselector/platforms/+darwin/test
diff --git a/tests/auto/corelib/io/qfileselector/platforms/+unix/+mac/test b/tests/auto/corelib/io/qfileselector/platforms/+darwin/test2
index e69de29bb2d..e69de29bb2d 100644
--- a/tests/auto/corelib/io/qfileselector/platforms/+unix/+mac/test
+++ b/tests/auto/corelib/io/qfileselector/platforms/+darwin/test2
diff --git a/tests/auto/corelib/io/qfileselector/platforms/+osx/test2 b/tests/auto/corelib/io/qfileselector/platforms/+osx/test2
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/tests/auto/corelib/io/qfileselector/platforms/+osx/test2
diff --git a/tests/auto/corelib/io/qfileselector/platforms/+unix/+darwin/+mac/+ios/test b/tests/auto/corelib/io/qfileselector/platforms/+unix/+darwin/+mac/+ios/test
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/tests/auto/corelib/io/qfileselector/platforms/+unix/+darwin/+mac/+ios/test
diff --git a/tests/auto/corelib/io/qfileselector/platforms/+unix/+darwin/+mac/+osx/test b/tests/auto/corelib/io/qfileselector/platforms/+unix/+darwin/+mac/+osx/test
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/tests/auto/corelib/io/qfileselector/platforms/+unix/+darwin/+mac/+osx/test
diff --git a/tests/auto/corelib/io/qfileselector/platforms/+unix/+darwin/+mac/test b/tests/auto/corelib/io/qfileselector/platforms/+unix/+darwin/+mac/test
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/tests/auto/corelib/io/qfileselector/platforms/+unix/+darwin/+mac/test
diff --git a/tests/auto/corelib/io/qfileselector/platforms/+unix/+darwin/test b/tests/auto/corelib/io/qfileselector/platforms/+unix/+darwin/test
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/tests/auto/corelib/io/qfileselector/platforms/+unix/+darwin/test
diff --git a/tests/auto/corelib/io/qfileselector/qfileselector.qrc b/tests/auto/corelib/io/qfileselector/qfileselector.qrc
index abfead2a556..8fe7b841d2f 100644
--- a/tests/auto/corelib/io/qfileselector/qfileselector.qrc
+++ b/tests/auto/corelib/io/qfileselector/qfileselector.qrc
@@ -13,8 +13,10 @@
<file>platforms/test</file>
<file>platforms/+unix/+android/test</file>
<file>platforms/+unix/+blackberry/test</file>
- <file>platforms/+unix/+ios/test</file>
- <file>platforms/+unix/+mac/test</file>
+ <file>platforms/+unix/+darwin/+mac/+ios/test</file>
+ <file>platforms/+unix/+darwin/+mac/+osx/test</file>
+ <file>platforms/+unix/+darwin/+mac/test</file>
+ <file>platforms/+unix/+darwin/test</file>
<file>platforms/+windows/+wince/test</file>
<file>platforms/+windows/test</file>
<file>platforms/+windows/test2</file>
@@ -24,12 +26,14 @@
<file>platforms/+android/test2</file>
<file>platforms/+blackberry/test2</file>
<file>platforms/+ios/test2</file>
- <file>platforms/+mac/test2</file>
+ <file>platforms/+osx/test2</file>
<file>platforms/+linux/test2</file>
<file>platforms/+wince/test2</file>
<file>platforms/+android/test</file>
<file>platforms/+blackberry/test</file>
<file>platforms/+ios/test</file>
+ <file>platforms/+osx/test</file>
+ <file>platforms/+darwin/test</file>
<file>platforms/+mac/test</file>
<file>platforms/+linux/test</file>
<file>platforms/+wince/test</file>
diff --git a/tests/auto/corelib/io/qfileselector/tst_qfileselector.cpp b/tests/auto/corelib/io/qfileselector/tst_qfileselector.cpp
index d6461c3aba0..4ccaecba000 100644
--- a/tests/auto/corelib/io/qfileselector/tst_qfileselector.cpp
+++ b/tests/auto/corelib/io/qfileselector/tst_qfileselector.cpp
@@ -94,7 +94,8 @@ void tst_QFileSelector::basicTest_data()
QString test2("/test2");
QString expectedPlatform1File(":/platforms");
QString expectedPlatform2File(""); //Only the last selector
-#if defined(Q_OS_UNIX) && !defined(Q_OS_ANDROID) && !defined(Q_OS_BLACKBERRY) && !defined(Q_OS_IOS) && !defined(Q_OS_LINUX) && !defined(Q_OS_MAC)
+#if defined(Q_OS_UNIX) && !defined(Q_OS_ANDROID) && !defined(Q_OS_BLACKBERRY) && \
+ !defined(Q_OS_DARWIN) && !defined(Q_OS_LINUX)
/* We are only aware of specific unixes, and do not have test files for any of the others.
However those unixes can get a selector added from the result of a uname call, so this will
lead to a case where we don't have that file so we can't expect the concatenation of platform
diff --git a/tests/auto/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp b/tests/auto/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp
index bb77ec54c50..0f72b419a0c 100644
--- a/tests/auto/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp
+++ b/tests/auto/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp
@@ -92,6 +92,7 @@ private slots:
void filterTable();
void filterCurrent();
+ void filter_qtbug30662();
void changeSourceLayout();
void removeSourceRows_data();
@@ -1480,6 +1481,33 @@ void tst_QSortFilterProxyModel::filterCurrent()
QCOMPARE(spy.count(), 2);
}
+void tst_QSortFilterProxyModel::filter_qtbug30662()
+{
+ QStringListModel model;
+ QSortFilterProxyModel proxy;
+ proxy.setSourceModel(&model);
+
+ // make sure the filter does not match any entry
+ proxy.setFilterRegExp(QRegExp("[0-9]+"));
+
+ QStringList slSource;
+ slSource << "z" << "x" << "a" << "b";
+
+ proxy.setDynamicSortFilter(true);
+ proxy.sort(0);
+ model.setStringList(slSource);
+
+ // without fix for QTBUG-30662 this will make all entries visible - but unsorted
+ proxy.setFilterRegExp(QRegExp("[a-z]+"));
+
+ QStringList slResult;
+ for (int i = 0; i < proxy.rowCount(); ++i)
+ slResult.append(proxy.index(i, 0).data().toString());
+
+ slSource.sort();
+ QCOMPARE(slResult, slSource);
+}
+
void tst_QSortFilterProxyModel::changeSourceLayout()
{
QStandardItemModel model(2, 1);
diff --git a/tests/auto/corelib/tools/qstring/tst_qstring.cpp b/tests/auto/corelib/tools/qstring/tst_qstring.cpp
index a0edc167182..b201028aad6 100644
--- a/tests/auto/corelib/tools/qstring/tst_qstring.cpp
+++ b/tests/auto/corelib/tools/qstring/tst_qstring.cpp
@@ -4429,6 +4429,62 @@ void tst_QString::operator_smaller()
// operator< is not locale-aware (or shouldn't be)
QVERIFY( foo < QString("\xc3\xa9") );
QVERIFY( foo < "\xc3\xa9" );
+
+ QVERIFY(QString("a") < QString("b"));
+ QVERIFY(QString("a") <= QString("b"));
+ QVERIFY(QString("a") <= QString("a"));
+ QVERIFY(QString("a") == QString("a"));
+ QVERIFY(QString("a") >= QString("a"));
+ QVERIFY(QString("b") >= QString("a"));
+ QVERIFY(QString("b") > QString("a"));
+
+ QVERIFY("a" < QString("b"));
+ QVERIFY("a" <= QString("b"));
+ QVERIFY("a" <= QString("a"));
+ QVERIFY("a" == QString("a"));
+ QVERIFY("a" >= QString("a"));
+ QVERIFY("b" >= QString("a"));
+ QVERIFY("b" > QString("a"));
+
+ QVERIFY(QString("a") < "b");
+ QVERIFY(QString("a") <= "b");
+ QVERIFY(QString("a") <= "a");
+ QVERIFY(QString("a") == "a");
+ QVERIFY(QString("a") >= "a");
+ QVERIFY(QString("b") >= "a");
+ QVERIFY(QString("b") > "a");
+
+ QVERIFY(QLatin1String("a") < QString("b"));
+ QVERIFY(QLatin1String("a") <= QString("b"));
+ QVERIFY(QLatin1String("a") <= QString("a"));
+ QVERIFY(QLatin1String("a") == QString("a"));
+ QVERIFY(QLatin1String("a") >= QString("a"));
+ QVERIFY(QLatin1String("b") >= QString("a"));
+ QVERIFY(QLatin1String("b") > QString("a"));
+
+ QVERIFY(QString("a") < QLatin1String("b"));
+ QVERIFY(QString("a") <= QLatin1String("b"));
+ QVERIFY(QString("a") <= QLatin1String("a"));
+ QVERIFY(QString("a") == QLatin1String("a"));
+ QVERIFY(QString("a") >= QLatin1String("a"));
+ QVERIFY(QString("b") >= QLatin1String("a"));
+ QVERIFY(QString("b") > QLatin1String("a"));
+
+ QVERIFY("a" < QLatin1String("b"));
+ QVERIFY("a" <= QLatin1String("b"));
+ QVERIFY("a" <= QLatin1String("a"));
+ QVERIFY("a" == QLatin1String("a"));
+ QVERIFY("a" >= QLatin1String("a"));
+ QVERIFY("b" >= QLatin1String("a"));
+ QVERIFY("b" > QLatin1String("a"));
+
+ QVERIFY(QLatin1String("a") < "b");
+ QVERIFY(QLatin1String("a") <= "b");
+ QVERIFY(QLatin1String("a") <= "a");
+ QVERIFY(QLatin1String("a") == "a");
+ QVERIFY(QLatin1String("a") >= "a");
+ QVERIFY(QLatin1String("b") >= "a");
+ QVERIFY(QLatin1String("b") > "a");
}
void tst_QString::integer_conversion_data()
diff --git a/tests/auto/gui/image/qicon/tst_qicon.cpp b/tests/auto/gui/image/qicon/tst_qicon.cpp
index 2ce6fc50584..bfe2fbc9f73 100644
--- a/tests/auto/gui/image/qicon/tst_qicon.cpp
+++ b/tests/auto/gui/image/qicon/tst_qicon.cpp
@@ -594,7 +594,9 @@ void tst_QIcon::fromTheme()
QCOMPARE(appointmentIcon.pixmap(22).size(), QSize(22, 22)); // exact
QCOMPARE(appointmentIcon.pixmap(32).size(), QSize(32, 32)); // exact
QCOMPARE(appointmentIcon.pixmap(48).size(), QSize(32, 32)); // smaller
+ QCOMPARE(appointmentIcon.pixmap(16).size(), QSize(16, 16)); // scaled down
QCOMPARE(appointmentIcon.pixmap(8).size(), QSize(8, 8)); // scaled down
+ QCOMPARE(appointmentIcon.pixmap(16).size(), QSize(16, 16)); // scaled down
QByteArray ba;
// write to QByteArray
diff --git a/tests/auto/sql/kernel/qsqldatabase/tst_databases.h b/tests/auto/sql/kernel/qsqldatabase/tst_databases.h
index 59a16bc5692..5c8b3ef728f 100644
--- a/tests/auto/sql/kernel/qsqldatabase/tst_databases.h
+++ b/tests/auto/sql/kernel/qsqldatabase/tst_databases.h
@@ -302,8 +302,8 @@ public:
// use in-memory database to prevent local files
// addDb("QSQLITE", ":memory:");
- addDb( "QSQLITE", QDir::toNativeSeparators(QDir::tempPath()+"/foo.db") );
-// addDb( "QSQLITE2", QDir::toNativeSeparators(QDir::tempPath()+"/foo2.db") );
+ addDb( "QSQLITE", QDir::toNativeSeparators(dbDir.path() + "/foo.db") );
+// addDb( "QSQLITE2", QDir::toNativeSeparators(dbDir.path() + "/foo2.db") );
// addDb( "QODBC3", "DRIVER={SQL SERVER};SERVER=iceblink.qt-project.org\\ICEBLINK", "troll", "trond", "" );
// addDb( "QODBC3", "DRIVER={SQL Native Client};SERVER=silence.qt-project.org\\SQLEXPRESS", "troll", "trond", "" );
@@ -589,6 +589,7 @@ public:
QStringList dbNames;
int counter;
+ QTemporaryDir dbDir;
};
#endif
diff --git a/tests/auto/sql/models/qsqlquerymodel/qsqlquerymodel.pro b/tests/auto/sql/models/qsqlquerymodel/qsqlquerymodel.pro
index 40ec56d473a..7bcde084695 100644
--- a/tests/auto/sql/models/qsqlquerymodel/qsqlquerymodel.pro
+++ b/tests/auto/sql/models/qsqlquerymodel/qsqlquerymodel.pro
@@ -1,4 +1,5 @@
CONFIG += testcase
+CONFIG += parallel_test
TARGET = tst_qsqlquerymodel
SOURCES += tst_qsqlquerymodel.cpp
diff --git a/tests/auto/sql/models/qsqlrelationaltablemodel/qsqlrelationaltablemodel.pro b/tests/auto/sql/models/qsqlrelationaltablemodel/qsqlrelationaltablemodel.pro
index 8d20eaa3c83..6bcc3a1870d 100644
--- a/tests/auto/sql/models/qsqlrelationaltablemodel/qsqlrelationaltablemodel.pro
+++ b/tests/auto/sql/models/qsqlrelationaltablemodel/qsqlrelationaltablemodel.pro
@@ -1,4 +1,5 @@
CONFIG += testcase
+CONFIG += parallel_test
TARGET = tst_qsqlrelationaltablemodel
SOURCES += tst_qsqlrelationaltablemodel.cpp
diff --git a/tests/auto/sql/models/qsqltablemodel/qsqltablemodel.pro b/tests/auto/sql/models/qsqltablemodel/qsqltablemodel.pro
index e7d01afb40d..211c2f2c2e5 100644
--- a/tests/auto/sql/models/qsqltablemodel/qsqltablemodel.pro
+++ b/tests/auto/sql/models/qsqltablemodel/qsqltablemodel.pro
@@ -1,4 +1,5 @@
CONFIG += testcase
+CONFIG += parallel_test
TARGET = tst_qsqltablemodel
SOURCES += tst_qsqltablemodel.cpp
diff --git a/tests/auto/widgets/itemviews/qabstractitemview/tst_qabstractitemview.cpp b/tests/auto/widgets/itemviews/qabstractitemview/tst_qabstractitemview.cpp
index e4167aacadd..c3aaf6be160 100644
--- a/tests/auto/widgets/itemviews/qabstractitemview/tst_qabstractitemview.cpp
+++ b/tests/auto/widgets/itemviews/qabstractitemview/tst_qabstractitemview.cpp
@@ -1286,6 +1286,7 @@ void tst_QAbstractItemView::task200665_itemEntered()
QVERIFY(QTest::qWaitForWindowExposed(&view));
QRect rect = view.visualRect(model.index(0,0));
QCursor::setPos( view.viewport()->mapToGlobal(rect.center()) );
+ QCoreApplication::processEvents();
QSignalSpy spy(&view, SIGNAL(entered(QModelIndex)));
view.verticalScrollBar()->setValue(view.verticalScrollBar()->maximum());
diff --git a/tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp b/tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp
index f7613a59f33..5739245899b 100644
--- a/tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp
+++ b/tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp
@@ -3702,7 +3702,7 @@ void tst_QTableView::mouseWheel_data()
<< 10 + qApp->wheelScrollLines() << 10 + qApp->wheelScrollLines();
QTest::newRow("scroll down per pixel")
<< int(QAbstractItemView::ScrollPerPixel) << -120
- << 10 + qApp->wheelScrollLines() << 10 + qApp->wheelScrollLines();
+ << 10 + qApp->wheelScrollLines() * 89 << 10 + qApp->wheelScrollLines() * 28;
}
void tst_QTableView::mouseWheel()
diff --git a/tests/auto/widgets/widgets/qtabwidget/tst_qtabwidget.cpp b/tests/auto/widgets/widgets/qtabwidget/tst_qtabwidget.cpp
index e55438f3d33..df11ea9b14a 100644
--- a/tests/auto/widgets/widgets/qtabwidget/tst_qtabwidget.cpp
+++ b/tests/auto/widgets/widgets/qtabwidget/tst_qtabwidget.cpp
@@ -112,6 +112,7 @@ class tst_QTabWidget:public QObject {
void heightForWidth_data();
void heightForWidth();
void tabBarClicked();
+ void moveCurrentTab();
private:
int addPage();
@@ -709,5 +710,27 @@ void tst_QTabWidget::tabBarClicked()
}
}
+void tst_QTabWidget::moveCurrentTab()
+{
+ QTabWidget tabWidget;
+ QWidget* firstTab = new QWidget(&tabWidget);
+ QWidget* secondTab = new QWidget(&tabWidget);
+ tabWidget.addTab(firstTab, "0");
+ tabWidget.addTab(secondTab, "1");
+
+ QCOMPARE(tabWidget.currentIndex(), 0);
+ QCOMPARE(tabWidget.currentWidget(), firstTab);
+
+ tabWidget.setCurrentIndex(1);
+
+ QCOMPARE(tabWidget.currentIndex(), 1);
+ QCOMPARE(tabWidget.currentWidget(), secondTab);
+
+ tabWidget.tabBar()->moveTab(1, 0);
+
+ QCOMPARE(tabWidget.currentIndex(), 0);
+ QCOMPARE(tabWidget.currentWidget(), secondTab);
+}
+
QTEST_MAIN(tst_QTabWidget)
#include "tst_qtabwidget.moc"
diff --git a/tests/manual/dialogs/printdialogpanel.cpp b/tests/manual/dialogs/printdialogpanel.cpp
index 256ffe09eeb..5c89055e22c 100644
--- a/tests/manual/dialogs/printdialogpanel.cpp
+++ b/tests/manual/dialogs/printdialogpanel.cpp
@@ -408,8 +408,10 @@ void PrintDialogPanel::showPrintDialog()
QPrintDialog dialog(m_printer.data(), this);
dialog.setOptions(m_printDialogOptionsControl->value<QPrintDialog::PrintDialogOptions>());
dialog.setPrintRange(comboBoxValue<QPrintDialog::PrintRange>(m_printDialogRangeCombo));
- if (dialog.exec() == QDialog::Accepted)
+ if (dialog.exec() == QDialog::Accepted) {
retrieveSettings(m_printer.data());
+ print(m_printer.data());
+ }
}
void PrintDialogPanel::showPreviewDialog()
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index e04bd57b7f5..c9ca0fc597f 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -2702,7 +2702,7 @@ void Configure::generateOutputVars()
qmakeVars += "LIBS += " + formatPaths(qmakeLibs);
if (!dictionary["QT_LFLAGS_SQLITE"].isEmpty())
- qmakeVars += "QT_LFLAGS_SQLITE += " + formatPath(dictionary["QT_LFLAGS_SQLITE"]);
+ qmakeVars += "QT_LFLAGS_SQLITE += " + dictionary["QT_LFLAGS_SQLITE"];
if (dictionary["JAVASCRIPTCORE_JIT"] == "no")
qmakeVars += "JAVASCRIPTCORE_JIT = no";