Commit Graph

33370 Commits

Author SHA1 Message Date
Thiago Macieira
3d6cbe3409 Long live QTemporaryFileName!
So we can use it in QTemporaryFile, QTemporaryDir and QFile::rename()

[ChangeLog][QtCore][QTemporaryDir] The class now supports the "XXXXXX"
replacement token anywhere in the template, not just at the end. This
behavior is similar to what QTemporaryFile supports.

Change-Id: I1eba2b016de74620bfc8fffd14ccb645729de170
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-08-04 17:30:03 +00:00
Thiago Macieira
3981a1f440 QTemporaryFile: split the template parsing and generation
This makes the code more reusable by the unnamed file feature.

This commit removes the backwards compatibility in using sequential file
names if the first one failed. Since 5483b30868,
there are at least three random characters, so the chance of collision
is 1 in 52³ = 140608.

That commit also did not take a system failure into account. If we ended
up getting EEXIST for all attempts, we'd attempt on average 26³*53³ file
creations. For that reason, I've added an upper limit in the number of
attempts to create a file.

Change-Id: I1eba2b016de74620bfc8fffd14cc7e31c6e50558
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-08-04 17:30:01 +00:00
Thiago Macieira
3766265602 QTemporaryFile: give the engine access to the template name
Instead of storing it in d->fileEntry. The QFSFileEngine methods may try
to use it before the file entry is filled with the actual file name and
that's no good. This change is using a reference to avoid keeping an
extra QString reference and to avoid going out of sync.

Change-Id: I1eba2b016de74620bfc8fffd14cca9e340e4b1e2
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-08-04 17:29:57 +00:00
Thiago Macieira
38bc95aece QTemporaryFile: add a simpler rename() (non-virtual) override
Calling the parent version is still ok, but if you call the new one you
get a bit of benefit. Since we control the file name, we don't have to
worry about a case-changing renaming (by choice). We also know that the
file is a regular one, because we created it.

[ChangeLog][Important Behavior Changes][QTemporaryFile] rename() no
longer attempts to do block copying, as that usually indicates a mistake
in the user's code. Instead, either create the temporary file in the
same directory as the new name to be, or use QSaveFile.

Change-Id: I1eba2b016de74620bfc8fffd14ccaac0cdb9fe87
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-08-04 17:29:54 +00:00
Thiago Macieira
363dc9146e QFSFileEngine: make rename() on Unix not overwrite
The rename(2) system call overwrites, so instead of using it, we try to
use the link/unlink pair. This works for regular cases, but can fail if
trying to change case in case-insensitive filesystems, if we're
operating on a non-Unix filesystem (FAT) or, on Linux, if the file
doesn't belong to the calling user (BSDs permit this). For those cases,
we fall back to rename(2).

That means there's a race condition if a new file is created there. But
we at least reduce the likelihood of that happening for regular files.

Change-Id: I1eba2b016de74620bfc8fffd14ccb38fd929e5aa
Reviewed-by: David Faure <david.faure@kdab.com>
2017-08-04 17:29:52 +00:00
Allan Sandfeld Jensen
74197140be Implement conversion from nullptr QVariant to QString and QByteArray
A nullptr QVariant should become a null QString or QByteArray,
since null strings have previous in our APIs represented the null value
in the absence of a dedicated null metatype.

Change-Id: I3b8f6386ece314d7c196959fbcf042c4fe0508a0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-08-04 11:19:44 +00:00
Edward Welbourne
fbe84a1a19 Add a test that we can read SQL time-stamps
Based on a test-case from Israel Lins Albuquerque, that my planned
fixes to our parsing of ISODate date-times would break.

Change-Id: I5658df9c7daed59d43aa5574df25d4d9eac4677d
Reviewed-by: Israel Lins Albuquerque <israelins85@yahoo.com.br>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-08-04 11:19:39 +00:00
Edward Welbourne
a9c111ed8c Clean-up in QDateTime's parsing of ISODate{,WithMs}
Actually check that there's a T where ISO 8601 wants it (instead of
just skipping over whatever's there), with something after it; move
some declarations later; add some comments; and use the QStringRef API
more cleanly (so that it's easier to see what's going on).  Simplify a
loop condition to avoid the need for a post-loop fix-up.

This incidentally prevents an assertion failure (which brought the
mess to my attention) parsing a short string as an ISO date-time; if
there's a T with nothing after it, we won't try to read at index -1 in
the following text.  (The actual fail seen had a Z where the T should
have been, with nothing after it.)

Add tests for invalid ISOdate cases that triggered the assertion.

Change-Id: Ided9adf62a56d98f144bdf91b40f918e22bd82cd
Reviewed-by: Israel Lins Albuquerque <israelins85@yahoo.com.br>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-08-04 11:19:35 +00:00
Kevin Ottens
b6c3f55b93 GLSL 1.00 ES must be selected using "#version 100"
I was mistaken before, the "es" part for that version isn't optional, it
*must* be omitted.

Change-Id: I9e83d2317523fb0a905e40b95a56033cf693b93b
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
2017-08-04 11:19:30 +00:00
Allan Sandfeld Jensen
f2c6e10ad5 QVariants of null pointers should be null
Changes the QVariant::isNull() implementation for
pointer types so they return true if null.

[ChangeLog][QVariant] QVariants containing pointers will now return
true on isNull() if the contained pointer is null.

Change-Id: I8aa0dab482403837073fb2f376a46126cc3bc6b2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-08-04 11:19:25 +00:00
Gatis Paeglis
341bfcd1ea glib dispatcher: ensure all window system events are flushed
... when QCoreApplication::processEvents() returns. This is the expected
behavior according to the documentation. Checked also the QUnixEventDispatcherQPA
dispatcher, which did work according to the documentation.

The sequence of events that causes the bad behavior:

1) XCB plugin sends a signals whenever there are new XCB events available
for processing. This signal is connected to QXcbConnection::processXcbEvents,
which will cause XCB events to be added to the QWindowSystemInterface (QWSI) event
queue.

2) When QCoreApplication::processEvents() is called, glib event dispatcher does
one iteration on all attached event sources. First it checks which sources are
ready, and after that starts dispatching events from each source that reported
to be ready.

3) In the case when there are no events in QWSI event queue, the source that handles
QWSI event dispatcing returns 'false'; If at the same iteration the source that
sends posted events (via QCoreApplication::sendPostedEvents()) has returned 'true'
and one of the posted events is to call QXcbConnection::processXcbEvents (due to
signal from step 1) then we get an assert in the following code:

QCoreApplication::processEvents();
Q_ASSERT(QWindowSystemInterface::windowSystemEventsQueued() == 0);

This happens because QXcbConnection::processXcbEvents has posted new events, but
they were not dispatched in this iteration. They would be dispatched in the next
iteration. Events being dispatched on subsequent iteration doesn't really matter
for Qt application, but is inconsistent from API point of view. If we were
populating QWSI queue from non-Gui thread, then it would be possible that
windowSystemEventsQueued() != 0, but that is not the case on XCB (don't know
about other platforms).

The issue could be fixed by always returning true from "check source" and then
simply dispatch 0 events at "dispatch" step if there isn't any in the queue. But
a better solution is to remove the event source all together. It is completely
unnecessary to have this indirection, when we can handle QWSI event dispatch
directly from Qt (like we do, for example, in QUnixEventDispatcherQPA and
QWinRTEventDispatcher). Not having Glib event source for QWSI events would have
also avoided issues that were fixed by fbb485d4f6.

Note, after this re-factoring QWindowSystemInterface::nonUserInputEventsQueued is
now unused, but I left it in as the API by itself is all right.

Task-number: QTBUG-62297
Change-Id: Ia245b835676bd87e63bf02b67036b42a3b1593cc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-08-04 11:19:19 +00:00
Thiago Macieira
b12fd1fa9d Long live qEnvironmentVariable()
[ChangeLog][QtCore] Added qEnvironmentVariable, which returns the value
of an environment variable in a QString, while qgetenv continues to be
used to return it in a QByteArray. For Unix, since most environment
variables seem to contain path names, qEnvironmentVariable will do the
same as QFile::decodeName, which means NFC/NFD conversion on Apple OSes.

I opted not to #include <qfile.h> from qglobal.cpp to implement that
QFile::decodeName functionality, so qglobal.cpp doesn't depend on
corelib/io and to avoid possible recursions.

Task-number: QTBUG-41006
Change-Id: I14839ba5678944c2864bffff141794b8aaa7aa28
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-08-04 11:19:13 +00:00
Simon Hausmann
1f4fd599a8 Ignore thaiZWJ failure on RHEL 7.2
The test fails when the system harfbuzz (version 1.3.2) is installed.

Change-Id: Id18a5a3c503f64ef56567d71655e433a46908b3f
Task-number: QTQAINFRA-1363
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
2017-08-04 11:18:50 +00:00
Laszlo Agocs
51446c3c6f Fix Q(Quick)Window on eglfs
The call to QPlatformWindow::setRect (for storing into d->rect) was
in the wrong place. It has to be the potentially-overridden value.

Amends 3a31c70879

Task-number: QTBUG-57608
Change-Id: Id3c35e2dc178f7bd2f9643e8ae4754c8f2f39240
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-08-03 11:23:41 +00:00
Alexander Volkov
d12d2949d1 uic: Add -no-stringliteral option
... and use it when building shared libraries and plugins.
It prevents application crashes in cases when libraries and
plugins are unloaded and their strings are still used by
the main application.

Task-number: QTBUG-51602
Change-Id: I4af79183f18c5ed6142d55af02a36fe4334f3fee
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-08-03 09:59:15 +00:00
Eirik Aavitsland
8ba373361d Support all QImage formats in native pixmap conversion
The conversion fallback did not catch all the more recently added
QImage formats, leading to corrupt pixmaps or crashes. Also alpha
channels were needlessly thrown away if present.

Change-Id: I38588035aa9bf37b77398489981df65201cf0340
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-08-03 09:43:12 +00:00
Laszlo Agocs
4f515815ef Change EDID parsing qCWarnings to qCDebugs
Avoid polluting the output by default. Unfortunately there are various
systems (modern Fedora with XWayland, VMWare) where parsing will fail
for some not yet known reason. Showing warnings on each and every Qt
application startup is not desirable, especially since not having the
EDID data available is far from being critical.

Change-Id: Ibaca7db4d897e705819f7c359f8de41b9be862a6
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2017-08-03 09:30:30 +00:00
Frederik Gladhorn
e5cdb966bf Ignore tests that fail on OpenNebula
These tests need fixing, but they are already partially blacklisted
and need investigation once the switch is completed.

Task-number: QTQAINFRA-1292
Task-number: QTQAINFRA-1355
Task-number: QTQAINFRA-1362
Change-Id: Ic50d0c4a01ee7e72be1129d418eff244ba783185
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-08-03 09:30:06 +00:00
Alex Trotsenko
8853f2bad4 QSslSocket: stabilize triggering for write
QSslSocket::writeData() accumulates outgoing data. It might be called
multiple times during the event processing (most likely from the long
loops which serialize the data).

As this function produces a notification event on each call, it's
possible to get a huge number of slot invocations on the next event
loop run, when we are interested in a single flush.

So, this patch protects the code against uncontrolled signal emission
that results in the lesser resource usage.

Change-Id: If7cf5b0e239abf0bd88a0dfaa8c1183cbd49e5ed
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Markus Goetz (Woboq GmbH) <markus@woboq.com>
2017-08-03 09:28:11 +00:00
Gatis Paeglis
5a1f1345aa xcb: don't rely on _NET_WORKAREA for available geometry on multi-head systems
On X11, QScreen::availableGeometry() is broken with multi-head systems,
and there doesn't seem to be a real fix for this due to limitation in
the protocol and therefore support in WMs (more details in the
patch). In Gnome this issue is more visible because on this DE the
 _NET_WORKAREA rectangle represents the intersection of the available
geometries on all monitors. This results in a big area of "dead space"
on the secondary screen, when primary screen is positioned lower in the
virtual space. If menu is opened by clicking in this dead space, the menu
is awfully misplaced (qmenu uses availableGeometry() to calculate the
position of menu).

On Ubuntu with Unity (same is true for KDE Neon+Kwin and LUbuntu+Openbox),
_NET_WORKAREA returns a bounding rectangle containing all monitors.
Which does not cause the menu misplacement as "dead space" is outside
clickable area. But this does not mean that the QScreen::availableGeometry()
reported values are correct. With the same setup as described above,
QScreen::availableGeometry() thinks that we have a tool panel on the
right screen, when in reality it is on the left screen.

AwesomeWM for example does not set _NET_WORKAREA at all, which means
QScreen::availableGeometry() == QScreen::geometry(). I am not aware that it
would cause any issues for popup/menu window positioning in Qt (Qt positions
these windows manually by bypassing WM (via Qt::BypassWindowManagerHint) and
using availableGeometry for calculations. With this patch, we would take the
same code path as if _NET_WORKAREA was not set (where we know that_NET_WORKAREA
is cleary wrong). The solution here is to recognize _NET_WORKAREA as true
available geometry only in specific cases (cases where the meaning is cleary
defined by the specification) and adjust the documentation accordingly.

Not knowing the true available geometry on X11 is mitigated by WMs. Window
manager can position windows as it wants. WMs are smart enough not to place
windows on top of reserved areas at edges (even if user has explicitly requested
this via setGeometry based on inaccurate information from availableGeometry()).

[ChangeLog][Platform Specific Changes][Linux] The _NET_WORKAREA atom is
used for calculating QScreen::availableGeometry() only on systems with one
monitor. In all other cases QScreen::availableGeometry() is equal to
QScreen::geometry(). To restore the legacy behavior with untrustworthy
values in QScreen::availableGeometry() set QT_RELY_ON_NET_WORKAREA_ATOM=1
environment variable.

Task-number: QTBUG-60513
Task-number: QTBUG-29278
Task-number: QTBUG-43768
Task-number: QTBUG-18380
Change-Id: I7e0f62f81d1444991b8a6c007c2527d8f96088c2
Reviewed-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-08-02 23:15:32 +00:00
Frederik Gladhorn
6c2bfbf88e Merge "Merge remote-tracking branch 'origin/5.9' into dev" into refs/staging/dev 2017-08-02 23:15:27 +00:00
Timur Pocheptsov
72cf2339ed Introduce QHstsStore - the permanent store for HSTS policies
The store is using QSettings under the hood. A user can enable/disable
storing HSTS policies (via QNAM's setter method) and we take care of
the rest - filling QHstsCache from the store, writing updated/observed
targets, removing expired policies.

Change-Id: I26e4a98761ddfe5005fedd18be56a6303fe7b35a
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-08-02 22:01:47 +00:00
Morten Johan Sørvig
37dc5bb46c Correct QThread::idealThreadCount() docs
QThread::idealThreadCount() now returns 1 if the number
of CPU cores could not be detected.

Change-Id: I60b75c46fbfa2891c28e71fed65589e2ce5a5c17
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-08-02 21:59:01 +00:00
Morten Johan Sørvig
e44ff19783 Add QThreadPool::stackSize
Allows setting the stack size for the thread pool
worker threads. Implemented using QThread::stackSize.

Task-number: QTBUG-2568
Change-Id: Ic7f3981289290685195bbaee977a23e0c3c49bf0
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2017-08-02 21:58:54 +00:00
Morten Johan Sørvig
5c9c55906c Make QThreadPoolPrivate use NSDMIs
(non static data member initializers)

Also, taking the absolute value of the idealThreadCount()
return value is no longer needed since the function now
returns 1 for the "CPU detection failure" case.

Change-Id: I2214fd15ed24413bba796ead38bbf1355dfd37d9
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2017-08-02 21:58:47 +00:00
Allan Sandfeld Jensen
bef7e4a222 Allow conversion of QVariants with real null values
Update documentation to be clearer on the special null variant state
with no value as opposed to a variant with a null value, and only block
conversions of the former.

Change-Id: I24fd50285414e049de87de54a63700a89bd5adf1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-08-02 21:09:19 +00:00
Alexander Volkov
bf6ae8406b Compare versions in qmake files with versionAtLeast
Change-Id: Iba5686131d9f3e22e9a4d6da473a61a845b0418e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-08-02 21:08:07 +00:00
Friedemann Kleint
6b38758084 Fix some qdoc warnings
qtbase/src/corelib/io/qfsfileengine.cpp:926: warning: Overrides a previous doc
qtbase/src/corelib/io/qfsfileengine.cpp:527: warning: (The previous doc is here)
qtbase/src/corelib/tools/qbytearray.cpp:689: warning: Cannot tie this documentation to anything

Change-Id: Ie7009f565a11a01859ccd0488ddeebe1b953305d
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-08-02 21:08:01 +00:00
Friedemann Kleint
0257ffe465 Windows QPA: Store requested geometry before QPlatformWindow::initialGeometry()
When requesting windows with a size of 0x0 for which a default size
is determined by QPlatformWindow::initialGeometry(),
QWindowsWindow::initialize() did not call handleGeometry() since
it compared against the requested geometry obtained after
calling QPlatformWindow::initialGeometry().
Store the initial geometry in the context.

Amends deb7f9a7c3.

Task-number: QTBUG-62177
Task-number: QTBUG-61977
Change-Id: I9e96f2f0b984b9009bebb192f576c92b4409d5d1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-08-02 21:07:36 +00:00
Oswald Buddenhagen
ee07b912a1 Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
	src/plugins/platforms/xcb/qxcbconnection.h
	src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
	src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp
	src/plugins/styles/mac/qmacstyle_mac.mm
	src/widgets/widgets/qdockarealayout.cpp
	src/widgets/widgets/qmainwindow.cpp
	src/widgets/widgets/qmainwindowlayout.cpp
	src/widgets/widgets/qmainwindowlayout_p.h
	tests/auto/corelib/tools/qlocale/tst_qlocale.cpp
	tests/auto/other/macnativeevents/BLACKLIST
	tests/auto/widgets/widgets/qmenu/BLACKLIST

Change-Id: Ic8e724b80a65e7b1af25511b0e674d209265e567
2017-08-02 22:52:32 +02:00
Kevin Ottens
4bfff6a98b Implement graph layers support in QShaderGenerator
Change-Id: I823f7866bc5e1f3b262f1aacf4c341dabda7305d
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2017-08-02 17:34:56 +00:00
Kevin Ottens
236284357f Add support for layers in QShaderGraphLoader format
Change-Id: I5038600e73523ac7eb37a88ddff1f942af18f18e
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2017-08-02 17:34:52 +00:00
Kevin Ottens
f3c70ab9f3 Implement graph layers support in QShaderGraph
When creating the statements, it is now possible to pass a list of
enabled layer names. Every node or edge which is not in the list of
enabled layers will be pruned from the graph prior to traversal. Note
that an empty layer list for a node or an edge means it is on all
layers.

Change-Id: I61a4df7d395b4beb42ee55ce08fef8ebe04263c9
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2017-08-02 17:34:48 +00:00
Kevin Ottens
32281653bf Add the layer concept to QShaderNode and QShaderGraph::Edge
This will be used in further commits

Change-Id: I49977f1ea482b97dc0a159f69a0d2eda3865ec44
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2017-08-02 17:34:44 +00:00
Kevin Ottens
3d5c4ce01e Add support for QShaderLanguage enums in QShaderGenerator
Change-Id: I93306d783309cda09fedae3713afde851df3e9a3
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2017-08-02 17:34:40 +00:00
Kevin Ottens
dd04551504 Extend the parameter support in QShaderGraphLoader for richer types
In particular, go through QMetaType/QMetaEnum to deal with enums.

Change-Id: I2e847ba328eb46609b86b3dfd6c4dbf532d78b7d
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2017-08-02 17:34:35 +00:00
Kevin Ottens
50775424be Extend the parameter support in QShaderNodeLoader for richer types
In particular, go through QMetaType/QMetaEnum to deal with enums.

Change-Id: Idbe16c913c1d471a4a91d219f77876e498c192d9
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2017-08-02 17:34:30 +00:00
Kevin Ottens
3786411f7f [Shader Graph Gen.] Introduce QShaderLanguage
This is a new namespace with helper enums to have richer parameters
available to QShaderNode. Will be used in further commits.

Change-Id: I9a61481c1e89ddd08327211e90eeabf0172c3b7a
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2017-08-02 17:34:27 +00:00
Oliver Wolff
a96656a8fb ANGLE: Fix build for newer MinGW versions
Availability of D3D11_QUERY_DATA_TIMESTAMP_DISJOINT depends on the used
MinGW version so that the check for MINGW is not sufficient. The newly
added configure test can be used for every toolset.

Task-number: QTBUG-57916
Change-Id: Ia9cb48f3e673841101a93cbc8ea23aff9547f639
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2017-08-02 16:38:28 +00:00
Oswald Buddenhagen
71e36a42f2 configure: clean up projects of remaining non-inline tests
remove redundant and wholly ineffective CONFIG manipulations.

Change-Id: I3836369a0eb32abfe985c7619c0f7c8037ad82e2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-08-02 16:38:06 +00:00
Oswald Buddenhagen
b0060d1056 configure: un-namespace remaining non-inline configure tests
only few tests remain, and many of these were mis-classified anyway.

Change-Id: Ic3bc96928a0c79fe77b9ec10e6508d4822f18df2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-08-02 16:38:00 +00:00
Thiago Macieira
f54f7d8470 configure: Add a feature to write tests in the .json file
We're adding a lot of unnecessary files that end up later as cargo-cult,
for at most a handful of lines. So instead move the testcases directly
into the .json file.

The following sources were not inlined, because multiple tests share
them, and the inlining infra does not support that (yet):
- avx512
- openssl
- gnu-libiconv/sun-libiconv (there is also a command line option to
  select the exact variant, which makes it hard/impossible to properly
  coalesce the library sources)

The following sources were not inlined because of "complications":
- verifyspec contains a lengthy function in the project file
- stl contains lots of code in the source file
- xlocalescanprint includes a private header from the source tree via a
  relative path, which we can't do, as the test's physical location is
  variable.
- corewlan uses objective c++, which the inline system doesn't support

reduce_relocs and reduce_exports now create libraries with main(), which
is weird enough, but doesn't hurt.

Done-with: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Change-Id: Ic3a088f9f08a4fd7ae91fffd14ce8a262021cca0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-08-02 16:37:48 +00:00
Oswald Buddenhagen
90588d57d7 configure: remove redundant parts of xcb_xkb test
testing the non-xkb xcb parts is unnecessary, as we already did that
separately.

Change-Id: I452cc746315117a0169f0e0c764fe7e0229437e9
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2017-08-02 16:37:40 +00:00
Oswald Buddenhagen
92ff8a2500 configure: dispose of which.test
just use 'which' and be done with it. the script was rather arcane, and
worked around deficiencies of cygwin (no longer relevant) and solaris
(assumed to be somewhat sane meanwhile).

Change-Id: I2e11ea3c87ac06a85604ac8d58d8fee95eae2e15
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-08-02 16:37:32 +00:00
Oswald Buddenhagen
acf75d7337 configure: standardize handling of 64 bit atomics
replace the custom QT_NO_STD_ATOMIC64 with a regular public feature, and
give libatomic an empty source rather than using a separate config test.

Change-Id: Iaf4a7f4c4874f61bf93aa58fe41843a86baf1ab7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-08-02 16:37:23 +00:00
Oswald Buddenhagen
a3b5020a1a configure: prune dead tests::journald
libraries::journald is the actually used one.

Change-Id: I2da4ae106dd1041cdb269e05def93523ed5011b2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-08-02 16:37:17 +00:00
Oswald Buddenhagen
1229558a40 configure: modernize dbus test
remove useless define and ifdef/error, and check for a more appropriate
function.

Change-Id: I1a1622cc157c49ebb6787068ade7b33e45e228ca
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-08-02 16:37:09 +00:00
Oswald Buddenhagen
799e09a947 configure: remove check for ancient libpng < 1.0.17
that's just noise nowadays.

Change-Id: Ife75ebcc67de45db76265b1a8fb3b8130ff58c0f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-08-02 16:36:51 +00:00
Oswald Buddenhagen
245bd9bf78 configure: prune checks for ancient compilers from some tests
these would be caught by the central verifyspec test, if we even got
that far.

Change-Id: I3eda80c4614b94f869d907f0a40166f4914ea692
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-08-02 16:36:45 +00:00
Oswald Buddenhagen
b56846a430 configure: remove support for obsolete platforms
- #error hack for MIPSpro compiler from unix/clock-*
- irix exclusions from unix/*iconv
- hpux defines from unix/{getifaddrs,ipv6ifname} (the obsolete
  hpuxi-g++-64 spec would add them automatically anyway)

Change-Id: Ib227e5626c0e8c8f6faebf76c312d77955f80b92
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-08-02 16:36:39 +00:00