The change causes items in QListWidget and QTreeWidget to disappear during
InternalMove since the widgets modify the actions of the event
to remember an internal state.
This reverts commit 988f1b2e57.
Task-number: QTBUG-46642
Task-number: QTBUG-43466
Change-Id: I27d888d7a1fdfcf8eaf8806ccd4ca33b292b9d8c
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
It will definitely not be called for events outside the main thread, but
we haven't decided for the main thread, in Qt 6.
[ChangeLog][Future direction notices] In Qt 6,
QCoreApplication::notify() will not be called for events being delivered
to objects outside the main thread. The reason for that is that the main
application object may begin destruction while those threads are still
delivering events, which is undefined behavior. Applications that
currently override notify() and use that function outside the main
thread are advised to find other solutions in the mean time.
Change-Id: I27eaacb532114dd188c4ffff13d5a5c8df3bc85b
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
[NSDate date] returns an id, so one needs to send a message instead of
accessing a property.
Backport commit 92b3397a from the 5.5 branch.
Change-Id: Id70915e1ac23994a081765e0a527802fef61b573
Reviewed-by: Tim Blechmann <tim@klingt.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
By setting QT_XCB_GL_INTEGRATION to the special value "none", no plugins
will be considered for loading. This matches what eglfs does with
QT_QPA_EGLFS_INTEGRATION.
This allows widget or raster-QWindow-only apps to start up faster by not
spending time on plugin loading and potential initialization steps there.
Task-number: QTBUG-46765
Change-Id: Ifeec3548a9b58f619a18e0be75fe4a9f489677a9
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
ad9698713f reduced the curvethreshold
for wide lines, to fix QTBUG-46151. But as a side effect, the
threshold was increased for lines of widths >=0 and <4. This commit
fixes that, and also adds a lance test for the issue in QTBUG-46151.
Change-Id: I52507db622435fe1d2646640cb0bd9cd8222e453
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Visual Studio 2015 integrates the Windows Runtime development
tools, including the msvc2013 compilers.
This patch fixes the error that mspdb120.dll is missing.
It is typically included through PATH variable of the shell,
which points to the "wrong" location in this case.
Change-Id: I46289721912d6b517c6083612582f67536d28b11
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
This becomes necessary to avoid compilation errors with
Xcode 7 and clang 7.0.0. (Note that its version information
doesn't state which LLVM version it's based on, though we
suspect it could be 3.7.0svn.)
Change-Id: I2bfc7f2b73ca7a61798b123cc2715037028f0e5f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Remove highlighting for a number of older and less relevant examples.
Add examples from new modules, and examples that have been visually
polished.
Task-number: QTBUG-37203
Change-Id: I4e9be9a54f1ecea3bb407c049c1d44a7c00333a6
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
When PRECOMPILED_HEADER is set to foo/bar/stable.h and
PRECOMPILED_SOURCE is empty, then a C++ file foo/bar/stable.cpp
is generated that contains the include "stable.h".
We must pass the exact string "stable.h" to the /Yc compile
switch instead of "foo/bar/stable.h".
Commit dc612acdc6 introduced this
regression to allow to have PRECOMPILED_SOURCE in a different
directory than PRECOMPILED_HEADER.
Change-Id: I1a7e096c0455b946a5660d23c70c72abd4c7ac1b
Task-number: QTBUG-46679
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Move the code path handling widgets embedded in QGraphicsProxyWidget
into the loop moving up the parent hierarchy.
Add child widget to test.
Task-number: QTBUG-41135
Change-Id: Ibd86413faaa927145a85a2f5864f162979135053
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Set target and action in menuHasKeyEquivalent in order to match
the specification, and to avoid QFileDialog crashes on OSX 10.7.
Task-number: QTBUG-17291
Change-Id: Ie8f88cbda31a42c3e1acd8d4ad36d54a295eac65
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
Currently when a developer uses a string like
QString("%1%3%2").arg(x).arg(y).arg(z) he can be bitten by the
sequential replacement done by QString. Adding an example with a little
explanation should help future Qt user avoid generating buggy strings.
Task-number: QTBUG-44044
Change-Id: I81e20af8d9fb2a07e12ec61dcd5bb4544d863777
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
The Intel compiler defaults to "fast math" mode, which is why those
tests had been failing. So for the test that is trying to check whether
we conform to IEEE strict requirements, turn on strict requirements.
Change-Id: I02f8426b1c8e4241ac10ffff13e8efa224f313b2
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Since Connection can be copied, one copy could be used for
disconnecting, but the other's d_ptr wouldn't get updated and would
continue to report as still connected.
This patch fixes that by making it check the internal state. That is
only done after d_ptr is already known to be non-null. Unfortunately,
that is the common path:
if (connect(sender, &Sender::signal, [] {}))
will call an out-of-line function. I don't see a way out.
Task-number: QTBUG-46213
Change-Id: I66a35ce5f88941f29aa6ffff13dfb45dca68a350
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Global (application-level) event filters are supposed to be run only in
the main thread, so ensure that it is the case.
Change-Id: I27eaacb532114dd188c4ffff13d5a17d991b8bd2
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
The default locale is the system locale, unless you changed the default
with QLocale::setLocale(). If you did that, you probably want it to
apply to QFileSelector too.
Task-number: QTBUG-45951
Change-Id: I0d4913955e3745b69672ffff13db5a2c7f8b1227
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Add QPointF overloads for QXcbScreen::mapToNative() and
QXcbScreen::mapFromNative(). Use mapFromNative() to map
the coordinates of a touch point to screen coordinates
as we do it for mouse events. It fixes touch events when
QT_DEVICE_PIXEL_RATIO is set.
Change-Id: Id8362cda526e0f837b76899eba21d9bfc895988c
Task-number: QTBUG-44840
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
Currently all icon resolving is passed thru to the platform icon engine,
even in the case where the application developer has set their own
requested icon theme. In that case, the application developer
specifically does not want to follow the icon theme of the system, so
don't ask the platform, but rely on Qt code instead.
It leads to bugs reported to platform icon theme providers like this:
MMC: https://github.com/MultiMC/MultiMC5/issues/796
KDE: https://bugs.kde.org/show_bug.cgi?id=344469
Thanks to the multimc people (Jan Dalheimer and Peterix) for the
reports and testcases.
Change-Id: I52cda6f688b2ef9e44e060c8ae67831cb02b26c8
Reviewed-by: Eike Hein <hein@kde.org>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
This reverts commit 21e6c7ae47
because in QtQuick.Controls, we do not call exec(): we just set the
dialog visible. If it is a sheet, then it is already acting as a
modal dialog, basically.
Task-number: QTBUG-46691
Change-Id: I7fe89f2a2ade0d4ddcf540c9bfc4f5963a077471
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
The content written to example manifest files can be extended with
additional metadata in the form of xml attributes. In order to
avoid invalid (duplicated) input from generating malformed xml,
QDoc now keeps track of the attributes and only writes metadata
that hasn't already been written.
Task-number: QTBUG-46692
Change-Id: I645935fa8f32b915b7335c400f5a8f2cf72802b7
Reviewed-by: Martin Smith <martin.smith@digia.com>
QProcess::pid() is deprecated since Qt 5.3. Rather link to it's
replacement.
Change-Id: Iaea86137a046513809f9f92ff88fe21233adaa34
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
When deleting selected text, Google Keyboard will call
deleteSurroundingText() with a negative beforeLength. This does
not make any sense, and not all our controls are able to handle
the resulting input method events.
This patch interprets a negative beforeLength as a positive
afterLength. This works with the cases I have seen so far, but
since the keyboard is not following the specification, there
may be more weirdness later.
Task-number: QTBUG-46637
Change-Id: I410832417f6fb21139c338355e8fcfa57b9e544c
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Do not attempt to resolve dynamically in static builds. This is not
wrong, but if the GL library is statically linked just like the rest
of Qt, it won't work. Therefore just call the function directly in static
builds, it should be no problem on modern systems.
Task-number: QTBUG-46499
Change-Id: I35fd7c3b5b180d753becbb57377b27dd1a8747ad
Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
Setting the version breaks on Android as it has no .so versions, leading
to aborting apps on devices that support GLES 3.x.
Change-Id: Id4381e08a2615a0898def8f075ce5a5c5b9c7a7d
Reviewed-by: Jaeyoon Jung <jaeyoon.jung@lge.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
The "Fixed CE build of sqlite3" patch is preserved in this change,
Change-Id: I3073b51ea51403fa0011b78a510cd90b34b01068
Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
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>