Commit Graph

33652 Commits

Author SHA1 Message Date
Orgad Shaneh
3635b78c54 QFileInfo: Fix typo in doc
Change-Id: Id1051f08a870461b172b646c126eb44e8addc114
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-08-26 17:39:45 +00:00
Oswald Buddenhagen
e8b9a17a3b qmake: fix hypothetical raw data leak in $$replace()
the replacement value may well constitute the whole output string - this
is in fact common, given this rather typical usage pattern:

  BAR = $$replace(FOO, -flag, -otherflag)

this must be considered when constructing the return value.
compare 3c8134958c.

as of now, this is irrelevant, as QString::replace(QRegExp, QString) will
always memcpy the replacement into a detached copy of the target, but one
never knows.

Change-Id: Ia1f271f45023746040fc28ce6d88a6609e05e5c2
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-08-26 12:12:10 +00:00
Oswald Buddenhagen
702be65532 qmake: fix hypothetical raw data leaks relating to qt i/o classes
technically, we should not rely on the i/o classes not storing the
strings beyond the instantiated object's life time.

Change-Id: I0990769b3cf86860184869036c096c531160e9be
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-08-26 12:12:06 +00:00
Oswald Buddenhagen
18533ae2a7 qmake: remove pointless use of raw data in $$[QMAKEFEATURES] access
property values are de-facto guaranteed to be backed by full QStrings,
so there is nothing to be gained from using the raw data optimization,
while doing so risks raw data leaks.

Change-Id: I3d43da9aaadd4d5811c4b1a9d7ac734049da423c
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-08-26 12:12:02 +00:00
Oswald Buddenhagen
14505bbfea qmake: remove seemingly pointless QString::detach() calls
it's not clear why detaching would be necessary; there is no danger of a
raw data leak here.
concatenating a QStringRef with a non-empty QLatin1String (the only
expected use of this overload) will yield a detached QString anyway, so
this makes little difference in practice.

amends f137957e08.

Change-Id: I521c0e89a8b0c1ae62b1450e81b0ae91a931bcfa
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-08-26 12:11:57 +00:00
Oswald Buddenhagen
9f98935d33 qmake: prune obsolete QString::detach() call
no m_tmp is involved any more in this code path; it uses QStringRef.

amends 11d957d043.

Change-Id: Ib272d61edfb150a549c5e6a9a60d53502702e802
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-08-26 12:11:53 +00:00
Oswald Buddenhagen
ce5e6876d4 qmake: make more use of ProString built-ins
saves some noisy toQString() uses.

Change-Id: I62a9e2725c4baabac311124d19c7d8b40f54c8f7
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-08-26 12:11:49 +00:00
Oswald Buddenhagen
ccb8afcda7 qmake: fix raw data detach avoidance
the m_tmp array is a member, so the index toggle for accessing it also
needs to be one - otherwise, odd iteration counts will defeat the
mechanism.

Change-Id: If7a800ed5a4b4168625daf1ebbd5d2d164569d8e
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-08-26 12:11:45 +00:00
Oswald Buddenhagen
5131bb9bed qmake: fix excessive detaching of raw data
... in $$basename(), $$dirname(), and contains(). the latter case is
marginal, as it only applies to mutuals which are regexes, which i don't
remember ever seeing used.

QRegExp saves a copy of the matched string, so it's necessary to
alternate between two temporaries to avoid detaching. we already
did that in most places.

Change-Id: I97b8294585c17c76d1756f83971f42cb88353af0
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-08-26 12:11:40 +00:00
Oswald Buddenhagen
eb0ba90b0a qmake: make yet more use of ProString::toQStringRef()
in most cases, the main advantage is not using toQString(m_tmp), which
reduces the possibility of raw data leaks. in cases where we used
toQString() without temporary, this is a slight optimization.

Change-Id: Ib343acffd383aa2c4fefab75fb52762fb534dfc6
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-08-26 12:11:35 +00:00
Tor Arne Vestbø
40fe5d43fd macOS: Move NSOpenGLPixelFormat creation back into QCocoaGLContext
The code was factored out in 0058f00b6 to be shared with Wayland, but
the Wayland platform plugin now lives in its own repository (as of
75a66c3d), and doesn't support running on macOS anymore.

Change-Id: Ied54f5f3e0a3e6fdaaedfcd456a140b46706f33c
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-08-25 15:33:33 +00:00
Tor Arne Vestbø
cda9bd664d macOS: Add workaround for Qt not accepting resize-events before show
QtWidgets in particular expects a show event before any resize or expose
events. QWindow::setVisible creates the platform window before sending
the show event, so we block sending any resize events during platform
window creation of QCocoaWindow, which means we miss out on the resize
event that indicates that the window is maximized.

We should probably teach QWindow::setVisible to send the show event
before creating the window, but until then we work around it by sending
an explicit resize event in QCocoaWindow::setVisible.

Task-number: QTBUG-62774
Change-Id: I6d512c9775986bcbcbf5c02a9e49984015fa9782
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-08-25 15:33:31 +00:00
Francois Ferrand
fabedd399e Introduce OBJECTIVE_HEADERS
When a ObjC++ QObject subclass is listed in the regular HEADERS, qmake
creates a .cpp file. The moc file will then fail to compile, as it
requries ObjC++ headers. Using Q_FORWARD_DECLARE_OBJC_CLASS() can be
used to let the class be parsed by The compiler, but link will still
fail, as the generated methods (e.g. signals) must be built with ObjC++
compiler, in case they have ObjC parameters:

 Q_FORWARD_DECLARE_OBJC_CLASS(NSString);

 class MyClass: public QObject {
     Q_OBJECT
 signals:
     void objcSignal(NSString * myObj);
 };

The canonical workaround for that is including the .cpp file into the
corresponding .mm file. This also offers a compilation speed advantage,
but is somewhat counter-intuitive.

Therefore, we introduce a separate variable which instructs moc to create
.mm files directly.

Task-number: QTBUG-1581
Change-Id: Ia98af58006efd168ea37f3a63c396979e7e81baa
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-08-25 12:15:36 +00:00
Andy Shaw
d293f071f5 Add missing #ifdef for isTouchScreen() implementation
The definition of isTouchScreen() is protected with XCB_USE_XINPUT22 so
the implementation needs to have this too.

Task-number: QTBUG-62226
Change-Id: Icc3de01a6cb1299b43e56fc9f77833764131ca4b
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2017-08-25 10:32:43 +00:00
Andy Shaw
ab323c5bf4 Append the QMAKE_EXTRA_ARGS to the output instead of overwriting it
When QMAKE_* variable assignments were passed to the configure line
they would cause the current contents of the private pro output to be
overwritten. This would cause anything added to it before the QMAKE_*
variable assignments to be parsed to be lost.

Change-Id: Idcb8cad5f07cbb96b4da204384f5618b95b375b0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-08-25 10:32:32 +00:00
Andy Shaw
dbaa4de28e Cocoa: Fix compile when using QT_NO_TABLETEVENT
Change-Id: I76f08d747009a5bf2c0e8004c3443e16e83b6a7d
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-08-25 10:32:19 +00:00
Gabriel de Dietrich
75b323c30e QMenuPrivate: Fix implicit type conversion warnings
As reported within Qt Creator.

Change-Id: I9dc06b9fba52936e01e01fb0e8cdf4b216c46551
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-08-25 10:04:21 +00:00
Andy Shaw
8ebfe00f4a Initialize the print engine with the given printer name
Originally when the QPrinter was created it would create the engine with
the default printer and then change it afterwards even though the
desired printer may already be known here. So by passing the printer
name we ensure that it is initialized with the desired one right away.

Task-number: QTBUG-62221
Change-Id: Iaa90243708b57bf89354a527a982ac45c991f603
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-08-25 06:50:10 +00:00
Tor Arne Vestbø
a980250a66 macOS: Deduplicate QNSWindow/QNSPanel code
By sharing the implementations of the methods between QNSWindow and
QNSPanel we don't need a helper, and can remove duplicated code. This
duplication would expand in the future, as for each method added to
the QNSWindowProtocol, we would have to add forwarding functions
in both QNSWindow and QNSPanel, forwarding to QNSWindowHelper, and
then two more functions in QNSWindow and QNSPanel in case we wanted
to call super from the helper, similar to [QNSWindow superSendEvent].

The only snag is that calls to super are hard-coded to a specific
superclass during complication, so we provide our wrapper for
objc_msgSendSuper that resolves the superclass at runtime.

The helper class QSendSuperHelper provides compile time implicit
instantiation of the right template without having to provide
the return type as a template argument, via operator T and
a fallback for the case of no return type via the destructor.

Change-Id: Iaf13f27675d90f884470f5005270ea0d9d0316f3
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-08-24 23:54:43 +00:00
Tor Arne Vestbø
31190140c3 iOS: Remove support for OpenGL-backed QBackingStore
The default on iOS has been raster for two years now, as of 3e892e4a97,
and we haven't seen any major performance regressions that would warrant
keeping the OpenGL based code-path alive.

This includes the default surface format, which was ony set so that
QPainter clip regions would work when using the GL backed backing store.

Change-Id: I37b880a758b9c3fad1f23ae60268629ffbe9bc3e
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-08-24 22:20:52 +00:00
Tor Arne Vestbø
7b1a3ba027 Fix QCFType::constructFromGet() crash when passed a nullptr
Change-Id: I83cbbb47af8580fa67cbc75fee07bc1e123895eb
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-08-24 22:20:50 +00:00
Edward Welbourne
515b905150 Adapt qmake's raw-string parser to avoid confusion by macros
A macro name ending in R might expand to a string; if this precedes a
string constant, we're juxtaposing the strings.  My first parser for
raw strings would mistake it for a raw string instead, ignoring the
part of the identifier before R.  Re-worked the exploration of what
came before the string to catch these cases, too.

The backwards parsing would also allow any messy jumble of [RLUu8]* as
prefix for the string; but in fact R must (if present) be last in the
prefix and *it* can have at most one prefix, [LUu] or u8.  Anything
else is an identifier that happens to precede the string.  Reworked
the parsing to allow only one prefix and not treat R specially unless
it's immediately (modulo BSNL) before the string's open-quotes.

Add link to the cppreference page about string literals, on which the
grammar now parsed is based.

Added a test for the issue this addresses.
Verified that this fails on 5.6, dev and 5.9 without the fix.
Expanded the existing test to cover R-with-prefix cases.

Task-number: QTBUG-55633
Change-Id: I541486c2ec909cfb42050907c84bee83ead4a2f4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-08-24 14:27:50 +00:00
Thiago Macieira
797530c3f8 QHostInfo: Remove Darwin refusal to use getnameinfo(3)
This #if has been there since 0248ec4054b (Oct 2005), presumably due to
bugs reported after the Qt 4.0 release (the first containing QHostInfo).
Any macOS issues with getnameinfo() have long since been gone. I've
confirmed that it works on 10.9, 10.10, 10.11 and 10.12, so I'm
dropping the #ifndef.

[ChangeLog][Deprecation Notice] Starting with Qt 5.10, IPv6 support will
be mandatory for all platforms. Systems without proper IPv6 support,
such as the getaddrinfo() function or the proper socket address
structures, will not be able to build QtNetwork anymore.

Change-Id: I320d9d2f42284a69a4cbfffd14dd5bf479e5f678
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-08-24 03:47:14 +00:00
Thiago Macieira
643d19f87b QNetworkInterface: Fold the test for if_nameindex into the config test
No need to make workarounds for Android in the .cpp source. Just let it
fail (if it still has to fail).

Change-Id: Iaf4157b7efa2416d898cfffd14d94ebcb4d979be
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-08-24 03:47:12 +00:00
Thiago Macieira
94c4827a9f configure: Disable warnings in configure tests
No need to log them.

Change-Id: I3868166e5efc45538544fffd14d8c3cc0012ba12
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-08-24 03:47:10 +00:00
Giuseppe D'Angelo
f537dc0da2 PCRE2: upgrade to version 10.30
Minimal adjustments to config.h are necessary.

[ChangeLog][Third-Party Code] PCRE2 has been updated to version 10.30.

Change-Id: Iaca6a5ceffe4f5029212411eca8e2965ca7d9410
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2017-08-23 14:35:56 +00:00
Sérgio Martins
6522d4c487 Fix invalid placeholder name in tst_qsqlthread.cpp
Change-Id: I88c0c48888b86b58d85223ad1dc4cafdaea01d77
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2017-08-23 12:48:32 +00:00
BogDan Vatra
09ea013ae1 Use libc++ instead of libstdc++ when compiling with android-clang mkspec
clang+libc++ is the only supported way by Google nowadays.
libstdc++ is too old and already fails to build some C++11 apps
e.g. missing std::to_string().

android-g++ mkspec still uses libstdc++ and g++.

Use -isystem to include system headers instead of QMAKE_INCDIR_POST (-I).

Task-number: QTBUG-60455
Change-Id: Iba8b04594c2e5e2832e6cf480e4e52ff31ad4106
Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2017-08-23 12:47:58 +00:00
Leena Miettinen
2740584e6d Doc: Update Qt Creator Manual link targets to match version 4.4
Change-Id: Ib784779b09f4bce38ada4833777f873ee510af16
Reviewed-by: Tarja Sundqvist <tarja.sundqvist@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2017-08-23 12:18:14 +00:00
Robert Loehning
a576954f9b QTableGenerator: Fix handling of illegal characters in fromBase8
Task-number: QTBUG-60387
Change-Id: I084c2b4a86439857e898e9adc7370c19961d0126
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-08-23 12:11:03 +00:00
Gabriel de Dietrich
b65e30c861 QWidget: Call appropriate QWindow method from setGeometry_sys()
When calling resize() from showEvent(), we'd set the full geometry
on the widget's QWindow. This resulted in the top-level window
being moved to the top-left corner, even though no other call to
move() or setGeometry() had happened before.

The solution consists on calling the proper QWindow methods depending
on whether setGeometry_sys() is called for a move, a resize or both.

Furthermore, this needs QWindow::resize() to set its position policy
to frame-exclusive. The documentation states that is already the case
and we're setting the full geometry on the platform window, so we need
to convey that bit of information.

This also solves the age-old conundrum: "### why do we have isMove as
a parameter?"

Change-Id: I2e00fd632929ade14b35ae5e6495ed1ab176d32f
Task-number: QTBUG-56277
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-08-23 08:42:44 +00:00
Friedemann Kleint
1bbad92e83 tst_QPrinter: Share printers in testPageRectAndPaperRect/testMargin
Speeds up testing by a factor of 2.

Task-number: QTBUG-61827
Change-Id: I9d6c9d9786d35af3083bc7e98beb9a79dbcc7e11
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2017-08-23 08:09:12 +00:00
Andy Shaw
c1cd8df84e Fix the test for non-English based setups
Unsetting the SOFTWARE environment variable will force lpstat to use
English for the output, so we can ensure that the test will pass
regardless of the language used for the machine.

Change-Id: Iddf5e8aadaa546ae3e0dd172df84e4e43ee02c2a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-08-23 08:07:37 +00:00
Friedemann Kleint
82e7bd689a tst_QPrinter: Disambiguate all file names
Introduce helper function which uses a number to build
unique names. Remove helper for deleting files since it
now uses a temporary directory. Add a few cases
that were overlooked in 88c68f4d9e.

Task-number: QTBUG-61827
Change-Id: I53355f99ffc3bfe6ad6994a5439710c9fa8cdad5
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2017-08-23 08:05:17 +00:00
Thiago Macieira
189e9c93d7 QTemporaryFile: Add support for Linux's O_TMPFILE
That means a file is never created, unless you ask for the name. There's
no chance of left-over temporary files being left behind. QSaveFile also
benefits from this, since the save file is not present on disk until
commit(). Unfortunately, QSaveFile must go through a temporary name
because linkat(2) cannot overwrite -- we need rename(2) for that (for
now).

[ChangeLog][Important Behavior Changes][QTemporaryFile] On Linux,
QTemporaryFile will attempt to create unnamed temporary files. If that
succeeds, open() will return true but exists() will be false. If you
call fileName() or any function that calls it, QTemporaryFile will give
the file a name, so most applications will not see a difference.

Change-Id: I1eba2b016de74620bfc8fffd14cc843e5b0919d0
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-08-23 04:02:19 +00:00
Edward Welbourne
b6a6121128 Deprecate QDate methods using MonthNameType
These introduce an unwanted locale-dependency; clients should use
suitable QLocale methods instead.

Task-number: QTBUG-28581
Change-Id: Ie7dfe712c50b9f5da94e4b20af7b231d8963cbc9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-08-22 09:47:22 +00:00
Morten Johan Sørvig
8b3a120a3b macOS: Simplify and correct style mask determination
This function had accumulated a fair bit of accidental
complexity over the years.

- No early returns, make sure to preserve fullscreen
  state for all windows.

- Use windowIsPopupType() directly to set borderless
  for Qt::Popup (but not Qt::Tool).

- Handle Qt::Tool explicitly.

- Deduplicate Qt::CustomizeWindowMask handling.

- Remove case that used the absence of NSResizableWindowMask
  to remove the maximize button. Maximize is now
  disabled elsewhere (setWindowZoomButton). All windows
  now get NSResizableWindowMask by default.

- Qt::ForeignWindow now gets a standard window style
  mask instead of NSBorderlessWindowMask. The old
  code did not handle this case and left the mask
  value unmodified.

Change-Id: I56499e9f05c3f481b5a96e0507da2fb195f207fa
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-08-22 08:06:31 +00:00
Giuseppe D'Angelo
12c5264d9a QCryptographicHash: re-add support for Keccak hashing
88a8feeacb fixed QCryptographicHash's
implementation of SHA-3 -- before, QCryptographicHash was
calculating Keccak, not SHA-3. The change however breaks downstreams
that were relying on the "wrong" values calculated by earlier
versions of Qt. To restore compatibility with such calculations,
add the support for Keccak back, as deprecated and to-be-removed
in Qt 6.

[ChangeLog][QtCore][QCryptographicHash] In order to preserve
compatibility with earlier versions of Qt, QCryptographicHash is
now able to calculate Keccak message digests.

Task-number: QTBUG-59770
Change-Id: I740684cb3d0774292fa837a06b444c73fb4eed52
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-08-22 07:54:31 +00:00
Thiago Macieira
9c112a37ba QFileSystemEngine::cloneFile: expand the Linux cloning process
FICLONE only works on (currently) btrfs and xfs, and then only if it's
the same mount, so it's of very limited use. There are a couple other
techniques we may try that do not involve I/O through user-space, though
not immediate:
 - sendfile(2) can be used on regular files, even across mountpoints
 - sendfile(2) can be used on block devices too, but we need to get the
   device's size first
 - splice(2) can be used on pipes (FIFOs)

We only implement the first technique (earlier iterations of this patch
implemented all).

Change-Id: I81480fdb578d4d43b3fcfffd14d4b47cd70495a3
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-08-22 06:56:25 +00:00
Thiago Macieira
974b3adf8a QFileSystemEngine::cloneFile: add support for fcopyfile(3) on macOS
For some reason, fcopyfile(3) works on directories, so we need to make
we aren't operating in one.

Change-Id: I81480fdb578d4d43b3fcfffd14d4f2f485348515
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-08-22 06:56:16 +00:00
Thiago Macieira
26094982f8 Move the file-cloning code from QFSFileEngine to QFileSystemEngine
Change-Id: I02d22222fff64d4dbda4fffd14d1c1bbf48385ff
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-08-22 06:56:08 +00:00
Friedemann Kleint
1fc9c8d8f3 Windows QPA: Call raise unconditionally for popups
A case of nested Qt::WindowStaysOnTopHint may occur when
context menus are created on windows with Qt::WindowStaysOnTopHint
set. Raise the popup in that case.

Amends 329a029c36.

Task-number: QTBUG-62004
Change-Id: Ifb761edbd42b1447bec30735810c006d02e1aa97
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-08-22 06:18:03 +00:00
Jake Petroules
0f4cce2630 QOperatingSystemVersion: add Android Oreo (v8.0, API level 26)
[ChangeLog][Binary Compatibility Note] The variable
QOperatingSystemVersion::AndroidOreo was added in this release.
Code that uses this variable will not run under Qt 5.9.1.
If backwards compatibility is desired, use instead
  QOperatingSystemVersion(QOperatingSystemVersion::Android, 8)

Change-Id: I1da5a5577bf6b719e543a1ded1f9b912a83665c3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-08-22 05:45:17 +00:00
Morten Johan Sørvig
750a252b89 Blacklist tst_QMessageBox::defaultButton on osx ci
Has become flaky on CI. Does not fail locally.

Change-Id: I42938849571938db78b16a72c215442a69f7c2d5
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-08-22 05:10:54 +00:00
Morten Johan Sørvig
d044b0b1e3 Remove timer checks from testQuitLock
This test sets up two timers:
	- a 100ms recurring timer
	- a series of 10 200ms single-shot timers.

After quitLock lets exec() return it then uses a signal
spy to check if the 100ms timer fired at least 17/20
of the times it should.

However there is no guarantee that the 100ms timer
will fire more often than the 200ms timer. If the
native timer callbacks happen at 500ms intervals then
Qt will fire both timers (once) at that interval.

In practice this seems to happen on macOS CI under
system load and/or with the test app napping.

The primary goal for the test is to verify that exec()
returns when it should; we can remove the timer signal
spy.

Remove testQuitLock from BLACKLIST.

Timely timer:

  524429311.389913 runLoopTimerCallback
  524429311.389979 200ms fire
  524429311.389997 100ms fire
  524429311.490056 runLoopTimerCallback
  524429311.490130 100ms fire
  524429311.589752 runLoopTimerCallback
  524429311.589929 200ms fire
  524429311.589976 100ms fire

Delayed timer:

  524429428.690887 runLoopTimerCallback
  524429428.691002 100ms fire
  524429428.691143 200ms fire
  524429433.692103 runLoopTimerCallback
  524429433.692205 100ms fire
  524429433.692331 200ms fire

Change-Id: Iff4faaa1de3741cf4e217949d5ed17d4e70c6af2
Task-number: QTBUG-61499
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-08-22 05:10:48 +00:00
Morten Johan Sørvig
1497e5853b QTestLib: Disable App Nap on macOS
App Nap may cause stalls or timer delays during test runs.

Change-Id: I828282d12127918439a9a2a4f7d7be6cac457b42
Task-number: QTBUG-61499
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-08-22 05:10:43 +00:00
Morten Johan Sørvig
8b8578a155 macOS: Add support for OpenGL Core Profile 4.1
NSOpenGLProfileVersion4_1Core is available starting
with macOS 10.10.

Task-number: QTBUG-62333
Change-Id: I75d8c3bc1093ff38c6ca1db2d2da50fd448a149f
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-08-22 05:08:04 +00:00
Topi Reinio
2ea3c0d5f6 Doc: Clean up Qt::ApplicationAttribute docs
Move deprecated and obsoleted enum values to the end, as there already
was a category for them.

Fix linking to 'Q(Gui)Application'.

Update the usage of the name macOS.

To make the table more readable in online style, add zero-width spaces
to long strings, allowing browsers to word-break them, thus avoiding
text overflow/horizontal scroll bar.

Task-number: QTWEBSITE-783
Change-Id: I0a96156d24cba4a0405c4edd8d3829def30c69bf
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
2017-08-21 12:31:56 +00:00
Tor Arne Vestbø
0a7eb034f4 macOS: Restore support for layered mode
After 871966 we now do drawing as a result of drawRect calls, but layer
backed mode was not taken into account. This restores support for both
pull and push-mode drawing in layer-backed mode.

Change-Id: I35039ee9eb4486206f9f92f8230df104473368c9
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2017-08-21 10:18:12 +00:00
Paul Olav Tvete
4700a32f21 Android: stop composing before pasting new text
We have to exit composition mode before inserting text. Otherwise, the
state of the input method will be out of sync with the contents of the
text editor.

Task-number: QTBUG-61717
Change-Id: I58bf3988ae9e0acf3302e810e46bb0ebeda30d17
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2017-08-21 07:26:00 +00:00