Commit Graph

234 Commits

Author SHA1 Message Date
Jake Petroules
7fd3cc3980 Clean up OS version checks for Apple platforms
Convert QSysInfo/QOperatingSystemVersion to __builtin_available where
required or possible, or to QOperatingSystemVersion where
__builtin_available cannot be used and is not needed (such as negated
conditions, which are not supported by that construct).

Change-Id: I83c0e7e777605b99ff4d24598bfcccf22126fdda
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-09-29 03:30:13 +00:00
Thiago Macieira
a3c71b71e2 QFileSystemEngine::setFileTime/Unix: remove the fallback to futimesat
The use as in the code:
  futimesat(fd, NULL, &tv)

is not documented to work. The file descriptor should be a directory's
one, not an open file (though the Linux source code seems to handle that
case). This call was done as a fallback to futimes, so it's very
unlikely a system would have futimesat and not futimes.

Both the Linux and the FreeBSD man pages say it's deprecated anyway.

Change-Id: I8d96dea9955d4c749b99fffd14cd94068dc7668a
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-08-05 16:41:42 +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
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
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
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
Oswald Buddenhagen
479b2ab55f configure: get rid of indirect #defines in gl tests
in the gles tests, use #ifdef __APPLE__ directly instead of defining
BUILD_ON_MAC. this is consistent with the desktop gl test, less magic,
and corresponds with the later usage (which does #ifdef Q_OS_MAC).
amends f3d82a89.

in the desktop gl test, clean out the dead Q_OS_MAC define from the
project file (added in 45dc5852 concurrently to the more direct fix in
864815ef).

Change-Id: Ieebad3c7e87218b887f61485c331b93eadfcf406
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-08-02 16:36:27 +00:00
Gabriel de Dietrich
d38fe875c7 Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
    src/widgets/widgets/qmainwindowlayout.cpp

Change-Id: I306b4f5ad11bceb336c9091241b468d455fe6bb6
2017-07-13 16:36:10 -07: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
Thiago Macieira
9ca3443a37 Rename the "sys_auxv" feature to "getauxval"
Change-Id: I8d96dea9955d4c749b99fffd14cdbd1e69940d33
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-07-06 00:23:59 +00:00
Richard J. Moore
cfbe03a6e0 QSslSocket: OpenSSL 1.1 backend
This patch-set implements a new QSslSocket backend based on OpenSSL 1.1.

1. General.

The code in this patch was organized to achieve these (somewhat contradicting)
objectives:
- keep the new code free of #if-ery, as far as possible;
- make it easy to clean away dead code when we're eventually able to retire
  out-dated OpenSSL versions;
- reduce the amount of code duplication.

If changes in some file/component were insignificant (~5 one-liners per file),
we still use pp-checks like: #if QT_CONFIG(opensslv11) ... #else ... #endif -
the logic is simple and it's still easy to clean the code if we remove the legacy
back-end. Where it saved #if-ery, we also introduced 'forward-compatible'
macros implementing equivalents of 1.1 functions using older OpenSSL.

In case some class contains a lot of version-specific ifdefs (particularly where
nested #if-ery was complex) we choose to split code into: "pre11" h/cpp files,
"shared" h/cpp files (they preserve their original names, e.g qsslsocket_openssl.cpp)
and "11" h/cpp files. If in future we remove the legacy back-end, "pre11" should be
removed; "shared" and "11" parts - merged.

2. Configuration.

We introduced a new feature 'opensslv11' which complements the pre-existing
'openssl' and 'openssl-linked' features. The 'opensslv11' feature is enabled
by a simple test which either compiles successfully or ends in a compilation
error, depending on a value of the OPENSSL_VERSION_NUMBER constant. If the
feature was enabled, we also append an additional compilation flag
-DOPENSSL_API_COMPAT=0x10100000L to make sure our new code does not contain
deprecated structures, function calls, macro-invocations from OpenSSL < 1.1.

Change-Id: I2064efbe9685def5d2bb2233a66f7581954fb74a
Reviewed-by: André Klitzing <aklitzing@gmail.com>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2017-07-04 18:03:59 +00:00
Thiago Macieira
120ecc976f QRandomGenerator: use getentropy on Linux & OpenBSD
The getentropy function, first found in OpenBSD, is present in glibc
since version 2.25 and Bionic since Android 6.0 and NDK r11. It uses the
Linux 3.17 getrandom system call. Unlike glibc's getrandom() wrapper,
the glibc implementation of getentropy() function is not a POSIX thread
cancellation point, so we prefer to use that even though we have to
break the reading into 256-byte blocks.

The big advantage is that these functions work even in the absence of a
/dev/urandom device node, in addition to a few cycles shaved off by not
having to open a file descriptor and close it at exit. What's more, the
glibc implementation blocks until entropy is available on early boot, so
we don't have to worry about a failure mode. The Bionic implementation
will fall back by itself to /dev/urandom and, failing that, gathering
entropy from elsewhere in the system in a way it cannot fail either.

uClibc has a wrapper to getrandom(2) but no getentropy(3). MUSL has
neither.

Change-Id: Ia53158e207a94bf49489fffd14c8cee1b968a619
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-06-30 21:19:10 +00:00
Laszlo Agocs
078f04254e Add support for OpenGL ES 3.2 in QOpenGLExtraFunctions
Follow the usual pattern:

Add a config test and automatic include of GLES3/gl32.h if there
is a GLES 3.2 capable header+lib at build time.

Then, regardless of this being enabled, expose all new 3.2 API
functions in QOpenGLExtraFunctions and resolve them dynamically
at run time.

This way 3.2 functions will be available when deployed to a 3.2
capable system (or OpenGL 3/4.x with the functions in question
available) regardless of what was present in the sysroot at build
time.

Change-Id: Ia52551f3178591e1e56ceac8e45d89c6b13f4927
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2017-06-30 18:12:58 +00:00
Thiago Macieira
0669f71b0c QRandomGenerator: don't internally rely on QT_HAS_INCLUDE
GCC didn't support it until version 5 or 6, so add configure tests for
both <random> and <sys/auxv.h>. Normally I'd say "upgrade", but this is
too low-level and important a feature.

There's a good chance that all our supported compilers have <random>
anyway. As for <sys/auxv.h>, it's present on Glibc, Bionic and MUSL, but
I don't see it in uClibc (AT_RANDOM is a Linux-specific feature).

Change-Id: Ia3e896da908f42939148fffd14c5b2af491f7a77
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-06-20 16:37:35 +00:00
Liang Qi
ce09ef4313 Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
	src/corelib/io/qprocess_unix.cpp
	src/corelib/io/qprocess_win.cpp
	src/plugins/platforms/android/qandroidplatformintegration.h
	src/plugins/platforms/windows/qwindowscontext.cpp
	src/plugins/platforms/windows/windows.pri
	src/tools/uic/cpp/cppwriteinitialization.cpp
	src/widgets/doc/src/widgets-and-layouts/gallery.qdoc

Change-Id: I8d0834c77f350ea7540140c2c7f372814afc2d0f
2017-06-19 16:12:34 +02:00
Oswald Buddenhagen
9d90bbd7b1 rework detection and use of clock_gettime()/librt
recent versions of glibc include clock_gettime() inside libc itself.

Task-number: QTBUG-41009
Change-Id: I7401773be99682a356bf06a69571d11c4b15978b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-06-17 06:48:04 +00:00
James McDonnell
d0706ae3a3 Enable stack-protector-strong for QNX 7.0.0
This was originally enabled in the mkspecs for 64-bit QNX 7.0.0
but that broke when the qtConfig change was made.  It looks like
qtConfig shouldn't be used in the platform mkspecs.  I suspect
the stack-protector changes were left out of the 32-bit mkspecs
so that 6.6.0 builds wouldn't be affected.

Ignore the stack-protector/stack-protector-all possibility since
it isn't possible to access it without a command line option.
Specifying both options doesn't even make sense since
stack-protector-all encompasses stack-protector.

For now, leave out command line control of this feature.

Task-number: QTBUG-59644
Change-Id: I99323216be5b592dd2c3bef6d22da195764a6e65
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-06-13 14:01:24 +00:00
Nikita Krupenko
7ef398e8fa QFileDevice/QFileInfo: Add fileTime() and setFileTime()
[ChangeLog][QtCore][QFileDevice] Added fileTime() and setFileTime().

[ChangeLog][QtCore][QFileInfo] Added fileTime().

Task-number: QTBUG-984
Change-Id: I84dfb05b9454a54e26b57b78edee5773dc4c5c3c
Initial-patch-by: Raphael Gozzo <raphael.rg91@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-04-27 18:44:15 +00:00
Giuseppe D'Angelo
e8cf0bf5f8 PCRE2: fix the configure test
A typo caused the test to never detect the system wide PCRE.

Task-number: QTBUG-59226
Change-Id: I42ada99aac240455d11b53d2ab59d712d8f811ff
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-03-28 07:09:01 +00:00
Kai Koehne
585bb526c4 config.tests: Replace LGPL21 with LGPL license header
Also use canonical contact url.

Change-Id: Ia1f814ce822d247f3af14c1ea46e07cfad0fda09
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
2017-03-03 07:26:50 +00:00
Liang Qi
dd756011da Merge remote-tracking branch 'origin/5.8' into 5.9
Conflicts:
	configure.json
	mkspecs/win32-icc/qmake.conf

Change-Id: Ibf40546b024d644c7d9ed490bee15b82597f4d3f
2017-02-08 15:49:18 +01:00
Allan Sandfeld Jensen
099f286870 Fix MIPS DSP configuration
The patch fixes a number of bugs in code, and removes dead logic
clarifying that MIPS DSP, like ARM NEON, has no runtime detecton.

Change-Id: If2f4eea68da5b2eaa80b8e9c8258206d8c1b7173
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-01-27 15:08:57 +00:00
Giuseppe D'Angelo
9ca635482d PCRE2: port QRegularExpression to PCRE2
PCRE1 is going towards EOL. PCRE2 is the way forward in terms
of new features, performance, and security improvements. The
APIs that QRegularExpression uses are similar so the required
modifications aren't extensive.

The biggest difference comes to JIT-compiling of the pattern.

In PCRE1, JIT-compiling did not modify the processed PCRE pattern,
but returned a new chunk of data.

This allowed multiple threads to keep matching using the same
processed data and NULL for the JIT data, until a thread
JIT-compiled and atomically set the shared JIT data to the results
of the compilation.

In PCRE2, JIT-compiling _modifies_ the processed PCRE pattern in a
way that it's thread unsafe [1]; the results of JIT-compilation
are stored somewhere inside the processed pattern.
This means the above approach cannot work -- a thread may be
matching while another one JIT-compiles, causing a data race.

While waiting for better workarounds from upstream, employ a
read/write mutex to protect the matching from JIT-compilation.

[1] https://lists.exim.org/lurker/message/20160104.105831.3cb25b39.en.html

[ChangeLog][General] QRegularExpression now requires the PCRE2
library, at least version 10.20. Support for the PCRE1 library
has been dropped. A copy of PCRE2 is shipped with Qt and will
automatically be used on those platforms which lack it.

Change-Id: I9fe11104230a096796df2d0bdcea861acf769f57
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-12-12 15:22:01 +00:00
Liang Qi
3a0764d625 Merge "Merge remote-tracking branch 'origin/5.8' into dev" into refs/staging/dev 2016-11-18 08:01:52 +00:00
Andy Nichols
dafd0955c6 Enable support for OpenVG
This commit re-enables support for OpenVG in Qt, but not in the
same way as in Qt 4.8.  The first part is about adding a test
and using the new configure system to enable OpenVG.

There is still support code in Qt for setting up EGL to provide a
surface and context for rendering with the OpenVG API, this commit
enables a path to do so.

Normally to get access to an EGLContext from a QWindow you do so via
QOpenGLContext, but in setups without OpenGL but with EGL and OpenVG
this doesn't make sense (there would be no QOpenGLContext). So the
intended way is to use a QWindow to get an EGLSurface, then create
an EGLContext directly (without going through QPA).

Change-Id: I0f75aadbaa3cd006deb7e6fd12cfbb574870fba4
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2016-11-17 15:00:00 +00:00
Liang Qi
e5ac4afbf9 Merge remote-tracking branch 'origin/5.8' into dev
Conflicts:
	mkspecs/features/mac/default_post.prf
	mkspecs/features/uikit/default_post.prf

Change-Id: I2a6f783451f2ac9eb4c1a050f605435d2dacf218
2016-11-17 14:43:26 +01:00
Liang Qi
90c425642d Merge remote-tracking branch 'origin/5.7' into 5.8
Conflicts:
	mkspecs/common/linux-android.conf
	src/gui/opengl/qopengl.h
	src/network/socket/qnativesocketengine_winrt.cpp
	src/network/socket/qnativesocketengine_winrt_p.h
	src/plugins/platforms/cocoa/qcocoawindow.mm
	src/plugins/platforms/eglfs/api/qeglfsintegration.cpp
	src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp
	sync.profile

Change-Id: If70aaf2c49df91157b864cf0d7d9513546c9bec4
2016-11-16 12:35:36 +01:00
Lars Knoll
7d4da559af Remove all Multimedia related configuration options from qtbase
They live in qtmultimedia now.

Change-Id: I1a2ee8be3efb7c4ee9a29d2a8e3fc1f3eea704fc
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2016-11-15 14:00:00 +00:00
Liang Qi
9808b53fde Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	configure
	src/plugins/platforms/eglfs/qeglfsintegration.cpp
	src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp

Change-Id: Id2da7c775439adb62646d5b741ee7c638042b34b
2016-11-15 09:58:16 +01:00
Laszlo Agocs
e8364f9a4b Enable GL prototypes with recent Khronos headers
Recent Khronos headers decided to break the world by guarding all
function prototypes with GL_GLEXT_PROTOTYPES which has traditionally
been used for extension headers only.

Until this gets corrected - see
https://lists.freedesktop.org/archives/mesa-dev/2016-September/128654.html
- add the define to the config tests and qopengl.h.

While 5.7 already has some of the qopengl.h fixes due to an upgraded
ANGLE shipping with newer headers, this is a cross-platform issue that
will surface everywhere eventually. Therefore we target the full set
of fixes to 5.6.

This time we also make sure the forced define of GL_GLEXT_PROTOTYPES
is removed before including the ext header, thus apps get the ext
protos only if they actually requested them.

Task-number: QTBUG-56764
Change-Id: Ib2c6d2e7b71b8fb8683424f43e6289e64e4ee46c
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2016-11-10 12:16:20 +00:00
Liang Qi
dfc177e3a9 Merge remote-tracking branch 'origin/5.8' into dev
Conflicts:
	qmake/library/qmakeevaluator.cpp
	(cherry picked from commit 1af6dc2c8fb4d91400fddc5050166f972ae57c9a in qttools)
	src/corelib/kernel/qcore_mac_objc.mm
	src/gui/painting/qcolor.h
	src/plugins/platforms/cocoa/qcocoawindow.mm

Change-Id: I5b3ec468a5a9a73911b528d3d24ff8e19f339f31
2016-10-13 09:49:38 +02:00
Laszlo Agocs
b4085e56b9 Migrate libinput support away from QT_LIBRARY_VERSION
There may not be a version when libinput is not picked up via
pkg-config. Add a config test instead.

Task-number: QTBUG-56017
Change-Id: I421af4cef1b896413a4ebda561809a8b2a3386b3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-10-10 16:59:26 +00:00
Oleksandr Tymoshenko
e6d0d202f3 Add evdev support for FreeBSD
FreeBSD 12 has evdev implementation dropin-compatible with Linux's
/dev/input. Add #ifdef wrappers around platform-specific headers.

Change-Id: Ia50c3f2d2e9f0f3689a92e327305d5e7547e9407
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2016-10-06 15:50:44 +00:00
Oswald Buddenhagen
57987ad571 fix freetype/fontconfig configure system
convert the ugly config.tests/[...]/freetype.pri file into a custom
callback in configure.pri, and reinstate pkg-config use for freetype.
subsequently, use QMAKE_USE for the actual library references.

this fixes in particular cross-builds, as the new configure was not
passing the necessary information to the test any more, so the old .pri
file misbehaved.

Task-number: QTBUG-54911
Change-Id: I5fc9c254334a2675f7db4d54df4c77637e8e2487
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2016-10-04 20:20:39 +00:00
Liang Qi
7555a92581 Merge remote-tracking branch 'origin/5.7' into 5.8
5971b88e is not needed in new configure.

This merge also reverts "fix QMAKE_DEFAULT_*DIRS resolution with
apple SDK", 2c9d15d7, because it breaks iOS build with new
configure system.

Conflicts:
	mkspecs/features/default_pre.prf
	mkspecs/features/mac/toolchain.prf
	mkspecs/features/toolchain.prf
	src/dbus/qdbusconnection.cpp
	src/plugins/sqldrivers/mysql/qsql_mysql.cpp
	src/sql/drivers/mysql/qsql_mysql.cpp
	src/widgets/widgets/qmenubar.cpp
	src/widgets/widgets/qmenubar_p.h
	tools/configure/configureapp.cpp
	tools/configure/environment.cpp
	tools/configure/environment.h

Change-Id: I995533dd334211ebd25912db05b639d6f908aaec
2016-09-21 11:57:52 +02:00
Liang Qi
d148019f16 Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp

Change-Id: I0af32ee55936d523cbd259b6fe82eb9c409f9074
2016-09-16 23:16:25 +02:00
Marc Mutz
47d064e905 libjpeg config test: init variable
Yes, yes, this is just a configure test, but why do something stupid
in the code and then have to shut up Coverity manually?

Fix by making it a global, which means it will be zero-initialized
(I didn't want to do the obvious = 0, as that could protentially
create a "0 used as nullptr" warning at some point in the future.

Coverity-Id: 59485
Change-Id: I49ecd28be983a0e42b420d20da0db34a872c6f44
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-09-16 04:12:03 +00:00
Thiago Macieira
1f7f73b86a compile.test: append any unknown arguments to the qmake command-line
This allows setting of variables, like FOO=bar.

Yes, it's intentional that there are no quotes.

Change-Id: Ib306f8f647014b399b87ffff13f1d9e6a10fa2f8
(cherry picked from commit e79200bf7f)
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Mike Krus <mike.krus@kdab.com>
2016-08-25 12:09:08 +00:00
Oswald Buddenhagen
c0cc505209 rewrite library handling in configure
so far, each library was distributed over a test and (optionally) a
'library' output of a feature. this was conceptually messy and limiting.
so instead, turn libraries into a category of their own.

libraries now support multiple properly separated sources, which makes
overriding them a lot saner. sources can be conditional to accommodate
platform differences.

as an immediate consequence, move (almost) all library references from
the config test projects to the json file.
a few tests were excluded, because they are doing somewhat magic things
that should not be handled in this bulk change:
- freetype: .pri file shared with actual source code
- clock-gettime: -lrt is conditional, and there is a .pri file which is
  shared with actual source code
- ipc_posix: -lrt & -lpthread conditional
- iconv: -liconv conditional

the multi-source mechanism is used to make a variety of tests work on
windows, where the library name differs from unix (and sometimes between
build configurations). some tests still needed minor adjustments to
actually work.

on the way, fix up disagreements between manually specified libraries
and pkg-config lines (affecting several xcb-related tests).

Change-Id: Ic8c58556fa0cf8f981d386b13ea34b4431b127c5
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-18 17:09:52 +00:00
Oswald Buddenhagen
4a1bafcc4e get rid of test type 'shell'
it's bound to the bourne shell, which is not readily available on
windows hosts.

on the way, the pch, fvisibility, and bsymbolic_functions tests were
rewritten as regular compile tests. they now just verify that qmake's
built-in support for the tested features actually works.

Change-Id: Ibac246f21b5ececa40da3f576dc789982eaf9fdf
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-08-12 22:04:50 +00:00
Oswald Buddenhagen
d520c825f1 delete orphaned config tests
mitshm, xcursor, xfixes, xrandr, xshape, and xsync were dead for a long
time (see also 4cb795cbdb).
glxfbconfig was also dead (see also d54b77d55).
x11/notype and x11/xkb became dead in 4535913c4f.
javascriptcore-jit became dead in 24f1025663.
stdint was another webkit vestige (see also 1b716724f7).

Change-Id: I04f408cb917c767951645c6445f15f24378fa43a
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-10 15:43:06 +00:00
Alex Trotsenko
733c4de36e Fix some syntax issues in SCTP implementation
Change-Id: I718fd060e313d544a5470fa20183db04ef89b1ca
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2016-08-03 06:21:47 +00:00
Edward Welbourne
f6fc34294f Merge remote-tracking branch 'origin/5.7' into dev
Conflicts:
	configure
5.7 now supports clang on android; but dev re-worked configure

	src/gui/kernel/qevent.h
One side renamed a parameter of a constructor; the other added an
alternate constructor on the next line.  Applied the rename to both
for consistency.

	tests/auto/tools/moc/tst_moc.cpp
Each side added a new test at the end.

	.qmake.conf
Ignored 5.7's change to MODULE_VERSION.

	configure.json
No conflict noticed by git; but changes in 5.7 were needed for the
re-worked configure to accommodate 5.7's stricter handling of C++11.

Change-Id: I9cda53836a32d7bf83828212c7ea00b1de3e09d2
2016-08-01 18:20:00 +02:00
Alex Trotsenko
75a9bd2a4f Introduce SCTP sockets support
Add protocol-specific code and the QSctpServer, QSctpSocket classes.

Change-Id: Ie9a1d87bd1fda866a2405043d1c15c12ded5a96e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-07-27 06:37:24 +00:00
Edward Welbourne
6c5de416c9 Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	src/corelib/io/qtemporarydir.cpp
One side encapsulated a repeated piece of #if-ery in a local define;
the other added to the #if-ery.  Made its addition to the other's.

	src/corelib/kernel/qeventdispatcher_unix_p.h
One side moved some members into a struct; this collided with a #undef
check that neither side now has.  Discarded the #undef part.

	src/gui/opengl/qopengltexturehelper_p.h
5.7 deleted a bunch of methods; not clear why merge got confused.

	src/tools/moc/moc.cpp
One added a name to the copyright header; another changed its URL.

Change-Id: I9e9032b819f030d67f1915445acf2793e98713fa
2016-07-26 10:43:29 +02:00
Thiago Macieira
1fcea11756 Fix enabling of precompiled headers on macOS
On macOS, the test script is passed the full path to the compiler, like
/usr/local/bin/icpc. That doesn't match "icpc".

Change-Id: I149e0540c00745fe8119fffd1463c87b8f6a89b2
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-07-25 20:23:13 +00:00