Commit Graph

33211 Commits

Author SHA1 Message Date
Christian Stromme
5dcd949145 Android: Add lock to protect access to the platform interface
Fixes dubious lock protecting the platform interface handle, and makes
sure that we lock and hold a valid reference to the platform
interface before accessing it. Since the platform interface is exposed
we also need to expose the mutex protecting it.

Change-Id: I1ec1219a75c589bc793676369b11fb403de20102
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2017-07-03 14:38:01 +00:00
Dmitry Shachnev
5c144a72d5 Fix capitalization of x11-xcb pkg-config module name
$ pkg-config --exists X11-xcb && echo True
$ pkg-config --exists x11-xcb && echo True
True

See https://cgit.freedesktop.org/xorg/lib/libX11/tree/x11-xcb.pc.in.

Change-Id: I1485f124e2926bb1c6a2b5eb83c4963c095d0f12
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-07-03 13:33:30 +00:00
David Faure
df06926b8a QMimeDatabase::mimeTypeForUrl: skip content check for remote URLs
The code was trying to open a local file with the same path
as the remote URL, which is unnecessary and wrong in the unlikely
case where such a file would exist.

Spotted by Christoph Feck when reading the code.

Change-Id: I1d77e5781cf606b025d2877f48a9914dd1e36b1d
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2017-07-03 13:18:03 +00:00
Friedemann Kleint
f2df5c64bd QFileSystemEntry: Export static helper function checking for the root path
This provides a helper function which does the check on the string.
QFileInfo::isRoot() in addition checks for the existence of
the directory, which can cause hangs with network drives.
Use the new function in appropriate places in QtWidgets.

Task-number: QTBUG-6039
Change-Id: I54d0d860713e82b28fa4069a5345b042337f9c52
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-07-03 12:44:00 +00:00
Daniel Teske
00b8050d68 QLineEdit: Document that []{} are reserved in Input Masks
They don't have any meaning, seems like they were meant for a future
extension. Documenting them, documents that they need to be escaped.

Change-Id: I90079766ffd45fab8c4676f7a9212ff6dec4a732
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2017-07-03 12:28:35 +00:00
Nico Vertriest
db6e357d48 Doc: Add list with widgets examples using layouts
Change-Id: I585cd63f68220467de1beed3346cdaa12af2b34b
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2017-07-03 11:51:23 +00:00
Alexander Volkov
46312b611b xcb: Use QT_CONFIG macro to check for xcb-sm, xcb-render, and xcb-glx
And remove the corresponding defines.
Note that XCB_USE_GLX and XCB_HAS_XCB_GLX were used as synonyms
because QGLXBufferSwapComplete was wrapped in #if defined(XCB_USE_GLX)
and at the same time it was used only when XCB_HAS_XCB_GLX
was defined.

Change-Id: I6c04b0ccfd5369b78b3e8af2ec39d38ae5c311dc
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2017-07-03 11:40:35 +00:00
Simon Hausmann
5ac03a14bf Blacklist tst_QWindow::positioning on macOS 10.12
Change-Id: I41f46e8387519a691d3df9a4fdcc577916e6d247
Task-number: QTQAINFRA-1332
Reviewed-by: Liang Qi <liang.qi@qt.io>
2017-07-03 11:29:30 +00:00
Nico Vertriest
3fe032ad91 Doc: minor correction in list
Removed unnecessary periods in list

Change-Id: Ic6e029a3271bf34db2e0b77005f58dd8b2337537
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2017-07-03 11:18:04 +00:00
Nico Vertriest
b7c33df724 Doc: add tutorials to overview page Qt Widgets
Change-Id: I62037ce2190689b2e9c8d62a9d67e1d477e1be42
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2017-07-03 10:35:44 +00:00
Gatis Paeglis
ce9a806336 doc: cleanup raster window example
Documentation does not match the sample code. There is no explicit
call to QWindow::create(). It is called implicitly by QWindow::show().

Furthermore, QWindow::create() documentation states: "Note that it is
not usually necessary to call this function directly, as it will be
implicitly called by show(), setVisible(), and other functions that
require access to the platform resources.".

Change-Id: I632da86438f7f88c1fd8359b9fd6d52f329291cb
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2017-07-03 10:20:37 +00:00
Kai Koehne
87229adca8 Change MinGW link to MinGW-w64
We're only supporting builds with MinGW-w64 these days.

Change-Id: I1198551ba85132c3f0f81e32f11aa149126ca61f
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2017-07-03 10:16:44 +00:00
Eike Ziller
2a9f678f59 Fix navigation with offline style
When the switching to the non-simple offline style is done after
document load, the navigation to anchors completely breaks. So, do
the switch without the additional delay.

Task-number: QTCREATORBUG-18448
Change-Id: I5abbc3bbe1c743d2a5e493bb9e0916c5d092942a
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2017-07-03 10:08:33 +00:00
Andy Shaw
3e8ebea95b Cocoa: Reset the target + action for a menuitem after showing a dialog
To make it more reliable and efficient we now do the reverse of what we
are doing when redirecting the items. This will ensure that the actions
are correctly reset to the original target and action. The original
approach of updateMenubarImmediately() was not always doing this and it
also does other unnecessary things as a result when all we need is to
just reset the things we changed.

Change-Id: Icefa38d47ec9434894f05caeed75fbf8bdfecb93
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-07-03 09:42:13 +00:00
Daniel Teske
9b91784987 QLineEdit: Tweak selectionStart() documentation
Change-Id: I55defa5ed182373f435b06c92770da5b05c01459
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2017-07-03 09:41:25 +00:00
Edward Welbourne
f881120fd0 Fix offset calculation to be valid at the correct time
tst_QLocale::macDefaultLocale() was determining local-time's current
offset from UTC and using it when working out what to expect the
offset at 1:2:3 today to be.  When a transition happens after 1:2:3 on
its day (which is usual for DST changes in Europe), this lead to using
the new offset to test a time before the transition; the test was thus
wrong and failed.

Use the time to be tested (and current date) to compute the offset to
use, instead of using the current date-time.

Change-Id: I1c02a5579bca859e1d1aeb4f45b24871a08287af
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-07-03 09:03:28 +00:00
Leena Miettinen
d52fa3efe5 Doc: Remove obsolete screenshots
References to these screenshots have been removed from the
docs in other commits.

Change-Id: I1af72f0160382f1fe98740c664258a9b35ca0e64
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2017-07-03 08:58:57 +00:00
Thiago Macieira
10de063ff1 QFSFileEnginePrivate::map: flags is not unused
It's used below:
    if (flags & QFileDevice::MapPrivateOption) {
        sharemode = MAP_PRIVATE;
        access |= PROT_WRITE;
    }

Change-Id: I8d96dea9955d4c749b99fffd14cd5222762699d4
Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
2017-07-03 08:17:24 +00:00
Friedemann Kleint
22aa919b76 macOS: Blacklist tst_QToolButton::task176137_autoRepeatOfAction()
The test is apparently flaky.

Change-Id: I4d7b5ad653c46a432d79c9090b9f5d4cc98e5b6e
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-07-03 07:50:41 +00:00
Bernhard Rosenkränzer
386af91c57 Fix detection of AT-SPI
Building qtbase 5.9.1 on Linux always results in a build with
accessibility support disabled.

The problem is that the config option for accessibility-atspi-bridge
checks for config.atspi, which isn't defined anywhere - it should
check for libs.atspi (which is set if pkg-config finds atspi-2) instead.

[ChangeLog][QtGui][Platform Specific Changes][Linux/XCB]
Fixed detection of AT-SPI, allowing accessibility support to be built
again.

Task-number: QTBUG-61731
Change-Id: If3bd5dfccda40158c566f8507e34b6877b59b6fb
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Reviewed-by: Bernhard Rosenkränzer <bero@lindev.ch>
2017-07-03 07:44:31 +00:00
Allan Sandfeld Jensen
989b9da300 Fix BMP ImageFormat for semi-transparent files
Reads the v4 and v5 info-header together with the rest of the info-
headers, and use that to report the correct image format before
decoding.

Change-Id: I69e2bcc54367b7f14820815ae2ae1fa2d8d5dc8c
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2017-07-03 07:41:56 +00:00
Oswald Buddenhagen
ed1373124a Bump version
Change-Id: I0d72a8a59926039bb58be51daa4e4b5a6284083f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-07-03 07:22:45 +00:00
Friedemann Kleint
88c68f4d9e tst_QPrinter: Run in temporary directory
Change-Id: I299b740a43926e4af31c70aadda882f87ba9c362
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-07-03 06:49:10 +00:00
Oliver Wolff
6b58d3fb98 Require printer config for printsupport auto tests
Change-Id: I171c5d642e41480b4feec102dc0095af5f500098
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2017-07-03 06:41:35 +00:00
Oliver Wolff
d6adb194af ANGLE: Fix flickering on resize when D3D9 is used
By reverting ANGLE change d3b84ab51db09de238459b0dff2e8420c09aabf3
we get rid of the flickering that happens on resize when D3D9 is
used. The issue that was fixed there is not relevant in Qt's
context so it is safe to revert the change.

Task-number: QTBUG-59893
Change-Id: I9306314b892612fbd1f7a058a2e606aedc0367bb
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-07-03 06:41:01 +00:00
Joerg Bornemann
0512c3e257 Add _UNICODE define to MSVC and MinGW mkspecs
System headers like tchar.h need the _UNICODE define, not UNICODE.
While qplatformdefs.h already provides _UNICODE when UNICODE is
defined, users might want to include tchar.h without Qt includes.

This is consistent with Visual Studio's default defines.

Task-number: QTBUG-61411
Change-Id: I2f604368080270d840f0dbb2cf273805d2ba5239
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-07-03 06:02:24 +00:00
Joerg Bornemann
b446275ac7 Make Qt's VersionInformation resource strings consistent
The strings in Windows VersionInformation resources should be
capitalized by convention, and the entries are usually not terminated
by a dot. However, "Ltd." is an abbreviation and should be
dot-terminated.

Change-Id: Ibea3443ac38846e29a3e77ab3e8d5d77b9370272
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-07-03 06:02:03 +00:00
Joerg Bornemann
f046ed395a Set VERSION for Qt tools
This creates a VersionInfo resource on Windows for Qt's tool
executables similar to what Qt's DLLs contain.

Task-number: QTBUG-55755
Change-Id: I9e5d7bedaec9d14f29a9eeeb6697b07241f860d8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-07-03 06:01:49 +00:00
Maurice Kalinowski
798c526919 winrt: remove legacy checks
Any version prior to 2015 is not supported anymore.

Change-Id: I9ccc87fc506521b560fda1b4c88f9c3aebd7a485
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2017-07-03 05:32:54 +00:00
Maurice Kalinowski
f74098d683 winrt: Update capability management
Introduce uap3 namespace which is used for newly introduced
capabilities. In addition, the autodetection of namespaces for
capabilities within the uap namespace is disabled in Visual Studio
lately. Hence, the output needs to be more verbose including the
namespace for a capability.

Task-number: QTBUG-60899
Change-Id: Ia1ccf825d4c257d2661e34c195c45fd37e0b6413
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2017-07-03 05:32:53 +00:00
Friedemann Kleint
9656e972d1 Remove remains of wince in .pro files
Task-number: QTBUG-52590
Change-Id: I444fc9eedc8a8e4ad2ede224d66e7c410bedbb48
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-07-03 05:32:51 +00:00
Allan Sandfeld Jensen
eaee1209f0 Switch QSemaphore::tryAcquire to using QDeadlineTimer
A deadline timer is more correct for timeouts.

Also starts the timer before trying to acquire the mutex for more
precise timeouts.

Task-number: QTBUG-58745
Change-Id: I230266a3a5d7b7af33981efed4e6882e5727a41c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-07-02 20:08:36 +00:00
Liang Qi
ab2c1f9509 Merge "Merge remote-tracking branch 'origin/5.9.1' into 5.9" into refs/staging/5.9 2017-07-02 16:24:12 +00:00
Liang Qi
339dd36b27 Merge remote-tracking branch 'origin/5.9.1' into 5.9
Change-Id: Ic02646cbab8fd627bc73dac0c52d515d4084bbb0
2017-07-02 18:23:00 +02:00
Sami Nurmenniemi
d23e18189c Skip QThread stress test on Qemu
Qemu uses some memory for each generated thread. This test creates
> 80000 threads and consumes about 10Gb of memory which is too
heavy for a VM.

Task-number: QTBUG-59966
Change-Id: I1bb8a0d7955778f5201948b41befcb9f1f391514
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-07-02 15:58:40 +00:00
Oswald Buddenhagen
23e2cc38ff fix QMAKE_DEFAULT_INCDIRS detection with Xcode targeting uikit platforms
uikit/sdk.prf replaces QMAKE_MAC_SDK_PATH with a make expansion of that
variable, which of course does not work when we use the contents
directly.

amends 6d5489f5d.

Task-number: QTBUG-61690
Change-Id: Id77dff8ee7d737dd35f74cc7d39faaa50b4b1ab9
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-07-02 15:38:32 +00:00
Oswald Buddenhagen
afdc4f439c actually make use of the detected ICU
Task-number: QTBUG-58012
Change-Id: I7a3d99277daa6566811b24111205548b89e77c53
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-07-02 15:38:25 +00:00
Stephan Binner
2fb9705521 Convert features.filesystemmodel to QT_[REQUIRE_]CONFIG
Change-Id: I862510387e79d04221ec075f3e79896908ee9d8f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-07-02 10:39:04 +00:00
Stephan Binner
341554e343 Convert features.fscompleter to QT_[REQUIRE_]CONFIG
Fix one #include as only QCompleter is used and not QFSCompleter.

Change-Id: Ia1e722122f7e322c678d2db6962c6086c684ddd9
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-07-02 10:38:58 +00:00
Stephan Binner
379179df9d Convert features.errormessage to QT_[REQUIRE_]CONFIG
Change-Id: I9cc4f5190108c4bb96ddbd782ef1a031c9889f7e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-07-02 10:38:52 +00:00
Stephan Binner
330f024589 Convert features.wizard to QT_[REQUIRE_]CONFIG
Change-Id: I43e3d9f55a21ae0f602fc43c570321d0152cd8b6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-07-02 10:38:46 +00:00
Stephan Binner
3ab0ba7bf2 Convert features.colordialog to QT_[REQUIRE_]CONFIG
Change-Id: If2ac57a10f38002db5a49be3882dfc507a84a3df
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-07-02 10:38:40 +00:00
Sérgio Martins
7a1b7c7420 docs: Reference QOpenGLWidget::grabFramebuffer, not QGLWidget::grabFrameBuffer
QGLWidget is obsolete

Change-Id: I8db3bfd534a328d41815d445557d899dc17d6061
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2017-07-02 09:31:14 +00:00
Sérgio Martins
fd897629bf Fix moving a hidden QOpenGLWidget to another window
A visibile QOpenGLWidget receives a QEvent::WindowChangeInternal which triggers
a QOpenGLWidget::reset(). A hidden QOpenGLWidget never received this event
so it was never reset, resulting in a black rendering.

Includes unit-test that fails without this patch.

Change-Id: I9d2c57d66fa629f631a9829a5ebf4de09998ad75
Task-Id: QTBUG-60896
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2017-07-02 09:31:01 +00:00
Friedemann Kleint
628f3becf9 macOS: Blacklist tst_QProgressDialog::autoShow()
The test is apparently flaky.

Change-Id: Ib0161fb18cdef1d532c81ac7196c57af1f7c8ee1
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-07-02 09:30:45 +00:00
Thiago Macieira
120ecc976f QRandomGenerator: use getentropy on Linux & OpenBSD
The getentropy function, first found in OpenBSD, is present in glibc
since version 2.25 and Bionic since Android 6.0 and NDK r11. It uses the
Linux 3.17 getrandom system call. Unlike glibc's getrandom() wrapper,
the glibc implementation of getentropy() function is not a POSIX thread
cancellation point, so we prefer to use that even though we have to
break the reading into 256-byte blocks.

The big advantage is that these functions work even in the absence of a
/dev/urandom device node, in addition to a few cycles shaved off by not
having to open a file descriptor and close it at exit. What's more, the
glibc implementation blocks until entropy is available on early boot, so
we don't have to worry about a failure mode. The Bionic implementation
will fall back by itself to /dev/urandom and, failing that, gathering
entropy from elsewhere in the system in a way it cannot fail either.

uClibc has a wrapper to getrandom(2) but no getentropy(3). MUSL has
neither.

Change-Id: Ia53158e207a94bf49489fffd14c8cee1b968a619
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-06-30 21:19:10 +00:00
Laszlo Agocs
078f04254e Add support for OpenGL ES 3.2 in QOpenGLExtraFunctions
Follow the usual pattern:

Add a config test and automatic include of GLES3/gl32.h if there
is a GLES 3.2 capable header+lib at build time.

Then, regardless of this being enabled, expose all new 3.2 API
functions in QOpenGLExtraFunctions and resolve them dynamically
at run time.

This way 3.2 functions will be available when deployed to a 3.2
capable system (or OpenGL 3/4.x with the functions in question
available) regardless of what was present in the sysroot at build
time.

Change-Id: Ia52551f3178591e1e56ceac8e45d89c6b13f4927
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2017-06-30 18:12:58 +00:00
Thiago Macieira
bb8a61866e Linux: add a note to the ELF binary what minimum Linux is needed
Change-Id: Ia53158e207a94bf49489fffd14c8d2a1f173ff97
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-06-30 17:15:52 +00:00
Thiago Macieira
919b12d969 qglobal.h: fix build in assembler mode
QT_CONFIG and some other macros are unavailable there.

Change-Id: Ia53158e207a94bf49489fffd14c8d306e2dbd9d2
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-06-30 17:15:51 +00:00
Andy Shaw
d0c5e29432 Respect the application and system configuration settings for the proxy
If an application proxy has been set or the usage of the system proxy
configuration has been turned off then these should be respected rather
than querying the system for the proxy. By using proxyForQuery() over
systemProxyForQuery() it ensures that it first checks if there is an
application proxy set before falling back to the system proxy, if using
the system proxy has not been turned off.

Task-number: QTBUG-61692
Change-Id: I65ed3e6bd7b3449cd4ae3757e583aa8d7724221b
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-06-30 04:05:29 +00:00