Commit Graph

42447 Commits

Author SHA1 Message Date
Tor Arne Vestbø
dbdb3cbc90 Reduce scope of testlib selftest regular expressions
Change-Id: I2fd7a39684bde44d82c4d877086f606413d68520
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-02-06 23:43:04 +01:00
Tor Arne Vestbø
a2832c577f Remove tst prefix for testlib selftests
These tests are apparently not run at the moment, otherwise they would
have failed to even start, but they should definitely not have the tst
prefix.

Change-Id: Iafcec2764ebb3570e6bc6ebfba27d92a94639893
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-02-06 23:43:02 +01:00
Tor Arne Vestbø
1a58e78db0 testlib: Be more selective in choosing to show stacktraces on macOS
The built in crash reporter on macOS will by default not show the
dialog if the application is not one that will run in the foreground.

Change-Id: I0020520ae2f14a0e2f84fdca1d80ec6fe1247ffd
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-02-06 23:42:55 +01:00
Laszlo Agocs
19510abbff rhi: Add depth bias and slope scaled depth bias
Beware of the API terminology: GL 'factor' = 'slope scaled depth bias',
GL 'units' = '(constant) depth bias'.

Task-number: QTBUG-81843
Change-Id: I03e3618d007cbf7100add0de4950a6163d788cc7
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2020-02-06 13:06:34 +01:00
Laszlo Agocs
7e82d49cc5 rhi: d3d: Make DepthClipEnable set to true
...which is the natural default, and matches other backends.

Task-number: QTBUG-81852
Change-Id: I6d0788b18eb7601661ef646e650114a503a12215
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2020-02-06 13:06:28 +01:00
Laszlo Agocs
1d77945094 rhi: metal: Make sure the resources are sorted based on the native bindings
...before generating batches for the encoder's set* methods. Otherwise there
is a chance we end up in an assertion in case the native binding number for
a buffer/texture/sampler happens to be smaller than the native binding of the
previous. (we pre-sort based on the SPIR-V binding but that is not what the
Metal API works with in the end)

Task-number: QTBUG-81822
Change-Id: Iddfed168e065e3c7f6a09ad6dd4efdafa891b339
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2020-02-06 13:06:23 +01:00
Edward Welbourne
26f6aa3e50 Configure the MS-Win long time format rather than assuming we know it
In tst_QLocale::windowsDefaultLocale(), we configure the long and
short date formats and the short time format eccentrically, then
verify that QLocale::system() does actually get these eccentric
formats. However, we did not configure the long time format (whose
MS-API name doesn't match that of the other formats), so had to rely
on a guess at the system locale's format. That, however, is not
robust; so now configure the long time format, too.

Removed a duplicated test, at the same time.

Fixes: QTBUG-36306
Change-Id: I04dc22c7eb1b58af55412b598873868f79e9c74f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-02-06 12:56:58 +01:00
Volker Hilsheimer
d75d22f785 Docs: tag newly added QFile and QFileInfo APIs as \since 5.15
Change-Id: I7d8605221a28cd05b4ebdbf20adf00ec3e121b58
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-02-06 12:21:25 +01:00
Qt Forward Merge Bot
d37f58e75b Merge "Merge remote-tracking branch 'origin/5.14' into 5.15" 2020-02-06 11:38:18 +01:00
Qt Forward Merge Bot
8ce0ad805d Merge remote-tracking branch 'origin/5.14' into 5.15
Conflicts:
	src/network/ssl/qsslsocket_openssl_symbols.cpp

Change-Id: I8c13b5c48a8ecce96540b39c6d5f8ca146eb2339
2020-02-06 11:10:34 +01:00
Jan Arve Sæther
8c6c4df3e8 Maintain at least 500ms timestamp distance between each test function
If we had one test function that just did

tst_Mouse::f1()
{
    QTest::mouseMove(w, QPoint(0,0));
}

and another test function that did

tst_Mouse::f2()
{
    QTest::mouseMove(w, QPoint(500,500));
}

their corresponding event timestamps were only 1 apart from each other.
This meant that any code that tried to estimate the velocity of a mouse
cursor would get a really high velocity estimate inside f2(). This would
come as a surprise to most people. So to avoid this, we add a 500 ms
timestamp delay between each test function call.

In theory this could also prevent generating a mouseDoubleClickEvent
when a pair of test functions containing a press-release sequence was
run, but there is a separate pre-existing mechanism to handle that case.

Change-Id: Icd4fc35853c09f080466d22411208c7b5c4174b5
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2020-02-06 09:31:47 +01:00
Assam Boudjelthia
6d6ca70538 Android: Allow requesting qtvirtualkeyboard with QT_IM_MODULE
Allow Android apps to request qtvirtualkeyboard using environment
variable QT_IM_MODULE.

Similar to commit b46fe39d94 for Windows
platform.

Task-number: QTBUG-80357
Change-Id: I584859729e60f5d73943ca5840a9dcd169cc9ecb
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2020-02-06 09:48:31 +02:00
Sze Howe Koh
c3050b6d96 Rename Qt::ReturnByValue_t -> Qt::ReturnByValueConstant
Copy the convention of QDeadlineTimer::ForeverConstant

Task-number: QTBUG-48701
Change-Id: Ic7760b7ffec630f1cd47361f5adda3f17fffb9f6
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-02-06 07:37:15 +08:00
Volker Hilsheimer
74a2467edd Add QFile::moveToTrash, which moves a file to the trash
Due to the nature of QFile just operating on a file path, this also
works for paths that are actually directories.

The test covers files from different locations on which this
operation should typically succeed, but tries to handle the case
where trashing files will fail because of the file system
structure.

On Windows 7, running the test will open a confirmation dialog as
the implementation of IFileOperation doesn't respect the various
flags. This might depend on the specific Windows 7 patch level,
and the option to always use SHFileOperation on that platform needs
to be evaluated further.

[ChangeLog][QtCore][QFile] Introduce QFile::moveToTrash to allow
applications to move files to the trash.

Change-Id: I45019040c25b30f7db293b6933c63aca2f319514
Fixes: QTBUG-47703
Reviewed-by: Vitaly Fanaskov <vitaly.fanaskov@qt.io>
2020-02-05 20:21:45 +01:00
Morten Johan Sørvig
d29aaf598a tst_qnetworkreply: Print proxy warning to stderr instead of stdout
This way we produce valid xml also for the no-proxy case.

Change-Id: I5a277255d22c3814fe463c0cd013c04ddc6ad919
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2020-02-05 15:01:10 +00:00
Assam Boudjelthia
6839d297b3 Android: Fix native open fileDialog crash on Android
Unregister the ActivityResultListener() after the result is handled.

Fixes: QTBUG-78912
Change-Id: Ia2b45eca002e854492c409c70a3876fa8ce98de1
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2020-02-05 13:19:15 +02:00
Morten Johan Sørvig
7dd6d32657 wasm: Specify event targets by CSS selectors; Support emsdk >= 1.39.5
DISABLE_DEPRECATED_FIND_EVENT_TARGET_BEHAVIOR is now on by default, which
means that functions like emscripten_set_keydown_callback() now expects
CSS selectors (e.g. "#canvas_id" instead of "canvas_id").

In addition, Module.canvas is no more. Add a deprecation warning in case
someone is setting it and expects Qt to use it. (qtloader.js sets
qtCanvasElements instead).

This bumps the minimum supported emsdk version to 1.39.5.

Fixes: QTBUG-74601
Change-Id: I8c46ce170143f969e6281824f78b1bb809c267ab
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2020-02-05 11:48:04 +01:00
BogDan Vatra
0947cf66e5 Fix AndroidAbstractFileEngine
"" it's the root folder of the assets, setting m_fileName = "" will make
AndroidAbstractFileEngine::setFileName to fail and it will not set the
proper flags.

Fixes: QTBUG-81535
Change-Id: I0653f83b55ee790c8edf188889ccb30ef54584c0
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2020-02-05 12:41:34 +02:00
VaL Doroshchuk
9ecc595d71 widgets: Don't create winId when the widget is being destroyed
When QWidget is being destroyed, its winId is cleared, and
a QEvent::WinIdChange is sent. If a listener of this event
reacted by calling winId() again, we might crash.

A crash can be observed when this child widget is destroyed in dtor of its parent.
E.g. here is a hierarchy of widgets:
1:QWidget
 2:QObject
 3:QWidget
  4:QWidget

If a listener subscribed for WinIdChange events from (4),
and there is a connection to destroy (4) when (2) is destroyed.

This will lead to infinite loop:

1. QWidget::~QWidget
2. QWidget::destroy
3. QWidgetPrivate::setWinId(0)
4. QCoreApplication::sendEvent(q, QEvent::WinIdChange);
5. eventFilter
6. QWidget::winId
7. QWidgetPrivate::createWinId (this=0x555555957600) at kernel/qwidget.cpp:2380
8. QWidgetPrivate::createWinId (this=0x55555596b040) at kernel/qwidget.cpp:2387
9. QWidget::create (this=0x5555558f2010, window=0, initializeWindow=true, destroyOldWindow=true) at kernel/qwidget.cpp:1163
10. QWidgetPrivate::createWinId (this=0x55555596b040) at kernel/qwidget.cpp:2387
11. QWidget::create (this=0x5555558f2010, window=0, initializeWindow=true, destroyOldWindow=true) at kernel/qwidget.cpp:1163
12. QWidgetPrivate::createWinId (this=0x55555596b040) at kernel/qwidget.cpp:2387

Fixes: QTBUG-81849
Change-Id: Ib4c33ac97d9a79c701431ae107bddfb22720ba0d
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-02-05 11:05:24 +01:00
Morten Johan Sørvig
7d19dd7730 wasm: Change compiler flags to target "upstream" llvm
As of version 1.39, Emscripten now uses upstream llvm instead of
the "fastcomp" fork. As a result of this em++ no longer builds
via the asm.js text format, and the performance issues related
to text parsing are gone.

Reducing the binary size for debug builds is no longer needed,
and we can fall back to using the default build flags.

This effectively makes 1.39.x the minimum Emscripten version for
Qt 5.15. The "-fastcomp" SDK variant is not supported.

Change-Id: Id66ef77294a9accd1b103e34785458d71dc188b1
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2020-02-05 09:59:27 +00:00
Timur Pocheptsov
e5408b62bd Fix symbol resolving for OPENSSL_NO_NEXPROTONEG
Our ALPN-related definitions were conditioned both on OPENSSL_NO_NEXTPROTONEG
and OpenSSL version (since ALPN first was introduced in 1.0.2), but
resolving was only under version check, not OPENSSL_NO_NEXTPROTONEG.
This went unnoticed for many years, and was found only recently with
OpenSSL built with no-nexprotoneg.

Fixes: QTBUG-81762
Change-Id: I7afca0b2034a234a19b5bcdefd3ce26f4202cddb
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-02-05 10:41:02 +01:00
Friedemann Kleint
6baed76654 uic/Python: Set form object name correctly
Add missing "not" for the isEmpty() check.

Fixes: PYSIDE-1210
Change-Id: I3798d483df9d077300ff69dc5d3a8d08812f534e
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
2020-02-05 10:37:02 +01:00
Edward Welbourne
2767367795 Coding style: put case bodies on separate lines from the case label
While the single-line-case format is more readable when consistently
applied through the whole switch, it works less well when several of
the cases are too complex to fit on a single line.

Change-Id: I6a84a3d3d1493dadddab103da0336a8ef860563c
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-02-05 10:24:01 +01:00
Edward Welbourne
41b2c477b7 Take care of NULL data from QStringView in QCollator
Back-ends need to catch NULL data so as not to call system APIs with
invalid pointers.

[ChangeLog][QtCore][QCollator] Fixed a regression introduced in 5.14.0
that caused QCollator not to operate with default-constructed QStrings
and print a warning on Windows.

Fixes: QTBUG-81673
Change-Id: I2eafe1e188b436afcca3cf2ecdf98bba707c44c9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-02-05 10:23:43 +01:00
Timur Pocheptsov
c9b8ebc223 QUrl::topLevelDomain() - deprecate in 5.15
And remove in Qt 6 (with private API remaining).

[ChangeLog][Deprecation Notice] QUrl::topLevelDomain() was deprecated in 5.15 and will be removed in 6.0

Task-number: QTBUG-80308
Change-Id: Ie053c9c8813274c971e2d6fc442dd6ce716fadf1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-02-05 09:00:01 +01:00
Sona Kurazyan
a20dbcf7c7 Deprecate QLinkedList
[ChangeLog][Deprecation Notice] QLinkedList is deprecated and will be
moved to Qt5Compat in Qt 6. It is recommended to use std::list instead.

Task-number: QTBUG-81630
Task-number: QTBUG-80312
Change-Id: I2c2b64e51d1cc2fd305aee6a11e9a89788f51eb4
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-02-04 20:01:18 +01:00
Volker Hilsheimer
f8e39a6656 Fix build of bootstrapped tools with clang 10
Building of qmake fails with clang 10 due to QStorageInfo symbols not
being resolved. Since bootstrapped tools don't need this functionality,
we can remove the respective code and make the function fail as "not
implemented".

Change-Id: I48bbbd822e4f70630d903e5caead1a08fe4f13a8
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2020-02-04 17:48:46 +01:00
Volker Hilsheimer
336b3bb0dd Address failing test case for internal implementation of moveToTrash
This ammends 601ce9e08a, which added
a new test case for the internal Qt APIs. The test was not
getting executed by coin as it wasn't included in the io.pro file,
and trying to fix that generates link errors on Windows, since these
internal APIs depend on other internal APIs.

Short of bootstrapping much of QtCore into this test case, the only
sensible option is to remove this test case again, and cover the
testing when the public API is added in a follow up commit.

At the same time, address those failures that were discovered
on platforms that could build the test, and fix compilation on
iOS platforms in Coin.

Change-Id: Id31b43c9df9f205476c48bccb6b87c7a53ed15c5
Reviewed-by: Vitaly Fanaskov <vitaly.fanaskov@qt.io>
2020-02-04 11:58:56 +01:00
Qt Forward Merge Bot
6b858e21ed Merge "Merge remote-tracking branch 'origin/5.14' into 5.15" 2020-02-04 10:49:41 +01:00
Qt Forward Merge Bot
97417e8f28 Merge remote-tracking branch 'origin/5.14' into 5.15
Conflicts:
	.qmake.conf
	examples/widgets/widgets/imageviewer/imageviewer.cpp
	src/corelib/text/qchar.cpp
	src/corelib/time/qdatetime.cpp

Change-Id: I9762f5c4ff650799219729d6aee79ac07ce9024a
2020-02-04 10:44:00 +01:00
Laszlo Agocs
b3422402b4 Clean up and modernize hellominimalcrossgfxtriangle manual test
This particular test may serve as sample code in various materials in
the future, therefore it is highly beneficial if it is kept in good shape.

Make it easier to read, more compact, and split up among the natural
boundaries of the functionality (global setup in main, window+swapchain
management in Window, graphics resource setup and draw call recording
in HelloWindow).

Change-Id: I2451d3961a01131dcbffe66baf23d2cf9bfd077f
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2020-02-04 10:15:02 +01:00
Vlad Zahorodnii
9d49475e91 xcb: Compute correct global pointer position in startSystemMoveResize
QWindow::mapToGlobal() expects pos to be in device-independent pixels,
while in reality it's in device pixels.

We need to use QXcbWindow::mapToGlobal(), which operates on physical
pixels.

Change-Id: I8dcad5cc1f5d55df7950b36d97af5ce4b983ed54
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
2020-02-04 11:11:07 +02:00
Nico Vertriest
6fee92770d Doc: Make snippets Qt Network compilable
Task-number: QTBUG-81489
Change-Id: I43446c7dafe60bc735fe463f359467b889952082
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-02-04 08:27:26 +01:00
Thiago Macieira
02eb9df851 Add new AVX512 extensions found in Intel CLX, ICL and ICX processors
Cascade Lake (CLX) added AVX512VNNI, Ice Lake has added that plus the
integer multiplication (IFMA), the vector bit manipulation instructions
(VBMI and VBMI2), bit algorithms (BITALG), the extended vector AES
instructions (VAES), among others.

I haven't turned on the configure check for those yet. I believe the
VBMI and IFMA instructions will be interesting for Qt image algorithms,
but we'll need some Ice Lakes to do benchmarking on.

Change-Id: Ib5d667bf77a740c28d2efffd15cb43dd821d4b2d
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2020-02-03 11:31:49 -07:00
Thiago Macieira
056230cc9c qfloat16: include the tables in AVX2 binaries regardless
Having a QtCore build optimized for AVX2 does not imply all user
binaries and libraries are optimized the same way. Most of them will
actually have been built for the base platform, which means they require
access to these tables to operate if they are using qfloat16.

Introduced by 5e40d3d982.

Change-Id: If79a52e476594446baccfffd15ee2da9e3693cce
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2020-02-03 10:31:25 -08:00
Edward Welbourne
71fa90a37c Enable system locale to skip digit-grouping if configured to do so
On macOS it's possible to configure the system locale to not do digit
grouping (separating "thousands", in most western locales); it then
returns an empty string when asked for the grouping character, which
QLocale's system-configuration then ignored, falling back on using the
base UI locale's grouping separator. This could lead to the same
separator being used for decimal and grouping, which should never
happen, least of all when configured to not group at all.

In order to notice when this happens, query() must take care to return
an empty QString (as a QVariant, which is then non-null) when it *has*
a value for the locale property, and that value is empty, as opposed
to a null QVariant when it doesn't find a configured value. The caller
can then distinguish the two cases.

Furthermore, the group and decimal separators need to be distinct, so
we need to take care to avoid cases where the system overrides one
with what the CLDR has given for the other and doesn't over-ride that
other.

Only presently implemented for macOS and MS-Win, since the (other)
Unix implementation of the system locale returns single QChar values
for the numeric tokens - see QTBUG-69324, QTBUG-81053.

Fixes: QTBUG-80459
Change-Id: Ic3fbb0fb86e974604a60781378b09abc13bab15d
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2020-02-03 15:34:02 +01:00
Edward Welbourne
3730452bfe Fall back to "+" if MS returns empty string for positive sign
MS's documentation says empty means "+" here, so implement that
fallback (which shall over-ride whatever the CLDR has given us for the
fallbackUiLanguage's positive sign).

Task-number: QTBUG-81530
Change-Id: Ic3f10dd061d0c46d1433f29b8065988da94c38e6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-02-03 15:33:53 +01:00
Edward Welbourne
e0f9b57462 qlocale_win.cpp: distinguish empty QString from null QVariant
An empty string, when packaged as a QVariant, is non-null (as a
QVariant); and QSystemLocale::query()'s callers care about the
difference.

Some callers of the internal getLocaleInfo(LCTYPE type, int maxlen)
need an actual QString return, while others are what query() returns,
so need to return a QVariant; where the former want an empty string,
the latter need a null QVariant. So make that getLocaleInfo() into a
template, so callers can chose QString or QVariant as return type,
only affecting the failure returns.

Change-Id: I7b9a698badedc0e0d8aef8c6e85c22931c33297a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-02-03 15:33:33 +01:00
Tor Arne Vestbø
bf2216c32b Fix isRunningArmOnX86 unused function warning
Change-Id: Ic51e85d2e6e24860f8e980a243a45ec4dc1253cd
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-02-03 15:03:51 +01:00
Giuseppe D'Angelo
2d265dce58 Markdown importer: properly set hyperlinks
The "title" in markdown is the tooltip, not the name attribute of
a link. Also, tell the char format that it's an anchor.

Change-Id: I2978848ec6705fe16376d6fe17f31007cce4b801
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2020-02-03 14:58:06 +01:00
Giuseppe D'Angelo
c29fac453f Markdown importer: use Unicode decoding
Given we feed UTF-8 data into the importer, it must be able to cope
with Unicode. Build md4c with UTF-8 support, advertise it at
usage site, and change a couple of broken decodings.

Driveby: the textedit example used the wrong codec to decode
a Markdown file. While the Markdown spec doesn't deal with encodings,
using the default one for HTML is certainly wrong. Port the loading
of both markdown and plaintext to UTF-8, as that what _saving_
via QTextDocumentWriter would use by default.

Change-Id: I51c6214cfe45ebfc5a67a7366f7866a5328366ec
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2020-02-03 14:58:00 +01:00
Assam Boudjelthia
77e8023eaf Android: use the correct string resources for ok and cancel
Fixes: QTBUG-76942
Change-Id: I0c0ccad4980a458ab291ca8ee533fadbedc90456
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2020-02-03 15:47:57 +02:00
Tor Arne Vestbø
27db9e458c testlib: Clarify that our XUnit reporter is actually a JUnit reporter
The reporter was probably named 'xunit' based on the historical use of
xUnit to refer to testing frameworks derived from Smalltalk's SUnit.
These frameworks typically added their own prefix, e.g. JUnit for Java,
RUnit for R, etc.

The most popular of these was the JUnit framework, and the corresponding
XML output produced by the Ant built tool became somewhat of a de facto
standard, which is probably why we chose to model our reporter after it.

Nowadays however, naming it 'xunit' is problematic as there is actually
a testing famework named xUnit.net, typically shortened to, you guessed
it: xunit.

Test report consumers will typically have a junit mode, and an xunit
mode, and the latter could easily be mistaken for what testlib outputs,
unless we clarify this.

The clarification also allows us to safely extend our support for the
JUnit XML format to incorporate some elements that are nowadays common,
but where we are lagging behind the standard.

[ChangeLog][QTestLib] The formerly named 'xunitxml' test reporter has
been renamed to what it actually is: a JUnit test reporter, and is now
triggered by passing -o junitxml to the test binary.

Change-Id: Ieb20d3d2b5905c74e55b98174948cc70870c0ef9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-02-03 13:48:25 +01:00
Laszlo Agocs
75ad13d2bc rhi: Improve isClipDepthZeroToOne() doc
Quick 3D is now having a use case for calling this directly, so use this
opportunity for enhancing the docs to make it clear what this is about.

Change-Id: I19ec956ac25175dbfb754192abaad8d65a6eeb0e
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2020-02-03 12:05:03 +01:00
Alexander Neundorf
71cf207b54 QGraphicsItem: optimize setCursor() for large number of graphic items
This patch optimizes setCursor() by invoking view->items(position) only
if the current graphics item is under the mouse cursor. If it is not,
setting the cursor for this item should not have any effect on the
actually currently visible mouse cursor, so there should be no
reason to call _q_setViewportCursor() at all in this case, so
it is not necessary to query for all the items under the cursor
position.
In my use case this gives a significant performance improvement
from slow behavior to almost immediately (Linux with X11).

My scenario is that I have many rectangular graphic items next to each
other in a graphics view, and there is the functionality to add one
more graphics item (a "handle") to one of those rectangular graphics
items, and then for this new "handle" a new graphics item will be
added on each of the other existing rectangular graphics items.
The ctor of the "handle" graphics item calls
setCursor(Qt::OpenHandCursor). QGraphicsItem::setCursor() calls
view->item(cursorPosition), and then updates the visible cursor
according to the top most graphics item under the cursor.

So assuming that there are e.g. 1000 rectangular graphics items next
to each other, each showing e.g. 5 "handle" graphic items, adding one
more "handle" graphics item will add one graphics item on each of the
1000 rectangular items, so 1000 times view->items(cursorPos) will be
called, at the beginning with 6000 graphic items (1000 rectangles and
5000 handles) already in the scene, for the last one with 6999 items
in the scene (999 "handles" have been already added), from which the
ones under the cursor have to be found.
This is basically O^2 complexity. With the patch it changes to
linear regarding the number of rectangular graphics items.

Change-Id: I9836fc710a8f11d01a94930ea64c6c946e0db282
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-02-03 11:40:52 +01:00
Eskil Abrahamsen Blomfeldt
07e5a05dcb Suppress deprecation warnings for QFont::ForceIntegerMetrics
This flag has been deprecated, but until we remove it completely
we need to continue supporting it, so we just suppress the warnings
for now.

Change-Id: I464e1cce42f78af76d46ec12eeb3e8d53d64d6a3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-02-03 07:08:53 +01:00
Oliver Wolff
a049325cc7 Win: work around (estimated) 32k char limit for OutputDebugString
Reaching a certain number of characters, OutputDebugString will just eat
the string and not give any output. As there is no way of handling that
error properly we divide the string into usable chunks.

Fixes: QTBUG-80996
Change-Id: Ic7ef34c48c212cbaec3a03790d1020506b7b4319
Reviewed-by: Miguel Costa <miguel.costa@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-02-02 17:35:14 +01:00
Alexandru Croitor
479d0c61d0 Bump version
Change-Id: I5ded7891d0d371b2fa8a38d7c6fba765268eb1ce
2020-02-02 13:41:14 +01:00
Christian Ehrlicher
06f88d2177 QtSql: add missing key for MariaDB
When support for MariaDB was added in
947704cefe the key 'MARIADB' was not added
to the json file.

Change-Id: I8565a4a3804028806c1d2ff992329ece24de3fc5
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2020-02-02 13:04:46 +01:00
Linus Jahn
aadf21b25c Fix 'the the' typo in comments
Change-Id: I00fcb1c2374e7ca168b6240f9d41c0323fb0867c
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2020-02-02 01:18:25 +01:00