Commit Graph

39106 Commits

Author SHA1 Message Date
Lorn Potter
f6ce77f3e4 wasm: activateWindow when needed
Task-number: QTBUG-74066
Change-Id: I6babab888de118c8c881fd8a18a90049563d7a23
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2019-02-27 18:20:49 +00:00
Alexander Volkov
f657c74263 QListView: Fix Shift+click selection for non-default itemAlignment
QListView::setSelection() algorithm is designed for items to
occupy their cells completely, which is not the case when
itemAlignment is used. The middle part of the selection rect
goes beyond the column borders and extra items are selected.

Use the introduced cellRectForIndex() instead of rectForIndex()
to calculate the middle part correctly.

Fixes: QTBUG-73684
Change-Id: I4a1e42a056d56e85a16d8ae0ffe18b78d1d6deb7
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2019-02-27 15:58:56 +00:00
Elena Zaretskaya
ca991ee22d Segfault when the exiting the application under platform eglfs
If you run an application under eglfs, it falls with segfault on the
exit. For example, examples/gui/analogclock,
examples/widgets/widgets/analogclock, examples/opengl/cube,
examples/opengl/qopenglwidget, etc. (I have added the function
keyPressEvent to exit  by qApp->quit(), if needed).
It isn't appear in applications using QQuickView or QGLWindow.
This is because QCoreApplication destructor, where the variable self = 0
(therefore, qGuiApp = 0), is called before than
QOpenGLVertexArrayObject::destroy(), where qGuiApp is accessed
(qGuiApp->thread()).

Task-number: QTBUG-73824
Change-Id: I1dc55d5e811bfe8a8ea2178752e8771f8644d356
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2019-02-27 15:30:40 +00:00
Mårten Nordheim
2ec47d6cb5 Fix crash in QTest's signal dumper
It Q_ASSERTs that argv is not a nullptr, so it would fail when an
unconnected signal with 0 arguments was emitted.

Change-Id: I5dd810fbeea5b6b511eff4705efdaa6a55739604
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-02-27 14:27:04 +00:00
Paul Lemire
d15b02ff29 QOpenGLTexture::setData add overloads to allow specifying sub images
All current setData implementation only allow to specify a full size
sub image for a given mip level. In some cases, we might only want
to update a small region on an image, in which cases being able to
specify the x, y, z offsets as well as the dimensions is required.

Change-Id: I880cfcc67a814733e8ab880aa8766c87b7bc7e45
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2019-02-27 13:41:05 +00:00
Eirik Aavitsland
42b42602c4 QTextureFileReader: add support for astc format files
The standard astc encoder has its own file format.

Change-Id: I9a2f7b1fa20ba344b79637bafb50ff2bd0596747
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2019-02-27 13:00:56 +00:00
Eirik Aavitsland
97e78b0e1f Update bundled libjpeg-turbo to version 2.0.2
[ChangeLog][Third-Party Code] libjpeg-turbo was updated to version 2.0.2

Task-number: QTBUG-73883
Change-Id: Ib4ed145f1ed9c51933aae565dcb4064ffd60ec24
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2019-02-27 13:00:43 +00:00
Edward Welbourne
116a661791 Properly deprecate assorted enum members
This adds the first uses of Q_DECL_ENUMERATOR_DEPRECATED.
Prompted by API change review for 5.13, comment by Christian Ehrlicher.

Task-number: QTBUG-73484
Change-Id: Ic106048cec18960a91f88eb12650abab6abf0e97
Reviewed-by: Rolf Eike Beer <eb@emlix.com>
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2019-02-27 12:49:53 +00:00
Edward Welbourne
d8cf721d60 Update the DNS public suffix list from publicsuffix.org
Regular update in preparation for 5.13, adding tests for additions
since 5.9.4/5.10.1/5.11.0's update 7e946030 (the last to record its
upstream version sha1).  Corrected the license header: it's now
published under MPL 2.0 (not 1.1); and our secondary licensing of it
is as LGPL3.  Deferred full header over-haul until we've worked one
out in detail.

[ChangeLog][Third-Party Code] Updated DNS public suffix list

Task-number: QTBUG-72623
Change-Id: Iabdbbbfd79624830396c2a6fe0a73389bd6ce5b7
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2019-02-27 12:49:30 +00:00
Joerg Bornemann
49ef377349 Fix determination of OpenGL include paths on macOS, take 2
The sysrootification of OpenGL include paths must be done only once: at
configure time. The resolved paths are stored since 521a8539 and must not be
resolved again.

Turn the makeSpec-type opengl library into a custom-type one, and do
the sysrootification in the handler function.

Fixes: QTBUG-73736
Change-Id: I2933144057d6f01d8bfc7bda2c2df56c57303459
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-02-27 09:53:52 +00:00
Friedemann Kleint
2c31516a1e Windows QPA: Fix override cursor when modal window is present
Handle WM_SETCURSOR to apply override cursors to window that do not have
mouse capture (as is done in Qt 4).

Fixes: QTBUG-58590
Change-Id: I7ff6f799da1b8d4b4396c0a6137778a11a192617
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
2019-02-27 08:10:49 +00:00
Dominik Haumann
16cb578a8d QSyntaxHighlighter: Fix crash when parent is a nullptr
QSyntaxHighlighter has the follwoing constructor taking a QObject

  QSyntaxHighlighter::QSyntaxHighlighter(QObject *parent)
    : QObject(*new QSyntaxHighlighterPrivate, parent)
  {
      if (parent->inherits("QTextEdit")) {
          // ...
      }
  }

Typically, a 'parent' refers to the parent/child hierarchy in Qt
and is allowed to be a nullptr. However, in this case, passing a
nullptr will lead to a crash, as reported in
https://bugs.kde.org/show_bug.cgi?id=404820

This patch makes the QSyntaxHighlighter constructor nullptr safe
by checking if parent is a valid pointer.

Change-Id: Ia4e9b46b94fd37e6ceb2cd0538594353fdc1e349
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
Reviewed-by: Christoph Cullmann <cullmann@kde.org>
2019-02-27 06:36:59 +00:00
Thiago Macieira
96404f7ac8 Doc: update the note about nested deleteLater()
If you enter a nested event loop, cause a deleteLater(), exit that event
loop, then enter a new one, the nesting count will be the same so those
are legitimate targets for deletion.

Task-number: QTBUG-73432
Change-Id: Id98140e1c2f0426cabbefffd157f975b5e291ccd
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-02-27 04:27:45 +00:00
Thiago Macieira
99566f6875 Use qEnvironmentVariable for QT_PLUGIN_PATHS
This is required for non-ANSI paths on Windows.

Change-Id: Id98140e1c2f0426cabbefffd157c4065c3bdfd40
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-02-27 04:26:51 +00:00
Thiago Macieira
197029b3d2 Make the QEventDispatcherWin32Private::interrupt flag atomic
Not entirely sure that this solves the problem reported in the bug
report, but here's the theory: the loop

 633        while (!d->interrupt) {
 ...
 710        }

has few calls that recurse back, so the compiler optimizer can assume
that the variable remains unchanged (not interrupted) in most of the
branches. Additionally, it can assume the variable did not change from
there to

 712        // still nothing - wait for message or signalled objects
 713        canWait = (!retVal
 714                   && !d->interrupt
 715                   && (flags & QEventLoop::WaitForMoreEvents));

Which causes canWait to be true, despite having been interrupted by
another thread.

Changing to an atomic does not force the reloading of the variable
(strictly speaking, would need volatile, but all atomic implementations
do reload now), but it solves the problem of data race, which was UB.

The equivalent variable in the Unix event dispatcher is atomic (commit
49d7e71f77 from 2013). I've reordered the
bool members so they're all together and reduce the amount of padding in
this class.

Fixes: QTBUG-72438
Change-Id: I4ac1156702324f0fb814fffd156f290df94dc4c7
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-02-27 04:26:13 +00:00
Qt Forward Merge Bot
c6fc2bc3e2 Merge remote-tracking branch 'origin/5.13' into dev
Change-Id: I14eaabe98845445a9ea5266872cc1797786cfe04
2019-02-27 01:00:45 +01:00
Shawn Rutledge
1500d2283e Clear only one device from g_pointIdMap when all points released
The new test tst_QTouchEvent::touchOnMultipleTouchscreens()
needs the touchpoint IDs to be predictable, but another test currently
has a QEXPECT_FAIL; without release events, g_pointIdMap continued to
hold the touchpoints that were there when the test failed.  So it's
necessary to add QWindowSystemInterfacePrivate::clearPointIdMap()
to be able to call it in the test cleanup function.

Fixes: QTBUG-73830
Change-Id: Ia6a70d028be95cd2b6676db6363ec408c0b116bc
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2019-02-26 19:52:25 +00:00
Ahmad Samir
ac7f46dd91 Unix: QPageSetupDialog: Use print device default paper size
When invoking QPageSetupDialog from QPrintPreviewDialog, don't construct
a new QPageSetupDialog every time the pageSetup action is triggered, instead
reuse the dialog if it's already been created. This way setPrinter is called
only once. This matches how QPrintDialog invokes QPageSetupDialog.

Set the default print device paper size in initPageSizes() instead of
setPrinter().

Change-Id: Ic82e6dd47ee00ecdd942c5ba59dbf09fb18ef218
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2019-02-26 19:44:09 +00:00
Andy Shaw
7e60858cbc Don't edit the item if we did not get the press event on the same item
With a QTreeView it is possible that collapsing an item can cause the
item under the mouse to be a new one and over the checkbox area for the
new item. As a result, a release can cause it to change the check state
even though it did not get the press for that item. This ensures that
it only allows the edit if it got the press as well.

Fixes: QTBUG-61476
Change-Id: I9a0821466afc84c97c9819755ccbacd729f7fbd7
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2019-02-26 14:18:18 +00:00
Friedemann Kleint
9694d754b8 Haiku: Fix mis-spelled module in .pro
Fix warning:
Project ERROR: Unknown module(s) in QT: eventdistpatcher_support-private

Change-Id: Ic74481621c541fc0a13640c5e5cae2df44ffb091
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-02-26 12:16:09 +00:00
Gatis Paeglis
58cad5caf2 build compose input context plugin not only for XCB platform
It can be used by any platform that uses xkbcommon for keyboard
input: wayland, eglfs.

Change-Id: Iba7d8989f922063cdceb94c1c4bcd8d8e4ae294e
Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
2019-02-26 11:46:12 +00:00
Kai Koehne
bc107d8100 Allow QML plugin to specify import name explicitly
For creating the qmlplugindump rule we need the name of the import. So
far we're trying to derive this from the directory name, but that
becomes complicated if versions are included, like

  QtQuick/Controls.2/Fusion

Instead of trying to tweak the regexp even more to capture this, we
now allow a plugin to set it's name explicitly via IMPORT_NAME.

Change-Id: Ie75dae7d41398b3ac19ccb6910002b6fad009891
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2019-02-26 07:32:22 +00:00
Joerg Bornemann
b0dcb94d94 vcxproj generator: Fix files being in multiple filters
Visual Studio doesn't support files being in multiple filters and
refuses to load such projects. Source files that appear in variables
that are mapped to file filters (SOURCES, TRANSLATIONS, ...)  must not
be added to a second filter if they are input for an extra compiler.

Fixes: QTBUG-74004
Change-Id: Id2d752059c98d04e8154a7848c91f29a94bd092a
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2019-02-26 07:30:53 +00:00
Joerg Bornemann
8f507a0b02 Display EXTRA_TRANSLATIONS files in VS projects
This amends commit 01d2f35b.

Change-Id: I958c924f7f5a477f5ebced895ce2678d282526ad
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2019-02-26 07:30:50 +00:00
Qt Forward Merge Bot
04479f1952 Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: Id511850002d9274d17891c063376ac4b3ff939dd
2019-02-26 01:00:19 +01:00
JiDe Zhang
c93670c5a0 QGenericUnixTheme: use QStandardPaths get the xdg data path
The corresponding interface is already provided in QStandardPaths.
We should use QStandardPaths::GenericDataLocation instead of the
environment variable XDG_DATA_DIRS.

Change-Id: I0e89e8c86d629585ec7d9a12989f24335aa6e3ba
Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: David Faure <david.faure@kdab.com>
2019-02-25 20:12:59 +00:00
Shawn Rutledge
2f4c658236 Mark QEglFSKmsEglDeviceIntegration::presentBuffer as override
clang complains; this makes it build

Change-Id: I874c51ea4500edcf3f0bb9c79f0ef0f36309d579
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2019-02-25 20:10:44 +00:00
Sandro Mani
93b7b0ec76 Add support for SPNEGO/Negotiate authentication
This commit adds support for single-sign-on SPNEGO/Negotiate
authentication to QAuthenticator, using SSPI on Windows and GSSAPI on
other platforms (if KRB5 GSSAPI is available).

[ChangeLog][QtNetwork][QAuthenticator] Add support for SPNEGO/Negotiate

Task-number: QTBUG-4117
Change-Id: Ie246b887db3fd6201b7ed30b023feca292cd6530
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2019-02-25 15:22:23 +00:00
Andre de la Rocha
00cfb4d780 Windows QPA: Generate proper event when dragging item outside window
When an item was dragged outside the window, the mouse release event was not
being properly delivered and the item would stick to mouse cursor after
moving it back into the window.

Fixes: QTBUG-72994
Change-Id: Ibce990390c866e16d58f7d969673dd05e862d97e
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-02-25 14:26:09 +00:00
Robert Loehning
85b0ce8ca3 Fix can not -> cannot
Change-Id: Ie9992f67ca59aff662a4be046ace08640e7c2714
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2019-02-25 13:03:45 +00:00
Mikhail Svetkin
1be070a2be qtlite: Fix build the source code with -no-feature-shortcut
Change-Id: If47149466a5da901e3eb6e6f2dcfb0a7816bc60b
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2019-02-25 12:20:36 +00:00
Edward Welbourne
79644952f7 Revise download location for pcre2 in its qt_attribution.json file
Changed DownloadLocation to match the version claimed in Version,
10.32, rather than the 10.31 tar-ball's URL.

Task-number: QTBUG-72623
Change-Id: Id3e17085ea9bb0a854c95e4dce7f472cc38923ed
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-02-25 09:29:32 +00:00
Edward Welbourne
241533962c Add ### Qt6 comment requested in code-review
Task-number: QTBUG-73484
Change-Id: I7c1c5faf3d32fa21d8d2277ec434084450290156
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-02-25 09:29:14 +00:00
Thiago Macieira
b56cfce732 Make the qfloat16tables.cpp depend on the executable, not the command
qtPrepareTool could return a more complex command-line in the variable,
for some reason. So declare the dependency on the actual executable
only.

Change-Id: Id061f35c088044b69a15fffd1583504f25936a7a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2019-02-25 08:53:13 +00:00
Eirik Aavitsland
1e0395f73e Fix assert when drawing lines with extreme coordinates
For extreme coordinates, the rasterizer's width parameter could become
NaN, which compares false with everything and hence would trigger an
assert.

Fixes: QTBUG-56434
Change-Id: I27abae6ab0bc94ce042be86ea0587095cdb7d487
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-02-25 08:26:21 +00:00
Kari Oikarinen
36c2ceca95 Bump version
Change-Id: I5561df4b90b02d88bb2fc7b52d74487e71efce7d
2019-02-25 09:37:31 +02:00
Kirill Burtsev
a2b31cd5db Fix build for size with gcc
Fixes the error: variable 'isDifferent' set but not used

Change-Id: Ibd60b17126057da64a41d325b7ef548316f27c4b
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-02-23 21:54:52 +00:00
Volker Hilsheimer
8c10255e37 Add conversion to and from long and ulong
This implements conversion parity with QString, which can convert to
and from long and unsigned long.

The implementation simply forwards to existing long long overloads or
uses the existing helpers, so just as for the conversion to/from int
or short, no additional test cases were added.

Change-Id: I37ef06d9ce4d80d98bd72720353996bac723e09c
Fixes: QTBUG-782
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 783953f09d)
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-02-23 20:24:13 +00:00
Liang Qi
19a9768f1a Merge "Merge remote-tracking branch 'origin/5.13' into dev" into refs/staging/dev 2019-02-23 10:19:34 +00:00
Christian Ehrlicher
bdf1c4f671 QComboBox: add two new signals textHighlighted() and textActivated()
To avoid overloaded signals for highlighted() and activated() add two
new signals textHighlighted()/textActivated() and deprecate the old
QString overloads.

[ChangeLog][QtWidgets][QComboBox] Two new signals textHighlighted() and
textActivated() were added to replace highlighted()/activated() QString
overloads

Change-Id: I62df7e606b335b5c756315a800654d7d0de442bd
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2019-02-23 07:18:43 +00:00
Christian Ehrlicher
656ce9fa9d QGraphicsItemAnimation: add transformAt() an deprecate matrixAt()
Replace QGraphicsItemAnimation::matrixAt(qreal) with transformAt(qreal)
to avoid the usage of QMatrix which is deprecated.

Change-Id: Iafcdf8b9b2fbffffa61417601a3ae4272d0176c6
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-02-23 07:18:38 +00:00
Qt Forward Merge Bot
2a1292b916 Merge remote-tracking branch 'origin/5.13' into dev
Change-Id: I4b56ce8c76729d9fc60995564299f8f27336fcde
2019-02-22 19:59:08 +01:00
Edward Welbourne
c204f6e417 Update and expand public suffix list's attribution information
Say where the git repo is, for finding commit IDs, but make clear that
the download should come from the public site.  Revised Description to
the closest match to it I could find on the current web-site (on the
home page).  Mention where the script to convert the data live.

Task-number: QTBUG-72623
Change-Id: Ie5f7b2b0c21cdf1c24e311c13866cb1bb02e6973
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-02-22 15:20:00 +00:00
Timur Pocheptsov
2be7746e09 Fix a typo
in a comment.

Change-Id: I10252b2e732636993daba6b72ed86116691f2030
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
2019-02-22 14:18:00 +00:00
Mikhail Svetkin
0f431712fb qtlite: Add a new option -no-pcre
pcre only used by QRegularExpression.

Change-Id: I704bdb46ed8956f875e1f5fcc0fa2e06122fd87e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2019-02-22 14:04:54 +00:00
Ulf Hermann
46589056c3 QObject: count declarative receivers also if there are no C++ ones
Change-Id: If998cdd5eeb8a3ae85cd540cc9c1fd0c051e1d4b
Fixes: QTBUG-73753
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2019-02-22 11:36:18 +00:00
Qt Forward Merge Bot
64085d9b2f Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: I9e7cb1b131b7b216aad8ed1b1536669fd1557c21
2019-02-22 01:00:27 +01:00
Morten Johan Sørvig
b5c16921cc wasm: make setting the cursor shape work again
Commit 960af0d64 ported away from EM_ASM but also
changed the logic. Set the canvas.style.cursor property,
like it originally did.

Change-Id: Ie4b23abeae54173894bff1db000a305c459684bb
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2019-02-21 17:27:07 +00:00
Gatis Paeglis
3d7616a316 offscreen: remove false condition
This plugin does not use any XCB libs.

This patch amends 94a4f06fb8
and 744be250bf

Change-Id: I33e2647ace3d9f32a420551b3b198e33a182a06f
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-02-21 16:26:48 +00:00
Oliver Wolff
1136c9849e qmake: vcproj: Fix windeployqt config for dll targets
Instead of hardcoding the target's extension to ".exe" we should rely on
target information available in Visual Studio. $(TargetFileName) is
documented as "The file name of the primary output file for the build
(defined as base name + file extension)." so it can be used instead of
$(TargetName) together with ".exe".

Change-Id: I103d8d13456910617b2d53c9c8f4e2935eb93015
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2019-02-21 15:12:29 +00:00