Commit Graph

31532 Commits

Author SHA1 Message Date
Tor Arne Vestbø
54e4735f89 qpa: Let platform plugins report old state for window state changes
The previous logic relied on QPlatformWindow::setWindowState() being
synchronous and delivering the QPA event before returning to QWindow,
in which case window->windowState() would still refer to the old
state. Async platforms can now report the previous state correctly.

Change-Id: Ib9148fe23fb62be55b7e3a0ccf63d32c71dc2ad3
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-02-15 14:37:03 +00:00
Olivier Goffart
1037eebc0b Windows QPA: Use the native algorithm to find out the window's screen
QPlatformWindow::screenForGeometry uses the screen where the center
of the window is, but native application use the one which intersects
with the bigger area. It might not be the same.

Change-Id: I831a5fcaea0e293e9f0f93ef5e562cce57fae2f4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-02-15 14:19:12 +00:00
Timur Pocheptsov
b5995afc79 Fix http2 auto-test
After it started to fail (somehow it's only OpenSUSE 42.1) again and again
and after a quick re-evaluation it appears the logic testing SETTINGS|ACK
is incorrect. We (client side) start by sending the preface and then
continue to send our request(s). The other side (server) starts from sending its
SETTINGS frame. These settings must be ACKed, but apparently it can happen,
that server receives a requests and sends a reply before it receives SETTINGS|ACK,
resulting in replyFinished (replyFinishedWithError) signal and event loop stopping.
As a result - QVERIFY(serverGotSettingsACK) fails.

Task-number: QTBUG-58758
Change-Id: I8184cf459b2b88f70c646171e0115c184237fad1
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-02-15 14:11:19 +00:00
Kimmo Ollila
a0a9e8b2d7 Fix is_iec559 assert on GHS compiler
GHS compiler is not fully compliant with iec559.
Therefore we need to replace is_iec559 assertion
with separate checks to build quint16.

Change-Id: I88c57e394b8d4e7899ee7d4a13cbfbac9436b2fc
Reviewed-by: Rolland Dudemaine <rolland@ghs.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-02-15 13:52:26 +00:00
Edward Welbourne
2aec5c9b34 Package transient zone setting in test to ensure restore on fail
tst_QDateTime::operator_insert_extract() was setting the time-zone and
taking care to restore it at the end of the test; however, if the test
were to fail, the restore would be skipped.  Package the zone-setting
and restore in a class instance, so that premature return can't bypass
the restore.

Change-Id: I3df63260da17e481ef4d0d107d9f0fdea3e147e7
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2017-02-15 13:48:37 +00:00
Marc Mutz
03903ec783 QJNIHelpers: make mutexes static
Amends 265db5ad9b.

Change-Id: I707bb88285531ee9f82efec46901871d53413eb3
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2017-02-15 13:06:12 +00:00
Kevin Funk
e0c43fb046 QFileDialog: Protect against nullptr dereference
When the QFileDialog receives a language change event, and native
dialogs are used, this code path dereference a nullptr in the qFileDialogUi member.

Protect by checking the return value of QFileDialogPrivate::usingWidgets() as
done in other places deferencing qFileDialogUi.

Fixes a crash in GammaRay

Change-Id: I3e9eb81c75d9fc983519a58c5ec06e316ac80263
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2017-02-15 12:46:30 +00:00
Frederik Schwarzer
9e888e633b Fix indentation of source code example in docs
Change-Id: Icf94c9adc55d16acd26831cce331054a8c49652d
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2017-02-15 11:58:12 +00:00
Marc Mutz
b4689401a5 tst_QThreadPool: don't deadlock when a cancel() test fails
We keep the runnables from finishing by having them block
on a QSemaphore::acquire() call inside run().

If we fail a test that precedes the call to sem.release()
further into the test, the early return will cause the
thread pool to be destroyed, which will then attempt to
wait for the runnables to finished, which, in turn wait
for the semaphore to be released.

-> dead lock

Fix by introducing a RAII object to release the semaphore
with a sufficiently large number to unblock all runnables.
That number will in some situations be too large, but that
does not matter.

Change-Id: I1ec7e29b37bc36309e93e6e30708cc7db3c9579c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-02-15 11:25:48 +00:00
Marc Mutz
410a14cc76 Wait for runnables to start up in tst_QThreadPool::cancel()
In order to get reproducible runs of the test, we need to
wait in the main thread until all runnables have started
executing. Otherwise, what the cancel() loop below actually
does will vary from run to run.

Change-Id: Ib912b0943e7bbd55c9480ae6fd4011ba20ac457e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-02-15 11:25:39 +00:00
Marc Mutz
8087ea67b1 tst_QThreadPool: simplify cancel()
Instead of allocating a statically-sized array on the heap,
use an automatic C array instead.

Replace some magic numbers with named constants.

Change-Id: I17d29a76a67c4a413453ac26a5dee8cd54a8a37d
Reviewed-by: David Faure <david.faure@kdab.com>
2017-02-15 11:25:30 +00:00
Marc Mutz
dcf74bdec8 Fix UB (data race) in tst_QThreadPool::cancel()
Manipulating a simple int from multiple threads is a data race,
thus undefined behavior.

Fix by using QAtomicInt and atomic operations instead.

Change-Id: I5418bc260da57fe353a71b8e5c7c1c97adbe7597
Reviewed-by: David Faure <david.faure@kdab.com>
2017-02-15 11:25:24 +00:00
Marc Mutz
af8771867c Fix UB (data race) in QtAndroidPrivate::requestPermissionsSync()
If the QSemaphore::tryAcquire() call times out, we mustn't
touch *res, because there was no happens-before relation
established between *res = result in the lambda and our
returning *res;

Fix by returning a default-constructed hash in that case.

Add a strategic std::move().

The same problem exists in runOnAndroidThreadSync(), but
I have no idea how to solve it, because there the shared
object is the runnable itself.

Change-Id: I9a2c431144c169fbd545763555d96153143a11bf
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2017-02-15 11:24:18 +00:00
Marc Mutz
39820cf8c3 QJNIHelper: fix a potential race in sendRequestPermissionsResult()
The code obtained an iterator into a QHash under mutex protection,
then dropped the lock, dereferenced the iterator several times and
only retook the lock to erase the element from the QHash.

This is very smelly. QHash provides no official iterator validity
guarantees, and the container isn't const, either (which would imply
thread-safety). In particular, the dereference into the container
outside the critical section is cause for concerns.

Simplify the code, removing any doubts about its race-freedom, by
taking the payload item out of the hash before dropping the lock, and
using only the local strong reference in the remainder of the
function.

The only other references to g_pendingPermissionRequests are
insertions with unique-by-construction keys in QtAndroidPrivate's
requestPermissions(), so there was no reason to keep the item in the
hash for the whole duration of the sendRequestPermissionsResult()
call.

Change-Id: I39fe0803b13b3046d1f0fd9c8e96c531406d57da
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2017-02-15 11:23:28 +00:00
Aaron Linville
a05116e6f1 Update QSyntaxHighlighter docs to use QRegularExpression
Update the QSyntaxHighlighter examples to use the new QRegularExpression
class in place of QRegExp.

Fix typos. Remove duplicated snippet. Replace lengthy section of
duplicate text in highlight(..) with a note to see the detailed
description.

Task-number: QTBUG-58494
Change-Id: Id8d94bddbed52e6e52feac107f6fc84e2fe4518a
Reviewed-by: Samuel Gaist <samuel.gaist@edeltech.ch>
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
2017-02-15 10:29:21 +00:00
Heikki Haveri
aebf66d242 Enable QtAndroid::runOnAndroidThread in a Service
Change-Id: I214f5dc70c52011a5e1712ea70f97f8b564fb664
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2017-02-15 10:04:17 +00:00
Thiago Macieira
cab4d495b2 50 ms isn't enough for the CI, so increase to 100 ms
This should reduce the failure rate. We're still doing qSleep of the
same amount of time, but we now only fail if the slip is over 100 ms.

Task-number: QTBUG-58713
Change-Id: I536c32a88bff44dab37afffd14a1afdf0b2e522a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2017-02-15 08:09:57 +00:00
Thiago Macieira
b58af67d7b Turn QThreadData::threadId into a QAtomicPointer
Solves a data race found by TSan.

Since thread and threadId are QAtomicPointer, I've removed the explicit
initialization in the QThreadData constructor

Task-number: QTBUG-58855
Change-Id: I4139d5f93dcb4b429ae9fffd14a34082f2683f76
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2017-02-15 08:08:58 +00:00
Timur Pocheptsov
5542e772d6 tst_qlocale::macDefaultLocale - remove flaky/incorrect test
currencySymbol == "$" does not mean negative currency values will be formatted
as "($value)". With all locales I have on my mac machines (10.11/10.12) the
result is different from what this test expects. Also, the results are very
different for different locales.  Apparently, we never saw this problem before
since in our CI "macs" we never have US Dollar/en_US selected in System Preferences.

Task-number: QTBUG-58784
Change-Id: Ic2c3a3172bf1e715e99092ddee8f461b216d995a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-02-15 07:43:26 +00:00
Friedemann Kleint
0b30a6e6aa QElfParser: Fix plural form in error message
Amends change dcec1420ea.

Change-Id: I54c7db012d87a55c310141debac19118e7cb284a
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-02-15 07:18:55 +00:00
Marc Mutz
265db5ad9b QJNIHelper: clean up atomic int and mutex handling
1. Do not use Q_GLOBAL_STATIC to hold QAtomicInt or QMutex, use
   file-static QBasicAtomicInt and QBasicMutex instead. They are
   zero-initialized PODs.
2. Use only QMutexLocker to lock mutexes.

Also wrap the atomic counter into a next...() function, as done
elsewhere.

Change-Id: I4b14ac0de9d4cb6780b1f1372c2b5fc88e918e4c
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-02-14 21:11:03 +00:00
Jesus Fernandez
5fcdb6c459 Add Q_ASSERT before dereference pointer
Fix Null pointer dereferences  (NULL_RETURNS)
CID 176640:  Null pointer dereferences  (NULL_RETURNS)
Assigning: "p" = null return value from "value".

Change-Id: I3af9aae3bbebd6f4de90854ba56cd601669b1b5a
Coverity-Id: 176640
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-02-14 15:06:18 +00:00
Marc Mutz
1cbf402ea6 tst_QMimeDatabase: increase timeout
The runUpdateMimeDatabase() call was timing out on the CI due to
running out of the default 30s timeout for QProcess::waitForFinished()
(on my machine, that call takes less than 0.5s, reliably...).

Increase to two minutes.

Change-Id: I61b2e060ea9c2508b853847ba7040ad499e0084c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: David Faure <david.faure@kdab.com>
2017-02-14 13:51:12 +00:00
Marc Mutz
6c4d75a485 tst_QSemaphore: avoid deadlock on test failures
When one of the QCOMPAREs in Consumer::run() fails, the consumer
returns early, leaving the producer deadlocked in a QSemaphore's
acquire() call. Change these to tryAcquire() with a large timeout,
so the producer, too, eventually leaves run().

Change-Id: I7421d43305decd4754e09c8e092363594d1be06b
Reviewed-by: David Faure <david.faure@kdab.com>
2017-02-14 13:30:16 +00:00
Friedemann Kleint
737383875e Blacklist tst_QTimer::remainingTime() on Windows and macOS
Task-number: QTBUG-58519
Change-Id: Ib03aa0bdeaa9ed0dc2f0d92aa11d07ffcdc2bc26
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2017-02-14 13:30:12 +00:00
Marc Mutz
c4a5307a3e QMutex/Linux: remove unused QBasicAtomic
$ git grep -we futexFlagSupport
  src/corelib/thread/qmutex_linux.cpp:static QBasicAtomicInt futexFlagSupport = Q_BASIC_ATOMIC_INITIALIZER(-1);

The last user of this variable was removed in 9ef59b5.

Change-Id: I818a13a481ad25baa5ff7d389a737b8801adcfcc
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-02-14 13:30:05 +00:00
Kai Koehne
414a124e81 Doc: Remove mentioning of Windows CE from qmake documentation
Change-Id: Ibfd575a63dd80b1571d1ba61d593aff75dd83f9f
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-02-14 12:48:35 +00:00
Milla Pohjanheimo
c6792bcb95 Binary compatibility files for QtBase (5.8.0)
Added BC files for QtBase for Qt 5.8.0

Change-Id: I36d5453b8cfb5d34511a9b6196d4dc83d5c9f9f6
Reviewed-by: Sergio Ahumada <sahumada@texla.cl>
2017-02-14 12:42:20 +00:00
Olivier Goffart
9e3a3250e0 Windows QPA: Fix compilation with QT_NO_OPENGL
Compilation error introduced in 7780ee9e5f

Change-Id: Ia770ca207cdd25bb15c74d681ece391a844791a7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-02-14 12:09:47 +00:00
Liang Qi
27432d40f2 Merge remote-tracking branch 'origin/5.8' into 5.9
Change-Id: I2bd2e61bae1eab4fc74fa6accd741ed9ae1f0669
2017-02-14 11:33:02 +01:00
Marc Mutz
10ecbc4041 Blacklist tst_QWaitCondition::wakeOne() on Windows
This test was determined to be flaky on the CI.

Task-number: QTBUG-58741
Change-Id: I43196d3a27f726fb96b427f5071e726b571a0404
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: David Faure <david.faure@kdab.com>
2017-02-14 06:51:52 +00:00
Friedemann Kleint
071a120400 Windows styles/wizard: Do not invoke winId() of desktop windows
Call the Win32 API GetDesktopWindow() to obtain a HWND of the desktop
instead of calling QApplicationPrivate::getHWNDForWidget() for desktop
windows. This allows for lazily creating desktop platform windows.

Observed in some tests where no window is visible.

Change-Id: I97074f69606b3d74f3fbc90acb4a077d52eeb84d
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-02-13 21:32:04 +00:00
Julien Gueytat
aa1631d76c Replace gstrip by strip due to ELF corruption
This is an old error of the gstrip binutils. The bug has been corrected
and re-introduced.

The command *elfdump -d xxx* on the ELF does bring lines like those :
.SUNW_syminfo: invalid sh_info: 0

Task-number: QTBUG-58814
Change-Id: I330c4031dcf4ba64297df4b333b41cf0a003914f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-02-13 20:06:53 +00:00
Tor Arne Vestbø
5c440880ba Respect QWindow::screen() when computing QPlatformWindow::initialGeometry()
Calling setScreen() on a QWindow doesn't move the window to that screen
unless the new screen is a separate virtual desktop, as the window
geometry is what determines the position of the window within each
virtual desktop.

But when mapping a QWindow that doesn't have a position explicitly set by
the user, we try to resolve a reasonable position for it. In that case we
should take the QWindow screen into account, as setting it to a non-primary
screen is a good indication that the user wants the window to end up on
that screen. If that's the case, it should override the logic of using
the transient parent or the cursor position to choose which screen to
place the window on.

Change-Id: I591d872a93913173b20eb3da19aa63118fcf6b12
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2017-02-13 18:30:09 +00:00
Tor Arne Vestbø
09e7a994d1 Don't create platform window for QWindows when calling setVisible(false)
We can defer the creation until the window is shown.

Change-Id: I3d5b45ae59ee0925996cf12cd46dd574c8c6ef95
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-02-13 18:30:06 +00:00
Marc Mutz
9bf8cc1f18 qimage_conversions.cpp: keep shared copies of gray and alpha color tables
Since QVector is implicitly shared, don't re-generate the same
two color tables all over again, but create them once and keep
them around in a Q_GLOBAL_STATIC.

Change-Id: I9a8d32021d8cc327264f2818a23beaae67fe3ee8
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-02-13 18:27:17 +00:00
Nico Vertriest
6fe386ac42 Doc: Updated doc QSqlDatabase
Change-Id: I914e9bdbf6137f0e3858a57b0f59fc550fc7e317
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
2017-02-13 15:45:06 +00:00
Joerg Bornemann
1b46872cde qmake/nmake: Prevent overlong lines in link and lib response files
Linking with too many object files could lead to "LNK1170: line in
command file contains 131071 or more characters". Do not write all .obj
files into one line but respect a limit of 1000 characters. If the limit
is reached the object files are separated by newlines instead of spaces.

Task-number: QTBUG-58710
Change-Id: Ibae1f737d6b614a9624b4e00cdd21d3722d341e3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-02-13 14:48:15 +00:00
Friedemann Kleint
e8a2a9bf30 Windows QPA: Include GL header depending on presence of dynamic GL
Amends change 7780ee9e5f.

Task-number: QTBUG-58178
Change-Id: I0b6e064dfdbdafb7fba9c20c56cfd873fa594c44
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-02-13 12:04:39 +00:00
Oswald Buddenhagen
e3e2bc2109 announce 'temporaryfile' feature in bootstrap library
qmldevtools refers to it.

Task-number: QTBUG-58819
Change-Id: Id88265bb17e4d2e9c61f77409c4163eacc4a13f3
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-02-13 09:20:07 +00:00
Dominik Holland
088bf1fb3d Add the new NVIDIA specific calls to qeglstreamconvenience
NVIDIA 370 introduced new calls needed to work with eglstreams in the
wayland window system

Task-number: QTBUG-58299
Change-Id: I606b143d3016f365b0d5ca4bc163b99289afbea1
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2017-02-13 09:17:39 +00:00
Marc Mutz
0d2791c5f6 QCollatorSortKey: add some std::move
All implementations of QCollator::sortKey() can benefit from
moving their CollatorKeyType into the QCollatorSortKeyPrivate
on construction.

So make the QCollatorSortKeyPrivate ctor a perfect forwarder
for its m_key member, and add std::move() calls where they
were missing (in all but one case, lvalues were passed).

Make the ctor explicit, as it should have been from the
beginning.

Change-Id: I2a1cdda5fd23990ace019b963df895c621a1fa85
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-02-13 08:42:46 +00:00
Marc Mutz
a85b4d79db QThreadPool: replace a QSet with a QList
QThreadPool maintains three containers of QThreadPoolThread*:

- allThreads, a QSet
- waitingThreads, a QQueue
- expiredThreads, also a QQueue

None of the operations on allThreads make use of QSets fast lookup.
The only functions called on it are isEmpty(), count(), insert(),
and swap().

Since therefore QSet adds nothing but overhead, causes indeterminism
(e.g. when deleting threads in Private::reset()) and code bloat, use
the same container for allThreads that underlies QQueue: QList.

Port insert() to append(). Add an assert to verify that we're not
running into an ABA problem here (but this should never fire, since
we're never deleting threads except in Private::reset(), where we
do remove them from allThreads), just in case.

Saves ~0.5KiB in text size on optimized Linux AMD64 GCC 7.0 builds.

Change-Id: I53a4d5ef2c204420f7c8852f1e72ab3d6ea43d08
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-02-13 08:42:41 +00:00
Filipe Azevedo
9db8c171e7 Fix QLibrary::isLibrary on Apple platforms
Add proper support for 'so' and 'bundle' suffixes.  Qt wrongly assumes
.so libraries are not versioned on Apple platforms, which is
wrong. Also, the shared library .bundle which is what Apple recommends
instead of .so, are also versioned (not to be confound with the
different Core Foundation bundles, which are directory hierarchy).

For more info, see http://docstore.mik.ua/orelly/unix3/mac/ch05_03.htm.
Especially the part that reads:

"Loadable modules, called bundles in Mac OS X, have the file type
MH_BUNDLE. Most Unix-based software ports usually produce bundles with a
.so extension, for the sake of consistency across platforms. Although
Apple recommends giving bundles a .bundle extension, it isn't
mandatory."

Task-number: QTBUG-50446
Change-Id: Iacd5136397a12d65d83821434f332eb602550b4b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-02-12 18:25:42 +00:00
Thiago Macieira
b2ffc4d0a0 moc: remember to quote the path to moc_predefs.h
Task-number: QTBUG-58764
Change-Id: I4baef2edf7624ad69d96fffd14a22209a2bb90be
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-02-12 18:10:36 +00:00
Tor Arne Vestbø
7efd024b92 macOS: Make QMacNativeWidget example more usable
Change-Id: I3948c998dfbc2982a79d597c7ea3bc226df9c125
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-02-12 12:29:55 +00:00
Thiago Macieira
418184c2a0 Update the __xxx__ macros due to MSVC and ICC not defining them all
And if __AES__ or __PCLMUL__ is defined, then we expect wmmintrin.h to
exist.

Change-Id: I445bb15619f6401494e8fffd149db77dc513e071
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2017-02-12 08:16:05 +00:00
Thiago Macieira
b1b53b7101 Revert "Add tests for QCollatorSortKey"
This reverts commit b0c1e07d64.
The unit tests it introduced trigger errors with the macOS and
Win32 implementations, which means the there's something seriously
wrong with either the API, our implementation or the tests.

Revert for now until this gets fixed. Blacklisting was also the
wrong tool to use. The tests should have used QEXPECT_FAIL.

Change-Id: Ida20c6bbe0c019835a22464535029585e8e1e367
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-02-12 08:15:48 +00:00
Tor Arne Vestbø
b5068a2831 macOS: Don't try to cast foreign windows to QNSView
Change-Id: I08a4d76310a689c3c855d4c8306f9d7aa5cecadc
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-02-11 21:49:14 +00:00
Tor Arne Vestbø
0b18d51b89 macOS: Handle window state changes directly in QCocoaWindow
Now that notification callbacks are delivered directly to QCocoaWindow,
it doesn't make sense to then send them to QPA via QNSView. By skipping
the QNSView roundtrip we also enable window state notifications for
foreign windows.

As an optimization we no longer flush all window system events, but use
the new synchronous API to deliver the window state change event.

Change-Id: I529b625fbe22e664c34a51bcd4448d1bf0392e6b
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-02-11 21:48:45 +00:00