Commit Graph

30154 Commits

Author SHA1 Message Date
Tor Arne Vestbø
a21ffd44b3 Use async delivery when flushing events from secondary threads
Commit 33d748bb8 (Allow granular synchronous and asynchronous delivery of
QPA events) replaced a postWindowSystemEvent() with a SynchronousDelivery,
which was completely broken, as the delivery is already guarded by a mutex
wait.

Change-Id: I929fddc4e3403f943e8fe0677b5a46bf58419575
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2016-11-04 23:23:23 +00:00
Thiago Macieira
ea9a8672a1 Fix build with ICC on macOS: <atomic> is properly supported
I'm guess I introduced the regression in the commit
18ed6f20ad, which I wasn't sure about.

Change-Id: Ic46ff326a6ba46bc877cfffd14839f84fdf796e7
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-11-04 16:32:54 +00:00
Kai Koehne
02167870c3 Use new "Files" property in testlib 3rdparty documentation
Change-Id: I4ecef274f4afe0b1a25502fb64b2213a7bdb2853
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2016-11-04 15:20:12 +00:00
Richard Moe Gustavsen
6a4aaa3477 iOS: remove wrong file include after upstream merge
qiosfileenginefactory.h is now a part of the optional plugin.

Amends d7e49801

Change-Id: Ia1854145f54e4278ab5c0020361915f476d48cc9
Reviewed-by: Liang Qi <liang.qi@qt.io>
2016-11-04 12:17:19 +00:00
Kai Koehne
dd876ccb66 Add missing QBIG5CODEC_LICENSE.txt file
Add file that was forgotten in eb96813976.

Change-Id: Ib288bfc1f1f9cb4857e42f2fa3fe750e23b56aea
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2016-11-04 11:48:47 +00:00
Friedemann Kleint
da9ddb1e32 Direct2D QPA config test: Test for presence of IDXGISurface1
Partial Direct2D was added to recent versions of MinGW, which made the
config test pass but is not sufficient to actually build the plugin.
Check for IDXGISurface1 in addition.

Change-Id: Ie108f5735ceb0a44934429b0fd2213612ed28848
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-11-04 11:22:29 +00:00
Eskil Abrahamsen Blomfeldt
1ba0cfab30 Windows: Fix high-dpi text rendering
In change ce2ae6ebd8 we added support for
hinted rendering to the DirectWrite engine. Previously, we would just
use the DirectWrite engine for all text rendering in high-dpi and assume
we would get only vertical hinting, but since the default changed, we
ended up scaling hinted text and the resulting text layouts were a mess.

Task-number: QTBUG-56841
Change-Id: I52101ea264878138de41878d1677c0ef8b522e78
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-11-04 11:20:31 +00:00
Liang Qi
e918605f42 Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	src/corelib/json/qjsonparser.cpp
	src/gui/opengl/qopengl.cpp

Change-Id: Ib4d3208398399691839e6c6eaeb9006f99e3a62b
2016-11-04 11:39:15 +01:00
Lars Knoll
15df60239d Fix OOM crashes for huge json documents
Check all places where we reallocate our internal data structure
and return a DocumentTooLarge parse error if we can't get enough
memory.

Change-Id: I006d0170d941837220c7dad0508571b68e2cbfd7
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Kati Kankaanpaa <kati.kankaanpaa@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2016-11-04 07:53:39 +00:00
Thiago Macieira
4b6784b49c Stop using readdir_r: glibc deprecated it and it's not a good idea
POSIX does not require that readdir() be reentrant even for operations
on different dirent objects, but all implementations (according to the
glibc documentation) already do that. Moreover, it's not a good idea to
use readdir_r since the buffer space is limited by the caller, so
certain file names may be too long (ENAMETOOLONG) -- we had a workaround
for QNX, but for no other OS. According to the glibc documentation, it
is expected that POSIX will mark readdir_r obsolete and instead require
some form of reentrancy for readdir.

This commit makes everyone use readdir instead. The macros in
qplatformdefs.h are left behind in case someone else is using them.

With glibc 2.24, we started getting:

 qplatformdefs.h:150:35: warning: ‘int readdir_r(DIR*, dirent*, dirent**)’ is deprecated [-Wdeprecated-declarations]
 qfilesystemiterator_unix.cpp:112:17: note: in expansion of macro ‘QT_READDIR_R’

Task-number: QTBUG-56088
Change-Id: I33dc971f005a4848bb8ffffd14749b4082f62e69
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: James McDonnell <jmcdonnell@blackberry.com>
2016-11-03 15:31:33 +00:00
Thiago Macieira
cf4e7575ca Fix GCC warning about ODR violation
There are two enums called "Operator"

 qdrawhelper_p.h:201:8: warning: type ‘struct Operator’ violates the C++ One Definition Rule [-Wodr]
 qopengl.cpp:138:6: note: a different type is defined in another translation unit

Change-Id: I09100678ff4443e6be06fffd1482da1f636614b7
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-11-03 15:31:30 +00:00
Edward Welbourne
9930ea92c1 configure -libproxy: add a warning if not namespacing Qt
Task-number: QTBUG-46058
Change-Id: I62978b7fe9a82f9facb16ba56d0b14b792e3de61
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2016-11-03 15:25:45 +00:00
Dmitry Shachnev
1a1a0e3159 GTK+ dialogs: Get rid of deprecated GtkStock usage
GtkStock has been deprecated since GTK+ 3.10, and is removed in GTK+ 4.
Use the standard button names provided by Qt instead.

Change-Id: I55e8452178544b4a9ebf5c75b70f4c5c56c047f4
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
2016-11-03 14:07:59 +00:00
Allan Sandfeld Jensen
9e53a91e99 Fix tiling on a width over 2048
The blend_tiled_argb and blend_tiled_rgb565 was not correctly handling
widths larger than the buffer size. This patch adds the same pattern
used in blend_tiled_generic, which worked correctly.

Change-Id: Ie22c2a21d96cb0477cd0990bf01451ab907a4768
Task-number: QTBUG-56364
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2016-11-03 12:54:52 +00:00
Oliver Wolff
181bb447f5 winrt: Removed unused member variable from socket engine
Change-Id: I3255c1fb10e053f9a9a1753ad0a0b6969d8a8cfe
Reviewed-by: David Faure <david.faure@kdab.com>
2016-11-03 09:28:32 +00:00
Oliver Wolff
67c6d0f54e winrt: Remove static mutex that protected handleReadyRead
At the point in time when the callback is called it is very
unlikely that another thread sets the state or error of
the socket engine. Other members (readBytes, bytesAvailable)
are protected by readMutex.

Change-Id: I76cf12fbc9019d1b42846c4b40e0cd1c06bbb220
Reviewed-by: David Faure <david.faure@kdab.com>
2016-11-03 09:28:27 +00:00
Oliver Wolff
b787977ba0 winrt: Guard pendingReadOps with mutex
As the list is changed inside a native callback
(handleReadyRead) which can be run inside another
thread it has to be protected by a mutex.

Change-Id: I145a866a36a12b7ea9bfa9f99ad9f7add872a021
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Reviewed-by: David Faure <david.faure@kdab.com>
2016-11-03 09:28:21 +00:00
Oliver Wolff
e1f29814da winrt: Proper guarding by readMutex
Commented its purpose and the guarded members for
readMutex.

Fixed places where guarded members were accessed without
using the mutex.

Use QMutexLocker instead of manually (un-)locking the
mutex.

Task-number: QTBUG-44357
Change-Id: I0d46f9592d5a9d1b52e73df961785a6f6c9e80be
Reviewed-by: David Faure <david.faure@kdab.com>
2016-11-03 09:28:16 +00:00
Thiago Macieira
ca4d93d85e Stop unloading plugins in QPluginLoader and QFactoryLoader
QPluginLoader hasn't unloaded in its destructor since Qt 5.0, but we
missed the equivalent code in QFactoryLoader (which bypasses
QPluginLoader). Besides, QPluginLoader::unload() was still doing
unloading, which it won't anymore.

Not unloading plugins is Qt's policy, as decided during the 5.0
development process and reaffirmed now in 5.6. This is due to static
data in plugins leaking out and remaining in use past the unloading of
the plugin, causing crashes.

This does not affect QLibrary and QLibrary::unload(). Those are meant
for non-Qt loadable modules, so unloading them may be safe.

Task-number: QTBUG-49061
Discussed-on: http://lists.qt-project.org/pipermail/development/2015-November/023681.html
Change-Id: I461e9fc7199748faa187ffff1416070f138df8db
(cherry picked from commit 494376f980)
Discussed-again-on: http://lists.qt-project.org/pipermail/development/2016-October/027476.html
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-11-02 17:58:48 +00:00
Oliver Wolff
5f6c0418fe winrt: Fixed assignment of readOrigin in readDatagram
Change-Id: I0455b6526b8bacd30622698e0a497fa2da3932ba
Reviewed-by: David Faure <david.faure@kdab.com>
2016-11-02 12:14:46 +00:00
Jesus Fernandez
b5fc085e71 Add QPixmapIconEngine::pixmap pointer check
Dereference after null check (FORWARD_NULL)5.
var_deref_op: Dereferencing null pointer pe.

pe pointer it's being checked at the beginning of the function so it
implies pe might be null.

Coverity-Id: 11106
Change-Id: Ie88b27877a46cdd20a317fb5e21c3fdec1b99dda
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2016-11-02 10:56:51 +00:00
Sergio Martins
c501010722 Mention QDialog::setSizeGripEnabled() in QSizeGrip's docs
The same way it also mentions QStatusBar.

Change-Id: Ic084466310c989d1a79ba5ba21d6784acaa38e6e
Reviewed-by: Martin Smith <martin.smith@theqtcompany.com>
2016-11-02 10:39:39 +00:00
Jesus Fernandez
dcedce51a6 Include intrin.h header when using MSVC
Fixes the build with MSVC15

Change-Id: I7f22938583775bb3f0767d50cf59a43cab95eede
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2016-11-02 09:49:54 +00:00
Kai Koehne
71166288cb Add QNetworkProxy::usesSystemConfiguration() accessor
Allow to check programmatically whether using the system proxy settings
is enabled. To implement this the QSystemConfigurationProxyFactory is
replaced by an explicit boolean in QGlobalNetworkProxy.

Change-Id: I52231b4ffc890b085bcd1739acf93c97bdb18eb5
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2016-11-02 08:04:14 +00:00
Anton Kudryavtsev
c12f42e91b QString: optimize replace(QChar, QChar, Qt::CaseSensitivity)
Only detach() if the string does contain the character to be replaced.
Save memory allocations.

Change-Id: I69c070d3f0b99f505fb6c209f657cdce31a35461
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2016-11-01 18:36:53 +00:00
Oswald Buddenhagen
147b7d9da2 remove bogus freetype dependency stuff
fixes rebase FAIL in f9a80e06a.

the ft dependency itself is pulled in via the basic font database, which
is included if ft is used.

Change-Id: I4e9c0c44bd0360b702953e51cde4c5d526eff499
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2016-11-01 15:22:58 +00:00
Friedemann Kleint
99cebe717c Update bookmarks in the XML bookmarks examples
Update URLs in jennifer.xbel and remove frank.xbel, which
has too many outdated URLs

Change-Id: I8cbc1e3988f45230f849e68202780c76cf4353d9
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2016-11-01 08:37:50 +00:00
Oswald Buddenhagen
0239b4f217 decouple packageExists() and PKGCONFIG from qt configuration
users may want to use pkg-config regardless of whether qt itself was
built with it. that's particularly relevant when using binary packages
on macos while trying to use 3rd party dependencies from homebrew.

Task-number: QTBUG-36256
Change-Id: I15e6d0bf5cdaff4274e2d7c07917e97f29157a5c
Reviewed-by: Massimo Callegari <massimocallegari@yahoo.it>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-11-01 07:56:43 +00:00
Oswald Buddenhagen
265d309cb0 configure: fix usage of pkg-config from qmakespec
the spec (possibly) provides QMAKE_PKG_CONFIG. PKG_CONFIG is dynamically
determined on use.

Change-Id: I45b7f4eddeff5d28539021472ef9036dd397d61e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-11-01 07:56:33 +00:00
Liang Qi
a732576a66 Merge remote-tracking branch 'origin/5.7' into 5.8
Conflicts:
	config.tests/win/msvc_version.cpp
	configure.pri
	mkspecs/macx-ios-clang/features/default_post.prf
	mkspecs/macx-ios-clang/features/resolve_config.prf
	mkspecs/features/uikit/default_post.prf
	mkspecs/features/uikit/resolve_config.prf
	src/corelib/io/qsettings_mac.cpp
	src/corelib/json/qjsondocument.cpp
	src/plugins/platforms/cocoa/qcocoawindow.h
	src/plugins/platforms/cocoa/qcocoawindow.mm
	src/plugins/platforms/cocoa/qnswindowdelegate.h
	src/plugins/platforms/cocoa/qnswindowdelegate.mm
	src/plugins/platforms/ios/ios.pro
	src/plugins/platforms/ios/kernel.pro
	src/plugins/platforms/ios/qiosintegration.h
	src/plugins/platforms/minimalegl/qminimaleglintegration.cpp
	tests/auto/gui/painting/qpainter/tst_qpainter.cpp
	tools/configure/environment.cpp

Change-Id: I654845e54e40f5951fb78aab349ca667e9f27843
2016-11-01 06:02:55 +01:00
Joni Poikelin
c34d289c44 Fix building when lex source refers to a file generated by yacc
Scan lex and yacc sources for dependencies as if they were C source code,
which is close enough to reality.

This will unfortunately result in the generated source files depending on
the generated headers, while it should have been the object files created
from these sources which have that dependency. But qmake cannot do better,
and this is good enough.

Task-number: QTBUG-56507
Change-Id: Ic3e1941bf2e2820bfddf99deba854e1e82f83669
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2016-11-01 04:41:21 +00:00
Liang Qi
cd9de59177 Revert "Deduplication fetchTransformed"
A merge from 5.7 with this change will trigger a compiler crash
on gcc (GCC) 5.3.1 20160406 (Red Hat 5.3.1-6) on Linux RHEL_7_2 (gcc-x86_64).

This reverts commit eeb03fbf26.

Task-number: QTBUG-56817
Change-Id: I143fdf43e0530d68d627718c515c2063630bd920
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2016-10-31 17:12:00 +00:00
Martin Smith
1df45820d4 doc: Document two undocumented functions
This change provides missing documentation for two member
functions of QString.

QString QString::fromUtf16(const char16_t *str, int size)
QString QString::fromUcs4(const char32_t *str, int size)

Change-Id: I94a9437a457062e49e4457f5876e4d7c31fff24c
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2016-10-31 14:03:58 +00:00
Frederik Schwarzer
700ea0af68 QMainWindow: fix wording in apidoc
Change-Id: I5cb44bed7e946574eb3e08ff51948f901b2bb78c
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2016-10-31 13:49:55 +00:00
Liang Qi
8e20daae9f Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	src/plugins/platforms/minimalegl/qminimaleglintegration.cpp

Change-Id: Ia6ab42a6daadbf8abc085c971545904d49ea4b56
2016-10-31 09:26:35 +01:00
Laszlo Agocs
694702e09d Mark the entire widget dirty when changing flush paths
This augments 2a7cee47e5

Task-number: QTBUG-56534
Task-number: QTBUG-54241
Change-Id: I635478c43e353b0e435d3ac30e4cc608a5a2a6a5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2016-10-29 18:24:14 +00:00
Laszlo Agocs
ca5d4137aa minimalegl: Reorder includes to avoid EGL native type clashes
Some of the qminimaleglscreen.h includes are not even necessary.
With the inclusion of egl.h (or qt_egl_p.h in 5.7 and up) isolated
to this header, all we need to ensure is that the sources that include
it place the include at a suitable place.

This is not the only possible solution, there are alternatives (each with
its own caveat), but this is likely the least intrusive.

Task-number: QTBUG-56559
Change-Id: I17db031c8e401d9895a417ba3568ad1e4ba30f72
Reviewed-by: Louai Al-Khanji <louai.al-khanji@qt.io>
2016-10-28 21:01:58 +00:00
Laszlo Agocs
f9ec707e49 windows: Disable OpenGL proper on Intel 945
Change-Id: I77fbf5bafcd6b0fe5040513ef6b0d049600f9b33
Task-number: QTBUG-40991
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2016-10-28 21:01:43 +00:00
Topi Reinio
401172a198 Doc: Fix typos: handing > handling
Change-Id: Iecc64cba620ec639d06684e30264171052f21e10
Reviewed-by: Nico Vertriest <nico.vertriest@theqtcompany.com>
2016-10-28 19:40:47 +00:00
Topi Reinio
5545e5aa6e Doc: Template: Add CSS rules for bordered images
9f45d2ab added a documentation macro for bordered images
- Add the corresponding CSS rules to apply a drop shadow
for such images.

Change-Id: I18c4fbd7498db7b9391f33e568219e67b329e618
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
2016-10-28 19:40:10 +00:00
Marc Mutz
56734cdf33 QFileSystemModel: improve readability of the renaming code
Instead of calling QHash::value(), inserting the return value
into the hash with a different name and only many lines later
removing the old node, do the extraction into a QScopedPointer,
and the insertion into the hash from the QScopedPoiner, keeping
the node update in between the two.

Avoids the double-lookup of 'oldName', makes it clearer what's
going on, and limits the potential for some return between the
insertion under the new name and the removal under the old one
sneaking in, which would cause a double-delete later in the
dtor.

Change-Id: Ia2d1cca77c04708421ccb5e594729ec83de85345
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2016-10-28 18:20:08 +00:00
Liang Qi
f2f39946d2 Fix a mis-merge in af0d0b9
"-framework AudioToolbox" was lost.

Task-number: QTBUG-56784
Change-Id: Ibd536c53e7e1456077559c021a70407339f33971
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2016-10-28 18:02:41 +00:00
Joerg Bornemann
d16d56a05e MSVC: Fix installation of PDB files for static libraries
Commit 3d3d65f5 separated the PDB files for compiling and linking. Only
the PDB file the linker produces would be installed. However, this does
not work for static libraries as the LIB tool does not create a PDB file
from the compiler's PDB file. This patch turns the separation between
PDB files off for static libraries.

Task-number: QTBUG-56594
Change-Id: I08dcb7889c67b2f6370efa1ee19be8558355bbc9
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2016-10-28 14:37:11 +00:00
Friedemann Kleint
4039568837 Direct2d: Add missing dependency to platformsupport's accessibility
Change-Id: I620370bb5f4bbac11c1e5740c706e0cb64d9d407
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2016-10-28 14:19:49 +00:00
Friedemann Kleint
8cd8124559 Windows QPA: Do not use QSettings to access the registry
When commenting out the warning in createOrOpenKey()
(src\corelib\io\qsettings_win.cpp:157), applications produce warnings:
QSettings: Failed to create subkey "Software\Microsoft\Windows NT\CurrentVersion\FontSubstitutes": Access is denied.
indicating that an attempt to open the registry in read/write mode fails.
Add a utility function to read out registry strings in read-only mode to
the font database and use that instead.

Change-Id: I4187344cac7ec2ba27f15b51e237575efc171853
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2016-10-28 14:14:28 +00:00
André Somers
4c00246fea Fixed crash taking null central widget
When no central widget has been set, calling takeCentralWidget should
just return a null pointer instead of crashing.

[ChangeLog][QtWidgets][QMainWindow] Fixed crash using takeCentralWidget when
the central widget was not set.

Task-number: QTBUG-56628
Change-Id: I240ccf4caa41d2716a78851571fbfbf444a4922e
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2016-10-28 14:11:42 +00:00
Topi Reinio
dbf35d7571 Doc: Fix a typo in QtConcurrent example snippet
And use different wording to describe QtConcurrent::filtered(), as
it doesn't modify the sequence it operates on.

Change-Id: I768c0d121e027c5de36ba7bd548c2d4c2a7f1bd9
Reviewed-by: Martin Smith <martin.smith@theqtcompany.com>
2016-10-28 13:17:19 +00:00
Topi Reinio
431bc3321f Doc: CSS: Add styling for content generated with \legalese command
Even though the \legalese command is no longer used in Qt 5
documentation as it doesn't support collating legalese texts
across modules, it may still be useful for stand-alone doc
projects.

Add CSS rules so the \legalese text is styled similarly to
code blocks, to make it stand out from the rest of the content.

Change-Id: I533d8e2375ea2f8054c0671ff34dfa6f0dfe01d1
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
2016-10-28 13:02:22 +00:00
Kai Koehne
e5451f086b Document license for CLDR data in Qt Core
Change-Id: I21bf76a5603f3384fccad46a16b7304380a7a444
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-10-28 12:46:46 +00:00
Kai Koehne
e46cf80f8a Remove legalese text from QLocale
The mentioned functions are now documented in src/3rdparty/freebsd.
Anyhow, the license and copyright differs ...

Change-Id: Ib59ace624d1d8244f591668ed05993787ca65d24
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2016-10-28 12:46:43 +00:00