Commit Graph

29937 Commits

Author SHA1 Message Date
Oswald Buddenhagen
ec774500fb cleanup related to transitive dependencies
public uses of external libraries are automatically transitive now, so
we can remove some parts which were only meant to pull in transitive
dependencies manually.

this is particularly good for includes() of parts of QtPlatformSupport,
which actually redundantly pulled in the library's sources.

this required making the freetype and fontconfig dependencies public,
which is ok, as in the end, they are used only by platform plugins, so
there is no point in making them private, as plugins are not linked
against anyway (except statically, but there public vs. private doesn't
apply anyway).

Change-Id: Ia2a32f50dc0f8472285675a0903e6ecd142a03b2
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-10-15 18:45:26 +00:00
Oswald Buddenhagen
cd62d2810b make users of qt modules inherit the modules' public QMAKE_USE
when a module makes an external dependency part of its api, the users of
that module need to know the include paths (and possibly defines) of
that dependency, and also need to link to it explicitly if they want to
access symbols from it directly.
this patch implements this via the usual qt module pri mechanism.

limitation: the external library definitions are in the private pris,
so technically a public module is not allowed to make its external
dependencies public. we don't have (and don't anticipate) such a case.

Change-Id: I2dbbdcfcfc1b200acae151a969976cd668e24f89
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-10-15 18:45:19 +00:00
Oswald Buddenhagen
9a088e7869 use helper libs via QMAKE_USE
for that, qt_help_lib.prf gains the ability to write "external module
pri" files that contain suitable information for QMAKE_USE.

these files have a bunch of limitations:
- they are not installed, because a) they are not relocatable and b) the
  helper libs' headers are not installed, either
- it won't work with qmake -r, which is ok, as qt5 does not build with
  qmake -r anyway
- deps are not transitive, neither at build nor at use time

the freetype, harfbuzz-ng, pcre, and png helper libs have been adjusted
accordingly, and their uses replaced with QMAKE_USE instances. this also
allowed inlining the now trivial {harfbuzz,pcrc,png}_dependency.pri
files. freetype_dependency.pri remains due to its funkiness.

Change-Id: I16890eecb122e34ec49f3d3e68380d1ea71a198a
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-10-15 18:45:10 +00:00
Oswald Buddenhagen
81755e9623 get rid of Q_FONTCONFIGDATABASE define
use fontconfig feature directly instead.
easier to understand data flow, and less noisy compiler command lines.

Change-Id: If80af4b08933049d553df685b41422d15e1e4f5c
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-10-15 18:45:04 +00:00
Erik Verbruggen
936e132122 Add optimize-for-size case to ucstrncmp
The SSE code had a case where tail-loop unrolling was disabled when
optimizing for size. What would be even shorter, is to just do a
straight-forward loop over the arrays and compare them. For anything
else, we can just go for speed.

Change-Id: Ifb31650e10e41409972a38014067dbd2927674c9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-10-14 10:17:51 +00:00
Oswald Buddenhagen
a897343601 fix shadow builds with pre-synced headers, part 3
with the new configure system, all modules which have a configure.json
also produce a private config header. the forwarding module pri needs to
reflect that.

Change-Id: If79e10a2643d55ad9aa9815f20297d36d9b9feec
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2016-10-14 09:00:36 +00:00
Oswald Buddenhagen
5c57105565 don't include injected headers into linker version script
it makes no sense to version them, as they contain only #defines anyway.

it also removes the need to special-case their location in shadow builds
with pre-synced headers, which we actually failed to do anyway.

Task-number: QTBUG-56286
Change-Id: I4ea717f7be56494cfea0572389bea173d7470b6e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-10-14 09:00:29 +00:00
Oswald Buddenhagen
9a1163c7ae exclude injected headers from headersclean check
it makes no sense to check them, as they contain only #defines anyway.

Change-Id: I8b36139ee19471de0654c5eb3af262d0389a72f7
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-10-14 09:00:23 +00:00
Oswald Buddenhagen
aec9cebf8c make setting OPENSSL_LIBS_{DEBUG,RELEASE} work with dynamic builds
while it's probably not really necessary (which is why it wasn't
implemented before), just ignoring the options is somewhat inconsistent
and a deviation from historical behavior.

Task-number: QTBUG-55530
Change-Id: I9441bf7be50ab5c997bb745e2525048ca23e4cd5
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2016-10-14 08:56:46 +00:00
Kai Koehne
f71aa48138 Fix resolution of OPENSSL_LIBS in ssl.pri
Task-number: QTBUG-55530
Change-Id: Icc5ae9849e41479732eb44d01d9ea37aa3da16f8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2016-10-14 08:56:32 +00:00
Laszlo Agocs
2b9fe7d42d eglfs: clean up includes in the shared kms code
Avoid unnecessary EGL and eglfs-specific includes in order to
have a clearer view of the dependencies.

Change-Id: Ifbd7dc4bd64024cc1ee48cd9f2607d1b5cdda1a2
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2016-10-14 08:45:03 +00:00
Eskil Abrahamsen Blomfeldt
9ebfacb688 Android: Re-enable asset extraction for styling
When the new configure system was introduced, it accidentally
disabled automatic extraction of style assets on Android.
This patch puts it back in.

Note that the style extraction is not specific to Qt Widgets,
but rather Qt Gui, like other QPA options.

Task-number: QTBUG-56328
Change-Id: Ica33c3562c6dd6483050075f5c8ed5d28cd621a4
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2016-10-14 08:21:12 +00:00
Anton Kudryavtsev
fca0aa676e QPathClipper: remove homebrew 'qRemoveDuplicates' algorithm
Use std::unique

Change-Id: Iae2e80d16b5a443ee5023224f48c325197c23029
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2016-10-14 08:21:02 +00:00
Tor Arne Vestbø
6a35e77ef3 Change confusing Q_DEAD_CODE_FROM_QT4_FOO define
Commit c5db8fc74 changed all instances of Q_WS_FOO to have the prefix
Q_DEAD_CODE_FROM_QT4 instead, to make it clearer when reading the code
that the code in question was a left-over from Qt4, when we used
Q_WS_ defines instead of Q_OS_ defines.

This worked well for cases of #ifdef Q_DEAD_CODE_FROM_QT4, but less so
for cases of #ifndef Q_DEAD_CODE_FROM_QT4, where the code was actually
unconditionally included.

To make this even clearer, the defines have been replaced by checks for
1 or 0, with a comment describing how the code used to look in Qt4. The
use of constants in the check also makes it easier for editors to parse
the condition and show visually that the code is defined out.

Change-Id: I152070d87334df7259b417cd5e17d7b7950379b7
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-10-14 08:19:29 +00:00
Oliver Wolff
dcf7da7c93 winrt: Do not lose initial data for TCP connections
When a client connects and sends data immediately it was possible that
initial data was lost as the state was set too late. If the callback was
called before the state was set the socket engine just discarded the
data. So the state has to be set before the callback is registered.

The new implementation needs a list of pending read operations. It can
happen that the "readyRead" callback is triggered directly while
"put_Completed" is called. The callback reassigns readOp which causes a
"function not implemented" exception when it jumps back to the
"put_Completed" call in "initialize"

Task-number: QTBUG-55889
Change-Id: I5f52e3377b6176f1f90f227ac0bf52b60ee2d95a
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2016-10-14 05:53:06 +00:00
Tor Arne Vestbø
d8c72f4154 iOS: Take advantage of new synchronous API for QPA event delivery
By using the SynchronousDelivery specialization instead of flushing all
window system events, we remove the risk of flushing an event that was
added without our knowledge.

For example, QGuiApplicationPrivate::processMouseEvent() used to prepend
a mouse move event to the QPA queue, which is why we had a check for
QWidgetWindow when flushing geometry changes. processMouseEvent no longer
sends the move event via the QPA queue, so that's no longer an issue,
but if it were to be reintroduced, we wouldn't need to check for
QWidgetWindow, as we're not flushing all events anymore.

Change-Id: Ib346ea9501cd88ddda6c2137981d3eb0922192a0
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2016-10-14 01:57:43 +00:00
Laszlo Agocs
815341dbec eglfs: Fix deformed mouse cursor image
In 5.8 cr got changed to QRect from QRectF. This is incorrect without
adjusting the calculations based on it since QRect and QRectF's right()
and bottom() differs by 1.

Switch back to QRectF.

Task-number: QTBUG-56478
Change-Id: I5bde4ee59ca9bbf62f65493c66f42707032bfc80
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2016-10-13 19:07:23 +00:00
Tor Arne Vestbø
542a76c490 macOS: Remove workaround for including AppKit.h with slots defined
The workaround doesn't seem to be needed anymore, and wasn't applied
uniformly anyways. If it turns out AppKit still needs this workaround
we should add CONFIG += no_keywords to cocoa.pro, instead of trying to
wrap every single include of AppKit in a undef slots dance.

Change-Id: Ia1b15137c03abcc92f0dd246796622772e99ca68
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2016-10-13 16:52:02 +00:00
Tor Arne Vestbø
c79710a181 macOS: Remove QNSView member m_window in favor of going via m_platformWindow
The two should never be out of sync, but by having them as separate members
we risk that they do. By going though m_platformWindow for QWindow access,
it's also more clear in the callsites that we're dealing with a QWindow
instead of a NSWindow, as referenced though self.window. Finally, removing
the member slims down memory use of a QNSView, however small.

Change-Id: Iec96cebf813fae82d3af339331781419f234c28b
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2016-10-13 16:52:01 +00:00
Tor Arne Vestbø
2f505b79a4 macOS: Use QPointer to track QNSView -> QCocoaWindow
Change-Id: I4de581dda03d25e781112eff34de28dfd1797a7f
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2016-10-13 15:56:12 +00:00
BogDan Vatra
1d6eb70dce Android: Allow the user to hook into the onCreate methods
onCreate methods are very important when you want to add some java code
before the Qt application is loaded. Because onCreate must call
"super.onCreate(..)" it is impossible for the user to do anything before
Qt is loaded. By using the onCreateHooks to load Qt, the user can
decided, by overriding the onCreateHook method, when or if Qt is loaded.

Change-Id: I15a3dd60b8ae7d314c53ace99faedfbd47d25502
Reviewed-by: Christian Stromme <christian.stromme@qt.io>
2016-10-12 11:47:32 +00:00
Oswald Buddenhagen
14a5086bd3 de-duplicate freetype configure entry
note that the feature is kept private (unlike in the introduced
duplicate), as there shouldn't be a need to query this internal variable
(that's actually debatable, but this discussion applies to several other
features as well).

Change-Id: I05c52a8becd5151f7e9e378f0c49499223916053
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-10-12 09:29:04 +00:00
Oswald Buddenhagen
65d5bfc63d fix referencing libs fields dispatched to the selected source
the field was "over-expanded", which led to always querying the
non-existing source with an empty name. this broke the handcrafted
openssl library export which uses the feature.

amends c0cc50520.

Task-number: QTBUG-55530
Change-Id: Id019fcb3e7adcecaf47d7a65820179da1617c0f7
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2016-10-12 09:28:47 +00:00
Harald Meyer
05fd7f8d90 winrt: tcpsocket: Update bytesAvailable when new data is read
Instead of calculating the bytesAvailable in place, the value should
be stored and only retrieved in the function itself. Otherwise it is
possible that bytesAvailable is called between the data having been
read and readyRead is emitted. In this case it's possible, that the
client reads all the data before the signal is emitted. Triggering
readyRead without any data being available will stop the socket.

Task-number: QTBUG-44357
Change-Id: I81d6ab094c5fdd71f30b9ceba9d790153cc92439
Reviewed-by: Harald Meyer <dev@meh.at>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2016-10-12 09:03:02 +00:00
Oliver Wolff
19cbe171c2 winrt: Added 2013 scheme to Windows Phone 8.1 AppxManifest template
This scheme is needed to define Bluetooth (LE) capabilities on Windows
Phone 8.1. Setting these capabilities is a bit more involved than what
we currently support from qmake (see
https://msdn.microsoft.com/library/windows/apps/dn263090.aspx) but this
way we at least prepare the template for these steps.

On Windows 10 the bluetooth capabilities are set automatically similar
to the way it happens for other modules.

Change-Id: Ib3aa88802c3b421c9c3d02ec4db647cde2191f16
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2016-10-12 09:03:01 +00:00
Oliver Wolff
fc35f94964 winrt: Rework handling of udp datagrams
We may only emit the readReady signal once for every event loop
iteration. The previous implementation lead to the situation that the
socket engine stopped reading socket data when bursts of data was
received. In this case several readReady signals were fired. The socket
engine obtained the pending datagrams (not only the first one) and for
the following readReady signal no datagram was present. In this case the
socket engine stops reading and the engine stalls.

The new approach emits the readyRead signal at the most once every event
loop iteration. The list of new pending datagrams is queued to be added
to the "real" pending datagram list at the same time as the readyRead
signal. Thereby we avoid the situation that a client can read all the
datagrams before readyRead is emitted.

One more advantage of having the worker handle the pending datagrams
is that we no longer have to access the socket engine's members inside
the callback. Thus we avoid the situation, where a late callback can
make the application crash when the socket engine has already been
deleted.

Task-number: QTBUG-53472
Task-number: QTBUG-53471
Task-number: QTBUG-55895
Change-Id: Ia6d21cb635a40e7bd9e0213bb3a5c54ebc1220eb
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2016-10-12 09:02:59 +00:00
Lars Knoll
93b78e7c61 Fix build with various features disabled
Change-Id: I95cb3cf3434306344af3f4c7556f45dbfa0b08d6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2016-10-11 14:20:34 +00:00
Lars Knoll
369857d294 Add configure feature for QUrl::topLevelDomain
Change-Id: I237af8c60a9572c707e7004c9a284dd6cd3306ce
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2016-10-11 14:20:27 +00:00
Lars Knoll
5574a814ff Add configure feature for QCommandLineParser
Change-Id: I78c1159d29e12ad03b9a3c076a40ee533958af8a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2016-10-11 14:20:24 +00:00
Lars Knoll
93178d26f8 Add configure feature for time zone support
Change-Id: I6ea02dab33e67e7f312a62d94d82eaf1fbe9d9bc
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2016-10-11 14:20:19 +00:00
Liang Qi
e166d7d135 Merge "Merge remote-tracking branch 'origin/5.7' into 5.8" into refs/staging/5.8 2016-10-11 14:14:31 +00:00
Laszlo Agocs
182f4877bf eglfs: Add Virtual and DSI connector types for DRM
For example, VMWare's vmgfx exposes a Virtual connector. Recognize this
properly instead of falling back to UNKNOWN.

Change-Id: Iee4f980ca0dfbbf3433fea1515fab27392250093
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2016-10-11 11:16:47 +00:00
Maurice Kalinowski
c01d989a0c winrt: Enable usage of static manifest files
Previously, manifest files always got processed to perform, e.g., variable
expansion.
This change introduces the 'verbatim' flag for WINRT_MANIFEST.CONFIG to
disable those steps and perform a simple copy of the source manifest.

Task-number: QTBUG-43468
Change-Id: Ie7d4d27376efb3bcf5bc38163496f0a1f1319742
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2016-10-11 11:14:57 +00:00
Friedemann Kleint
dd7bf4b4c1 Direct2D platform plugin: Fix developer build with MSVC2015
Fix error:
qwindowsdirect2dbitmap.cpp(84): error C2220: warning treated as error - no 'object' file generated
qwindowsdirect2dbitmap.cpp(84): warning C4838: conversion from 'int' to 'UINT32' requires a narrowing conversion

Change-Id: I191f3300cd22715001eebc113b672ceac49c825d
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2016-10-11 11:13:39 +00:00
Allan Sandfeld Jensen
5d691922d8 Fix crash in QPainter benchmark test
Adds missing image-formats so it doesn't segfault.

Also changes the exclusion of rare formats to lists of included ones

Change-Id: I1d00562cf8e96baa03121a0b996764224911e06a
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2016-10-11 07:38:43 +00:00
Allan Sandfeld Jensen
a6dc284869 Avoid auto-vectorization of epilogues of manual vectorization
Defines a structure that tells the compiler in no uncertain terms the
maximum number of times a loop can be run.

The reduces the size of qdrawhelper_avx2.o from 22kbytes to 11kbytes.

Change-Id: Ie3d6281b04b4be3332497c15f3dfe9f185e20507
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-10-11 07:38:29 +00:00
Marc Mutz
17ac3b2c14 QColor: unbreak mingw build
The usual: inline functions not declared inline, but defined as such
give mingw errors:

  qcolor.h:280:8: error: 'QColor::QColor(QLatin1String)' redeclared without dllimport attribute after being referenced with dll linkage [-Werror]

Fix by declaring the functions inline, not only at the definition.

Task-number: QTBUG-56459
Change-Id: I3f05e5e3597f6aa0ed318c7e7a11afdefc4c1d2f
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2016-10-11 06:20:49 +00:00
Oswald Buddenhagen
5c652cb6aa unbreak direct2d test
amends c0cc5052.

Change-Id: Icdf157d0711d9de85b108ab2ff1da0e1fc2e4a9d
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-10-11 06:09:44 +00:00
Lars Knoll
dee8b4d6b1 Save 100k by not using bloated sha3 code
Probably makes sha3 calculations somewhat slower.

Change-Id: Ie082c163b91d4e2282ad68b810e56b2437a1eb8a
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-10-11 06:05:13 +00:00
Lars Knoll
8d330f55ba Fix build with statemachine feature disabled
The sources of the state machine are excluded completely at the build
system level instead of littering them with #ifs.

All remaining usages of QT_NO_STATEMACHINE are converted to
QT_CONFIG(statemachine) or a QT_REQUIRE_CONFIG(statemachine).

Also make the qeventtransition feature dependent on statemachine.

Change-Id: Ib05c7ca263a02042523fff8f794fa87342df1069
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-10-11 06:05:09 +00:00
Lars Knoll
267dd9133d Clean up building of bootstrap lib and tools
Add a qconfig-bootstrap.h, which contains all the defines required
to build the bootstrapped tools. This will be required anyway when
moving more code over to use QT_CONFIG(foo) instead of QT_NO_FOO.

Change-Id: I783d0aa0100b9190fe2d422bee4a95b05720aebe
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-10-11 06:04:54 +00:00
Liang Qi
905329200f Merge remote-tracking branch 'origin/5.7' into 5.8
Conflicts:
	src/gui/image/qpixmap.cpp
	src/widgets/kernel/qformlayout.cpp

Change-Id: I8a8391a202adf7f18464a22ddf0a6c4974eab692
2016-10-11 07:40:32 +02:00
Jørn Bersvendsen
91cde06296 Extracted cleanup from QCoreApplication::exec() into separate function
Not all Qt integration points can call QCoreApplication::exec(), in
particular, ActiveQt. When an ActiveQt server is loaded, it tries to
mimic the behavior of calling QCoreApplication::exec() by setting
QCoreApplicationPrivate::in_exec = true. However, when unloading the
DLL it is necessary to call the same clean-up (e.g. deferred delete)
that QCoreApplication::exec() does. Extracting the cleanup in a separate
function means implementation does not have to be duplicated.

Task-number: QTBUG-56172
Change-Id: I061f1c06f38881032ad7044416c12c91e536478a
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-10-10 17:44:56 +00:00
Marc Mutz
7eddca359d Q_FALLTHROUGH: use GCC extensions in non-C++17-code
GCC defines the [[gnu::fallthrough]] attribute for C++11 and C++14
code, as well as __attribute__((fallthrough)) for C++98 and C code.

Use them.

Change-Id: I66aa178c2a96e2ff9ac3f6f02821c978b4ec3696
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2016-10-10 17:17:54 +00:00
Laszlo Agocs
0a71cc111a xcb: Drop libXi version check
...because we cannot support it in a robust way. Querying the version
via pkg-config only works when xi2 is picked up via pkg-config. Also,
having a version at build time does not mean we'll have the same at
runtime.

Modern distros (e.g. Ubuntu 15.04 and newer) will have libXi 1.7.4 or
newer.

Task-number: QTBUG-56017
Change-Id: Ia4a3b0dc47f2b92bcc953f462c95602a8ea2efd6
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-10-10 16:59:32 +00: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
Oswald Buddenhagen
573fbd84a4 fix build of examples subdir with -no-gui
the opengl feature is defined in the gui module.

Change-Id: Ibf63395729540092ca82ee4ffc4e2ff4971c2a29
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-10-10 16:59:19 +00:00
Thiago Macieira
310bf3f57c Make sure flags from library detections go to the right places
Split them and add -I flags to INCLUDEPATH and -D flags to
DEFINES. Anything else gets reported as a problem and dropped.

This has the benefit that qmake will automatically use -isystem for
those paths if they lie in a system directory. As a consequence of that,
we won't get any warnings in headers located there. There are multiple
cases of glib, gtk, etc. headers producing warnings (such as enums
ending in comma). This does not fix warnings produced by use of macros
declared in system headers, though...

Done-with: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Change-Id: I4b844cb518dbae5ea499811221f9015af985110a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-10-10 16:59:10 +00:00
Tor Arne Vestbø
33d748bb88 Allow granular synchronous and asynchronous delivery of QPA events
The setSynchronousWindowSystemEvents() API of QWindowSystemInterface is
supposed to be set globally by the platform plugin, not switched on and
off to trigger async/sync deliver of events for a specific event.

We introduce processWindowSystemEvent() in QWindowSystemInterfacePrivate
to match postWindowSystemEvent(), where the former is synchronous and
the latter is asynchronous.

This is then coupled with a templated version of handleWindowSystemEvent()
that then calls out to one of the two depending on the specialization
that's used. The default specialization will decide based on the state
set by setSynchronousWindowSystemEvents(), as before.

This allows templated versions of handleMouseEvent, handleKeyEvent, etc
to be added without maintaining two code paths, one for synchronous
and one for asynchronous delivery, which in the end allows us to
get away from using setSynchronousWindowSystemEvents() as a temporary
switch to synchronous mode.

The templates are defined in the QWindowSystemInterface source file,
with explicit instantiations of the three supported modes of delivery,
as having the definition in the header file would both require inlining,
as well as qwindowsysteminterface.h having access to the private parts
of QWindowSystemInterfacePrivate for the template function bodies.

Task-number: QTBUG-56274
Change-Id: I54c34da1ad90ff243f11905529874695f556cfcd
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-10-10 16:06:45 +00:00
Tor Arne Vestbø
76f53791a1 tst_QSettings: Don't assume the presence of a key means isWritable
The previous sync() of the specific scope and domain may have failed due
to not having the necessary permissions, but the saved value may still be
cached, so we need to check both.

This was observed on macOS Sierra, where a failed sync() will result in
marking the CFPrefsPlistSource as read-only, eg:

  2016-10-04 13:14:11.713271 tst_qsettings[88537:767733] [User Defaults] attempt to set
  <private> for key in <private> in read-only (due to a previous failed write) preferences
  domain CFPrefsPlistSource<0x6180000e1780> (Domain: org.software.KillerAPP,
  User: kCFPreferencesAnyUser, ByHost: Yes, Container: (null))

Change-Id: I8976c1c4acfe2cb0d5510298d5c585faca9607f6
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
2016-10-10 16:06:43 +00:00