We were releasing only the memory of latest iteration since cfCerts
was being rewritten in every iteration, invalidating the RAII.
Hence, we need to define the variable within the loop to ensure the
object is released for every iteration.
Task-number: QTBUG-66937
Change-Id: Iaa9365168728337c6cdaac4aef686652903cf5a9
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Clipping enabled state would not always be correctly restored for the
raster engine (other engines work fine). The raster engine's QClipData
object is sometimes shared between painter state objects on the
save/restore stack. QClipData has its own enabled flag, and this could
then come out of sync. Fix by making sure we sync the enabled state on
restore.
Task-number: QTBUG-58789
Change-Id: I81e6254ebb93df6e153bbef58e32a885273e3224
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Previously, we would divide by zero in BezierEase::findTForX if factorT3
was zero when solving the cubic equation.
This change fixes the problem by adding solutions for the special cases
where the cubic equation can be reduced to a quadratic or linear
equation.
This change also adds tests that cover cases where the equation becomes
quadratic, linear or invalid.
Task-number: QTBUG-67061
Change-Id: I2b59f7e0392eb807663c3c8927509fd8b226ebc7
Reviewed-by: Christian Stromme <christian.stromme@qt.io>
The kernel stores the local address in IFA_LOCAL and the peer's address
in IFA_ADDRESS. My testing with loopback, Ethernet, WiFi, OpenVPN TAP
and TUN and Openconnect shows IFA_LOCAL is always passed and always
correct, so we could have used just that, but let's leave the use of
IFA_ADDRESS because that's also what all libcs' getifaddrs() do.
[ChangeLog][QtNetwork][QNetworkInterface] Fixed a regression in
reporting the local address of a point-to-point tunnel network
interface.
Task-number: QTBUG-67226
Change-Id: I04a43ee94975482f9e32fffd151eb393d1775580
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
The change causes a crash when compiling the xkbcommon 3rdparty
library and compile failures (qtimageformats on Android).
This reverts commit a47cb14680.
Task-number: QTBUG-67326
Task-number: QTBUG-67327
Change-Id: I5ddc4eccad699e3eaec535fd6a63d11b0026b42e
Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io>
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Ensure initialization of m_cupsCodec to nullptr. The codec is checking
the value of m_cupsCodec; but the initialization was conditional before
this patch.
Change-Id: I81751b7743e9956f31f17cead01dc05e268db7eb
Coverity-Id: 188700
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
This prevents delivering queued activation events
to windows that have been hidden or destroyed.
Task-number: QTBUG-66536
Change-Id: I4edf86b6c8592751130f836876725c786452933c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
There are a couple of Qt classes where you almost always use the
same signal, for example QTimer::timeout, QPushButton::clicked,
and QAction::triggered.
Simply doing timer.connectTo([]{}) is much more convenient, less
tedious and even fun.
Not overloading connect() as it would be confusing to see the
receiver as first argument.
And not naming it onTimeout, as that's a popular way of doing it in
other frameworks. People would assume you could use on* with any signal.
If we ever have on* it should be all or nothing.
[ChangeLog][QtCore] Added QTimer::connectTo(), a shorthand way of
connecting to the timeout() signal.
Change-Id: Ida57e5442b13d50972ed585c3ea7be07e3d8e8d2
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
This removes the following functions from Qt5CoreMacros:
- qt5_use_modules(...)
Task-number: QTBUG-63519
Change-Id: I59769060a3a93686bf319b558c0ede55755fdb70
Reviewed-by: David Faure <david.faure@kdab.com>
Mention that the current minimal supported version of
libxcb is 1.9.1, amend 1f5d791708.
Remove the specific package requirements for the xcb plugin:
these lists are unmaintained and besides there are build
instructions in wiki: https://wiki.qt.io/Building_Qt_5_from_Git
Change-Id: I4d5b0583a1ba8a355ee1649022845f6c8d520e7c
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
disableNotifiersInActivatedSlot(disable_signaled2) fails, if a signaled
state of the event #2 is detected prior to the event #1. In this case,
we get a timeout on waiting for event #1 which was disabled by the
first notification.
So, accept a disabled state of the notifier in condition for successful
exit from the loop.
Change-Id: I8a2fe76f8ec9362556d1ca1fe0be39a93ed58977
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
QImagereader benchmark does neither depend on network nor widgets.
Therefore those two dependencies can be removed here.
Change-Id: Ic127b2668e22608774ce5878454f4a96ef591f6b
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
qt4Delta and qt4Orientation have been "deprecated" ever since Qt 5.0
(even though widgets continue to depend on those properties). This
is mainly for use in Qt Quick right now, but can be used everywhere
later on.
Change-Id: If0b163766c8ad8efa268edaa4f1ac1e8926f9003
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Minor tweak: QList<int> is taking 64bit per entry, QVector<int>
only 32bit - this should reduce memory usage a little bit.
Change-Id: I3e17269feb4840343f5cecfc71f8fccd70edc80f
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Calling reserve() for every primitive added would defeat QVector's
over-allocation strategy to avoid reallocs.
Task-number: QTBUG-66677
Change-Id: I7bdafdfa4d3ef60b00752c11e1b803abba773658
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Internally we use "Tls11" and "Tls12" from Microsoft's API for TlsV1_1
and TlsV1_2 respectively. However, in their documentation these values
are defined to also include the lower TLS versions when you use them.
We should document this.
For "SslV3" TLS V1.0 support will also be enabled.
https://docs.microsoft.com/en-us/uwp/api/windows.networking.sockets.socketprotectionlevel
Change-Id: I0b20fb745eba40afc37e8430008872fc8174a72d
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Change-Id: Iaf5f5d93cd07429626d5c500ac04e67daada8e6e
Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
According to the documentation, datagrams that were
not completely read are discarded.
Change-Id: Id3a038d8aeeba05e8c8f92b70877f5f5297b89ca
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
The initial settings are done for other socket engines too.
The state checks return a message when they fail. Socket engine
auto tests rely on these messages to be shown.
Change-Id: If7734b453a24ecee4c3a028395ecdbb12859c871
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
Change-Id: I62f3abcabf1a0e5f909c603cbdcf407e36bd0402
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
Buffer handling is now completely moved to the worker. Instead of
moving data around all the time, the worker is responsible for
buffer handling. When reads happen, the data that is read is used
directly from the worker and its buffer is updated.
With the previous approach it was possible, that transfers never
completed. It was possible, that new data was read between calls
of bytesAvailable and read and the availability of that data was
never communicated to the user. If a read that does not read all
the data happens, we signal, that there is still data available,
so that the user is notified about that fact. At the same time
we avoid unnecessary readyRead calls by blocking them until a read
happens.
To make future debugging sessions easier, categorized logging
(including verbose) was added to the socket engine.
Task-number: QTBUG-65556
Change-Id: I12020ffcccf8eb3efec9c36dc5b0e6c0ebef7eb5
Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
The bounds check we had wasn't complete for mirroring cases.
Task-number: QTBUG-65387
Change-Id: I5333912621c1223f83b4f1b95f2b16d12b520bd2
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Adds the feature of adaptive decimal step sizes for the QSpinBox and
QDoubleSpinBox. By performing a calculation in
QAbstractSpinBox::stepBy() we continuously set the step size one power
of ten below the current value.
So when the value is 1100, the step is set to 100, so stepping up once
increases it to 1200. For 1200 stepping up takes it to 1300. For
negative values stepping down from -1100 goes to -1200.
It also works for all decimal values. 0.041 is increased to 0.042 by
stepping once, and so on.
The step direction is taken into account to handle edges cases, so that
stepping down from 100 takes the value to 99 instead of 90. Thus, a
step up followed by a step down -- or vice versa -- lands on the
starting value; 99 -> 100 -> 99.
Setting this property effectively disregards singleStep, but preserves
its value so that it takes effect again when adaptive decimal step is
disabled.
Adaptive decimal step allows values to be easily set to reasonable
levels. If the spin box value is 12000, changing to 13000 often makes
more sense than to 12001. The feature is turned off be default, when
single stepping is desired.
The accelerated property allows values to be changed quickly, as well,
but it is imprecise. Holding down the button makes it hard to land on
an even thousand, like 12000 or 13000. Often you end up somewhere
nearby and would need a second adjustment to get to an even hundred or
thousand.
[ChangeLog][QtWidgets] Add option of adaptive decimal step size for
QSpinBox and QDoubleSpinBox.
Change-Id: I9f286479b821e240c8ea05c238932fc128c582bb
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Native square buttons keep their text black when pressed or on.
Plus using the QStyleOptionButton variable over the QStyleOption
one where appropriate.
Change-Id: Idba8197e64d408e8a0987f1ef9243fde08e3e839
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
We prepare for a better world without HITheme.
Sadly, we can't guarantee Cocoa will be good enough as a
replacement. So, expect more hardcoded values and margins.
Change-Id: I915906b5dbfbfbfc8c7f5c3224fc0ed98562bb9f
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Meaning, if larger than the size of a regular NSButton.
No intermediate size square buttons anymore. We'll try to get
the closest one later, once the sizing problem is solved.
We also refactor the button creation code a bit.
Change-Id: I965520469546aea596cd1abec2309b40d70399ce
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
As for CE_PushButtonBevel, sizing is still pending. These
two seem to go together anyway.
Change-Id: I631c3f32ba201b16adbfa264a2920bfb636fb86f
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
For rendering only. Sizing is still pending and, consequently,
square buttons since these depend on the button's intrinsic size.
Change-Id: Iacadc02a1a75970b221543b32ca724c92e118ce1
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
- Replace xinput2 feature by xcb-xinput, which doesn't
depend on xcb-xlib
- Remove xi2PrepareXIGenericDeviceEvent() that was used to
fix incompatibilty between XCB and libXi structs
- Drop XCB_USE_XINPUT21 and XCB_USE_XINPUT22 defines that were
needed with libXi
Although xcb-xinput was released in version 1.13 of libxcb,
it was quite stable in version 1.12, and the parts that we
use did not change between versions, so require system
xcb-xinput 1.12.
[ChangeLog][X11] The xcb plugin was ported to use libxcb-xinput
instead of libXi for XInput2 support. The -xinput2 configure
option was replaced by -xcb-xinput.
Task-number: QTBUG-39624
Change-Id: I37475b09b2bd7057763345c3f33d8c7751a4e831
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
The destStore64 operation can be expensive, so when the pixels are just
repeating, avoid using it and the composition, and just repeat the
first generated part.
Change-Id: I6e21594a9abecdc245010b956acbaa60e3fb21a3
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
This test has been flaky on openSUSE in CI. The problem was that the window is
sometimes resized or removed while processing events after adding the rectangle
item to the QGraphicsScene. When the same mouse event is reused again, it uses
wrong screen coordinates. QGraphicsScene handling of mouse events then looks for
items under cursor at the wrong coordinates, does not find any items and thus
doesn't accept the mouse event.
Fix by using QTest API for simulating mouse events. Also wait for changed signal
rather than blindly running one iteration of event loop.
Task-number: QTBUG-67212
Task-number: QTBUG-66216
Change-Id: I968f9470c6f8803d01cebeda6f12ad76b4fd5293
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Thanks to QTBUG-61373, this qmake function was called with
/usr/local/5.10.1 as baseDir, which isn't absolute, leading to an
assertion failure. We could raise the error within qmake but it
proved easier to simply resolve any non-absolute baseDir using PWD,
before trying to use it as an absolute path.
Did the same for $$absolute_path(). Documented both. Adjusted the
assert that caught this to report any non-absolute path that upsets
it. Added simple tests, fixed an existing test.
Task-number: QTBUG-66156
Change-Id: Icfef2e2f5b236e071177c9beffa38d71bf404292
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Nvidia doesn't handle suspend very well in Linux and textures get
corrupted. To handle this Nvidia has a bespoke extension to query when
this has happened.
This patch checks if graphics have been reset and invalidates the
surface.
Task-number: QTBUG-56610
Change-Id: I0b97d539ce6cc2b9cfe41c71bf6efd4f68496cd6
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
If the offscreen platform plugin is used on Windows then it can end up
crashing since there is no native interface. This prevents a crash from
occurring when these functions are called.
Change-Id: I526fc0703771fa5f85b26d182ad3b15ef1a3ada5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
The QFile out variable cannot be open because if out.open() succeeded,
we could never reach this line. Instead, we want to capture *why* either
the source or the destination failed to open.
Task-number: QTBUG-66445
Change-Id: I940917d6763842499b18fffd15142f231bf34a47
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
This will make two floating points containing NaN compare as equal,
instead of the regular nan != nan IEEE behavior (which isn't very useful
in a unit-test framework).
Note that this does not apply to indirect comparisons, for example via
QVariant.
Change-Id: I39332e0a867442d58082fffd150851acfdd18c23
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Various pieces of code have to be disabled in this case.
Change-Id: I83b133f17e9f024016a79c9103293627185449d2
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Fixes the default C version used with gcc < 5
Change-Id: I948dece961caed8e6b181e1c6e6b9dc43c46583f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>