Commit Graph

33225 Commits

Author SHA1 Message Date
Andy Shaw
82e6ac8cdb Implement setDoubleStep for QInputDialog
setDoubleStep works in the same manner as for setIntStep in that it is
just available for input dialogs getting a double.

[ChangeLog][QtWidgets][QInputDialog] Added setDoubleStep to enable
changing of the step amount for getDouble().

Task-number: QTBUG-17547
Change-Id: I5cabcfceb23324f8045f2b1e49017644418db01a
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2017-07-11 12:10:39 +00:00
Tor Arne Vestbø
0721199187 macOS: Deliver screen change on window creation instead of on first expose
We know the resulting screen based on the geometry mappings we now do, so
no need to wait until expose to deliver the screen change.

Change-Id: Ibb84948ab091d8f74d31cdd2d300b381e2e1e7cc
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-07-11 11:36:15 +00:00
Tor Arne Vestbø
e7ba24bd70 macOS: Rename NSWindow variable in QCocoaWindow::createNSWindow
To distinguish it from window().

Change-Id: I90eb5207c6d9f178f009ecf755e2be8d29149a6b
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-07-11 11:36:08 +00:00
Tor Arne Vestbø
e91dafd7a9 macOS: Don't special-case QTestLib when reacting to occlusion events
The tests (and Qt) should be able to handle occlusion of windows.

Change-Id: I5e93e032f6a5282f19a20d0e230863d2a165f4e3
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-07-11 11:16:42 +00:00
Timur Pocheptsov
3e3466d28c tst_QSslSocket::protocolServerSide - fixes for OpenSSL 1.1
Several tests are not valid for 1.1 anymore:

1. SSL2 was removed, but there is no OPENSSL_NO_SSL2 and the 'protocolServerSide'
   test is trying to use QSsl::SSLv2 and thus is failing.
2. We now use the generic TLS_server/client_method instead of version specific
   methods we have in pre-1.1 back-end. So, for example, a client socket with
   QSsl::TLS_V1_0 in its SSL configuration will be able to negotiate
   TLS 1.2 if our server socket wants it, while with TLSv1_client_method
   (OpenSSL < 1.1) our test was expecting SSL handshake to fail.

Change-Id: I18efd5921c79b189e4d9529be09299a361a8a81d
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-07-11 10:44:08 +00:00
Andy Shaw
b1708efeeb Windows: Fallback to d3d9 when in a VM on VMWare Workstation 12
On VMWare Workstation 12 it will indicate OpenGL 2.1 support but it is
not sufficient enough as it is lacking things needed to use QtWebEngine
without crashing. Falling back to d3d9 works fine in this case as d3d11
also crashes.

Change-Id: I404867045a74f37d3ecc7e04e669dd305570deeb
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-07-11 06:24:19 +00:00
Stephan Binner
01703d0264 Convert features.tableview to QT_[REQUIRE_]CONFIG
Change-Id: I7ab479deff7bbf3083d1efa196e0480b181548c5
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-07-11 02:52:35 +00:00
Stephan Binner
6cd46c9a61 Convert features.datetimeedit to QT_[REQUIRE_]CONFIG
Change-Id: I083cd565fab8c33dc3633b71f962de099c2b3481
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-07-11 02:52:29 +00:00
Stephan Binner
3835194d34 Convert features.rubberband to QT_[REQUIRE_]CONFIG
Change-Id: I6d634bafa6d26c1e78069fddd412e6de24f5775c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-07-11 02:52:25 +00:00
Stephan Binner
3906043f05 Convert features.fontdialog to QT_[REQUIRE_]CONFIG
Change-Id: Iebc091ffd023595278fa177b7f205b6e0cd7ec52
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-07-11 02:52:20 +00:00
Stephan Binner
93dc459f48 Convert features.graphicseffect to QT_[REQUIRE_]CONFIG
Change-Id: I1bb96088b2e9f2a2cfab5fceeebebe94fa6bb3a6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-07-11 02:52:03 +00:00
Ben Boeckel
bb1e5675a5 cmake: avoid @var@ expansion in older CMake versions
Older versions of CMake expanded `@var@` in CMake code, so this could be
expanded at this location rather than the `string(CONFIGURE)` call if
`module` were set inadvertently. Instead, hide the literal `@` symbol
from CMake, but not from the string.

This avoids a CMP0053 warning for projects using Qt5 with a minimum
version set lower than 3.1 and silent bugs with projects explicitly
setting CMP0053 to OLD.

Change-Id: I0e4a86469fdf69b8706387799ab9b17498b8d1ca
Reviewed-by: Stephen Kelly <steveire@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-07-10 21:25:47 +00:00
Andre Hartmann
8a8788f4df QSslCertificatePrivate: make use of QByteArray::toHex(separator)
Qt 5.9 introduced a QByteArray::toHex() overload that
inserts a separator char after each byte. The function
colonSeparatedHex() could not be replaced completely,
as it skips leading zeros also.

Change-Id: Ic1d5d4771a0a5171f0e7e9813b83eb4c1f59f085
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-07-10 20:16:58 +00:00
Thiago Macieira
c3cd0f6e19 configure: Remove test for unused feature "mremap"
It's a Linux-specific call that was added to the kernel in pre
historical times (before Git). Sqlite3 uses mremap(2) but it has its own
checking. Nothing else in Qt uses this.

Looks like the last user was the QPF font engine, removed in commit
d7e424ee66 almost four years ago. And
that's considering that the QPF font engine wasn't in use since Qt 5.0
because QWS was no more...

Change-Id: Idaa189413f404cffb1eafffd14ceee7488514c1d
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-07-10 18:00:38 +00:00
Gabriel de Dietrich
c12072c685 QMacStyle: Add back icon logic in tab layout
This was accidentally removed when we revamped the document
mode tabs appearance.

In retrospect, we should also consider adding CE_TabBarTabIcon
so that we can set the relative position of the icon w.r.t.
the tab title.

Change-Id: Ic8c3a69c31837018bfdd60f8084120cae47e91f8
Task-number: QTBUG-61092
Task-number: QTBUG-61742
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-07-10 17:39:03 +00:00
Gabriel de Dietrich
bdb1a5b283 QMacStyle: Simplify logic for SC_GroupBoxLabel rectangle
This removes the single occurrence of HIThemeGetTextDimensions. Since we
have access to the actual platform font through QPlatformTheme::font(),
it's possible to use QFontMetricsF instead.

We also cache small and mini system fonts to be reused in other places.

Change-Id: I799c61eef0a2a6880a1c51aa7d3105c7e5b0ed4f
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-07-10 17:38:42 +00:00
Gabriel de Dietrich
aaf227e299 QMacStyle: Simplify rendering SC_GroupBoxLabel
Removes the last occurrence of HITHemeDrawTextBox.

Change-Id: I13804a16672c692a4405d8b2f9d5fb6a132a6b7b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-07-10 17:38:35 +00:00
Gabriel de Dietrich
b81573bbd8 QMacStyle: Simplify CE_PushButtonLabel, CE_TabBarTabLabel
We don't need the calls to HIThemeDrawTextBox after all. These
render simple text nowadays, so we can do this with Qt APIs.

Also fixes TabBarPalette in QCocoaTheme.

Change-Id: Ib9436be83f03bd62fca40feb110a86602794c5b7
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-07-10 17:38:26 +00:00
Daniel Teske
4ebc2cf74e macOS QComboBox: Don't show scrollers if they aren't needed
Task-number: QTBUG-13925
Task-number: QTBUG-18788
Change-Id: Id155ea26824e1cb470cc6174704436d99fb7ac87
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
2017-07-10 14:21:07 +00:00
Stephan Binner
333a27a8b6 Fix macOS build for -no-widgets, take 2
Task-number: QTBUG-61780
Change-Id: Ic67074b19b3b5c409c0f1254be77ba122ad61a85
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-07-10 09:40:46 +00:00
Friedemann Kleint
70b976ece1 QtTest: Add msvc2017 detection and keyword to blacklisting
Change-Id: I71162fc7dff0f29a24fd78e1188f8d86c2834d3c
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-07-10 07:01:14 +00:00
Friedemann Kleint
1bc5f619ea QStorageInfo/Windows: Improve error handling
Bail out of QStorageInfoPrivate::doStats() should an error occur
and set the ready/valid flags accordingly.

Task-number: QTBUG-6039
Change-Id: Id5354b31329d951599ae991aa7edde0515c90514
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-07-09 11:07:38 +00:00
Friedemann Kleint
6e861d8412 pathstroke example: Add Q_FALLTHROUGH to unmarked fallthrough seen by GCC 7
Task-number: QTBUG-60635
Change-Id: I10695f96122f1b0859bbe7fadb349efb3c7277a6
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2017-07-09 11:07:17 +00:00
Tor Arne Vestbø
920ba35397 macOS: Use same naming for QPA event forwarding functions
Expose events and others will follow.

Change-Id: I8e11a133381a678517b54ad1872fe302515d4104
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-07-09 10:02:55 +00:00
Morten Johan Sørvig
0e0034d93a macOS: Simplify QCocoaWindow::handleGeometryChange
There are really only two cases here, where the difference
is the coordinate system of the window position.

1) Child QWindow and embedded QWindow:
   The position is relative to parent view/window origin.
2) Top-level QWindow:
   The position is relative to screen origin.

Change-Id: I867133a5adbbf3a690f574aec06b70c2bc64ad95
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-07-09 10:02:53 +00:00
Allan Sandfeld Jensen
6be94e8f6d Move endian-specific integer types to public qtendian header
The classes have recently been cleaned up to be ready for being made
public, and this change adds the final documentation. The classes are
already used in qjson, qtdeclarative and some image format decoders.

Change-Id: Ib6df89f1119162c5bad7a08e9b6f843a2db4040f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-07-09 09:00:16 +00:00
Tor Arne Vestbø
16799ba394 Only try to resolve library paths via linker for Drawin clang
Task-number: QTBUG-61735
Change-Id: Ia8e777928aa0cff44f092968eac14d32501a5d73
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-07-08 16:59:07 +00:00
Tor Arne Vestbø
74fc88f638 macOS: Move geometry reporting from QNSView to QCocoaWindow
There's no longer any reason to call out from QCocoaWindow to QNView for
this, as the geometry events from AppKit are delivered directly to the
QCocoaWindow. Most of the data used in the implementation are coming
from QCocoaWindow anyways, and this enables geometry events for foreign
windows in the future.

Change-Id: Idd724d078e9981304dcbe6742b9ddc71640a2350
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-07-08 16:53:28 +00:00
Kevin Funk
9db09b4700 Fix modernize-use-bool-literals issues
Reported by clang-tidy. Skipped fixes in implementation files, only
changed headers.

Change-Id: I5cfd266b3d4046f90baebc0c538b1b6ab03a02d2
Reviewed-by: Volker Krause <volker.krause@kdab.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-07-08 11:49:55 +00:00
Friedemann Kleint
2300629df5 QWindowsFileIconEngine::filePixmap(): Handle non-existent files
Pass SHGFI_USEFILEATTRIBUTES/FILE_ATTRIBUTE_NORMAL to ShGetFileInfo() in
case a file does not exist to obtain an icon.

SHGFI_USEFILEATTRIBUTES cannot be used unconditionally as it
breaks custom directory icons.

The functionality is then on par with XCB which obtains icons
via QMimeDatabase look-up.

Task-number: QTBUG-25319
Change-Id: Icd894d97fd8d1a2c4d5d39e86afe89843e6720c4
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
2017-07-08 11:02:39 +00:00
Kevin Ottens
0d196b4268 Add support for parameters in QShaderGenerator
Change-Id: Iff8fec51ddbf9b018cb5ec3aff357125134013eb
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2017-07-08 09:05:23 +00:00
Kevin Ottens
13ecd686b9 Add support for node parameters in QShaderGraphLoader
Now the parameters from the prototypes are used as default values and
the graph file can overload them.

Change-Id: I9a8a73963c7e578bd0a34e96f76f147a12224f4f
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2017-07-08 09:05:19 +00:00
Kevin Ottens
5667c870fb Add support for node parameters in QShaderNodesLoader
This will allow to make the prototypes more extensible when referred to
from a graph file while providing some sane defaults.

Change-Id: I1ae10182427d8a7d29c51a64e19e99139494ea92
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2017-07-08 09:05:16 +00:00
Kevin Ottens
f7fefed2ea Add parameters to QShaderNode
This will allow to create nodes having an entry point for tuning, still
need to be exploited by the loaders and the shader generator. Coming in
further commits.

Change-Id: I8384b0f528c9919e9f8d35102adde2b307f08b80
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2017-07-08 09:05:13 +00:00
Kevin Ottens
74e9a11386 Complete the QShaderGraphLoader tests to introspect nodes
We forgot to check that the node content was correct and complete when
loading the graph.

Change-Id: Id4ee6aaba6ca268b0785e7fa3fb51a19817e7c9c
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2017-07-08 09:05:10 +00:00
Allan Sandfeld Jensen
4f88475a96 Allow QImage with more than 2GByte of image data
Changes internal data-size and pointer calculations
to qssize_t.

Adds new sizeInBytes() accessor to read byte size, and
marks the old one deprecated.

Task-number: QTBUG-50912
Change-Id: Idf0c2010542b0ec1c9abef8afd02d6db07f43e6d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-07-08 08:17:13 +00:00
Thiago Macieira
80c152d689 Move the readlink(2) wrapper to qcore_unix.cpp
This deduplicates the code between QFileSystemEngine and QLockFile.

Change-Id: I1eba2b016de74620bfc8fffd14cd005d5fd9beaa
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
2017-07-08 02:18:16 +00:00
Thiago Macieira
3c689c4b3f QLockFile: Move the check for Linux /proc to a central place
I'll need it soon in QTemporaryFile. This also reduces the overhead,
since QFile::exists -> QFileInfo::exists needs to check if there's a
file engine that handles "/proc/version" (there isn't), convert the
UTF-16 filename to UTF-8 and QFileSystemEngine::fillMetaData will issue
a more expensive stat(2) syscall.

access(2) is cheaper.

This commit also introduces QT_LINUX_ALWAYS_HAVE_PROCFS that isn't
defined anywhere, but could be passed during configure with -D if a
build wants it.

Change-Id: I1eba2b016de74620bfc8fffd14ccfd1593d59ade
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-07-08 02:18:14 +00:00
Gatis Paeglis
fb78adf8df xcb: cleanup gl_integrations_plugin_base.pri
The original version (8758f532ae) of
this file was full of things that are irrelevant for XCB GL plugins.
Most of this has been cleaned out as side effect of porting to the
new configure system. This patch cleans up the remaining pieces.

It does not matter for XCB GL plugins if Qt was configured with
-qt-xcb or -system-xcb as those are dependencies of xcb_qpa_lib-private
and are not used directly by these plugins.

The only XCB dependencies that are directly used by these plugins
are libxcb-glx and libxcb, which are managed directly in xcb_glx.pro:

qtConfig(xcb-glx): QMAKE_USE += xcb_glx

Change-Id: I2175185902bb028de142c8ff6e0b0a3b76a09703
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-07-07 23:05:17 +00:00
Friedemann Kleint
05fd45ac8d QIntegrityHIDManager: Fix syncqt warnings
QtInputSupport: WARNING: qtbase/src/platformsupport/input/integrityhid/qintegrityhidmanager.h includes QObject when it should include QtCore/QObject
QtInputSupport: WARNING: qtbase/src/platformsupport/input/integrityhid/qintegrityhidmanager.h includes QList when it should include QtCore/QList
QtInputSupport: WARNING: qtbase/src/platformsupport/input/integrityhid/qintegrityhidmanager.h includes QList when it should include QtGui/QList
QtInputSupport: WARNING: qtbase/src/platformsupport/input/integrityhid/qintegrityhidmanager.h includes QThread when it should include QtCore/QThread

Amends 88f30250eb.

Change-Id: Ia56fdd87871fdeae8fe34752c61a66195100ceb7
Reviewed-by: Kimmo Ollila <kimmo.ollila@qt.io>
Reviewed-by: Rolland Dudemaine <rolland@ghs.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-07-07 21:39:17 +00:00
Thiago Macieira
8d542154a8 Avoid sharing violation in QFileSystemEngine::id on Windows
We can't open a file for reading if the file is open by another process
(or by ourselves) without sharing permitted. So ask for no access just
so we can get a handle to it.

Change-Id: I998653739e1cec2a58a07a6593b6ff87c1d59dd1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-07-07 21:39:16 +00:00
Thiago Macieira
fd95ef765a QFile::rename: avoid two stat(2)/CreateFile in a row
QFileSystemEngine::id() will stat(2)/CreateFile in order to get the ID
of the file anyway, so we don't need to use QFile::exists() to check if
the destination exists. Instead, rely on id() returning a null value to
indicate error. On Windows, it's possible that the calls to either
GetFileInformationByHandle or GetFileInformationByHandleEx might fail,
but we ignore those.

Change-Id: I1eba2b016de74620bfc8fffd14ccaebcbed64419
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
2017-07-07 21:39:12 +00:00
Thiago Macieira
49ab284d34 Stop using QVector in QFileInfoPrivate
This was added in 32629676b9 for Qt 5.1
because QDateTime always allocated memory, so QVector was much faster
for default-created objects. Since Qt 5.7, QDateTime no longer allocates
memory in the default constructor, and in Qt 5.8 on 64-bit systems, it
won't allocate memory at all for most reasonable dates, so construction
times are acceptable now.

Change-Id: If0ad4d988da143b3b1b2fffd1480e83121cddc8c
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-07-07 18:40:31 +00:00
Thiago Macieira
0b7d9d2811 QAbstractFileEngine: make setFileTime not a pure virtual
Most engines just had to override the virtual to return false. So do it
in the base class.

Change-Id: I8d96dea9955d4c749b99fffd14cd738a48aa818c
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
2017-07-07 18:40:30 +00:00
Tor Arne Vestbø
1b73c202ce macOS: Add LLDB debug script when building with separate debug info (dSYM)
The script will look for the most recent Qt Creator version on the system,
and pick up the LLDB summary providers from there, allowing pretty-printing
of Qt types inside LLDB/Xcode.

LLDB will detect the file when loading the dSYM, and inform the user that
the file can be loaded to enable the formatters. The script can be loaded
automatically by adding the following setting in ~/.lldbinit:

    settings set target.load-script-from-symbol-file true

Which comes as a slight security risk, as other libraries might have
scripts of their own. The alternative is to load the script directly
from ~/.lldbinit:

    command script import "<path to debug script in dSYM>"

With an optional target.load-script-from-symbol-file set to false, to
silence the warning when loading the dSYM bundle.

Change-Id: I01ba51dab725a8d0a58f1ad1749742443b639cc5
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-07-07 18:09:45 +00:00
Edward Welbourne
ddcbe23f20 Mark an unlikely test as such and condition in positive order
Also wrap two blocks in braces, since the formerly-else block spreads
across many lines; and split those lines differently to limit length.

Change-Id: Ib89329b11aad6599926f0338d6546f4141d2c002
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-07-07 18:09:44 +00:00
Tor Arne Vestbø
3a31c70879 Ensure all platforms send geometry events if request was not fulfilled
The logic of deciding whether or not to send resize and move events
has been centralized in QGuiApplication. This ensures that if a
window with geometry 100,100+200x200 is moved and resized to e.g.
0,0+100x100, but the window manager denies the request (because the
window would e.g. overlap with system UI), and issues a geometry
update with the original geometry, 100,100+200x200, we will still
treat that as warrant of a move/resize event to the application,
so the application knows that its position and size is as before.

[ChangeLog][Qt Gui][QPA] QWindowSystemInterfacePrivate::handleGeometryChange
no longer takes the old geometry as an argument.

Task-number: QTBUG-57608
Change-Id: I1d471cc7a257fef958bdb1e56184fa95489403a3
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-07-07 18:09:43 +00:00
Edward Welbourne
9381ca77b2 tst_QDateTime::toTimeSpec(): verify round-tripping works cleanly
Change-Id: I811fa4249dae923e5e4e434910d8bf96c15bff25
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-07-07 18:09:33 +00:00
Edward Welbourne
cf9187f8c9 tst_QFileInfo: generalize old-file test
Now that QFileDevice::setFileTime() provides a portable way to prepare
our test file, we can verify QFileInfo does handle the distant past,
notably including negative time_t values.  The old MS-specific code
used a time back in 1601, which we can't hope to support
cross-platform, so use one in 1901 that's a little inside the range of
32-bit time_t.

Task-number: QTBUG-47985
Change-Id: I2de3e79d8c7864221f92395813b63f373e4d8a3b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-07-07 18:09:24 +00:00
Edward Welbourne
3a9e135d55 Exploit QVector3D::length() instead of duplicating its work
Calling the class-method dotProduct(x, x) in order to then take its
square root is a clumsy way to obfuscate x.length() - and lacks its
efforts (clumsy though they are) to limit rounding issues.

Change-Id: I1dc1f38764651bc70c0620e286cb5625f505ddbf
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2017-07-07 18:09:08 +00:00