Commit Graph

23959 Commits

Author SHA1 Message Date
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
Marc Mutz
886eac5213 QHttpNetworkHeaderPrivate: use QList<QByteArray>::join()
...instead of coding the loop by hand.

Change-Id: Ieaa066de1ff8552b737cf27cf0d4236efb7296eb
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-06-20 11:40:07 +00:00
Marc Mutz
e173403971 QAbstractItemView: convert some assignments into RVO'ed initializations
Change-Id: If4b612460166675e91906a49e03de8ad4c50739f
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-06-20 11:39:48 +00:00
Simon Hausmann
0e39aeaffb Prospective fix to unbreak qtdeclarative tests
Since commit a6000e2b66 tests run in the
CI now disable D3D11 and are intended to fall back to warp. This
causes additional output, which confuses tests in qtdeclarative
that look closely at the output of processes. So let's make these
debug messages instead of warnings.

Change-Id: I91d2f88c66e2e7368c8cbbfb3aec7ad0c47b8bee
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-06-20 09:56:22 +00:00
Kai Koehne
5147f73ac3 Core: Consolidate QProcess error reporting
Introduce two methods to set set error and errorString, and optionally
emit the error() signal. This also fixes two places where errorString
hasn't been set previously.

Change-Id: Ib7c27ff2daff898745e8e20ff8f11eaae568697f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-06-20 09:48:46 +00:00
Alex Trotsenko
5c0ff27d9b Simplify QIODevice::readAll()
The previous implementation performed reading in two steps:

 - flush the internal buffer
 - request the rest of the data by calling the read() function

It would resize the result buffer separately at each step, even if its
total size was known in advance. This is important for random-access
devices, which may have big chunks of cached data. Also, possible
failures during the second step would cause a loss of result data from
the first stage. This patch eliminates the initial flush, which improves
performance and prevents data loss.

Change-Id: I3da4c24ee33dca6afc4ba519d078b86068de43b9
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-06-20 08:56:14 +00:00
Marc Mutz
657e8ffb9e QSettings: replace a QMap with a QList
The QMap<QString, QString> was only used to create a sorted,
unique list of keys. The associativeness was never used (the
value was always the null QString).

Better to use a QStringList instead and sort-unique the
whole thing at the end.

Saves ~1.6K in text size on Linux AMD64 GCC 4.9 release C++11
builds, and a tremendous amount of heap allocations.

Change-Id: Idf749dd8924b3894e436aa1cee0304002b898975
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-06-20 04:39:15 +00:00
Marc Mutz
669487fe95 QCommandLineOption: prevent aggressive inlining
There is a good chance that in every program, command line options
that have only one name and those that have multiple names are
used. Make better use of the icache by not inlining the Private
ctors into the QCommandLineOption ones.

Saves 400B in text size on Linux GCC 4.9 C++11 release
builds.

Change-Id: I6247d4a2330c5fff75d06f5a40223d972b267e85
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-06-20 04:39:05 +00:00
Marc Mutz
90da7ba49c QFontSubset: mark local types movable and hold in QVector, not QList
Virtually all of these types are too large to fit into a QList.

Change-Id: If55496ef3fb26d6531e9ef1bb1558887d9077a3b
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-06-20 04:38:40 +00:00
Marc Mutz
452ece9c02 Remove quadratic behavior in QFontDatabase::writingSystems()
Looping over QList::contains() constitutes O(N²) behavior,
the more so as this QList is horribly inefficient since
WritingSystem is not a Q_MOVABLE_TYPE.

Since the range of possible unique values in the result
is severly limited (by virtue of being enumerated values),
use a bitmask to remember which WritingSystems were
encountered, then, after releaseing the mutex again, use
that bitmask to populate the QList.

Change-Id: I1d12eb487513ec17faa6f38942f8b681819dc0e8
Reviewed-by: Adam Majer <adamm@zombino.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-06-19 18:37:30 +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
2de01c8388 Move-enable QPixmapCache::Key
The default constructor already sets the d-pointer to nullptr,
so the move constructor does not introduce a new state.

Change-Id: Icd47952bdf76d2106992d6babea40d68f18d067e
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-06-19 17:49:15 +00:00
Marc Mutz
9ab45763d7 QSpdyProtocolHandler: don't create QLists of key and value just to iterate over
Just iterate over the QMultiMap directly. Also, now that we use
iterators, the remove operation becomes amortized O(1) instead
of O(logN). The loop could be even O(N) (clean, not amortized)
if QMap had range-erase.

Change-Id: I0cf3511adc3a558e551ddd91e47dabcab376001a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-06-19 16:30:03 +00:00
Ulf Hermann
8558289780 QtNetwork: fix warnings when compiling with QT_NO_BEARERMANAGEMENT
Resolving d- and q-pointers in code branches where we don't use them is
wasteful and leads to compile warnings.

Change-Id: Ib5dadd247acfe48722121e0e95ffcac61e7a2e09
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2015-06-19 16:29:58 +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
8133b80e63 QCUPSSupport: clear the job-hold-until option if jobHoldToString() is empty
This changes the behavior of the code such that the option, once set,
can also be unset again.

Change-Id: I739f77ae1f1336806aac548f6a797ed6b2770235
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-06-19 16:29:46 +00:00
Marc Mutz
eb5654788b Micro-optimize QSettingsPrivate::processChild() and its users
...by using QStringRef instead of QString, avoiding one
memory allocation in the case of spec != AllKeys and
key containing a '/'.

Also calls one less non-inline function, since
QStringRef::truncated() is inline.

Change-Id: Id5eb203006a3857508c5d3f4b729cde1a5170d58
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-06-19 16:29:41 +00:00
Marc Mutz
e2d83802a0 QPixmapCache: remove unused Q_TEST_QPIXMAPCACHE-only function
Unused by tst_qpixmapcache.cpp and everything else, and
uses an inefficient QList, so remove.

Change-Id: Ia410ed19db9bb3db97460b21bc2fd9d53c95a73d
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-06-19 16:29:24 +00:00
Sérgio Martins
bc977f690f Use Q_GLOBAL_STATIC for QThreadStorage<QGuiGLThreadContext *>
QThreadStorage isn't a trivial type.

Change-Id: Iedc3c16320fd025a0ccf627eac43a85ebd02aa5e
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2015-06-19 16:25:33 +00:00
Sérgio Martins
8f5dceee3c qprinter: Remove superfluous iteration and memory allocation
Instead of iterating through a QList that was constructed
after iterating through all of QSet's elements just iterate
through QSet's elements.

Change-Id: Ie502017976536b14ea9170af550a2d7156443391
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-06-19 16:25:14 +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
Ulf Hermann
5867e0a7ab Don't build CUPS related code if QT_NO_CUPS is set.
Various related classes aren't built in this case, so the build fails
if we try to build the plugin or the widget.

Change-Id: Ia3f8651f172bc3c4c643fb2521601683b403eadc
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
2015-06-18 14:52:21 +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
Alex Trotsenko
a851868e63 QIODevice::atEnd(): fix debug message output
For sequential devices, duplicated bytesAvailable() calls can produce
different results. To avoid a wrong output, print exactly the same
value as would be returned.

Change-Id: I02615dd7375516f7b263eea56bfcf15e2889e6e3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-06-18 07:04:11 +00:00
Marc Mutz
895dbac454 QException: fix exception specification
Some broken compilers (known broken: GCC 4.7; known good: GCC 4.9)
don't understand that destructors are implicitly noexcept and
complain about a weaker exception specification on ~QException
than on ~std::exception.

Change-Id: I433475fcf345d7da55e8da667cf9821ee09c0d8a
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-06-17 13:22:50 +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
b9331eff91 QMetaObjectBuilder: replace an inefficient QList with QVector
ints are only half the size of void* on 64-bit, so
QVector<int> uses only 50% of per-element memory,
compared to a QList.

Saves ~1800B of text size on GCC 4.9 optimized C++11 AMD64
Linux builds, even though it wasn't the last instance of
QList<int> in QtCore, yet.

Change-Id: Ibf04b26cff78c428e4253aaab7c280866906db58
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-06-17 07:10:06 +00:00
Marc Mutz
d4cee10bf8 QMetaObjectBuilder: replace inefficient QLists with QVector
The QMeta*Private classes are larger than a void*, and weren't
marked as movable, so QList<QMeta*Private> is horribly inefficient.

Fix by holding them in QVector instead. Saves ~900B in text size
on GCC 4.9 optimized C++11 AMD64 Linux builds, and tons of memory
allocations.

Change-Id: I313c965d7a0fea16f79e9fde04a972fc248e33aa
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-06-17 07:10:02 +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
Marc Mutz
9f1646b0d9 qDBusRealAddTimeout(): don't create a QList just to check it's empty
Instead of QHash::keys(value).isEmpty(), use QHash::key(value, 0) == 0
(0 is used a failure indicator three lines down, so it should not be
a key in the hash table).

Change-Id: I75cc4f7f7540dc5c51a7b8e3add09a0ec6a75e05
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2015-06-17 07:09:52 +00:00
Marc Mutz
dd788e0dc8 QButtonGroup: don't create a list just to find the minimum element
Change-Id: Ibd66ad81264abbe804db2bae48823966d5e4f449
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-06-17 07:09:46 +00:00
Ulf Hermann
7c34ea1fc7 Don't define qAccessiblePlugins if we cannot use them.
In case of QT_NO_LIBRARY there are no plugins after all.

Change-Id: Iad891d0cf0edf9e4418a4fe4ac49cf6497ceeb79
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
2015-06-16 14:31:00 +00:00
Ulf Hermann
ef0f7f4248 Unify QByteArray::MaxSize and MaxAllocSize
We have established the maximum size qAllocMore can deal with in
commit 880986be23 and we should use
it.

The maximum size for byte arrays is reduced by one byte as with
the previous code we could make qAllocMore produce ((1 << 31) - extra)
by passing (1 << 30). That is not a problem for qAllocMore itself
(as long as extra > 0) but it's hard to verify that no related
code casts the total sum back to signed int, which would overflow
to -1.

To make the compiler inline access to the maximum size, a private
enum MaxByteArraySize is provided, which can be used in internal
code.

This fixes the merge of commits
880986be23 and
c70658d301

Change-Id: Idb04856f7c2e53ef383063e7555d3083020ff2b7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-06-16 14:30:45 +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
Friedemann Kleint
05fa4ac7df configure.exe: Fix detection of DirectWrite for MinGW.
Check on the correct library name.

Change-Id: I10980a8ba3e3e96d368319af0d86d6fb339c03ff
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2015-06-16 14:14:09 +00:00
Oliver Wolff
1de6fd49d1 Use "Ex"-versions of WaitForSingle/MultipleObject(s) where possible
Not only should using the "Ex"-versions be the rule and not the
exception on Windows, but it's only the only way to share as much
code as possible between Desktop Windows and WinRT (which is pushed
by Microsoft a lot). The current rule of Desktop and WinCE vs WinRT
does not make a lot of sense any longer, as WinCE is getting less
and less important. By moving these #ifdefs in favor of WinRT,
WinCe code might be removed easier in the future.

Change-Id: I0ef94fb14fbf8add9c2dfa2a3fb8036d25fb697d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-06-16 06:40:27 +00:00
Olivier Goffart
d3ad8cff17 Make sure the QDockAreaLayoutInfo item_list is detached when we are going to modify it
This can lead to situations in which the gap item ends up in the
saved state
'subinfo' is owned by the item, but the const-ness is not transferred to
the pointer. So calling a non const function (unplug) that changes the
subinfo changes it in the original list as well.
This is a problem because that list might be shared with the saved state.

Change-Id: I90a5faafea5958043db610a84c069494f2e48137
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Jocelyn Turcotte (Woboq GmbH) <jturcotte@woboq.com>
2015-06-16 06:36:05 +00:00
Ulf Hermann
d7e2e943a2 Fix conditions for disabling dbus dynamic symbol lookup
We cannot do this if no library support is present. Incidentally that's
the case when bootstrapping, but you can also set the flag manually.

Change-Id: I51e167176d0839af5858122630ef623a1c69a106
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2015-06-16 06:31:42 +00:00
Marc Mutz
d3cb97172f Micro-optimize QKeySequencePrivate::decodeString()
Use a QStringRef instead of a QString.

Change-Id: I63bf9775606b071cd9614306375e1316dada9f61
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-06-15 18:31:49 +00:00
Laszlo Agocs
3d5612de98 Add a synthesized-by-application value to mouse event source
Task-number: QTBUG-46669
Change-Id: I5567a9fe7ed8a80cd08830250c02f7252fa79bf8
Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
2015-06-15 17:16:17 +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
bca41b1b85 Improve back trace handling
Print the full backtrace including the values of all variables, for
improved diagnostic analysis.

Change-Id: Iffcaa08123599e3610cdc2e316627167bfff0f36
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2015-06-14 13:12:43 +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
Sérgio Martins
80da7792f7 core: Add several QList::reserve() calls.
Reduces reallocations.

Change-Id: Ib63539fb690a80245d8fe81ff8468e79ffa8e57c
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2015-06-12 14:29:34 +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
Ulf Hermann
53b83ac413 Don't try to load opengl extensions or functions without QLibrary
Change-Id: If77ca6e04c83d94fd3063b68963b1bcd90980d99
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-06-12 12:36:42 +00:00
Holger Hans Peter Freyther
8b81f89dff Delete the d_ptr in the destructor
The d_ptr variable is introduced by QGLCustomShaderStage and
needs to be fully handled by it. Delete the d_ptr in the dtor

Fixes Coverity CID #10995.

Change-Id: I76bf05206acf23363419afc95094f5593e808a2e
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-06-12 12:18:03 +00:00