Commit Graph

5862 Commits

Author SHA1 Message Date
Simon Hausmann
55655abfaf Insignifify qfileinfo on Windows, like QDir
Change-Id: I46595b2802321fa799fd6b0e91ab2cbcbb0193f5
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-06-20 15:26:14 +00:00
Simon Hausmann
e817ab43c2 Extend flakeyness of tst_QDBusAbstractAdaptor::overloadedSignalEmission(int)
This isn't specific to an Ubuntu version, unfortunately. It also fails
on OpenSuSE occasionally and other Ubuntu versions.

Change-Id: I6a1ca55a198270f1a1e8a9916e9f768762211550
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-06-20 15:26:10 +00:00
Simon Hausmann
fd9cf9e800 Blacklist flakey tst_QTimeLine::duration test on Windows
Change-Id: Ib9f901da5675a6eb86b90c5137afb66245c395a4
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-06-20 15:26:06 +00:00
Simon Hausmann
ba9bbf596f Improve debug output of tst_QTimeLine::frameRate()
When the test fails, show the actual signals spy count.

Change-Id: Id7312bfbfb6531404a9df73234031f13295c80ea
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-06-20 15:26:02 +00:00
Simon Hausmann
23cb449885 Extend tst_QPauseAnimation::pauseAndPropertyAnimations blacklist
Unfortunately it's flakey all over ;(

Change-Id: I1395af8a3186b3bc65cd79a60ae434dd9689d6e5
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-06-20 15:25:58 +00:00
Simon Hausmann
c2c9751c55 Blacklist tst_QPropertyAnimation::startBackwardWithoutEndValue on Windows
It's flakey with 'current > 42' sometimes succeeding and sometimes failing.

Change-Id: I86f52b0d0cecd345ed6c5852c822d12eae6acb26
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-06-20 15:25:54 +00:00
Simon Hausmann
88c98f38fe Extend the scope of QTBUG-30943
The failure of this test is not architecture specific but rather
Windows specific. It is failing on either type of Windows machine at random
intervals.

Change-Id: Ie3ab1d868053b22ee5b0d965a8cd6b923985b019
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-06-20 15:25:43 +00:00
Simon Hausmann
bc5581f228 Blacklist socks bind test on Windows
The test is very flakey.

Change-Id: I6cb7ee7989169d077104883a02bb9240bafabe38
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-06-20 15:25:39 +00:00
Simon Hausmann
7a04670e53 Blacklist tryAcquireWithTimeout
All variants of the tests are timing out randomly on all platforms :(

Change-Id: I9244602a8d06fd07d3cc99b2fb8fdf6e07e92cf2
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-06-20 15:25:35 +00:00
Simon Hausmann
b373d183de Insignifify qdiriterator test
Crashes on Windows in release builds :(

Change-Id: I6802af510046de414ba5b6c6fb4c4c2c90703a3d
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-06-20 15:25:31 +00:00
Laszlo Agocs
a6000e2b66 windows: Disable D3D9/11 with ANGLE in VMs
By adding support for the driver description, we can detect if
we are in VMware. In this case D3D9 and 11 get disabled, so only
the software-based options are in use.

This allows running autotests like tst_qopengl, tst_qopenglwidget,
tst_qgl, etc. in the Qt CI system. There OpenGL 2.x is not available,
so ANGLE is the only option. D3D11 is not an option, so it picks D3D9
by default. However, this results in mystic failures. The stable solution
seems to be to use WARP. This can be achieved by setting disable_d3d9 in
the built-in GPU blacklist.

Change-Id: I937c4b3fa82fc1a2d524b4eb712732722df2070c
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-06-19 17:52:19 +00:00
Marc Mutz
fedb442db3 QCommandLineOption: optimize ctors
...by moving common code into the Private ctor,
and catering for C++11 move semantics a bit.

Saves ~1.5KiB in text size on Linux GCC 4.9 C++11 release
builds.

Change-Id: I52ed7e47f76b69500a871844c0920e27fe51a127
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-06-19 16:29:50 +00:00
Marc Mutz
24ef5d2263 QStringRef: add truncate()
Missing part of QString API.

[ChangeLog][QtCore][QStringRef] Added truncate(int).

Change-Id: I49e218daf8f47fcd3dad131155e0abc8e2a133e5
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-06-19 05:41:41 +00:00
Marc Mutz
302cc32dee QMap: add const equal_range() overload
... to prevent detaching.

[ChangeLog][QtCore][QMap] Added const equal_range() overload.

Change-Id: I4b39abb8ad41ba6eaa8f9a9a74ed74ed10337dd3
Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-06-19 05:41:33 +00:00
Marc Mutz
6f530fe4d6 QVector: add move(int,int) for QList compat
Change-Id: I67948621313f2e7c69abe7ef95ee82ca64c6512a
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-06-18 19:58:58 +00:00
Friedemann Kleint
c0eafb9d75 QMenu/QToolBar: Add overloads of addAction() using Qt 5 signals and slots.
Add documentation dummies and templates, add tests verifying
compilation.

Change-Id: Ide336b28bc069cfd17848ce3a17fd428e36ed65b
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-06-18 14:42:24 +00:00
Marc Mutz
742c6ff5dc tst_QStateMachine: replace inefficient QLists with QVector
It's just a test, but it's in the way of automatic tracking
of inefficient QLists.

Change-Id: I2dcfd81c9e208dab57bb256d7c276ad5303f196c
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-06-17 07:10:11 +00:00
Marc Mutz
2d9700c041 QPointer: add member-swap
Change-Id: I5704badc86f98e549c586656ec8df3915632ce15
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-06-17 07:09:57 +00:00
Friedemann Kleint
8d5516b585 Add check for top level widget leaks in kernel test of QtWidgets.
Add a cleanup function for the check and disable animations
in tst_qwidgetaction to prevent effect widgets from interfering
(vista style animations).

Change-Id: I043ecb131c8dcd07b6ef10bc75c9e010ab569e85
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
2015-06-16 14:14:18 +00:00
Olivier Delbeke
28ceb2ea5e Added SSL support for MySQL database connections
Addition of new options SSL_KEY, SSL_CERT, SSL_CA, SSL_CAPATH and SSL_CIPHER
to allow SSL-encrypted connections to MySQL databases.
When needed, these options must be specified in the function call
QSqlDatabase::setConnectOptions() before the call to QSqlDatabase::open().

SSL_KEY = the path name to the key file
SSL_CERT = the path name to the certificate file
SSL_CA = the path name to the certificate authority file
SSL_CAPATH = the path name to a directory that contains trusted SSL CA
certificates in PEM format.
SSL_CIPHER = a list of permissible ciphers to use for SSL encryption.

These options replace CLIENT_SSL (which should not be used any more).

Example:
    db.setConnectOptions("SSL_KEY=client-key.pem;" \
                         "SSL_CERT=client-cert.pem;" \
                         "SSL_CA=server-ca.pem");

[ChangeLog][QtSql] SSL support for MySQL database connections has been added.
Option CLIENT_SSL replaced by SSL_KEY, SSL_CERT, SSL_CA, SSL_CAPATH and
SSL_CIPHER, so that the keys, certificates and cipher can be specified.

Task-number: QtBUG-3500
Change-Id: I8197234b169a818658678d6fcc953c90e83db23e
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2015-06-14 15:49:24 +00:00
Simon Hausmann
f3939d943e Blacklist and skip various tests that are flakey
They didn't show up in the "old" CI runs because they usually pass the second
time they are executed - which the testrunner does. The new CI doesn't do that
anymore, instead we now mark those tests explicitly and will track their record
of passing and failing in the new metrics database.

Change-Id: Id34dd6f792f38995b07b6fec88f833df64de2f8b
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2015-06-14 10:50:45 +00:00
Simon Hausmann
630855263a Blacklist tst_QThreadPool::expiryTimeoutRace() on OS X
Sometimes it works and sometimes it hangs. This is the back-trace
when it hangs:

 FAIL!  : tst_QThreadPool::expiryTimeoutRace() 'task.semaphore.tryAcquire(numTasks, 10000)' returned FALSE. ()
    Loc: [tst_qthreadpool.cpp(380)]

 ========= Received signal, dumping stack ==============
 (lldb) process attach --pid 31360
 Process 31360 stopped
 Executable module set to "/Users/qt/work/qt/qtbase/tests/auto/corelib/thread/qthreadpool/./tst_qthreadpool.app/Contents/MacOS/tst_qthreadpool".
 Architecture set to: x86_64-apple-macosx.
 (lldb) bt all
 * thread #1: tid = 0x11f82a, 0x00007fff87451716 libsystem_kernel.dylib`__psynch_cvwait + 10, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
   * frame #0: 0x00007fff87451716 libsystem_kernel.dylib`__psynch_cvwait + 10
     frame #1: 0x00007fff8102dc3b libsystem_pthread.dylib`_pthread_cond_wait + 727
     frame #2: 0x000000010b160dab QtCore`QWaitConditionPrivate::wait(unsigned long) + 75
     frame #3: 0x000000010b160c62 QtCore`QWaitCondition::wait(QMutex*, unsigned long) + 162
     frame #4: 0x000000010b15d66a QtCore`QThreadPool::~QThreadPool() + 106
     frame #5: 0x000000010b0c6bec tst_qthreadpool`tst_QThreadPool::expiryTimeoutRace() + 380
     frame #6: 0x000000010b0ccabb tst_qthreadpool`tst_QThreadPool::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) + 139
     frame #7: 0x000000010b3138e2 QtCore`QMetaMethod::invoke(QObject*, Qt::ConnectionType, QGenericReturnArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument) const + 1026
     frame #8: 0x000000010b312f0a QtCore`QMetaObject::invokeMethod(QObject*, char const*, Qt::ConnectionType, QGenericReturnArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument) + 2122
     frame #9: 0x000000010b0ec18f QtTest`QTest::qInvokeTestMethod(char const*, char const*, QTest::WatchDog*) + 1535
     frame #10: 0x000000010b0e7847 QtTest`QTest::qExec(QObject*, int, char**) + 1447
     frame #11: 0x000000010b0cc954 tst_qthreadpool`main + 132
     frame #12: 0x000000010b0c4e74 tst_qthreadpool`start + 52

   thread #2: tid = 0x11f82c, 0x00007fff87452662 libsystem_kernel.dylib`kevent64 + 10, queue = 'com.apple.libdispatch-manager'
     frame #0: 0x00007fff87452662 libsystem_kernel.dylib`kevent64 + 10
     frame #1: 0x00007fff88af1421 libdispatch.dylib`_dispatch_mgr_invoke + 239
     frame #2: 0x00007fff88af1136 libdispatch.dylib`_dispatch_mgr_thread + 52

   thread #3: tid = 0x11f82e, 0x00007fff87451e3a libsystem_kernel.dylib`__wait4_nocancel + 10, name = 'QThread'
     frame #0: 0x00007fff87451e3a libsystem_kernel.dylib`__wait4_nocancel + 10
     frame #1: 0x00007fff81911090 libsystem_c.dylib`system + 425
     frame #2: 0x000000010b0e6fa6 QtTest`stackTrace() + 150
     frame #3: 0x000000010b0efd1d QtTest`QTest::WatchDog::run() + 77
     frame #4: 0x000000010b15f723 QtCore`QThreadPrivate::start(void*) + 339
     frame #5: 0x00007fff8102b899 libsystem_pthread.dylib`_pthread_body + 138
     frame #6: 0x00007fff8102b72a libsystem_pthread.dylib`_pthread_start + 137
     frame #7: 0x00007fff8102ffc9 libsystem_pthread.dylib`thread_start + 13
 (lldb) quit
 ========= End of stack trace ==============
 QFATAL : tst_QThreadPool::expiryTimeoutRace() Test function timed out
 FAIL!  : tst_QThreadPool::expiryTimeoutRace() Received a fatal error.
    Loc: [Unknown file(0)]

Change-Id: I12a61496e101c1bc04bb7f1141c4f6318e8238e4
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2015-06-12 14:35:53 +00:00
Ulf Hermann
5ab74ffca1 Namespace copy of QFileSystemIterator in QDirIterator benchmark
Otherwise you cannot link it statically against QtCore.

Change-Id: I4ac35602cea2192974f3e96ecad35edac976ce27
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-06-12 13:52:55 +00:00
Olivier Goffart
7f85fb4654 Allow types with a comma in Q_PROPERTY
This allows for example properties with QMap<Foo, Bar>

[ChangeLog][QtCore] Types in the Q_PROPERTY macro can now contain commas
(for example, QMap<Foo, Bar>)

Change-Id: Ibf5c8c9cf20a7c8b3dfec9e891fb8a9ca1bdba7c
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-06-12 11:36:32 +00:00
Marc Mutz
e593891b15 Add qHash(QSizePolicy)
Size policies can be compared for equality,
so qHash should be overloaded, too.

[ChangeLog][QtWidgets][QSizePolicy] Added qHash(QSizePolicy).

Change-Id: Id219f47ac6cb236efdd73cad7b892c8efd034d5c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2015-06-12 07:48:24 +00:00
Friedemann Kleint
d0f64542c8 Output registered enumeration names in QCOMPARE.
Produces output:

FAIL!  : tst_qquickwindow::cursor() Compared values are not the same
   Actual   (clippedItem.cursor().shape()): ForbiddenCursor
   Expected (Qt::ArrowCursor)             : ArrowCursor
   Loc: [tst_qquickwindow.cpp(1465)]

Change-Id: I8a9dfa099a6011cbe0c07da683d4be3d07e22d5d
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
2015-06-12 07:48:22 +00:00
Friedemann Kleint
898ce1dcf5 networkselftest: Fix handling of the smbclient process.
When the server could not be reached, the test previously,
produced:

FAIL!  : tst_NetworkSelfTest::smbServer() 'smbclient.waitForFinished(5000)' returned FALSE. ()
-   Loc: [tst_networkselftest.cpp(992)]
QWARN  : tst_NetworkSelfTest::smbServer() QProcess: Destroyed while process ("smbclient") is still running.

Fix this by:
- Using QStandardPaths::findExecutable to locate the binary instead
  of test-wise starting it.
- Add a function to ensure process termination.
- Pass a timeout argument to smbclient and pass an interval
  depending on it to waitForFinished(), which should prevent
  having to kill the process in most cases.
- Add proper error message

Change-Id: I1cbc76ca69aec7d1e0e880685bed54b0ba7f21c7
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-06-10 12:50:12 +00:00
Dmitry Shachnev
657a8cf5be Remove exec bits from files that should not be executable
Change-Id: I66f49c6db82eadc3b11cc9b1cf01375e9596a8e6
Reviewed-by: Lisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2015-06-07 22:50:19 +00:00
Lars Knoll
19ed646bce Make the test pass on high res mac displays
Change-Id: I05f156faae85abe11edc954dd358ddfcfd320c74
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-06-06 12:01:30 +00:00
Lars Knoll
83eb09d591 Wait for the window being active before sending it events
Change-Id: I2f5d6e37e630d70c4ba3ae81e807a89c447c8b26
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-06-06 12:01:25 +00:00
Lars Knoll
3658b62781 Fix the autotest on Mac
Don't hit the scrollbar with the mouse click

Change-Id: Ie82d8c5c058df9a482e7d5de2fe40681572f19ad
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-06-06 12:01:16 +00:00
Lars Knoll
73cc3db4d5 Fix qgraphicswidget::initStyleOption autotest
make sure it'll work with the new mouse handling as well.

Change-Id: Ia2d567e618b77b0fa3532ee6c335cbdf5e496241
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-06-06 12:00:52 +00:00
Lars Knoll
71388c37d2 Clean up the qgraphicsscene autotest
Change-Id: I8950a3eb9792dff90ed64cd3bf1d572745b05886
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-06-06 12:00:32 +00:00
Friedemann Kleint
d7f15e67f9 Manual touch test: Add gestures.
Add command line options for
- Grabbing gestures
- Suppressing mouse and touch events

Add gesture events to the log.
Add a hierarchy of gesture classes storing the parameters
of finished gestures with drawing functionality and
implement for pan and swipe.

Task-number: QTBUG-46195
Change-Id: I019fe5b60116316a54e11b2c30e1d34f5e72bcf0
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
2015-06-06 06:26:39 +00:00
Simon Hausmann
80bc743406 Fix tst_qglobalstatic on OS X
OS X has an unreasonably low default for the maximum number of open
file descriptors (256). The unit test creates about 200 threads and each
thread in Qt creates at least two file descriptors (pipe), so the test
cannot execute.

Change-Id: I656367bca6d0a40fb1edb8c72914304db0f429ac
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-06-04 05:56:16 +00:00
Simon Hausmann
e2f66f9215 Merge remote-tracking branch 'origin/5.5' into dev
Conflicts:
	src/corelib/global/qnamespace.qdoc
	src/corelib/io/qwindowspipereader.cpp
	src/corelib/io/qwindowspipereader_p.h
	src/corelib/statemachine/qstatemachine.cpp
	src/corelib/statemachine/qstatemachine_p.h
	src/plugins/platforms/xcb/qxcbconnection.h
	tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
	tests/auto/tools/qmake/tst_qmake.cpp
	tests/manual/touch/main.cpp

Change-Id: I917d694890e79ee3da7d65134b5b085e23e0dd62
2015-06-03 10:23:56 +02:00
Friedemann Kleint
cd0bed6d71 Polish and stabilize tst_qtooltip.
- Implement init() and cleanup() to verify that
  no top level widgets are leaked.
- Position widget in tst_QToolTip::task183679() and set
  window title.
- Remove hardcoded wait in tst_QToolTip::whatsThis()
  and use a find function within QTRY_VERIFY().
- Rearrange and clean code a bit.

Change-Id: I0b1ad88444fc9441c1071a2527f75de1f68ea9e5
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-06-02 18:51:25 +00:00
Friedemann Kleint
6fba3c1904 Stabilize tst_qtouchevent.
- Use QTRY_COMPARE() in touchBeginWithGraphicsWidget.
- Change raw event translation tests to wait for the
  window to become active to avoid WM positioning issues.
- Blacklist the raw event translation tests on Linux.

Task-number: QTBUG-46266
Change-Id: I73aae375ee279a518a2a083d0ce8919cce474cb3
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-06-01 13:39:13 +00:00
Marc Mutz
87d57d1994 Fix users of QTextLayout::additionalFormats to use the new API
QTextLayout::additionalFormats setters and getters using QList<FormatRange> have
been deprecated; port to the QVector versions.

Moved op== definition for FormatRange needed in tst_qsyntaxhighlighter.cpp
to a friend declaration in FormatRange itself, because MSVC 2008 doesn't find
it otherwise.

Change-Id: Ibab6589df057f02377d895079b56395859e3401e
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2015-05-30 10:56:24 +00:00
Olivier Goffart
71c85c554a moc: Fix crash parsing invalid macro invocation
When invoking a macro with less argument than it expect, we would
crash trying to access the vector of arguments from the invocation
as we are trying to substitute an argument.

(Note that we do not show an error in case of argument mismatch
because ithat might happen parsing valid code as moc's c++ parser
is not 100% accurate (that was QTBUG-29331))

Task-number: QTBUG-46210
Change-Id: I3f08d7f5049e593a5bdc02a594ea63cadf66e7a4
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
2015-05-30 08:37:11 +00:00
Sérgio Martins
9eff0dd19d QSet: Introduce intersects().
The pattern "mySet.intersect(other).isEmpty()" has been spotted in
the wild and in Qt codebase. intersects() is much cheaper because it
bails out as soon as we find one common item and doesn't do any
allocations.

[ChangeLog][QtCore][QSet] Added intersects().

Change-Id: I44a350dc4cdb9deb835a23eee99fc99d6ca24c82
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2015-05-30 07:15:24 +00:00
Friedemann Kleint
0c5befa129 Reanimate test gui/kernel/qtouchevent/tst_qtouchevent.
Add CONFIG += testcase to the .pro file which was missing.
The test thus was never executed by make check and left to
rot.

Fix up code:
- Remove module includes.
- Introduce explicit constructors taking parent object
  for helper classes, removing calls to setParent().
- Ensure test does not leak objects by converting pointers
  to stack variables or introducing QScopedPointer, verify
  by checking for an empty window list in cleanup().
- Simplify code by removing unneeded variables.
- Split up conditions in QVERIFY().

Fix tests:
- Show windows were required when events are sent to
  QWidget::windowHandle().
- Invert the conditions checking whether touch events are
  accepted by widgets since widgets no longer accept them
  by defaults in Qt 5 after
  e50416066c.
- XFAIL multiPointRawEventTranslationOnTouchPad()
  which started to fail at some point in Qt 5.
- Mark as insignificant on OS X due to crash.

Task-number: QTBUG-46266
Change-Id: I6676d021afb015411a24d97d9b8f7c327d4d3c3f
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-05-29 16:36:48 +00:00
Friedemann Kleint
4964c89540 tst_QDockWidget::restoreDockWidget: Add QSKIP for XCB.
The positioning test has been observed to fail on X11.

Change-Id: I58727126a8742de93ec203e9992a9ae1b454f731
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-05-29 15:20:00 +00:00
Tor Arne Vestbø
5471413522 Add shared implementation of a NSAutoreleasePool wrapper to qglobal
We have at least 5 different (but equal) implementations of a wrapper
in Qt, and some code uses explicit NSAutoreleasePools. Having a shared
implementation lets us clean up things a bit and makes it easier to
reason about which pools are actually needed.

Change-Id: I2fd8eefc3ae7308595ef9899b7820206268362a5
Reviewed-by: Tim Blechmann <tim@klingt.org>
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-05-27 18:45:29 +00:00
Timur Pocheptsov
5449589b7c tst_QApplication - quitOnLastWindowClosed (fix for OS X)
Two (?) tests can fail: what they actually try to test is that our application
quits on the second single shot timer (2 s. timeout) and not on the first one
(timeout 1 s.) - on the first timeout we either ignore event, or we still have another
window and should not quit yet, on the second timeout we actually do quit the app.
The test checks this in a quite fragile way, counting the number of timeouts for the third  100 ms
timer. It looks like on OS X (VM-only) there is some delay (~500-600 ms) before we receive the
first timeout so the count is always 14 or less, making the test to fail.

Change-Id: I9e8728e6c956025d91528f4195982767a5d3d320
Task-number: QTBUG-46164
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
2015-05-27 15:26:27 +00:00
Friedemann Kleint
9749ddeb4b Remove test other/baselineexample.
baselineexample.pro is missing CONFIG += testcase, so,
make check succeeds without doing anything. The test seems
to connect to some network server to retrieve baseline images,
but that infrastructure apparently no longer exists.

Change-Id: I98f4fe5ef8a508fda90e408df2781a944eb99a60
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-05-27 14:11:22 +00:00
Joerg Bornemann
42b7a7c609 Fix crash due to QTreeView accessing deleted model indexes.
QTreeViewPrivate::updateScrollBars depends on a correctly set up
viewItems vector. If a delayed layout is pending, we must call
QTreeViewPrivate::executePostedLayout before accessing any stored model
indices.

Task-number: QTBUG-45697
Change-Id: I55fcbaf81f225b26181c2cf739283740b85dd16a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-05-27 14:04:41 +00:00
Olivier Goffart
02f6b21bbc QMetaType: Fix compilation with non default constructible Q_GADGET
Do not try to automatically register the meta type for Q_GADGET that
are not default constructible.
This fixes a source incompatibility in the function pointer syntax
of QObject::connect when such types are used as an argument of a signal.

Task-number: QTBUG-45721
Change-Id: I3065f6d57bc1f37e16988d2dee99118de250ca56
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-05-27 10:51:10 +00:00
Giuseppe D'Angelo
d1de6c521e QVector: add const first/last getters
Convenience to avoid annoying detaching (instead of using at()),
especially on temporary vectors (returned by functions or so).

[ChangeLog][QtCore][QVector] Added the convenience constFirst
and constLast functions.

Change-Id: If61b1f0096f6a7a1c9074340e237cc2376ce3d18
Task-number: QTBUG-46026
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-05-26 15:21:21 +00:00
Caroline Chao
a8dda3b8b0 Tests: Use blacklist for failing tst_qwidget tests
Remove the insignificant_tests CONFIG option in favor of a BLACKLIST
file. The tests blacklisted have been found using CI builds logs.

Change-Id: Iffc9043654a9dcd97d55e262011c8daff6f4e60f
Task-number: QTBUG-25300
Task-number: QTBUG-45502
Task-number: QTBUG-46325
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
2015-05-26 11:59:02 +00:00