Commit Graph

33502 Commits

Author SHA1 Message Date
Kai Koehne
6b7b37cf2e Windows: Automatically set metadata for all Qt apps
Move the logic to set default values for VERSION,
QMAKE_TARGET_DESCRIPTION to qt_app.prf. This way,
a lot more executables get sane defaults.

Change-Id: I8394418c118a8877cec792eddc8894397c0fbf2d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-07-31 06:19:06 +00:00
Kai Koehne
79737d03bc Windows: Simplify generic tool description
Make the tool description even simpler so that e.g. moc shows up as
"Qt Moc". The 'description' is shown in various places as the mere
title, so it shouldn't be too verbose.

This augments change ad68bf51e7.

Task-number: QTBUG-61970
Change-Id: I4b30b95a10d597a9a8a2c388c2381ea38a340be6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-07-31 06:19:02 +00:00
Joerg Bornemann
85403d0af0 Support more than 62 instances of QWinEventNotifier, take 2
QWinEventNotifiers were limited to 62 instances, because of
WaitForMultipleObject's limitation to MAXIMUM_WAIT_OBJECTS - 1 handles.

Use the RegisterWaitForSingleObject API which does not have this
restriction and executes waits in threads managed by the system. A
central manual reset event per event dispatcher is signaled in the
RegisterWaitForSingleObject callback and waited for in the event loop.

Task-number: QTBUG-8819
Change-Id: I3061811c18e669becf9de603bbdd7ba96e4d2fcd
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2017-07-30 19:11:49 +00:00
Alex Trotsenko
6adff20fe6 Fix bytesAvailable() on UDP under Windows
When ::WSAIoctl() reports 1 byte available for reading, we are trying
to peek an incoming datagram to ensure that the data is actually
delivered. But, according to MSDN docs, we are not allowed to pass NULL
as 'lpNumberOfBytesRecvd' parameter to ::WSARecvFrom() call, if
'lpOverlapped' parameter is also NULL.

The case with an empty datagram is fixed accordingly.

Change-Id: Id13038245332d3fb4bc18038d44a7cfd7ce04775
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-07-30 13:02:30 +00:00
Friedemann Kleint
7c2850cd8f QEventDispatcherWin32: Check for WM_QT_SOCKETNOTIFIER on internal window only
Restrict the checking to the internal window handle to prevent it being
thrown off by other WM_USER messages used by applications.

Complements change 124b9a6ff8.

Task-number: QTBUG-62083
Change-Id: Ifb1b00e4ff70cb7e53873943e46cea0d72ff6257
Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-07-29 20:15:16 +00:00
Stephan Binner
8f32e34734 Fix build for -no-feature-icu -no-feature-textcodec
Change-Id: Ibb19e5bce3da81518f0967ae7677f42de80ec73e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-07-29 14:37:04 +00:00
Friedemann Kleint
7b2debda2b Windows QPA: Fix compilation with MinGW 7.1
MinGW 7.1 claims the qUuidOf<> specializations are unused:

In file included from accessible\qwindowsaccessibility.cpp:59:0:
accessible\iaccessible2.h:274:5: error: 'IID qUuidOf() [with DesiredInterface = IAccessible2]' defined but not used [-Werror=unused-function]
 IID qUuidOf<IAccessible2>() { return IID_IAccessible2; }
     ^~~~~~~~~~~~~~~~~~~~~
In file included from accessible\qwindowsaccessibility.cpp:59:0:
accessible\iaccessible2.h:58:5: error: 'IID qUuidOf() [with DesiredInterface = IAccessibleComponent]' defined but not used [-Werror=unused-function]
 IID qUuidOf<IAccessibleComponent>() { return IID_IAccessibleComponent; }
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Amends 4f599c5ea1.

Change-Id: Iafcfe8b8d8ca9cdf00663f39ad491347b51d3ace
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2017-07-29 09:52:29 +00:00
Friedemann Kleint
3bdd59920f Refactor tst_qdir::entryList()
Split the test in two: one test that requires the symlinks
and test files and one that does not need them.
In the test with test files, verify each step and the deletion
of the files.

Task-number: QTBUG-58654
Task-number: QTBUG-50835
Change-Id: I14de57ce7a1df2d834d5a7565c804dead1d89088
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-07-29 09:51:50 +00:00
Jędrzej Nowacki
3760120ab3 Remove tst_qtconcurrentiteratekernel blockSize test
The test is just wrong.

It suggests, that it tests minimal block size,
but in reality it is checking if a maximal peak of block size
is bigger then expected minimum block size.

The minimal block size is 1, not 1024 / ideal threads count and
it is defined in BlockSizeManagerV2.

The maximal block size is defined and it is fixed, but it is an
implementation detail, probably not worth testing.

The test is based on a race condition as peakBegin and
peakBlockSize are modified in parallel from multiple threads,
without any synchronization.

Change-Id: I430eedcf83b0fa3e2ce2cfd294eaee7b301e48ae
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-07-29 09:35:16 +00:00
Simon Hausmann
5881fc0d2d Ignore tst_QFocusEvent failures on macOS 10.12
Task-number: QTQAINFRA-1352
Change-Id: Ia5cad1af74a2ea581d768ce150e480f3a97b6495
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
2017-07-29 09:35:03 +00:00
Simon Hausmann
5a9247166c Ignore failure of qaccessbilitymac on macOS 10.12
Task-number: QTQAINFRA-1351
Change-Id: I9b41e5664cdb6cedcb68be6197fc21b2cc45963d
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
2017-07-29 09:34:57 +00:00
Simon Hausmann
5bce6aabdc Enrich tst_macNativeEvents blacklist
Amends 0c7e4b97a7

Task-number: QTQAINFRA-1292
Change-Id: I599dc1e7d39a96617d48fa32227093c8501b1323
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
2017-07-29 09:34:52 +00:00
Tor Arne Vestbø
f25b4d2fe3 macOS: Modernize QCocoaBackingStore::flush()
Instead of forwarding the flush to the view, using CoreGraphics to blit
the backing store to the window, we do everything in flush(), and use
higher level AppKit APIs to do the blit.

This simplifies the flow and code quite a bit, and also supports blitting
of individual regions in a flush instead of the whole bounding rect.

Change-Id: I2173c1a7763fe652a94125c7e3ae93a655412cd3
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-07-29 05:10:58 +00:00
Dongmei Wang
5157c3e8bd In QFileDialog delete a symlink rather than actual target it points to
In QFileDialog, when a resolved symlink gets deleted, the actual target
it points to gets deleted instead of the symlink itself. The patch is to
delete the symlink rather than actual target by doing the following:

1. In QFileDialog, if a directory being deleted is a resolved symlink,
do not remove the directory. Instead, call QFileSystemModel to remove
the model index.

2. In QFileSystemModel::remove(), use the full file path instead of
the resolved file path for deletion. For a symlink, delete the symlink
itself.

The patch is for Windows and Linux.

Task-number: QTBUG-29770
Change-Id: I4db545f0b5963acde3f89a8ee858338c23104804
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
2017-07-29 00:29:57 +00:00
David Fries
047e0e5118 Docs: Fix day/year format in QDateTime
QDateTime takes dd and yyyy.  It is confusing when the example format
strings don't work because they use DD YYYY, and it is a silent error
with the characters not getting substituted and can be easy to miss.

Improved Qt::ISODate, TZD isn't a format character so skip writing out
a bad format example.

Task-number: QTBUG-62111
Change-Id: Ia61d561074ae885fc0a99238d93cb34aaa9953bb
Reviewed-by: David Fries <david@fries.net>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-07-28 23:55:27 +00:00
Antonio Larrosa
23187ade60 Fix open/chmod race condition in QSaveFile
This fixes a problem introduced in a60571b370

The problem happens when an application like Kate (actually, ktexteditor)
uses QSaveFile to save files. So if you open a secretfile.txt file (with
permissions 0600), edit and save it, then QSaveFile currently
generates a temporary file with 0666 that afterwards gets chmod'ed to
0600 again, but in between, some other user in the system can open the
temporary file and get a file descriptor that would allow him/her to read
the contents of a file with 0600 permissions.

Change-Id: I824025f54d6faf853da88e4dfcb092b577b4df04
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-07-28 21:47:30 +00:00
Kevin Funk
5978be3129 Use correct paths in Qt5CoreConfigExtrasMkspecDir
Before we generated the following content:
  set(_qt5_corelib_extra_includes "${_qt5Core_install_prefix}/X:/src/qt5.9/qtbase/mkspecs/win32-msvc")

Which lead to the following error when used:
  CMake Error at Z:/build/qt59/qtbase/lib/cmake/Qt5Core/Qt5CoreConfig.cmake:15 (message):
  The imported target "Qt5::Core" references the file
      "Z:/build/qt59/qtbase/X:/src/qt5.9/qtbase//mkspecs/win32-msvc"

=> We prefixed an absolute path with another absolute path which is
obviously wrong

After the patch we generate this content:
  set(_qt5_corelib_extra_includes "X:/src/qt5.9/qtbase/mkspecs/win32-msvc")

This patch ensures we never prefix an absolute path additionally

Patch by Konstantin Tokarev

Change-Id: I05dab7f681958723594ceb78064be41798e83fb8
Task-number: QTBUG-61768
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Konstantin Tokarev <annulen@yandex.ru>
2017-07-28 11:47:16 +00:00
Edward Welbourne
8b628bb251 Add test for time zone transitions near the epoch
This needs a zone with transitions near the epoch; and the only CET
with DST that winter was Italy (copied by Malta), for which the Olson
database had a recent (2016) correction to its data, for that winter.
That means we get inconsistent results on O/Sen of different ages.

So add a separate testEpochTranPrivate(), alongside testCetPrivate(),
and test it with America/Toronto.  (Unfortunately, MS-Win gets the
date wrong on the first transition after the epoch, so we have to code
round that.)

Since information before the epoch isn't reliably available, only test
the search backwards if nextTransition does find something before it.
(We can safely assume all real transitions happened since 1601;
non-celestial time-keeping wasn't accurate enough, before that, for
anyone to synchronize with anything but celestial time.)

Change-Id: I984b46938a2805b93bb2afd6855e317b5d66b386
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-07-28 08:14:36 +00:00
Soroush Rabiei
5e1408bd0d Test locale propagation from date-time editor to its calendar popup
Done-with: Edward Welbourne <edward.welbourne@qt.io>
Task-number: QTBUG-59106
Change-Id: I5b79b76087f0e980de5ea4ec687e8b8e2184506f
Reviewed-by: David Faure <david.faure@kdab.com>
2017-07-28 08:14:28 +00:00
Thiago Macieira
15df77f683 Fix use of getentropy on larger blocks
Found while working on suppressing the warning about the return value
(which is either 0 or -1) was being ignored.

Task-number: QTBUG-61968
Change-Id: I02d22222fff64d4dbda4fffd14d148b1724547ca
Reviewed-by: Florian Bruhin <qt-project.org@the-compiler.org>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-07-27 23:19:05 +00:00
Dongmei Wang
aca9c93fa0 QFileDialog: Fix a crash occurring when deleting a file
A crash has been observed on Windows in the use case below:
1) In a non-native QFileDialog, select a file and press "Del" key to
delete it, and a warning message box appears for user to confirm the
deletion.
2) Delete the file in the Windows Explorer.
3) Click "Yes" on the warning message box, a crash happens
In QFileDialog::_q_deleteCurrent(), use QPersistentModelIndex
instead of QModelIndex to ensure that the index is valid to be
deleted. The change is intended to fix .

The patch is to use QPersistentModelIndex instead of QModelIndex
in QFileDialog::_q_deleteCurrent() to ensure that the index is
valid to be deleted.

Change-Id: I8959124dc071f7cf0ab47f954d611211a789978d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-07-27 21:31:28 +00:00
Jesus Fernandez
763b0a68be Fix QStandardItem::setChild crash when passing a null pointer
Passing a null pointer as a parameter to the setChild function no
longer crashes when calling the
QStandardItemModelPrivate::itemChanged signal. The child is removed
from the model.
The patch also fixes the behavior of deleting a item. A
dataChanged signal is emitted.

Change-Id: I027e8b0d84fe33c5fca056df870f0e60a020824b
Reviewed-by: David Faure <david.faure@kdab.com>
2017-07-27 19:41:06 +00:00
Alex Trotsenko
8566487286 QSslSocketBackendPrivate::transmit(): improve reading from OpenSSL
This patch avoids intermediate copying of the data by writing SSL
decryption data directly into the outer socket's read buffer.

Change-Id: I19e5b6087595f280436a99fb2ca93cc6793c8f36
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Markus Goetz (Woboq GmbH) <markus@woboq.com>
2017-07-27 19:26:40 +00:00
Thiago Macieira
7c45c6a3c4 Revert "Make QFile::open fail when using an invalid file name"
This reverts commit 346cd79192. The bug
report was incorrect, since the suggested file name is actually valid,
it just happens to name an Alternate Data Stream (ADS) "20:803Z.txt" in
file "testLog-03".

[ChangeLog][QtCore][QFile] Reverted an incorrect change from Qt 5.9.0
that forbade the creation and access to Alternate Data Streams on NTFS
on Windows. This means that file names containing a colon (':') are
allowed again, but note that they are not regular files.

Task-number: QTBUG-57023
Change-Id: I81480fdb578d4d43b3fcfffd14d4f2147e8a0ade
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
2017-07-27 15:42:55 +00:00
Friedemann Kleint
5303225aef Windows font database: Make DirectWrite warnings more verbose
Output family and format error message using _comerror struct.

QWindowsMultiFontEngine::loadEngine: CreateFontFromLOGFONT failed (The operation completed successfully.)
becomes
QWindowsMultiFontEngine::loadEngine: CreateFontFromLOGFONT failed for "8514oem": error 0x88985002 : Indicates the specified font does not exist.

Change-Id: Iccd4622127d94870b4b7465a4b4fdbf34ad1c434
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-07-27 14:58:50 +00:00
Friedemann Kleint
a8818d3346 QFontDatabase: Output family in warning about missing Open Type support
OpenType support missing for script 11
becomes:
OpenType support missing for "SimSun", script 11

Change-Id: I562e20d630c9cdd888f75fd99b987de5152cd77e
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2017-07-27 14:58:34 +00:00
Jędrzej Nowacki
7daf0ea581 Blacklist tst_MacGui::nonModalOrder
The test is marked as expected failure for the last 3 years, in CI it
is proven to be somehow flaky and it is failing now because of XPASS
which is not covered by blacklist feature.

This patch extends efforts of 7eba6d039d
and 03b4838cb5 by blacklisting the test
completely.

Change-Id: Ia295d61620fa6bc97b168d4de9456a18ed5c064f
Task-number: QTQAINFRA-1333
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-07-27 09:08:58 +00:00
Mårten Nordheim
5cdc485865 Fix compilation failing for WinRT with QT_NO_SSL
Change-Id: I5a2758065d3155f4f33b76c022c43955a9b096c2
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2017-07-27 07:54:39 +00:00
Oliver Wolff
0fcc7ea02a winrt: Fix platform theme for non-phone devices
When running on a desktop machine (using Windws SDK 10.0.14393) the
palette had fully transparent text colors which were assigned in the
"phone only" part of the theme's initialization. By checking the API
contract we can avoid that part of the initialization and thus return
proper values.

Change-Id: Id770a686c1c7e447a9594830fd7670352116eb21
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2017-07-27 06:51:45 +00:00
Thiago Macieira
be93d2de03 Blacklist use of [[nodiscard]] with Clang
__has_cpp_attribute(nodiscard) is 1 in all compilation modes, but if you
use it outside of C++1z, you get a warning.

LLVM-bug: https://bugs.llvm.org/show_bug.cgi?id=33518
Task-number: QTBUG-61840
Task-number: QTBUG-62085
Change-Id: I84e45059a888497fb55ffffd14d3683f4808978b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-07-26 22:25:42 +00:00
Tor Arne Vestbø
1828caad33 macOS: Send expose event with individual rects instead of bounding rect
Change-Id: I914521e1dfecb0157a8b9e1c9d9a86ca45e0826e
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-07-26 21:07:44 +00:00
Jonathan Liu
50275fbcaf Use correct DRM event context version
Explicitly declare which DRM event context version we want to use,
rather than just the latest one libdrm supports. New versions may change
semantics, or extend the structure, in ways we're unaware of.

Stick with version 2, which is the version that introduced
page_flip_handler.

Change-Id: I1d2066d5ab485ea571f016a8660829f435821c82
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2017-07-26 12:56:40 +00:00
Eskil Abrahamsen Blomfeldt
73176d2922 Add API to disable text shaping on fonts
In the past, we had an undocumented text flag that worked with
one of the QPainter::drawText() overloads. This was never intended
as public API and served a specific cause in Qt WebKit at one point.

But there is a general need for such API, as disabling shaping features
easily gives 25% performance improvement on text rendering even for
fairly short strings.

This patch adds a new style strategy flag to disable shaping and
will just uses the CMAP and HDMX tables to get glyph indices and advances
for the characters. In Qt 6, the TextBypassShaping flag can be removed
completely and be replaced by the style strategy.

[ChangeLog][QtGui][Text] Added QFont::PreferNoShaping style strategy to support
improvements to performance at the expense of some cosmetic font features.

Task-number: QTBUG-56728
Change-Id: I48e025dcc06afe02824bf5b5011702a7e0036f6d
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-07-26 10:51:00 +00:00
Jüri Valdmann
af7e756155 Return "en" for QLocale::c().bcp47Name()
Currently QLocale::c().bcp47Name() returns "C" which, according to [BCP47], is
not a valid language tag. In particular it does not conform to the ABNF grammar
in section 2.1 which specifies a minimum length of 2 characters for all language
tags.

[BCP47]: https://tools.ietf.org/html/bcp47

This patch changes the return value to "en" seeing as the documentation for
QLocale::Language states that the C language is identical in behavior to
English.

Task-number: QTBUG-61949
Change-Id: I2a381def8fb7156467e01d105da92bb1f4821204
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-07-26 08:22:51 +00:00
Jüri Valdmann
2031196ad1 Add test for QLocale::bcp47Name()
Task-number: QTBUG-61949
Change-Id: I34fece0441afb1e69ea84ae59b90c5e2b7cf133f
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-07-26 08:22:43 +00:00
Tor Arne Vestbø
8719660416 macOS: Send expose event at drawRect and trigger updates via setNeedsDisplay
This changes the drawing model on macOS from the following:

 1. Sending synchronous expose events directly from callbacks such as
    windowDidOrderOnScreen and windowDidChangeOcclusionState
 2. Waiting for a resulting flush of the backing store, and issuing
    setNeedsDisplay as a response
 3. Waiting for the asynchronous drawRect call in response to
    setNeedsDisplay, where the backing store is finally drawn
    to the window

To the following:

 1. Issue setNeedsDisplay as a response to callbacks such as
    windowDidOrderOnScreen and windowDidChangeOcclusionState,
    when needed (in many cases this is automatic by AppKit)
 2. Send synchronous expose events from the resulting drawRect
    callback
 3. Draw the backing store to the window when flushed

The new model matches how normal Cocoa application draw in response to
drawRect, and makes the backing store flush synchronous instead of having
to trigger a async setNeedsDisplay. This gives AppKit more information
about how much time we're spending in drawRect, as the actual drawing
and flushing all happens within the synchronous expose event.

Qt applications that draw outside of drawRect, e.g. in response to timers,
are still supported by manually locking focus of the view and flushing the
window at the end of the backingstore flush.

Task-number: QTBUG-50414
Change-Id: I2efb9ff8df51ab6e840ad20c497b71f53e21e1c2
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-07-25 17:47:08 +00:00
Edward Welbourne
cff39f1818 tst_QTimeZone: improve readability of code and failure reports
When QCOMPARE(,) reports two 12-digit numbers, it's not always
immediately obvious what the difference is (much less what 1/3600000
of it is); nor is it obvious that (or why) a given 12-digit number is
in fact correct.  In contrast, our eyes can make sense of a
QDateTime's reported value quite well, enabling us to see what's
different; and it's possible to at least confirm the plausibility of
2-or-3 am on a spring or autumn day at a plausible transition (or even
to confirm it exactly by consulting suitable web-sites).  Also
document the actual transition happening in each case (since I *did*
consult a suitable web-site).  So prefer to QCOMPARE(,) two QDateTime
values instead of two 12-digit qint64s.

Where a that would be unsuitable, at least compare the difference to
zero, to make the error easier to understand (except when one of the
twelve-digit numbers consists entirely of 9s; that, for once, actually
is easy to see).

Write various multiples of 3600 as the relevant intelligible whole
number times 3600, rather than premultiplying, to make it obvious to
reders what's going on.

None of this changes what is actually tested.

Change-Id: I488e751283a55d4623c93612af13ad631144900d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-07-25 14:09:03 +00:00
Edward Welbourne
37b0a4d2e1 Fix a loop-test and the bogus data the loop expected
A loop initialized i = 0 and used i > 2 as its condition; it didn't
get very far.  Consequently, the test it was in never checked whether
CET's 2011 transitions happened at the times expected - which they
didn't, as the times in question were in fact the times at which
Pacific/Auckland had its transitions that year.

Change-Id: I94d1f8df615c5bcfe48e73d41b4c7faf2beccb96
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-07-25 14:08:55 +00:00
Edward Welbourne
3ff2d70a15 Rework qAppFileName() on MS-Win to handle problems gracefully
Using a stack buffer and then a growing realloc() buffer can be tidily
packaged by using a QVLA.  Passing the reported name length to
QString::fromWCharArray() saves the need for 0-termination, even if it
has been missed.  This also degrades gracefully to produce an empty
QString when GetModuleFileName fails (returning 0).

Change-Id: If58f5ad8505f66fb67e59572af1ceb60a068f0ab
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
2017-07-25 14:08:47 +00:00
Alexandru Croitor
03bb4fe6b1 Fix WebEngine build when VULKAN_SDK environment variable is present
Instead of expanding the VULKAN_SDK environment variable at Makefile
processing time, expand it at qmake time, so that a resolved include
path is passed to WebEngine's build system GN.

Task-number: QTBUG-61823
Change-Id: I63bd661350883d22af2ccdeb7c360ed0d8d881c8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2017-07-25 13:48:41 +00:00
Timur Pocheptsov
410148ef1e tst_QSslSocket::ephemeralServerKey - fix for OpenSSL 1.1
The original test is quite unfortunate - it has cipher names hardcoded,
and it fails with OpenSSL 1.1 - no matching cipher found for 'RC4-SHA'
and QSslContext::initSsl fails with 'Invalid or empty cipher list'.
We skip this test entry for 1.1.

Change-Id: I810b80a62d9e27a60db71fd412af0c80630d976c
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-07-25 13:29:32 +00:00
Sérgio Martins
4034c3a3d2 Don't call QVariant::fromValue<T>() with T=QVariant
Could be unwrapped further but that's a different topic.

Change-Id: I8f3414374dd6f114ab368c7508f725cece74ce34
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-07-25 13:26:17 +00:00
Jesus Fernandez
28d1d19a52 Add QDebugStateSaver to QVectorPath operator<<
&operator<<(QDebug &, const QVectorPath &) was modifying the QDebug
state without restoring it after finishing.

Change-Id: I28c377bc99bfeb5a7bc67ca9affa8123f04583df
Coverity-Id: 11375
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-07-25 12:39:23 +00:00
Jesus Fernandez
a493170a94 Fix memory leak
CID 10994 (#1 of 1): Resource leak in object (CTOR_DTOR_LEAK)

The font database was not destroyed in the destructor.

Coverity-Id: 10994
Change-Id: Ibd4cb0b65d1e554593295a3654e8d8c946551cc2
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
2017-07-25 12:14:39 +00:00
Gatis Paeglis
5be8445f11 doc: minor cleanup in QPlatformWindow::setGeometry()
This patch amends a4c8129.

This is more consistent with other parts in QPlatformWindow docs.

Change-Id: I26d7a91849f3fde3ab2a0f3c81e00a5f9c830707
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-07-25 12:03:29 +00:00
Stephan Binner
7964b7468d Convert features.tabbar to QT_[REQUIRE_]CONFIG
Change-Id: Id21a95cbc61b2559a8f517ee60548b61536e3cc4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-07-25 11:24:02 +00:00
Stephan Binner
2d02c4c799 Convert features.dockwidget to QT_[REQUIRE_]CONFIG
Change-Id: I1d4b0268df01f8bc0aec28af52cc4b639a376863
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-07-25 11:23:58 +00:00
Stephan Binner
4d70a501db Convert features.tabwidget to QT_[REQUIRE_]CONFIG
Change-Id: Iab985564fd2069188df01f8ff3e00add86eb86f4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-07-25 11:23:54 +00:00
Stephan Binner
16f375f549 Convert features.itemviews to QT_[REQUIRE_]CONFIG
The QT_NO_ITEMVIEWS queries in corelib/ seem to had no effect at all.

Change-Id: I494ee2309a96b0cf25de18781fc9a675878a2ee9
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-07-25 11:23:49 +00:00
Stephan Binner
163863f77d Convert features.combobox to QT_[REQUIRE_]CONFIG
Change-Id: I2f415de8556289a6461a645d559be17089c43c99
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-07-25 11:23:45 +00:00