With Xcode7, Apple added support for compiling apps to bit code
instead of binary (*). But this is only supported when the deployment
target is at least 6.0. And in Qt-5.5, the deployment target is
still set to 5.1.1. The result is that every Qt application will fail
building once people move to Xcode7.
Instead of bumping the deployment target (which we plan to do
for Qt-5.6), we choose to switch off bit code for now.
*: https://developer.apple.com/library/prerelease/ios/documentation/IDEs/Conceptual/AppDistributionGuide/AppThinning/AppThinning.html
Change-Id: I23001563439a7726506b7cd2dc77a82533b8a27b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Verify the bounding rect of the left hand side of copy/assignment,
not the right hand side (which is passed by const ref).
Change-Id: I5044d269fe0acb5f4484c82da7e030ca33958792
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
When a font style-name is not directly available from the font we
need to generate it with the data we have, so we should include all
the new supported weights.
Change-Id: I45cc0114f8c76f45bc7a639f9d0d8096a064bc51
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: René J.V. Bertin <rjvbertin@gmail.com>
Reviewed-by: Pierre Rossi <pierre.rossi@theqtcompany.com>
Otherwise, the handler can't be called for a stack overflow.
Change-Id: I5d1e6f7607404caa96e4ffff13e7fabd66011785
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Reviewed-by: Jason McDonald <macadder1@gmail.com>
... and enable auto-deletion on it.
This allows users of the function to get rid of their own
cleanup code. They just need to keep the shared pointer alive
for as long as they need it.
Drive-by changes:
- replaced QStringLiterals that were only used as the rhs of op+
- replaced an instance of mid() used as the rhs of op+ with midRef()
- enabled NRVO
Change-Id: I161d39461e020c9e8d473c0810dea2109fe0d62d
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Merge QXcbWindow::setNetWmWindowFlags(), which was called from
QXcbWindow::setWindowFlags(), into QXcbWindow::setWmWindowType().
Now setWindowFlags() can't override window type set by
QXcbWindowFunctions::setWmWindowType().
Also reorder _NET_WM_WINDOW_TYPE atoms in QXcbWindow::setWmWindowType()
as it was in Qt 4.
Change-Id: Id1752d78f91caf04e9d16bb1ac40ed180597df7b
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
QFile::decodeName should be used instead of a simple QString::fromUtf8.
Change-Id: I76955ab01af55dd373f860f6e3dbffa37e60892c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
readlink does not append a NUL character to buf. If readlink places
PATH_MAX characters into buf, then an unterminated character buffer
would have been passed to QString::fromUtf8.
Change-Id: Ib1865b8df760fa7da91c3be746dc701a165d93ee
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
QPainter::clipRegion() is expensive especially for certain clip paths.
QPainter::clipBoundingRect() does not promise to return an exact (tight)
bound but delivers the desired result quickly. In addition, this avoids
discretization.
Change-Id: Ib35406edc12fb8206ca978bc140a7c5e21279ca2
Task-number: QTBUG-46578
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
It is exposed in the QtQml.StateMachine import, but note that the metaobject
version is just incremented (no need to match QtQml.StateMachine, which
is in a different module).
Change-Id: I50773d9dec5252aa93846b7e5f743958ee838023
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Zero is a legitimate size to be returned by bytesFree/bytesAvailable
functions, so change those functions to return some 'invalid' size
in case of an invalid drive.
This is also consistent with the original version from the Qt Systems
framework.
[ChangeLog][QtCore][QStorageInfo] Fixed sizes returned for invalid drives.
Task-number: QTBUG-45724
Change-Id: I312fba521fdf8d52d7a0ac0e46cacca625775e80
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Previously, QStandardItem::operator<() returned true when both
items had invalid data. With MSVC in debug mode (checked
iterators/STL), this triggered an assert in
tst_QStandardItem::sortChildren() since that verifies
that !(b < a) when a < b:
Debug Assertion Failed!
Line: 3006
Expression: invalid operator<
Introduce a stable sort order for invalid items such that
other items are always less than invalid items and comparing
invalid items returns false (indicating equivalence).
Change-Id: Ica0f0d9f001c86973b1941dbcc1faf282e4c47df
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
We used to check if [sender draggingSource] != nil to determine
if the current drag was started by the application itself or
somewhere else. While this is correct use of the API, the problem
is that a drag can also be started by UIKit if e.g dragging the
file icon in the titlebar. And in that case, Qt has no no
native drag data. Since we didn't take this usecase into account, we
tried to access the data anyway, which led to a crash.
This patch will instead check if we have native drag data directly
before trying to access it, which will also cover the
usecase mentioned above.
Task-number: QTBUG-46598
Change-Id: Ic91b86f658670b895d90a1533246ba24a00dde41
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
QSslConfiguration is better suited for these APIs. The ones
in QSslSocket that already have a counterpart have been deprecated.
[ChangeLog][QtNetwork][SSL/TLS Support] Most of the QSslSocket
functions to deal with ciphersuites, certification authorities
as well as elliptic curves have been deprecated in favor of the
corresponding counterparts in QSslConfiguration.
Task-number: QTBUG-46558
Change-Id: I1de03379efcbcab931c20e876e252769fe4279e0
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
There is no test for gold linker and new dtags support for the host build
(only for the target compiler/build) which leads to trouble in some cross
compiling environments (see [1] for details).
So disable gold linker/new dtags support unconditionally for host builds.
[1] http://lists.busybox.net/pipermail/buildroot/2015-May/128303.html
Task-number: QTBUG-46125
Change-Id: Ic62828704dcce461487d63860705158cce3e4af8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
The current implementation assumed that the image format
of the file loaded would be jpg. This has proven not to be
correct, e.g sometimes the format is png.
This patch will change how the image url is reconstructed so
we doesn't loose/hard code the format.
Change-Id: I22d8ca0108e52d3670c2601f0bb9255406b896cf
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Give the link a name containing time stamp and ensure
it is deleted.
Change-Id: I846c58095acbcd92e7daccfd43a69dd97e95e7b0
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Rename variable named "override" and check using
qEnvironmentVariableIsSet() to avoid constructing a QByteArray
in the default case. Remove DOS-based OS.
Change-Id: Ibf348cd74ada5be99b9d2ed7637184a786df8244
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Apple Clang 3.2 is known bad with broken or partial
support. Which version is the first good version is
unknown.
Change-Id: I1b938281680dde5acbe0e08979444b6055a1cc4e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Don't return a const QString &, return the QString by value. This
is still broken for some of the older methods, but let's not add
to it.
Change-Id: Ic5cabb1b89eda0fcf678dbe175963e03109e5c2c
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
QMetaType::IsGadget was introduced in Qt 5.5 and set when Q_GADGET is used.
If an existing Qt 5.4 class was converted to a gadget in Qt 5.5+,
the two types would have differing QMetaType::TypeFlags. Such a conversion
happened for QGeoCoordinate, QGeoShape, QGeoRectangle
and QGeoCircle. There might be other classes too.
In principle, the same problem exists for every future addition to
QMetaType::TypeFlag too. This patch ensures that new flags are kept in
the metatype database and the related qFatal call is not triggered for any
flag >= TypeFlag::WasDeclaredAsMetaType.
Change-Id: Ibb15daeb28d9a11b7f31658f4219cbca2499213f
Task-number: QTBUG-46454
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
There's zero reason not to do it, esp. given how small
a QSizePolicy is.
Change-Id: I88b92bb27e6341b60a2cb3f2ddcc232f25f03ca8
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Change-Id: I5ea44a720e01e388a8d219a89c5b0ccd8fd23146
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
Previously, the path was removed from list returned (indicating failure
to remove) only when the thread's list was empty
(last file in directory). Move the statement up so that removal
happens when it is found in thread's list.
Task-number: QTBUG-46449
Change-Id: Ib79199c731f79357b0e5c17636254fbeb3a754a0
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
The accessibility class was created and activated in onCreate(), which
meant we where trying to activate accessibility before the platform
plugin was properly initialized.
With this change we will also activate, or deactivate, accessibility in
Qt whenever the state is changed by Android, compared to doing it at
start-up only.
Task-number: QTBUG-46355
Change-Id: I5cbae125df43f7694d4464d5054e6cfec4626e26
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Exporting value classes (as opposed to just their non-inline
methods) creates subtle binary incompatibility problems.
In this case, between C++11 and C++98 builds because of the
move assignment operator.
Even though it's not a problem in practice, so far, for some
types of classes this issue ie real (QVector, say), so it's
best to avoid exporting what we don't need to export.
Change-Id: Ifca6aaedcbfa79ca35e651de7630e69c3b266fe3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Currently, the files are extracted with read-only permissions.
If the data are extracted under a temporary directory, this prevents
it from being deleted, causing a leak and test failures (for example,
tst_qfileinfo).
Change-Id: Idc85f31265af234446ed21d736e9a2b9866dc62d
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Caused by the refactor in 05351b0cde.
The count was probably wrong in the creation of the QKeyEvent, so this
commit keeps it wrong.
Change-Id: I049a653beeb5454c9539ffff13e573bba826e927
Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
X server sends emulated XI_Motion events before each touch sequence.
Filter them out to avoid a mess with mouse events synthesized in
QGuiApplication.
Change-Id: Ic919c86b41e2467a594de7c903cc0f3fc88a6804
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
wm_window_type_property_id is a dynamic property, so we should
check that it is set by using QObject::dynamicPropertyNames()
instead of QMetaObject::indexOfProperty().
Change-Id: Ic7f3408a0d028f349538e0538c40c4b58360f7df
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
Make sure GLESv2 library to be loaded even when the symlink of .so is
not installed.
Change-Id: Ie7c810a137cebc7fa59612830e3643861b532fdb
Reviewed-by: Jaeyoon Jung <jaeyoon.jung@lge.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
When trying to do a straight right/left/up/down swipe, a minimal
change in the other direction caused to the gesture to be canceled.
Introduce a threshold for checking such to prevent this.
Task-number: QTBUG-46195
Change-Id: I3e199f2ec0c81d23a16073b1f5b8fff004958239
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
QDialog::setVisible() tries to adjusts the dialog position, but
it's not really possible if the dialog size is not defined yet.
Besides, if the dialog window is not created, QWidget::move()
will not really move it and will set WA_PendingMoveEvent flag.
And QWidget::setVisible() also will not change the position,
because we reset WA_Moved flag. Thus it may break adjusting
the position in QDialog::showEvent().
So adjust the position only in QDialog::showEvent().
Task-number: QTBUG-36185
Task-number: QTBUG-39259
Task-number: QTBUG-41844
Change-Id: I015a19f2e533f68178f4ee7519b17f5e9b5def7b
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
Closing the forkfd descriptor before disabling the deathNotifier causes
a race condition in ~QProcess. This is the same underlying cause as
QTBUG-22789.
Change-Id: I1cbdedc567fdfa8d95d111827b7bf9994661ecc7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
These examples now define their own images. Having duplicate
definitions is bad as it results in invalid example manifest
xml, and Qt Creator fails to detect all examples declared in
that file.
Task-number: QTBUG-41996
Change-Id: Ia9d6cd0b3ec4e82b79b1df54774c2d9cea279a59
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
On Windows, we set VERSION for QML plugins, because this embeds a
VERSIONINFO resource into the DLL that can be inspected by the user.
Change-Id: Ifb42efed6ceee05d05f61a271e028776cac6a3a2
Task-number: QTBUG-46473
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
To avoid conflicting anchors within an HTML page, QDoc keeps
the used anchors in a map, and appends 'x' to new anchors if
it was already used. However, this map was never cleared, so
anchors on one page affected the ones generated for another
page.
This commit clears the map for each page when generating the
page header.
Change-Id: Id30baced46917bb4d48cf58dde047f4fbcdf74cf
Task-number: QTBUG-46153
Reviewed-by: Martin Smith <martin.smith@digia.com>
Match the cases for the adding logic.
Change-Id: I61f49975b4cfcf2acf26b31b521cbc9b96f9d150
Task-number: QTBUG-46447
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
It can happen that NSMenuDidEndTrackingNotification comes after our imageCell
QNSImageView was deallocated (for example, mouse button is not released yet
when dealloc called). Remove soon-to-be-deallocated observer.
Change-Id: Ib155cc5f0b884c6b1fed0f986d12599096b582c6
Task-number: QTBUG-46425
Reviewed-by: Thierry Bastian <thierryb@filewave.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
[NSDate date] returns an id, so one needs to send a message instead of
accessing a property.
Change-Id: I21ce9b64310315accb7a89278b292dd5c73adc4d
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>