Nothing in this test references date-times.
Change-Id: I4005cda550d54abe46370963b1e91fab9829298d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
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>
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>
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>
Avoids an unused function warning.
Change-Id: Id221595920e9a34eb83b66fe123d664f60fcae05
Reviewed-by: Mikhail Svetkin <mikhail.svetkin@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
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>
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>
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>
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>
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>
Change-Id: I840426ebf35b0fec64e92386fc3e1cabd91ced25
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
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>
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>
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>
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>
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>
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>
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>
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>
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)
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>
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>
QDesktopWidget::screenGeometry() was deprecated in 5.11 and replaced
by QScreen::geometry()
Change-Id: I23f5b6a4ed6b76cf558cd8d3ad49bc8029c16f61
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
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>
This is the counterpart of the previous commit.
[ChangeLog][QtCore] Added QCborStreamReader and QCborStreamWriter,
classes for low-level reading and writing of CBOR streams.
Change-Id: Ia0aac2f09e9245339951ffff13c72e4bffdf4a56
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
This does not match any upstream version, but rather the "dev" branch at
https://github.com/thiagomacieira/tinycbor/. I've found myself
completely out of time to finish developing the TinyCBOR buffer
integration and zero-copy support.
Change-Id: I9741f017961b410c910dfffd150133cbf6fbe678
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
According to the documentation of ConnectNamedPipe we must pass an
OVERLAPPED object, because the passed handle was opened with
FILE_FLAG_OVERLAPPED.
Pass an OVERLAPPED object, and create a manual reset event that is
waited on if ConnectNamedPipe "fails" with ERROR_IO_PENDING.
Check the return type, and report any failure via qErrnoWarning.
Change-Id: Iedd702cecc2f0008eee6ed4f19d9370912190595
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>