Commit Graph

7415 Commits

Author SHA1 Message Date
Anton Kudryavtsev
1dc4c3817b QStringList: add contains(QLatin1String) overload
... to avoid the expensive conversion from QString to QL1S.

[ChangeLog][QtCore][QStringList] Added contains(QLatin1String) overload.

Change-Id: Ie75839ce9e46e03fe5155a02c7dcf00277b95c8d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-03-20 06:16:59 +00:00
Laszlo Agocs
f1a23a5467 Basic Vulkan enablers
For Android, Windows and xcb. Verified on Win10 with NVIDIA, Win10
with AMD, Android with Tegra K1, Android aarch64 with Tegra X1, and
Linux aarch64 with Tegra X1 (Jetson TX1, L4T).

Introduce QPA-based Vulkan library loader, core function resolver, and
instance creation support. In addition to creating a new VkInstance,
adopting an existing one from an external engine is supported as well.

The WSI specifics are hidden in the platform plugins. Vulkan-capable
windows use the new surface type VulkanSurface and are associated with
a QVulkanInstance.

On Windows VULKAN_SDK is picked up automatically so finding vulkan.h
needs no additional manual steps once the LunarG SDK is installed.

[ChangeLog][QtGui] Added support for rendering to QWindow via the Vulkan
graphics API.

Task-number: QTBUG-55981
Change-Id: I50fa92d313fa440e0cc73939c6d7510ca317fbc9
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2017-03-17 16:12:03 +00:00
Marc Mutz
208c71768c QChar: add (char16_t) and (wchar_t) ctors
... for better std C++ integration.

[ChangeLog][QtCore][QChar] Added constructors from char16_t and, on
Windows, wchar_t.

Change-Id: I2d18ea3a37e869b8ea9f4036d7200d9d13c7d929
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-03-17 01:14:54 +00:00
Olivier Goffart
a02959bb5b Make QWindow's windowState a QFlags of the WindowState
This reflects QWidget API, and restores some behavior from Qt4.
Some WM can have several state at the same time. On Plasma for example,
when a window is both maximized and minimized, the "maximized" checkbox
is checked from the taskbar entry.

The API of QPlatformWindow was changed to take a QFlag and the platform
plugins were adapted.

 - On XCB: Always send the full state to the WM. And read the full state.

 - On Windows: The code was originally written with '&' in Qt4, and was changed
   to == when porting. Some adaptation had to be made so the states would be
   preserved.

 - On macOS: Only a single state can be set and is reported back for now,
   with the possibly to expand this in the future.

 - Other platforms: Just do as before with the effective state.

Task-number: QTBUG-57882
Task-number: QTBUG-52616
Task-number: QTBUG-52555
Change-Id: I7a1f7cac64236bbd4c591f796374315639233dad
Reviewed-by: Gunnar Sletta <gunnar@crimson.no>
Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
2017-03-16 12:55:19 +00:00
Filipe Azevedo
7f1a220ee4 Add support for recursive filtering in QSFPM
You can now use the recursiveFiltering property to recurse into
children to find potential matching children to filter in.

Change-Id: I411a2fb29489fd56b9c881b3e6b8d1860cce630c
Reviewed-by: Stephen Kelly <steveire@gmail.com>
2017-03-14 21:34:37 +00:00
Liang Qi
0c034a649f Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
	src/widgets/widgets/qpushbutton.cpp

Change-Id: I615de00e6e64540c50f658d4d8ab3e002d701a81
2017-03-14 10:52:24 +01:00
Marc Mutz
1567a7c0f4 Use new QSemaphoreReleaser in tst_QThreadPool
... replacing a hand-rolled version there.

Change-Id: I0db50acd1ecf591d608eb719021a6fcd06aeb226
Reviewed-by: David Faure <david.faure@kdab.com>
2017-03-09 19:04:33 +00:00
Thiago Macieira
ef26467eb2 Reintroduce a directed QMetaType::typeName array
Commit fb376e0fcc removed an array that
facilitated returning the names of built-in types, to avoid the jump tables
from the switch statement. This commit brings it back but makes the array a
compile-time constant string offset table.

The array is created by way of a set of C++11 constexpr functions, so we
require that compiler feature. I've tested that MSVC 2015 does support
it as well as the ICC 17 when masquerading as MSVC 2015, so I've enabled
for that too. The only compiler left out is MSVC 2013.

If we didn't need to support MSVC 2015, this could have been written
more simply with C++14 relaxed constexpr.

This also adds unit tests to confirm that QMetaType::typeName() does
return null when we said it would. We're testing QMetaType::User-1
(which we'll likely never use) and QMetaType::LastWidgetsType-1 to
select something inside the range of the built-in types.

Task-number: QTBUG-58851
Change-Id: I4139d5f93dcb4b429ae9fffd14a33982891e2ac1
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2017-03-09 14:56:35 +00:00
Oleg Yadrov
175f33ed85 QMacStyle: update QTabBar style
Task-number: QTBUG-58266
Change-Id: I135e4dae44e2e97d73b7c7c97d8e682bcf459d75
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
2017-03-08 18:39:01 +00:00
Olivier Goffart
5675334b6e moc: Add support for C++17 nested namespaces (N4230)
[ChangeLog][moc] Added Support for C++17 nested namespaces

Change-Id: Ib83fc5bf48f66546fa97b49710582fbf9c984503
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-03-08 17:34:38 +00:00
Olivier Goffart
11d60dcad6 moc: Fix parsing of digit separator
[ChangeLog][moc] Fixed parsing errors in presence of
C++14 digit separators.

Task-number: QTBUG-59351
Change-Id: Iea38ea7388853d84b819c2beb78a59371f57bf7d
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-03-08 12:34:12 +00:00
Marc Mutz
69415638ae QLatin1String: add iterators
[ChangeLog][QtCore][QLatin1String] Added iterators, {c,}{r,}{begin,end}().

Change-Id: I0222a3ff44f2aa827c737e2fa3cfbb8aad69b5a7
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-03-07 16:38:58 +00:00
Jake Petroules
b181da9885 Remove workaround for potentially unavailable pasteboard in macOS
This was added in 2006 (when Tiger was the latest version of macOS) in
order to work around an issue where the pasteboard would not be
available when running under a non-graphical session. The latest
supported version of macOS is currently 10.10 on which this is not
expected to be an issue, so this workaround and therefore the Carbon
dependency can be removed.

Change-Id: Id5ed0a7e531dda71ce461c8bbbaebd5d4cadbd0e
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
2017-03-07 01:04:46 +00:00
Jake Petroules
c1058cfd7b Remove remaining Carbon includes from QtCore, QtGui and QtWidgets
Carbon is deprecated and we should not rely on it at runtime or compile
time. These headers were only included for a small collection of
keyboard key constants which have now been hardcoded instead.

Change-Id: Ia2eaa267584b63be8019be3bbf64cba897a985a8
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
2017-03-07 01:04:40 +00:00
Jake Petroules
e0e956bfc2 Remove Carbon API usage from tst_qmacnativeevents
These code paths are actually never exercised at all.

Change-Id: I95a5cfa0173e265573c30378ec2e03a2ddf954e4
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
2017-03-07 01:04:35 +00:00
Paul Olav Tvete
d5fe06a94e Make uic handle -no-feature-shortcut
Change-Id: I0f8c9fdc8b0fe573443cfc126f21e473544ddcba
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-03-06 09:08:34 +00:00
Joerg Bornemann
80145d556e Increase timeout of tst_QProcess::softExitInSlots even more
Commit eab7efd1 increased the timeout for this test, but apparently 10
seconds are still not enough. Set the timeout to a minute.

Task-number: QTBUG-59075
Change-Id: Iebab8e5c73c4858ca90063a82aedfbb2546a62cc
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-03-03 16:26:41 +00:00
Marc Mutz
863debd720 Revert "Add expandingListItems property to QListView"
This reverts commit a4c25c0205.

The API is too limited in scope, and a good name is hard to find, as
evidenced in the API review discussion preceding Qt 5.9 beta.

This API will hopefully return as something like setItemAlignment().

[ChangeLog][QtWidgets][QListView] EDIT: REMOVE: Added expandingListItems property.

Conflicts:
	tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp

Change-Id: I397acd8a7a6c716e2d3c96eee45a276eb6d4f9dd
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Alexander Volkov <a.volkov@rusbitech.ru>
2017-03-03 08:34:19 +00:00
Olivier Goffart
1d9270ee42 Fix DPI of QWidget with parent on a different screen
If a floating QWidget has a parent on a different screen, its DPI was
still inherited from the parent instead of taken from the screen.

The only reason we did was in case there is a customDpi set.
(customDpi is a private thing that is only used in designer to change
the appearance of the previewed widget)

So instead of recursing into QWidget::metric for each ancestor, just
use a for loop to find if one parent has a customDpi. If no customDpi
is found, then return the DPI of the right screen.

Task-number: QTBUG-58959
Task-number: QTBUG-48242
Change-Id: Ie6e9e48cdd10234994c0919ba3aea9b0cdb52494
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-03-02 16:43:38 +00:00
Liang Qi
71264bae08 Merge remote-tracking branch 'origin/5.9' into dev
Change-Id: I84097f8e7b3b2128028bd7693c913d6968b82bfe
2017-03-02 09:04:38 +01:00
Eirik Aavitsland
c4c8886a86 ppm/pgm image formats: fix reading 16bit and limited range
The color values of ppm and pgm images can be either 8 or 16 bits.
They can also be scaled to a smaller max value, and they can be
expressed either binary or ascii. For some of these permutations, Qt's
image handler lacked implementation or would decode the wrong color
value. This commit fixes that.

Task-number: QTBUG-18262
Task-number: QTBUG-35990
Change-Id: I7cf11c2366244f3a9b31c1a565a81e2658bc6a51
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-03-02 07:59:50 +00:00
Marc Mutz
5e785c0b83 Add a string API symmetry test for mid/left/right
All good.

Change-Id: Iab278c24b4bd462d5e77af0c4f0fefb155d00551
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-03-01 13:40:12 +00:00
Kai Koehne
58cf57492c Widgets: Replace LGPL21 with LGPL license header
Also use canonical contact url.

Change-Id: I59ed3d09d2fee877a577a00e7e1cb09782d26512
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-02-28 15:34:14 +00:00
Kai Koehne
a64c766a3d Network: Use canonical license headers
Replace outdated LGPL21 with LGPL license header.
Use GPL-EXCEPT for all autotests.
Also use canonical contact url.

Change-Id: I6e5cc8a4285569c4f862730a980f492b8a933a72
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
2017-02-28 15:34:01 +00:00
Liang Qi
1a4f0deeb4 Merge remote-tracking branch 'origin/5.9' into dev
Change-Id: I7d84cfed0b2a122d334b8a920e6e4f18472d2f11
2017-02-28 13:03:36 +01:00
Marc Mutz
49c558eb0d QSizePolicy: inline toControlTypeFieldValue()
The implementation now uses the relaxed-constexpr
qCountTrailingZeroBits() function from QtAlgorithms, making the
QSizePolicy(Policy, Policy, ControlType) constructor constexpr on
C++14 compilers. The explicit check for DefaultType remains to keep
the constructor C++11-constexpr when called with just (Policy,
Policy).

Extend the constExpr tests a bit.

Change-Id: I59690f0921d9bdee08e3615d0d1f4a9b92870c32
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2017-02-27 23:09:27 +00:00
Robin Burchell
7a717aaf45 QImageWriter: Detect failure due to trying to write a QImage()
This is not a bug in QImageWriter, but caller code. We should be
explicit about what the problem was so it can be fixed.

[ChangeLog][QtGui][QImageWriter] Add QImageWriter::InvalidImageError to
communicate invalid attempts to write a bad QImage (for instance, a null
QImage).

Change-Id: I0333b8263f1da1c672bed17dab48bfd6cafe41a2
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2017-02-27 18:03:33 +00:00
Edward Welbourne
1631384c27 tst_QWMatrix: use lambdas to duplicate messy code less
The cumbersome complex calls to QMatrix were surely easy to write
thanks to copy-and-paste; but this left the reader to either
laboriously check or guess that all the copies were the same (and
notice that there were two, in fact).  DRY.

Since QMatrix wants qreal data, change the float deg angle to a qreal
and work in qreal throughout.  Passing the angle to a function instead
of repeating it obviates the need for a local variable in the calling
code, to hold its value.

Change-Id: I6bb4adf438a893083ca19f27942502c1e5c518aa
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2017-02-27 17:45:28 +00:00
Laszlo Agocs
dfc338613e Make QPlatformSurface events work with QWindowContainer
Embeddeding a QWindow via QWidget::createWindowContainer() fails to
deliver the SurfaceAboutToBeDestroyed event. This breaks any OpenGL
or Vulkan based QWindow that releases resources upon this event, and
is particularly critical with Vulkan where the only way to do properly
ordered swapchain - surface cleanup is via this event.

In the non-embedded case close() eventually ends up in an explicit
destroy() in QWindow. In the embedded case destroy() only gets called
from ~QWindow. This then silently breaks since the subclass' reimplemented
event() virtual is not getting called anymore.

To remedy the problem, simply add an explicit destroy() to
QWindowContainer.

Task-number: QTBUG-55166
Change-Id: I1671e8f4d39f6c44e19eca7b9387f55fe3788294
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2017-02-27 12:38:08 +00:00
Laszlo Agocs
5bb4d06494 Add support for custom texture format in QOpenGLWidget
...in order to support sRGB framebuffers.

Add a --srgb option to the qopenglwidget example to allow testing.

[ChangeLog][QtWidgets][QOpenGLWidget] Added support for specifying
custom internal texture formats in QOpenGLWidget in order to make it
possible to have the widget backed by an sRGB-capable framebuffer.

Task-number: QTBUG-50987
Change-Id: I112e2f0ab0b1478c69e601031aa0bafaa87fa847
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2017-02-26 20:06:07 +00:00
Liang Qi
de49839df8 Merge remote-tracking branch 'origin/5.8' into 5.9
Conflicts:
	mkspecs/features/moc.prf

Change-Id: Ia71c8e3b3185f7c999bf226d0675051b10b8740b
2017-02-24 20:01:42 +01:00
Timur Pocheptsov
09ca03e1aa QNAM - rename Redirect*s*Nnn to RedirectNnn
As discussed in API code-review.

Change-Id: Ib54cfd43d5bef8c7d99a7fb3b09a9d16dc1dc1dc
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-02-23 20:24:17 +00:00
David Faure
9ffc9e306f QUrl::fromUserInput(with cwd) fix handling of files with trailing spaces
The call to trimmed() makes sense for URLs typed in a browser's location bar,
but its use in every code path made it impossible to open a file with a trailing
space in command-line tools that uses fromUserInput(cwd) to handle command-line
arguments, as recommended. For instance kde-open5 "file.txt " would fail.

Change-Id: Ie61182684521d91f077d3e76f95b7240965ab405
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-02-23 18:12:35 +00:00
David Faure
8cb9314971 tst_qurl: use temp dir and create our own files for testing
This allows to test specific filenames without polluting the current dir.

Change-Id: Ieb99019a2e37e30f294d85c5d80af1de1b919019
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-02-23 18:12:13 +00:00
David Faure
11790f41a7 tst_qurl: replace all QDir::currentPath() calls with local variable
Change-Id: I70e4547ba87292c29dfab59950aa1214be8015a5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-02-23 18:12:06 +00:00
David Faure
90b48a70ff QTextFormatCollection: replace copy ctor and op= with clear()
operator=, which was only used for clearing, wasn't clearing the hash.
This led to a mismatch between the vector and the hash (given that the hash
points into the vector).

Spotted by interrupting kmail in gdb, and it was in this code
iterating over a 2000 entries hash (the first vector entries not matching
the hash, this code keep appending new entries for the same formats).

This fixes QTBUG-8862 again, the initial fix having been accidentally
reverted in 467b15a.

Change-Id: Ia34b3d002a0199e1930431a4bbdb2ec981ed4ffc
Task-number: QTBUG-8862
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-02-23 18:11:55 +00:00
Daniel Vrátil
30da659af5 Introduce QMetaType::PointerToGadget flag for pointers to gadgets
A Q_GADGET class can be used both as a value class and a pointer, but
right now QMetaType::IsGadget is only set for value types. This change
introduces PointerToGadget metatype flag which is set for pointers.

This allow for better handling of gadgets in code as well as
disambiguating between value types and pointers to value types.

Change-Id: Id3bd9e18a8eec7ca1cc6b1c25ed03cdc8c0a75a1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-02-23 16:58:47 +00:00
Shawn Rutledge
8fd6cef372 add tst_QWidget::tabletTracking autotest
Ensure that tablet moves are delivered iff tabletTracking is true.

Task-number: QTBUG-26116
Change-Id: Iaa360e181f0c6484cfbde6fa5365f2f0dc77433a
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2017-02-23 10:43:03 +00:00
Marc Mutz
62e15093ff Unexport QTimeZonePrivate
It's only used in the autotests, and it private API, so
downgrade from Q_CORE_EXPORT to Q_AUTOTEST_EXPORT.

Fix a use of QTimeZonePrivate functions unprotected by
QT_BUILD_INTERNAL in tst_qtimezone.cpp.

Change-Id: I70eaea06f8fcf2983aeafb6894c3a5d2a4b272a7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-02-23 10:42:51 +00:00
Marc Mutz
b952bd3605 QSizePolicy: make (Policy,Policy) ctor constexpr
Unfortunately, that ctor also takes a ControlType argument (defaulted),
and calls the non-constexpr, non-inline function setControlType().

In order to make at least the two-arg version constexpr, I added
a use of the ternary operator to check for type == DefaultType,
making all calls of the ctor that use type == DefaultType
constexpr. For init'ing an aggregate type without ctor in the
ctor-init-list, I needed to require uniform initialization, too.

C++11-style constexpr cannot call void functions, so I needed
to extract the transformation part of setControlType() into a
new function that returns the result instead of storing it directly.

Saves a surprising 2K in QtWidgets text size on GCC 4.9, AMD64 Linux
stripped release builds.

Change-Id: Ib4adf5fd6e54d5345dbfe1c298554278faf13c58
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2017-02-23 05:44:51 +00:00
Lorenz Haas
2a3297c726 REGEXP for SQLite
Since SQLite does not define a regexp function by default, provide a Qt
based implementation which can be enabled using QSQLITE_ENABLE_REGEXP as
an connect option. This way statements like

SELECT * FROM table WHERE col REGEXP '^[a-d]';

work out of the box.

[ChangeLog][QtSql] Add QSQLITE_ENABLE_REGEXP connect option for
QSQLiteDriver. If set a Qt based regexp() implementation is provided
allowing to use REGEXP in SQL statements.

Task-number: QTBUG-18084
Change-Id: I7f0e926fe4c5d6baea509f75497f46a61ca86679
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
Reviewed-by: Sebastian Sauer <sebastian.sauer@kdab.com>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2017-02-22 21:14:23 +00:00
Marc Mutz
494ee2aa8d QThreadPool: supersede cancel() with tryTake()
The cancel() function added in 5b11e43e for Qt 5.5 suffers from a
number of problems:

First, if runnable->autoDelete() is true, then the function suffers
from the ABA problem (see documentation written for trytake()).

Second, if runnable->autoDelete() is false, due to cancel() throwing
away crucial information instead of returning it, the caller cannot
know whether the runnable was canceled (and thus has to be deleted),
wasn't found or is currently executing (and thus mustn't be deleted),
or has finished executing (and can be used to extract the result).

Deprecate this dangerous API and replace it with the much more useful
Private::stealRunnable(), promoted to public API and renamed to
tryTake() for consistency with the rest of Qt.

Described the various caveats in the function's documentation.

[ChangeLog][QtCore][QThreadPool] The cancel() function suffers from
several subtle issues and has been replaced with a new tryTake()
function.

Change-Id: I93125935614087efa24b3e3969dd6718aeabaa4f
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-02-22 16:37:07 +00:00
Ulf Hermann
46730ca610 Make the factoryloader test compile without library support
We define QT_STATICPLUGIN for the plugins in this case, so that they
define the factory functions needed to link them directly into the
test.

Change-Id: I0f2de7bf6bec5a6d53ec9ad92536817c1221b7d5
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-02-22 15:53:13 +00:00
Marc Mutz
dbfde461ed tst_QProgressBar: add a case for INT_MIN/INT_MAX to setValueRepaint()
Convert the function to be data-driven, then add cases for ranges with
limits INT_MIN, INT_MAX and zero to check for overflows in the
painting code. Speed up the function by removing the per-iteration
qWait() call and rely solely on the existing QTRY_VERIFY() to do the
right thing.

Change-Id: I6d2a2c2b7637fca7ddb2a9adc5f6550f8255da14
Reviewed-by: David Faure <david.faure@kdab.com>
2017-02-22 13:55:51 +00:00
Marc Mutz
7c647edae9 QTypeInfo: don't treat enums and (extended) integral types as complex
We fully specialize QTypeInfo for most C++ built-in types,
but enums and extended integral types (like GCC's int128_t)
were not covered.

Now that we depend on <type_traits>, we can stop pessimizing
enums and extended integral types in QVector and QVLA by
defaulting QTypeInfo::isComplex to true for such types.

Fix a test that checked that enums were complex types. This should
have been a XFAIL test. Enums are not complex types.

Change-Id: Ibb0fb38cc83e980a428b5573d1db5666593418ae
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-02-22 09:21:57 +00:00
Oswald Buddenhagen
5e2367aaa5 use regular configure mechanism for openssl library references
don't attempt to hand-craft a library export any more. instead, use the
configure system's built-in mechanism, and refer to it via QMAKE_USE.
this also allows us to rely on transitive dependencies in the autotest.

as a side effect, this makes the openssl-linked feature imply the
openssl one.

Change-Id: I5dd209b63bc8fbbc62852f6ffc472d4452ea2e68
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-02-22 07:45:59 +00:00
Tor Arne Vestbø
3e5d5852dd windowflags: Update preview info when window state changes
Change-Id: I072939cdff0bd58779d9c163cb23e8176f3bc84a
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-02-20 14:19:47 +00:00
Edward Welbourne
3cdf8debd1 Make sure to use C locale during time tests that assume it
Some format and parse tests for time and date-time depended on locale
but had test data for the C locale (so fail if the test-environment
has, e.g., LANG=de_DE@utf8).  So impose the C locale (until Qt 6).

The date-time test did *some* attempts at fixing for locale, but
failed to handle am/pm; and we do have "### Qt 6" comments in
Q(Date|Time)+::fromString indicating that we intend to switch these
methods to use the C locale by default (which shall fix this once and
for all).  So rip out the incomplete localization now and test we work
properly at least when the locale used *is* C.  Add a comment to the
matching QDate test to rip out its (presently adequate) matching code
once we do get to Qt 6 and make fromString() use the C locale.

QDateTimeParser uses systemLocale(), which is initialized the first
time it gets accessed; so we need to frob the locale *early*; doing so
in the test-class constructor is about as early as we conveniently
can; and seems to work (while doing it in individual tests does not).
(There is no point rolling back at the end; the QSystemLocale global
has been set up by then, so the roll-back would merely leave the
global out of sync with setlocale() and the environment.)

Task-number: QTBUG-58728
Change-Id: Ifa6778a80276050a099387a6dab15a1096be7561
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2017-02-20 08:48:46 +00:00
Tor Arne Vestbø
5f80a7956e windowflags: Improve compound states handling
Change-Id: Iab5df40b69cf9c0e11f0e495a6b27af9c05fbd94
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-02-19 23:36:29 +00:00
Liang Qi
bc4cd465dd Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
	qmake/Makefile.unix

Change-Id: Ia18e391198222eef34ffa2df6f683e052058d032
2017-02-17 20:10:34 +01:00