Commit Graph

35824 Commits

Author SHA1 Message Date
Pablo Marcos Oltra
c2373fce3c macOS: Fix memory leak in systemCaCertificates
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>
2018-03-27 04:15:37 +00:00
Eirik Aavitsland
c7c41fa1c6 Fix QPainter save/restore of clipping enabled state
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>
2018-03-26 16:00:43 +00:00
Svenn-Arne Dragly
50cfbd6112 Animation: Fix case where QEasingCurve::valueForProgress returns nan
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>
2018-03-26 15:53:10 +00:00
Thiago Macieira
411a4cb67c QNetworkInterface/Linux: fix support for P-t-P tunnels
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>
2018-03-26 15:17:38 +00:00
Friedemann Kleint
dbc983a513 Revert "Detect C standard and try using the most recent"
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>
2018-03-26 15:10:33 +00:00
Filipe Azevedo
3d5fd088c3 Fix build issue on macOS
Change-Id: Ib3aa37242e9bf66c3fc3d232ead1e6ef4d4bc485
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-03-26 14:48:59 +00:00
Jesus Fernandez
0dd326ea7a Initialize m_cupsCodec
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>
2018-03-26 14:44:03 +00:00
Eric Lemanissier
edf96b984d fixup oversight in rvalue overloads of operator+=() and operator<<()
ammends 4dee5446be

Change-Id: Ia0ca27644eb71815a93d6e76681b8a9e61a4e7ab
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2018-03-26 14:29:47 +00:00
Morten Johan Sørvig
ed4833465b Cocoa: Deliver window activation events synchronously
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>
2018-03-26 07:23:16 +00:00
Sergio Martins
a6d1456458 Add QTimer::connectTo(), a shorthand way of connecting to timeout()
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>
2018-03-25 21:17:20 +00:00
Kevin Funk
02ed1b36da Remove CMake code for CMake < 3.1
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>
2018-03-24 22:31:18 +00:00
Alexander Volkov
863c688749 Update READMEs for the bundled xcb sources and the xcb plugin
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>
2018-03-23 19:01:25 +00:00
Mårten Nordheim
a7dda3e4b0 Move QWindowsCaRootFetcher to its own file
In preparation for its usage in QDtls.

Change-Id: I7b28ac060e350228839461dc027c809af9ff73a4
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2018-03-23 18:14:59 +00:00
Alex Trotsenko
927db42882 tst_QWinEventNotifier: fix flakiness
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>
2018-03-23 18:09:24 +00:00
Christian Ehrlicher
89bf58b070 Benchmark/QImageReader: remove unused dependencies
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>
2018-03-23 17:42:52 +00:00
Shawn Rutledge
c08bf215cc Add a legacy-free QWheelEvent constructor
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>
2018-03-23 17:28:17 +00:00
Christian Ehrlicher
69948f4899 QSqlResult: use QVector<int> instead QList<int> for indexes value
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>
2018-03-23 17:03:23 +00:00
Rolf Eike Beer
25956a1e7c DBus: merge calls to set_source_files_properties() in CMake functions
This can handle multiple files at once just fine.

Change-Id: I9dcf7b0c72df432f02200ac7f3967f36a408f306
Reviewed-by: David Faure <david.faure@kdab.com>
2018-03-23 16:38:56 +00:00
Albert Astals Cid
e8260edf87 Unify QPlatformPrintDevice constructors
Change-Id: I01714a626e204c73456ebed987055662331d6a3a
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2018-03-23 15:53:40 +00:00
Albert Astals Cid
c0a7c7b42d Remove unused QPpdPrintDevice constructor
Change-Id: I19a6cddebfbd1b72f01feae8873a634348cdc926
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2018-03-23 15:53:36 +00:00
Sergio Martins
54507e25d4 Fix win32-clang-msvc build due to -Werror,-Wunused-private-field
Task-number: QTBUG-63512
Change-Id: Ie1507faffc11be09d9ce5e95c3b537dd65bb6978
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-03-23 15:16:01 +00:00
BogDan Vatra
5daaafa084 Update gradle files
Change-Id: I7324082ef9eb19cb0851a0a53e8e41ee8f174210
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2018-03-23 10:30:52 +00:00
Eirik Aavitsland
d5b9a4ebc4 Fix: avoid realloc when adding primitives to painterpath
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>
2018-03-23 08:18:01 +00:00
Richard Moe Gustavsen
915fa58060 QTableWidget: fix spelling error
Change-Id: Ifd6f116a214d13328ccf0d070ef4517a3b53bf25
Reviewed-by: Nico Vertriest <nico.vertriest@qt.io>
2018-03-23 08:16:59 +00:00
Mårten Nordheim
443a98e881 Document an odditity in WinRTs SSL backend
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>
2018-03-23 07:52:18 +00:00
Oliver Wolff
f6ec2ea8a1 winrt: Fetch connection parameters when connection is successful
Change-Id: Iaf5f5d93cd07429626d5c500ac04e67daada8e6e
Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2018-03-23 07:13:52 +00:00
Oliver Wolff
1f77332db0 winrt: Remove partially read datagrams from queue
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>
2018-03-23 07:13:51 +00:00
Oliver Wolff
6696c37e00 winrt: Add initial setting of options and additional state checks
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>
2018-03-23 07:13:49 +00:00
Oliver Wolff
e72b583bc2 winrt: Remove unneeded function
Change-Id: I62f3abcabf1a0e5f909c603cbdcf407e36bd0402
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
2018-03-23 07:13:49 +00:00
Oliver Wolff
f3db6971ee winrt: Rework socket handling
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>
2018-03-23 07:13:47 +00:00
Kari Oikarinen
8e93988cce Blacklist tst_QProcess::softExitInSlots on Windows
Task-number: QTBUG-66903
Task-number: QTBUG-66216
Change-Id: I4a36d6f4b980f016e11fd7a8840dbc60a2964e83
Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io>
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
2018-03-23 07:11:04 +00:00
Allan Sandfeld Jensen
1d616e764d Avoid of bounds memory reads when scaling and mirroring images
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>
2018-03-22 23:47:25 +00:00
Harald Nordgren
97e40a5409 Allow adaptive decimal stepping for QSpinBox and QDoubleSpinBox
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>
2018-03-22 21:37:45 +00:00
Gabriel de Dietrich
fae42e1e73 QMacStyle: Don't highlight square buttons text when pressed
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>
2018-03-22 21:25:24 +00:00
Gabriel de Dietrich
b8dc00ea4b QMacStyle: Refactor button sizing
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>
2018-03-22 21:24:56 +00:00
Gabriel de Dietrich
3e665c8df8 QMacStyle: Make CE_PushButtonBevel square if large enough
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>
2018-03-22 21:24:35 +00:00
Gabriel de Dietrich
bec1e609ec QMacStyle: No more HITheme for CC_ToolButton
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>
2018-03-22 21:24:12 +00:00
Gabriel de Dietrich
e3561dbda0 QMacStyle: No more HITheme for CE_PushButtonBevel
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>
2018-03-22 21:24:05 +00:00
Gabriel de Dietrich
3691c41115 QMacStyle: Make CocoaControl a full type
And one small code clean-up.

Change-Id: I57c71ce2e18c95529ee45ba4fdfc68e21209e384
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2018-03-22 21:23:59 +00:00
Alexander Volkov
a692d7cd28 xcb: Use XCB instead of Xlib for XInput
- 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>
2018-03-22 20:51:09 +00:00
Allan Sandfeld Jensen
8b16557c35 Avoid destStore64 when pixels are just repeating
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>
2018-03-22 20:03:52 +00:00
Pasi Petäjäjärvi
14157a1a3e Add env variable to set QNX screen debugging information
Enables different QNX Screen graphics system information
as overlay.
Following are valid options for the env variable:
* fps, posts, blits, updates, cpu_time, gpu_time, statistics

More info:
http://www.qnx.com/developers/docs/7.0.0/index.html#com.qnx.doc.screen/topic/group__screen__debugging_1Screen_Debug_Graph_Types.html

Change-Id: I8cbee44de31bb2aaf3892a063769f4740027242b
Reviewed-by: Adam Treat <adam.treat@qt.io>
Reviewed-by: James McDonnell <jmcdonnell@blackberry.com>
2018-03-22 13:37:10 +00:00
Kari Oikarinen
141582505f Stabilize tst_QGraphicsView::acceptMouseDoubleClickEvent
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>
2018-03-22 13:35:51 +00:00
Edward Welbourne
58b373c9e3 Make sure $$relative_path() uses an absolute path as its first arg
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>
2018-03-22 08:40:45 +00:00
David Edmundson
ee54df0311 Support GLX_NV_robustness_video_memory_purge in XCB-GLX
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>
2018-03-22 08:23:18 +00:00
Andy Shaw
f4435d2d5c offscreen: Check that native interface is valid before using it
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>
2018-03-21 18:11:49 +00:00
Thiago Macieira
d3b6ef6ccf QFile::rename: fix the error message if renaming a file by copy fails
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>
2018-03-21 14:23:53 +00:00
Thiago Macieira
79493a3ee1 Make QCOMPARE(-inf, -inf) and QCOMPARE(NaN, NaN) succeed
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>
2018-03-21 14:23:13 +00:00
Ulf Hermann
6e8e9979d0 Make sure we can build with -no-feature-itemmodel
Various pieces of code have to be disabled in this case.

Change-Id: I83b133f17e9f024016a79c9103293627185449d2
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-03-21 14:00:29 +00:00
Allan Sandfeld Jensen
a47cb14680 Detect C standard and try using the most recent
Fixes the default C version used with gcc < 5

Change-Id: I948dece961caed8e6b181e1c6e6b9dc43c46583f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-03-21 13:52:10 +00:00