The first time we're going to sleep, the timeout should be exactly the
value that was passed by the user. We don't need to calculate the time
elapsed between start() and a few lines below.
Change-Id: I99c363b6f0ecfd07ad787b79b75e61771733c2b3
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Non-timed mutex locks are by far more common, so let's try not to
penalise the locking of those with code that won't get used that
often.
Change-Id: I37f56d6429836467fdec2e588c0fb22d914b5d75
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Once we enter the inner loop, we never exit it except to return from
the lockInternal() function, so the rest is never executed again.
As a consequence of this, we won't try to fastTryLock() twice per
mutex. Therefore, for a non-recursive mutex, if lockInternal() is
entered, we'll definitely need to use futexes.
Change-Id: Ice617ed27449c1fbdc112a159a86cd0660125e13
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Dispatch to the recursive mutex functions from QMutex::lock, tryLock
and unlock.
This has the benefit that those using QBasicMutex will not go through
the testing for recursive mutexes. It simplifies a little the code for
those users.
For the users of QMutex, the code required to perform a lock does not
appear to change.
Change-Id: I0ca9965e012b283c30f1fab8e9f6d9b3288c2247
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
If the timeout wasn't zero, it can only become zero if we return from
futex() with a non-timeout reason but subsequently expires while we're
recalculating something.
A side effect is that we try-lock a non-recursive mutex exactly
once. Before this change, we'd fastTryLock() twice even with
timeout == 0.
Change-Id: I0af09fc2a84669a683a843fcf1513203b075dfb7
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
A non-recursive mutex doesn't suddenly become recursive, so we don't
need to check it multiple times.
Change-Id: Id040254b6142d320a7bd3111491082ad09968404
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Create a new QDBusConnectionPrivate for every new connection in
qDBusNewConnection instead of creating a single QDBusConnectionPrivate
in the QDBusServer constructor which gets assigned the latest connected
DBusConnection in qDBusNewConnection (and loses track on all previous
DBusConnections).
Also extend tst_QDBusConnection::registerObjectPeer() test with multiple
connections to the server.
Task-Number: 24921
Change-Id: I4341e8d48d464f3fe0a314a6ab14f848545d65a0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Q_DECL_NOTHROW is used by qVersion(), which can be extern "C".
Change-Id: If71f3bc3a0df3e8321237e5ac9f3bea82380c1e4
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Additionally, qmake no longer needs -o since we are in the project
directory.
Change-Id: I89dbe829c064663b653e8f747f0849d63ceb367e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
QElaspedTimer is a lot more efficient.
Change-Id: I66d9514108f800a45181d8960b01a5e7d3fa9e80
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
The test tries to acquire a semaphore that isn't ready, so it will
timeout. The test is working properly.
The only problem is that 10 ms is too strict. For a wide variety of
reasons, especially since the Qt CI system runs multiple tests in
parallel, the program may not run again in that 10 ms window.
Change-Id: Ic0f684895f73646db5f1cc783fe9ef75fb1ab02b
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Fixed so that empty QDateTime is returned for non existing file.
Fixed also created() and lastRead() to return empty QDateTime for
non existing file.
QFileSystemEngine::fillMetaData() returned true for non existing
files. This was also corrected.
Task-number: QTBUG-25811
Change-Id: I523eb99e4405b4b813b2950f85cc646239181d07
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: Christian Stromme <christian.stromme@nokia.com>
Redoing 5704cbc462
This can't work, because the define comes from qconfig.h, not qmake.
Skipping initTestCase and cleanupTestCase when QT_NO_PRINTER is
defined.
Change-Id: I2527c018294b7518a4692f2c93da933848640b5d
Reviewed-by: J-P Nurmi <j-p.nurmi@nokia.com>
Added a dependency on the qtwidgets module to qtcore.qdocconf so that
it has access to widgets examples. Also added examples/widgets to
exampledirs.
Change-Id: I7a69f51d51b65bd534950f0df5b348d6ef61a5d9
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
This test checks the access permissions for '/etc/passwd', however the
filesystem on Blackberry is always read-only
Change-Id: I9299531397d4467287541b04184540ad6e2eae72
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
gcc defines __STRICT_ANSI__ implicitly for -std=c++0x. The MinGW headers
however omit the declaration of common functions like putenv then.
Instead of working around this MinGW particularity on a case by case basis, rather
just use gnu++0x for QtCore.
Change-Id: Iefe4e7f77014a4f1d501b149e34f7049deb52fb9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Also check for c++11 support in configure.exe (which is also used by MinGW builds).
The c++11 check is therefore moved from 'unix' to 'common' directory.
Change-Id: I082848f032c2770e52e34f331b83820f395c06b6
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: Yuchen Deng <loaden@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Use reinterpret_cast to convert from DWORD to pointer.
Change-Id: I17a12940850aeb0bc27080725a18eb93fee72ff7
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
we have been warning about such functions for a while now, now execute.
the qmake language is (generally) case-sensitive, so this wasn't all
that useful anyway.
Change-Id: I1388ac2d5a1104389aeb3347e739a0d5e69e138d
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
the world has awaited this moment for a long time. very patiently.
Change-Id: Iba8697e7eebb5cdd43caadb64cd89126de395e66
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
it's a pretty braindead thing to implement control flow statements as
(built-in) functions.
as a "side effect", this fixes return() value handling for lists.
(cherry picked from qtcreator/f53ed6c4b3feca59a94d4f0de8b1a7411122e30e)
(cherry picked from qtcreator/f529e22ec38fb9a656d74394e484d2453cf42c69)
Change-Id: I59c8efa0e4d65329327115f7f8ed20719e7f7546
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Several functions in qlineedit.cpp are documented but don't exist. QDoc
was complaining... e.g.: "Cannot find 'repaintArea(...)' in '\fn' void
QLineEdit::repaintArea(int a, int b)".
Change-Id: I56ca0dbc8e7b4da5f23ad2ca8d8280cdf91c2dc2
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: Geir Vattekar <geir.vattekar@nokia.com>
Introduced by 2e0003eda4. We were
missing a attributesEmitted=true which caused the output from
toHtml() to sometimes be invalid when using pixel sizes to
specify the font size.
Task-number: QTBUG-25778
Change-Id: Ied61fcaef425a590d71c0b52292ac676cb88ba52
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: Jiang Jiang <gzjjgod@gmail.com>
qTerminate is declared within a #ifndef QT_NO_EXCEPTIONS block, so the
implementation must use the same #ifdef
Change-Id: I5d2d58a55fce5084c0538d18a9dd3998b12ed703
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: Arvid Picciani <aep@exys.org>
This partially reverts commit
07a978d3d4.
Despite what the commit message said, pkg-config previously worked
and was useful, particularly for static Qt. Qt itself even installs
its own .pc files.
Note: The mkspec win32-g++-cross had a PKG_CONFIG definition to avoid
using the pkg-config installation on the build machine.
Change-Id: Ia4a8d18cd57f74a00bdb9b6a171d20151978a9cc
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: Peter Kümmel <syntheticpp@gmx.net>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Extend drawPixmap capabilities for qpa through new ExtendedPixmapCapability
QBlittable flag and add related implementation in DirectFB platform.
Change-Id: If5436e16bfb37bf081bf864cad73a5e97394df8c
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>