Commit Graph

6100 Commits

Author SHA1 Message Date
Olivier Goffart
d206d04b7c moc: fix Q_PROPERTY with parentheses in their MEMBER clause
This was never a documented feature, but happended to work before Qt 5.5.
It broke because the peoperty access went into the static function and are
now prefixed with '_t->'

So restore the behavior as it was by not including the parentheses in the
member name.

Task-number: QTBUG-47695
Change-Id: Ic3509ddea7ac9abc871e71f5bfbe81d04d08e9bc
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
2015-10-22 16:48:26 +00:00
Friedemann Kleint
a3abf9d76b Improve file handling in test of QSettings.
- Avoid duplication of slashes and use static variable for the
  const part in settingsPath().
- Do not run expensive cleanup twice in init()/cleanup() as was
  before by moving the code into a separate cleanupTestData()
  function called from cleanup() and initTestCase().
- Use QDir::removeRecursively() (which should be able to deal
  with readonly files, etc after 26bcc0565f )
  instead of system calls or the special removePath() function for
  CE/RT.
- Switch QStandardPaths into test mode.

Change-Id: Idcde2d17020eae1ea43e448266e3940c06f174ef
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-10-21 16:36:10 +00:00
Laszlo Agocs
2a1d3f330d Add support for TEXTURE_EXTERNAL_OES in the internal texture blitter
Assuming that the target is always GL_TEXTURE_2D is not going to be sufficient
when working with EGLStreams for example where GL_TEXTURE_EXTERNAL_OES is a
must. The blitter is now changed to support multiple programs so other targets
can easily be added as well in the future, if necessary.

Change-Id: I247d30600222fb5af6305ed5d9740baa5e43e83e
Reviewed-by: Louai Al-Khanji <louai.al-khanji@theqtcompany.com>
2015-10-21 13:32:42 +00:00
Marc Mutz
dd8351b654 QLatin1String: add default ctor
A pending change in uic depends on this.

[ChangeLog][QtCore][QLatin1String] Added default constructor.

Change-Id: Ie6f5dfc7b38683a488b0ff7f31404800ef5ee188
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-10-20 09:27:21 +00:00
Marc Mutz
85226dfed3 QLatin1String: add test
QLatin1String wasn't really tested except as a drive-by.
Unearthed a discrepancy with docs. Fixed the docs.

Change-Id: I1246bb33888132edbc4e22da792a480a156357bf
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-10-19 15:55:21 +00:00
Friedemann Kleint
c977c687cb QMdiSubWindow: Do not close when doubleclicking on disabled Restore action.
Check whether the action under the mouse is enabled before closing.

Task-number: QTBUG-48493
Change-Id: I2a0669840b9b6c81dacdf179325301c02f1c0c35
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2015-10-19 11:13:27 +00:00
Friedemann Kleint
2042a091a3 QAbstractItemView::sizeHintForRow()/Column: Check for null delegate.
The delegate may be null in QHeaderView.

Task-number: QTBUG-48543
Change-Id: I4d3ba104b0b57431e8765271dc2dc880be096672
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2015-10-19 11:06:22 +00:00
Lars Knoll
3695285fde The C locale should omit group separators by default
Numbers formatted in the C locale should not use group
separators by default.

[ChangeLog][QtCore][QLocale] The C locale does not use group separators
when formatting numbers any more.

Task-number: QTBUG-4044
Task-number: QTBUG-3068
Change-Id: Ia647a72efc11fecd66d22f9253562b1d4ef58168
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-10-19 07:36:13 +00:00
Morten Johan Sørvig
068a545339 Add support for "@3x" image loading.
Implement as generic "@Nx" support in an exported
qt_findAtNxFile function.

3x devices now get one extra file existence test
in cases where @3x versions are not present. 1x
devices are still on the fast path where there are
no extra file system accesses.

Add an @3x image to the highdpi manual test.

Change-Id: I4ce3fc245ada01ea410abe1443ceb1e3abf7c17f
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-10-16 21:47:25 +00:00
Thiago Macieira
9d1fab424e Make the C++11 atomic support the default, if available
Change-Id: Ib056b47dde3341ef9a52ffff13ef1647ccd607b1
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-10-16 18:52:00 +00:00
Edward Welbourne
1901adbab7 Split two error cases so they get reported distinctly.
If a macro is used with too few parameters, complaining about its
definition using '#' followed by something other than a macro
parameter name is apt to be confusing - reading the definition will
reveal that the name in fact is a macro parameter after all.  The
reader needs attention directed to the invocation, not the definition.

Split the test in two: one to test the prior error message does in
fact get produced for an invalid macro definition, the other to test
the invalid invocation case.

Task-number: QTBUG-46210
Change-Id: Ie177a56d346e553bf9d67e2008a4352633afa1ae
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-10-16 13:59:59 +00:00
Marc Mutz
dde8d5e3a0 QTextStream: add missing op<<(QStringRef)
It simply is missing. We could wait for QStringView to come around, but
I need this function in uic _now_, so let's add it.

[ChangeLog][QtCore][QTextStream] Can now stream QStringRef without converting
to a QString first.

Change-Id: Idd178e0ba8a89c025f4533d46de912cbdb3883d5
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-10-16 12:17:36 +00:00
Liang Qi
b7ac036b72 Merge remote-tracking branch 'origin/5.5' into 5.6
Conflicts:
	src/network/socket/qabstractsocket.cpp
	src/plugins/platforms/winrt/qwinrtscreen.cpp
	src/sql/drivers/mysql/qsql_mysql.cpp

Change-Id: Ifb73623d09f53340ee5e10283f1f86b580998902
2015-10-13 23:03:51 +02:00
Marc Mutz
967e4f258c QLinkedList/QSet: add {const_,}reverse_iterator, {c,}r{begin,end}()
Now all Qt sequential containers consistently provide reverse iterators.

The associative ones, by way of not returning std::pair from op*, can't
just use std::reverse_iterator. They would miss .key() and .value() methods.
So that has to wait for 5.7.

The reverse versions of the new key_iterators can also just use
std::reverse_iterator, but I'm afraid that after bikeshedding over
keyRBegin() vs. rKeyBegin() vs. reverseKeyBegin() vs. rkbegin()
vs. krbegin() (<-- of course, what else?), it would anyway be too
late for 5.6, so defer, too.

[ChangeLog][QtCore][QLinkedList/QSet] Added rbegin(), crbegin(), rend(), crend(),
and reverse_iterator and const_reverse_iterator typedefs.

Task-number: QTBUG-25919
Change-Id: I58316fffade469e9a42c61d7aa1455ae3443fd94
Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-10-13 18:07:20 +00:00
Ulf Hermann
0df5d07929 Don't let closed http sockets pass as valid connections
A QAbstractSocket can be close()'d at any time, independently of its
current connection state. being closed means that we cannot use it to
read or write data, but internally it might still have some data to
send or receive, for example to an http server. We can even get a
connected() signal after close()'ing the socket.

We need to catch this condition and mark any pending data not yet
written to the socket for resending.

Task-number: QTBUG-48326
Change-Id: I6f61c35f2c567f2a138f8cfe9ade7fd1ec039be6
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-10-13 16:40:56 +00:00
Friedemann Kleint
9b6cd2764a Testlib: Output function / total time along with crash dump.
Previously, only QXmlTestLogger had timers to take elapsed times
and log them. Move those into class QTestLog for access by
the loggers and output the times in the crash dump to make it
easier to spot hangs/recursion crashes.

Produces:

QFATAL : foo() Received signal 11
         Function time: 22ms Total time: 23ms

A crash occurred in ...
Function time: 24ms Total time: 26ms

Task-number: QTBUG-47370
Change-Id: Ia530a63104087daffc9a15f68c15d93378b9407e
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-10-13 16:38:43 +00:00
Alex Trotsenko
0872156559 QAbstractSocket: fix writing to socket in HostLookup state
After calling connectToHost(), the socket enters HostLookup state. At this
stage, the socket engine was not created yet, and writing to the socket
should result in either data buffering or an error. So, add a check for
d->socketEngine to prevent a crash on unbuffered sockets.

Task-number: QTBUG-48356
Change-Id: I15ea9ce7de97ce6d7e13e358eca5350745b556bb
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-10-13 05:20:08 +00:00
Juha Turunen
a623fe8d2a Fixed a QTimer::singleShot() crash when a functor callback is used
If QTimer::singleShot() is used with a functor callback and a context
object with different thread affinity than the caller, a crash can
occur. If the context object's thread is scheduled before
connecting to QCoreApplication::aboutToQuit(), the timer has a change
to fire and QSingleShotTimer::timerEvent() will delete the
QSingleShotTimer object making the this pointer used in the
connection invalid. This can occur relatively often if an interval
of 0 is used.

Making the moveToThread() call the last thing in the constructor
ensures that the constructor gets to run to completion before the
timer has a chance to fire.

Task-number: QTBUG-48700
Change-Id: Iab73d02933635821b8d1ca1ff3d53e92eca85834
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-10-12 16:45:04 +00:00
Christoph Schleifenbaum
0cfdfcc82e QListView: Use correct available size when calculating scrollbars.
Calculation was working as long as one didn't use per pixel scrolling.

Task-number: QTBUG-48579
Change-Id: Ie02e28b008c5c81ed45d7dd17fed96148c23b598
Reviewed-by: Thorbjørn Lindeijer <bjorn@lindeijer.nl>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: David Faure <david.faure@kdab.com>
2015-10-12 08:41:06 +00:00
Olivier Goffart
de70798859 QMetaProperty::write should reset the property if an empty QVariant is given
[ChangeLog][QtCore][QMetaProperty] write() now resets the property if an
empty QVariant is given, or set a default constructed object if the
property is not resettable

Change-Id: I9f9b57114e740f03ec4db6f223c1e8280a3d5209
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-10-09 15:26:38 +00:00
Ulf Hermann
54b5287adf Insert leading after each line, not before
Task-number: QTBUG-45791
Change-Id: I763d9d1ba00989d0c6b1e0b955173dadbef26b10
Reviewed-by: Stephen Chu <stephen@ju-ju.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-10-09 15:18:11 +00:00
Olivier Goffart
a3a7d485fa Fix crash in QMetaProperty::write for custom types and conversion
if t >= QMetaType::User, we would not return false nor call convert.
We would then pass a pointer to whatever is in the QVariant to the
qt_metacall that is expecting a pointer to an object of a different type.

Since we have custom converters, we can call QVarent::convert even for
custom types anyway.

[ChangeLog][QtCore] Fixed crash when setting a QVariant of a different
type to a property of a custom type. Attempt to do a conversion instead.

Task-number: QTBUG-40644
Change-Id: Ib6fbd7e7ddcf25c5ee247ea04177e079f6d7de35
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
2015-10-09 07:59:07 +00:00
Alexander Volkov
04e8d72a64 xcb: Add support for Qt::WA_ShowWithoutActivating
Also re-enable and update the tst_showWithoutActivating test.

Change-Id: Ic7fa9b1bf7637e4661c593aaeabb3220cd4204ff
Task-number: QTBUG-46098
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-10-08 07:11:06 +00:00
Marc Mutz
eb88d77a27 tst_qversionnumber: enable c++11 and don't use core-private
QVersionNumber is now public API.

Change-Id: I5b21b6ce5f1651158b6f29bc6f06e5d4e133bed8
Reviewed-by: Keith Gardner <kreios4004@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-10-07 19:03:12 +00:00
Libor Tomsik
3c449f7da5 Fix selected items after sorting in QTableWidget
OldPersistentIndexes store selected items during sort operation. They
were wrongly taken from static list of indexes. This change takes them
from parent (QTableWidget) who maintains the list of selected segments.

Task-number: QTBUG-48408
Change-Id: Ie1bc4071a275dd76d113d883ab30ccd4cb1fa625
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-10-07 18:19:57 +00:00
Liang Qi
925d6eff3e Merge "Merge remote-tracking branch 'origin/5.5' into 5.6" into refs/staging/5.6 2015-10-02 17:24:58 +00:00
Liang Qi
d0eaa737e1 Merge remote-tracking branch 'origin/5.5' into 5.6
Conflicts:
	qmake/doc/src/qmake-manual.qdoc
	src/corelib/tools/qstring.h
	src/gui/image/qimagereader.cpp
	src/network/access/qnetworkaccessmanager.cpp
	src/tools/qdoc/doc/examples/examples.qdoc
	src/widgets/accessible/qaccessiblewidgetfactory_p.h
	src/widgets/doc/qtwidgets.qdocconf

Change-Id: I8fae62283aebefe24e5ca4b4abd97386560c0fcb
2015-10-02 16:59:55 +02:00
Friedemann Kleint
bbb2c95d7a tst_qdesktopservices: Use regular expression to suppress error message.
The error return has been observed to vary.

Task-number: QTBUG-48566
Change-Id: Iecfe7819898a6a8a482c1b2251543193ecfa4841
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
2015-10-02 09:34:41 +00:00
Friedemann Kleint
0addf25bd7 tst_QSharedPointer: Add jom.exe to the list of make tools to be searched.
Task-number: QTBUG-48565
Change-Id: I9b1371fb1d3ea451c185bfe5fa3a6acabe28be15
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
2015-10-02 09:34:35 +00:00
Edward Welbourne
2c5126b9de Purge extraneous execute permissions.
Source files should not be executable.

Change-Id: If9b9eaa6c8c7348ca6f48fa9253f3540e95aca37
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
2015-09-30 18:26:21 +00:00
Friedemann Kleint
3130f0865a Improve tst_qfile.
- Introduce consistent error messages for failing QFile::open()
  and existence checks to make errors about non-available
  UNC paths on Windows clearer.
- Introduce a guard class to ensure the stdin reader processes
  are terminated properly in case of failures, which currently
  occur for MSVC2015.
- Fix brace coding style and remove unnecessary QString
  conversions.

Task-number: QTBUG-48504
Change-Id: I890b13088558ef05391fb152a6b815276df0fe8c
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-09-30 17:28:49 +00:00
Friedemann Kleint
0bc3983b8a Improve messages in tst_qdir/tst_fileinfo/tst_qfiledialog2.
Introduce error messages showing the path in file existence,
file type and directory entry list tests to make fails related
to missing UNC shares clearer.

Task-number: QTBUG-48504
Change-Id: I5fb401b94cfa8b58562a906b8d9765039e334027
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-09-30 17:27:58 +00:00
Edward Welbourne
b86efb1ab9 Initialize QFutureWatcherBasePrivate::finished and test
It's accessed by QFutureWatcherBase::isFinished(), potentially before
anything has set it.  It gets to be initially true until setFuture()
has given it us unfinished future and set it false.

Add a regression test for matching state in future and watcher.

Task-number: QTBUG-12358
Change-Id: Iae7bdaa434ab80f518afe4d7d55df99c391991a4
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
2015-09-30 08:25:34 +00:00
Friedemann Kleint
0ebebeb983 MSVC2015: Blacklist tests reading from stdin in buffered/text mode.
- tst_QProcess::fileWriterProcess()
- tst_QProcess::readLineStdin()
- [tst_QProcess::readLineStdin_lineByLine()

The test fails apparently due to a bug in its runtime library
(fread() dropping data).

Task-number: QTBUG-48455
Task-number: QTBUG-48504
Change-Id: I972e560e88312cea0d3dbcea9450c59285a15d5a
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
2015-09-30 07:54:58 +00:00
Joni Poikelin
0f48a0ed04 Clean unused parameter warning from QItemSelectionModel test
Change-Id: I6bd40e8de7b44630ef5c7475b8159ab9a0361cb9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-09-30 06:36:21 +00:00
Friedemann Kleint
a2995c180b tst_qprocess: Improve handling of helpers.
Verify exit status and code where applicable. Avoid unnecessary
data conversions in fileWriterProcess. Improve error handling in
helper processes.

Task-number: QTBUG-47370
Task-number: QTBUG-48455
Change-Id: Ib5c4f546027131db02caaa05154a5880edac5cf7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-09-30 04:29:56 +00:00
Friedemann Kleint
78f9b16d60 Skip tst_QNumeric::addOverflow() for MSVC2015.
The code still produces  Internal Compiler Errors in release mode.

Task-number: QTBUG-46344
Change-Id: I86d3608b13a197a0b65b83829d1512203e1578f8
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
2015-09-30 04:28:39 +00:00
Friedemann Kleint
9facf1be9b Tests: Always verify whether QTemporaryDir/File creation succeeded.
Use QVERIFY2() with QTemporaryDir/File::errorString() consistently.
Attempt to catch issues like the below warning and follow-up issues.

QSYSTEM: tst_QFiledialog::clearLineEdit() QFileSystemWatcher: FindNextChangeNotification failed for "C:\Users\qt\_____aaaaaaaaaaaaaaaaaaaaaa"  (Access is denied.)

Task-number: QTBUG-47370
Change-Id: I58a6e87c502627e976efa62ad73c912f3b2d49fa
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
2015-09-28 15:05:43 +00:00
Christian Kandeler
d24366a632 Fix comparisons between QByteArray and QString.
QByteArray::operator< and friends had their logic reversed.

Task-number: QTBUG-48350
Change-Id: I625209cc922b47e78dfb8de9fe100411f285a628
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-09-28 07:42:51 +00:00
Lorn Potter
bb281eea17 Make sure networkAccessibilityChanged is emitted
Task-number: QTBUG-46323
Change-Id: I8297072b62763136f457ca6ae15282d1c22244f4
Reviewed-by: Timo Jyrinki <timo.jyrinki@canonical.com>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2015-09-26 19:14:03 +00:00
Frederik Gladhorn
b2e664df61 Enable tst_qaccessibilitylinux
This test caused problems because it relies on the at-spi services to
run. In addition it could trigger orca (screen reader) to be launched
as a side-effect of the dbus call to the screen-reader-enabled setting.
Instead just export QT_LINUX_ACCESSIBILITY_ALWAYS_ON to make sure that
accessibility will work. This means we won't test the dbus startup any
more, but the test will be reliable.
There is still a dbus call to org.a11y.Bus to launch the service in case
it's not running yet.

Task-number: QTBUG-27732
Task-number: QTBUG-44434
Change-Id: Idb86ed98ca4b47cb209027c8b41529e7e5285197
Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com>
2015-09-26 00:50:44 +00:00
Friedemann Kleint
3cbb89fa5a tst_qprocess: Instantiate QProcess objects on the stack.
Instantiate the QProcess object on the stack to ensure resource
cleanup and remove the QProcess * member variable.
Use qobject_cast<QProcess *>(QObject::sender()) instead
of the member variable in the helpers slots to ensure that signals
from a leaked QProcess do not interfere with other tests.

Task-number: QTBUG-47370
Change-Id: Ifc0dccb7e4b18069d236df53bccdcb6a47df6346
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-09-25 20:22:17 +00:00
Friedemann Kleint
f322e2aa08 tst_qprocess: Port to Qt 5 connection syntax.
Task-number: QTBUG-47370
Change-Id: I09489a6fb4598238fa5e0120bf751fe5af6f31af
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-09-25 20:22:00 +00:00
Shawn Rutledge
61b608dfb5 QScreen manual test: don't crash when a QScreen is null
Need to survive having screens detached/reattached on X11.

Task-number: QTBUG-42985
Change-Id: I81cf9721f0cb61a29180c60d44d588063266e651
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-09-24 20:15:35 +00:00
Thiago Macieira
3bcb3c64e2 Use QTypeInfo<T>::isRelocatable in QVariant
Change-Id: Ib306f8f647014b399b87ffff13f1f01c40dc3ef7
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-09-24 16:55:10 +00:00
Christian Kandeler
73b8cd879c QSettings: Special-case serialization of QDateTime.
QDateTime values with a UTC offset are not correctly serialized with
QDataStream::Qt_4_0. So use a newer QDataStream format for this type and
mark it with "@DateTime" instead of "@Variant".

Task-number: QTBUG-46551
Change-Id: I211c89e8cd0211c949ec993e6ffd5192d0eebbb3
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-09-24 11:25:36 +00:00
Joni Poikelin
61f2e9a9a7 Fix QItemSelectionModel deselection range
Left and right were swapped which caused invalid selection ranges to be
emitted through selectionChanged.

Task-number: QTBUG-48402
Change-Id: I18692c2b50c49ab39065f9b360b37b7615227ee9
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
2015-09-24 08:13:07 +00:00
Friedemann Kleint
7183d08095 Tests: Harmonize code checking on platform name.
Use case insensitive comparison and static invocation
of QGuiApplication::platformName().

Change-Id: I8c197c7b4f0669f71c019fbcee09a0f03dfab399
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
2015-09-24 07:49:30 +00:00
Thiago Macieira
0d75f8e95a tst_QDBusAbstractInterface: fix racy test failing every so often
The explanation is in the code comment. Ever since QDBusConnections
began being processed in a separate thread, we were relying on the fact
that the main thread didn't begin processing its event queue until the
second event got posted (the event loop only exits after it has finished
processing all pending events). We had a race between the main thread
starting its processing, at which point it decides which is the last
event it will process, and the QDBusConnectionManager thread posting the
second event.

This is very fragile code, since it depends on the behavior of
QDBusConnectionPrivate (how it stores the signal relays in a hash) and
that of QHash with duplicate keys. This only works because the hash
key between the two connections is the same (it's only dependent on the
method name and interface name). If we ever begin using something that
isn't the same between "control" and "p", then with QHash's randomness,
we'll be racy again.

Change-Id: I42e7ef1a481840699a8dffff1406c3a4674ec3a6
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2015-09-24 07:37:05 +00:00
Jędrzej Nowacki
a153bb232c Stabilize qguieventloop test.
The test assumed that an event loop can be tested for emptiness
multiple times, which is wrong because an event can be delivered any
time.

Change-Id: Ic44245321eeed2091b640ada2c83d205b83a1cc2
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-09-24 07:36:25 +00:00