First step to fix race condition about deleting QDBusPendingCallPrivate.
In a multithreaded application on a slow/single core cpu the following
race (and segmentation fault) can occur:
First thread A is running:
A: QDBusPendingReply<> reply = pi->asyncCallWithArgumentList(method, argumentList);
Then when the dbus answer arrives thread B will call:
B: QDBusConnectionPrivate::processFinishedCall()
B: ...
B: locker.unlock()
and runs until here, go on with thread A:
A: reply.waitForFinished();
A: QDBusPendingCallPrivate::waitForFinished()
A: {
A: QMutexLocker locker(&mutex);
A: if (replyMessage.type() != QDBusMessage::InvalidMessage)
A: return;
which returns immediately (mutex acquired, replyMessage alread set), now
reply goes out of scope (destructor called) and QDBusPendingCall::d's
destructor of type QExplicitlySharedDataPointer<QDBusPendingCallPrivate>
deletes the reference counted object QDBusPendingCallPrivate.
Now thread B continues, still in processFinishedCall()
B: if (call->watcherHelper)
B: call->watcherHelper->emitSignals(msg, call->sentMessage);
B:
B: if (msg.type() == QDBusMessage::ErrorMessage)
B: emit connection->callWithCallbackFailed(QDBusError(msg),
B: call->sentMessage);
accessing alread deleted object QDBusPendingCallPrivate via call->...
Fixed QDBusPendingCallPrivate deletion by proper reference counting
will be done in the next commit.
Task-number: QTBUG-27809
Change-Id: I15b3f0242471b62eaafadc763fb6a33339ff2fe1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
In QDBusConnectionPrivate::waitForFinished() pcall->pending was used
after the protection by pcall->mutex was released. A simultaneous
call to QDBusConnectionPrivate::processFinishedCall() was able
to reset pcall->pending to null before it was used for the
q_dbus_pending_call_block(pcall->pending) call.
Fixed by releasing (and setting to 0) of pcall->pending in
processFinishedCall() only in case no one is waiting yet, otherwise
release pcall->pending by the first thread waiting in waitForFinished().
There is still a race condition about deleting QDBusPendingCallPrivate
(too early) which will be fixed in the next two commits.
Task-number: QTBUG-27809
Change-Id: I040173810ad90653fe1bd1915f22d8dd70d47d8c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
On the Android Emulator, the shaders will be compiled by a desktop
GL driver, since the GL driver in the emulator is just a thin
wrapper. The GL driver does not necessarily support the precision
qualifiers, which can cause applications to break. We detect this
at runtime in the platform plugin and set a workaround flag to
Task-number: QTBUG-32557
Change-Id: Ied00cfe8e804d1f7862697dd379a14f3bed3d980
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Before this patch we always send mouse events for each
touch event that happens.
This is redundant (we already synthesize in
QGuiApplicatioin) and breaks some touch handling
in QtQuick2.
Change-Id: I4bc1686a7a46039901315619a0acdf2888ad6775
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
On Android, when not using Ministro, we cannot read certificates
from the file system, so we have to get them through Java APIs instead.
Change-Id: I415329fcb45836735c1112dbe832214b3c73dc9a
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
This patch now also copies the state of the QPainter returned from
QPaintEngine::painter for the first page of a print preview, as it is
done for all other pages of a preview in QPreviewPaintEngine::newPage().
Task-number: QTBUG-30621
Change-Id: I50001231c4006b9627ff80504618cbe0fa6d9f65
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
We're rolling back exception safety support
Task-number: QTBUG-32642
Change-Id: I25f20b554a93f25d00cca19b3e308d6cc8fe85e2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Several QOpenGLContext methods fails incorrectly on QWindows from EGL or
MinimalEGL. This is happens because they are incorrectly marked as raster
surfaces instead of OpenGL surfaces.
Change-Id: Ic9b3859915a9049fce442216b01dce89521fa5ee
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Tests are passing nowaways on OS X.
Task-number: QTBUG-27890
Change-Id: I6a0a881ece844ef931cb8af51b58d33c40be4d2c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
The c_rehash'ed symlinks are always there on QNX, so no need to check
at every app start for the feature. This saves ~ 17ms at each app
start.
Task-number: QTBUG-32549
Change-Id: Ia9df60aba9d1bd70868b7004b847867a2128f600
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Added full path to src dir for testdata.
Task-number: QTBUG-32535
Change-Id: I38e96216e9a016869151adf0ae995e068b8b5354
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
Added full path to src dir for testdata.
Task-number: QTBUG-32536
Change-Id: I5ef215d451a6407c277d2c98f21ffc35a8657e28
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
If some of the X11 requests fail, QXcbXSettings::QXcbXSettings() prints a
warning and returns. These error paths all caused memory leaks.
Change-Id: Idfecf03dd412c35552c3bbbebdda9c039aeadc13
Signed-off-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
This option is required to build qtmultimedia without
Windows Media Foundation backend. In this case,
a full DirectShow backend will be build instead.
Change-Id: Ib29ba81ca6cbb00b609cc97fab7da29e61d31d6d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
Now arm specific -mfloat-abi flag is added to compiler flags
only for arm architecture in linux_arm_device_post.conf.
Change-Id: Ie77ac6e0717d9d1fd9c14e1d6a26e86f08ab418c
Reviewed-by: Jarosław Staniek <staniek@kde.org>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Qt::HANDLE is always defined as 'void *' on Qt 5.0
Task-number: QTBUG-32469
Change-Id: I3f0f2b19e65d54c88604e1cb65b5791c456b3003
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Change-Id: I68d087b15839418008db5bf1c0c76ca303245519
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
The $$path may already be absolute, so prepending a slash may
result in //usr/lib, for example.
Task-number: QTBUG-32570
Change-Id: If7a4f6fbec0216404cfe48c1da62d21d75b3e272
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
because of popular confusion.
the packaging scripts now need to use -no-compile-examples explicitly.
Task-number: QTBUG-32449
Change-Id: Iecab1f345afe21e540204fe69a2292ef932cbb61
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
... as that causes debug+release installs to overwrite each other's
postprocessed files.
introduces CONFIG+=sliced_bundle, which instructs qmake to create
file-by-file install commands. we don't know whether people are not
putting files outside qmake's knowledge into the bundle build dir, so
this mode is not necessarily backwards-compatible, and thus off by
default.
Task-number: QTBUG-28336
Change-Id: I23e90985ccd3311f0237ed61aadca6d7ed8325b7
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
by convention, $target.framework/$target links to
Versions/Current/$target, not Versions/$version/$target.
Versions/Current already links to $version.
so this adds one indirection, but is otherwise the same.
Change-Id: If3d1a3713712f4221ec31883977e50bce6f91764
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
this went unnoticed so far, because the mac qmakespecs don't define a
strip command to start with.
Change-Id: Iac3e7ffa6f400373552134a44b9713aaf5f44589
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
replace() doesn't detach if there is nothing to do.
Change-Id: I845b585c766f44a670ca3af1fc11ba03e7317622
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
qmake has the rather bizarre logic that QMAKE_LIBS* is escaped rather
early (instead of right before being written out the the Makefile).
consequently, we need to explicitly escape the paths from the prl files
as well.
Task-number: QTBUG-32326
Change-Id: Ieaf81113d3ca3cf5d8a1ef87c83c5721d6b473ee
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
escape backslashes before the quotes, as otherwise we'd escape the
backslashes we just used to escape the quotes.
Change-Id: I88e12c0c2cfc53e0ab8dce9807b06dfce6aa6e78
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
... as that is the CWD of the command (since b139e7e96e5c).
leave the resolution relative to $$PWD as a fallback with a warning.
Investigated-by: Harald Hvaal <hhvaal@cisco.com>
Task-number: QTBUG-19352
Change-Id: I75de9444a647cd9e6f509e3d8eb3382dc985e5ca
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Some packagers don't want to install the private headers.
Check the existence of private headers only if the 'Private' component
is specified when finding the package.
Task-number: QTBUG-32466
Change-Id: I1fdbfb25e8ce485cd051564b937f766b2733741a
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
XBell() just sends a Bell request to the X11 server. This can be done
equally well (and with less ifdefs) through xcb's xcb_bell().
Change-Id: If41d955aa97acfe9e0a8b9fce05c11ebc146ce8e
Signed-off-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Codecs registered by creating new QTextCodec instances should be listed
there.
Task-number: QTBUG-32500
Change-Id: I56c00e0d6bbfef55a6cbd571bcf9aa2cf333ef3a
Reviewed-by: David Faure <david.faure@kdab.com>
Hardcode our perf_event_open(2) function to simply return -1 and set
errno to ENOSYS. This will disable the functionality.
People compiling Qt with such old headers will probably carry quite a
bit of dead code in QtTest. They should upgrade.
Task-number: QTBUG-32507
Change-Id: I774b4a81bee5c3e2ddc75fa52520d123a6bebed9
Reviewed-by: Jason McDonald <macadder1@gmail.com>
Use "_" instead of "-" in variables so variable replacement works
properly.
Change-Id: I2b17dca8f2351bc0933c165017f3fbb9393b0514
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Currently tst_QEasingCurve::setCustomType() is always failing on CI
when ran on 32 bit 11.10 Ubuntu.
Task-number: QTBUG-32432
Change-Id: Iaf346c14985f14716692fe996714b7040fb70930
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
Scripts are available in internal mkdist repo.
Added license tags, updated licenses and copyrights/contacts
Change-Id: Ibc734275f3000987eaa4f5c57f19d4e1fda2c479
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>