Commit Graph

36404 Commits

Author SHA1 Message Date
Thiago Macieira
e1b40675ba Fix warning about tautological comparison in 32-bit mode
qwaitcondition_unix.cpp:209:14: error: comparison of constant 9223372036854775807 with expression of type 'unsigned long' is always false

Task-number: QTBUG-68568
Change-Id: Icc2c231dc2c44abdb087fffd1533c70ae68060dd
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-06-01 09:12:47 +00:00
Oswald Buddenhagen
7c87ffff9a qmake: skip empty parts when splitting strings in some more places
... and make it explicit where we can't do that for semantical or
backwards compat reasons.

most urgently, this fixes an assertion failure when $QMAKEFEATURES
contains empty paths (e.g., due to a trailing semicolon).

notable observation: QByteArray::split() has no argument for the split
behavior (it always keeps empty parts).

Task-number: QTBUG-47325
Change-Id: I72d4b2e154a2ed1802cfa98fb4a5211a68e43231
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2018-06-01 09:09:35 +00:00
Sergiy Korobov
94f249977c Fix QWindowsNativeInterface::platformFunction()
QWindowsWindowFunctions::setWindowActivationBehavior() does not work
because QWindowsNativeInterface::platformFunction() is broken.

Task-number: QTBUG-37435
Task-number: QTBUG-14062
Change-Id: Id5688316654ea8ad47d5c68894c376cb83e3583a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-06-01 07:30:31 +00:00
Kai Koehne
97c8b970cd Revert "Atomics: remove qatomic_msvc.h"
This reverts commit 90493e16b8.
The change broke static builds with MSVC.

[ChangeLog][Visual Studio] Reverted a change that caused static
binaries compiled with Visual Studio 2015 to crash on start-up. Note
that this does not apply to Visual Studio 2017 static binaries, even
though the crash stack traces are very similar: with 2017, the problem
is compiler regression and requires updating to version 15.8 for the
fix.

Task-number: QTBUG-68514
Change-Id: I67ea8e1ef442cecab83e7d8d74efc9617e02da35
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-06-01 06:24:18 +00:00
Allan Sandfeld Jensen
0a63d5fed6 Render QOpenGLWidget/QQuickWidget with AlwaysStackOnTop
QWidget::render was ignoring QOpenGLWidget/QQuickWidget with
AlwaysStackOnTop set, because normally they will be composited later,
however when not doing a backing store render, they need to be painted
right away as there is no later.

Task-number: QTBUG-67533
Change-Id: I08e2eeee5e7a8f0dbbf43f659fcfa9068e8c46d1
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2018-05-31 22:10:48 +00:00
Allan Sandfeld Jensen
dc2476c75e Fix clang develop build
A mismatch of enums after a rename.

Change-Id: Ib28e4607f20583afcb9210fdef7f52d95c63e3dd
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2018-05-31 21:35:01 +00:00
Edward Welbourne
6c3603f2ad Eliminate an un-needed #include
Nothing in this test references date-times.

Change-Id: I4005cda550d54abe46370963b1e91fab9829298d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-05-31 15:52:20 +00:00
Edward Welbourne
2d3bbd7f17 glextensions.h: simplify #if-ery to avoid conflict
The prior #if-ery was needlessly confusing; and most of it was
redundant anyway.

Change-Id: I82da1b38c08b93b9dc2220dd7b15ecb7dcc002af
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-05-31 15:51:55 +00:00
Tor Arne Vestbø
c4a21708ed Provide presets for QGradient
Similar to Qt::GlobalColor, the presets allow the user to create
brushes based on predefined gradients, quickly getting pretty pixels
on screen.

The presets are based on the linear gradients from WebGradients, a
free collection of gradients, hosted at https://webgradients.com/.
The few radial and blended gradient presets have been excluded.

Change-Id: I1ce8f2210a6045c9edb8829ab3eddcc313549127
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-05-31 15:50:50 +00:00
Tor Arne Vestbø
c538a333db macOS: Make layer-backed mode the default
QWindows are still backed by NSViews, but these views render to a
CoreAnimation layer instead of directly to the top level NSWindow.

This is the direction Apple is going (and is the only available
option on iOS/tvOS), so we want to move away from the existing
code path as soon as possible.

The default can be reversed by setting QT_MAC_WANTS_LAYER=0, or the
_q_mac_wantsLayer property on QWindow.

[ChangeLog][macOS] Layer-backed mode is now the default for QWindow.

Change-Id: Ibb9cc7541b179cad215d0daee14aeb1b54be614c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2018-05-31 15:50:33 +00:00
Edward Welbourne
af928dd160 tst_qstandardpaths: #if-out a function only used within #if-ery
Avoids an unused function warning.

Change-Id: Id221595920e9a34eb83b66fe123d664f60fcae05
Reviewed-by: Mikhail Svetkin <mikhail.svetkin@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2018-05-31 15:50:17 +00:00
Mikhail Svetkin
c9d593d431 macOS: minor refactoring in mouse handlers for nsview/systemtrayicon
Use new helper functions for mouse events

Change-Id: I01e83a228deb16cbdb1d7c8c628a92d48055ee2b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-05-31 15:49:50 +00:00
Edward Welbourne
78ac98a590 Remove LGPL_EXCEPTION.txt
It became obsolete when we switched to LGPL3, as discussed on the
developer mailing list in April 2017.

Change-Id: I8445a0e6febba8b31a95fbc140343c2013776b48
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-05-31 15:46:36 +00:00
Friedemann Kleint
3d841556bf Windows QPA: Fix release button event type after moving windows
Check whether the mouse is inside the window and report
MouseButtonRelease or QEvent::NonClientAreaMouseButtonRelease,
respectively. The inside case is triggered by programmatically
starting a size move via QPlatformWindow::startSystemResize()
(QSizeGrip) and was overlooked in
7c3ecf85a7.

Complements 4589440891,
7c3ecf85a7.

Change-Id: I8f714dc768a163878c2b4a075470bcee2dfbd802
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
2018-05-31 14:41:06 +00:00
Tor Arne Vestbø
7e2177464f macOS: Allow moving out of fullscreen state using titlebar button
Even if the window isn't configured with Qt::WindowFullscreenButtonHint,
the user might call showFullScreen(), which we respect and move the
window into fullscreen. In this state, we need to keep the collection
behavior as NSWindowCollectionBehaviorFullScreenPrimary, otherwise the
zoom button will have no effect and the user can't move out of fullscreen.

Change-Id: I77a4b4ee4b42fabc4c6ed2f529ff57acc31d6c24
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-05-30 23:12:32 +00:00
Thiago Macieira
b9935239db QCborStreamReader: rewrite read{String,ByteArray}()
This rewrites _readString_helper() in terms of _readByteArray_helper()
(the helper version doesn't do type-checking) and rewrites
_readByteArray_helper() in terms of readStringChunk().

Change-Id: Iab119b62106d40fb8499fffd1510aa404d9f3611
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-05-30 19:49:01 +00:00
Allan Sandfeld Jensen
ccfb309b90 Document qRound's rounding semantics
This differs from both C rounding (away from zero), and IEEE-754
rounding (to even).

Change-Id: I2cdd358824ca14c922b23029308e3ce3258c1d8f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-05-30 16:12:03 +00:00
Liang Qi
a4d7535f19 Fix missing override warning for android
This amends 8447f5f006.

Change-Id: Idd25c13735539682f6034724df4c79fcf10a1810
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2018-05-30 15:01:00 +00:00
Tor Arne Vestbø
b6fcc86101 macOS: Minor metal support nits/cleanups
Change-Id: I840426ebf35b0fec64e92386fc3e1cabd91ced25
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-05-30 14:38:53 +00:00
Oswald Buddenhagen
04ebb981ab qprocess: don't leak pid pipe if redirection fails in startDetached()
Change-Id: Ifc42f634964b9412f73f53fb20bd220fcbd9a86c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-05-30 10:58:01 +00:00
Oswald Buddenhagen
fc9378952b nuke {tests,examples}_need_tools flags
making the dependencies on tools/ optional was meant to maximize build
parallelization, but it's just too fragile, as nobody ever remembers (or
even knows) about having to add the flags when necessary.

Task-number: QTBUG-68478
Change-Id: I85c0b65d5a63109aedc24bc17eaaaf46b777b634
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2018-05-30 10:57:45 +00:00
Oswald Buddenhagen
00c3418b1e remove support for demos/ directories
no module had one for ages.

Change-Id: Ifb829140e6c97d43e1c8431cb377af8a12231f95
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2018-05-30 10:57:41 +00:00
Tor Arne Vestbø
286c153583 iOS: Handle application state for application extensions
Change-Id: I97df0f8ecf93e28bfbe9c719922f1ee5ec12b563
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-05-30 09:46:39 +00:00
Tor Arne Vestbø
0587941f6e Add function to safely access the shared application on Apple platforms
Change-Id: I52910309ba94d84d69f049b5c1990f1f866e1698
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-05-30 09:16:23 +00:00
Tor Arne Vestbø
6ada504475 Add function to check whether or not we're part of an extension on Apple OSes
Change-Id: I308147c752ec9c869db87aa94ccf6c88e0999524
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-05-30 09:16:07 +00:00
Allan Sandfeld Jensen
ffc377a529 Reduce recent performance regression
The change to fix 16-bit integer overflow used two floor operations
when only one is necessary. With floor being rather expensive on x86
without SSE4.1 this caused a performance regression in ARGB32
smooth perspective transforms.

This eliminates one of the floor operations which is unnecessary as the
number is always positive in this case and thus truncation will yield
the same result faster.

Change-Id: Iaae76820d4bc2f368e49ed143130b5075fc760a2
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2018-05-30 08:28:41 +00:00
Allan Sandfeld Jensen
d517d5428c Use qFuzzyCompare instead of qFuzzyIsNull in QPointF ==
qFuzzyIsNull has a fixed range, where qFuzzyCompare can tell if numbers
are different in a more relative range. Without it QPointFs that are
heavily scaled will be interpreted as identical, when they are quite
different at their own scale.

Task-number: QTBUG-60359
Task-number: QTBUG-62161
Change-Id: Ic4ba90e9e994aedff5548d690f053eb309b0a60b
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-05-30 08:28:11 +00:00
Laszlo Agocs
6a14608742 QOpenGLTexture: Enable multisample 2D textures on GLES 3.1+
Task-number: QTBUG-68510
Change-Id: Ib224189906b595bbae5aab95c888dd13e94171aa
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2018-05-30 07:53:15 +00:00
Thiago Macieira
28ab81158f forkfd: Restore errno on exit from the SIGCHLD handler
I'd never thought about it, but it is a requirement: a signal handler
must leave the global state as it found it (except for those bits that
it intended to change, and those must be done in an async-signal-safe
way). Otherwise, errno could change from one line to the next in the
middle of some code.

[ChangeLog][QtCore][QProcess] On Unix, the QProcess SIGCHLD handler now
restores errno on exit.

Task-number: QTBUG-68472
Change-Id: If025d476890745368955fffd1531e7126f1436d9
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-05-30 03:57:36 +00:00
Thiago Macieira
b9dc4f7a96 Suppress warnings about deprecated QString constructor
They were introduced in commit c416a7f257.

 warning: ‘QString::QString(const QByteArray&)’ is deprecated: Use fromUtf8, QStringLiteral, or QLatin1String [-Wdeprecated-declarations]

Change-Id: I6a540578e810472bb455fffd1532e31736e1edc9
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-05-30 03:57:32 +00:00
Gabriel de Dietrich
9ffb001306 QAbstractSpinBox: Fix missing frame condition
Wrong check for SH_SpinBox_ButtonsInsideFrame in initStyleOption().

Change-Id: I35c6ff4d007f171fe44d7f3e5734c6f4586d871b
Task-number: QTBUG-68238
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-05-30 02:13:49 +00:00
Andy Shaw
b92db8a4ad Show the display role inside the editor for the relation in a QComboBox
When a QComboBox is used as the editor for a relation inside a view then
it could end up showing the contents of the EditRole. This would be the
field which is used to represent the entry as opposed to the DisplayRole
which is what the user would expect to see is.

Therefore, setEditorData() is overridden to ensure that it is showing
the right data to the user. When the model gets updated, it will take the
corresponding EditRole value as before to ensure it is updated correctly.

Task-number: QTBUG-59632
Change-Id: Ibbccc3e9477de1cdefb654051b97dd111df36382
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
2018-05-29 22:08:28 +00:00
Joerg Bornemann
9f27bfb31a Make sure we can build with -no-feature-draganddrop
We move QInternalMimeData to a separate file, because this class is
used, even if draganddrop is disabled. From now on, include
qinternalmimedata_p.h instead of qdnd_p.h for QInternalMimeData.

Change-Id: I594e08e2e90d574dc445119091686b4b69e4731b
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2018-05-29 18:31:35 +00:00
Thiago Macieira
84b39d6ad5 QCborStreamReader: remove the documentation on the validation API
It's not present in this version.

Change-Id: I6a540578e810472bb455fffd1532ac4d49d4b994
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2018-05-29 11:23:33 +00:00
Tor Arne Vestbø
dd8e73504e macOS: Respect maximum window size when computing zoomed state geometry
AppKit will normally compute this automatically based on the
contentMaxSize property of the NSWindow, which we set correctly
based on the window's maximum size, but since we ignore the
frame proposed by AppKit (due to not working for borderless
windows), we need to take the maximum size into account ourselves.

We follow the lead of QCocoaWindow::propagateSizeHints(), and
interpret the window's maximum size as referring to the client
area size, not including the frame geometry, but AppKit expects
the NSWindow's frame, so we need to manually add the frame.

In addition, AppKit expects the frame in the native coordinate
system, so we need to map to it. This was an existing bug, that
never manifested before taking the maximum size into account.

Task-number: QTBUG-67376
Change-Id: Id4cf6ff5640610f809472e5b1d591b4ec17df602
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2018-05-29 10:54:21 +00:00
Tor Arne Vestbø
0b1342f374 iOS: Send window-system event also when embedded in native iOS app
The iOS event dispatcher has been split into two; one dealing with the
QPA event processing, which we should always do, and one dealing with
the longjumping that we do when running the user's main on a separate
stack.

Change-Id: I1f819db33c608aad130ff23cbbadcf84363a32d2
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
(cherry picked from commit 5414d372d4)
2018-05-29 10:53:11 +00:00
Tor Arne Vestbø
dc55000140 iOS: Don't assume our UIWindow is a QUIWindow
Change-Id: I6494e4a476273b131aedcf409abdb1ffffa5b62e
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
(cherry picked from commit ab9b026d27)
2018-05-29 10:53:10 +00:00
Mikhail Svetkin
6b98d97670 macOS: Fix QFileSystemWatcher to watch paths with the same prefix
It happens because our filesystemwatcher thinks it is subdirectory and not
two different paths

Task-number: QTBUG-60676
Change-Id: Ic753e9481cb26303a030044e0a5ab4d703bc529f
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
2018-05-29 06:32:46 +00:00
Qt Forward Merge Bot
875731368a Merge remote-tracking branch 'origin/5.11' into dev
Change-Id: I8d8b03ea46c537b091b72dc7b68aa6aa3a627ba6
2018-05-29 01:00:09 +02:00
Christian Ehrlicher
2843c58e5f Tests: replace deprecated QDesktopWidget::screenGeometry()
QDesktopWidget::screenGeometry() and similar was deprecated in 5.11
and replaced by QScreen::geometry()

Change-Id: Ic630d022bc6461af78f49684c8ac9d1836d738bc
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-05-28 17:22:59 +00:00
Christian Ehrlicher
be45ada035 QToolTip: replace deprecated QDesktopWidget::screenGeometry()
QDesktopWidget::screenGeometry() was deprecated in 5.11 and replaced
by QScreen::geometry()

Change-Id: I23f5b6a4ed6b76cf558cd8d3ad49bc8029c16f61
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-05-28 17:22:50 +00:00
Nico Vertriest
42e4a6531d Doc: Update Echoplugin Example
- screenshot
- connect syntax

Task-number: QTBUG-60635
Change-Id: I18c3e1fef5c623565bbf6cf33bf88e9d8135d8be
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
2018-05-28 12:38:07 +00:00
Thiago Macieira
2457b1381b Example: add a simple CBOR dumper tool
This is useful as well when trying to figure out what a CBOR file
contains or how it may fail to parse.

Change-Id: Ic38ec929fc3f4bb795dafffd150ad7c0bd8e9887
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2018-05-28 11:36:54 +00:00
Nico Vertriest
35e31149c2 Doc: Update Fetchmore example
- minor edit
- updated screenshot

Task-number: QTBUG-60635
Change-Id: I988ad28723131127eee0a93671b0562d8f446139
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
2018-05-28 10:19:06 +00:00
Oliver Wolff
a298fa3786 winrt: Skip/blacklist failing opengl tests
Task-number: QTBUG-68297
Change-Id: I1396b658b49baf5a8d4b97e35c22ddc25727b68a
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2018-05-28 08:36:55 +00:00
Oliver Wolff
0acd59153c winrt: fix tst_QFocusEvent
Change-Id: Ib2e82554c09a88a20fd789213a3040d6c6e42383
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2018-05-28 08:36:52 +00:00
Oliver Wolff
35d8c23a1f winrt: Make tst_qfocusevent pass in CI
Task-number: QTBUG-68297
Change-Id: I72d668103b86e26b15c0b818f87a58ae2ffe2d31
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2018-05-28 06:50:49 +00:00
Oliver Wolff
cfe019f90a Fix tst_qtextedit for configurations with builtin testdata
Change-Id: Ic692acd8053a02270416deb1be3d58a5f0424526
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2018-05-28 06:50:48 +00:00
Oliver Wolff
8d3e7eb259 Fix tst_qcombobox for configurations with builtin testdata
Change-Id: Id3a1166428873618b253989da98ccdbe13afd1a0
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2018-05-28 06:50:47 +00:00
Oliver Wolff
ed2754a56d winrt: make graphicsview auto tests pass
Task-number: QTBUG-68297
Change-Id: I627f9be20670d8e00f824ae85139fb1c4088033c
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2018-05-28 06:50:46 +00:00