Allow deprecation warnings to be controlled with
QT_NO_DEPRECATED_WARNINGS.
Fixes: QTBUG-82424
Change-Id: I6df55ee2abaf4c141ac9b0e7661e46ba3706b20e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
By delaying it to the end we can be sure that all the Qt modules have
their INCLUDEPATHs set and as a result we can avoid long command lines
on Windows.
Change-Id: I9068f7bf66fe138aad1a633191677a57dfd08d6e
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This will prevent a crash later on when it tries to assign to an index
in a QString that has not been allocated.
Fixes: QTBUG-81950
Change-Id: Ia0b5648a18f15594eeca07d234bedadcfeb266ac
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
A \c{} section is already rendered using monospace, no need to escape
the \nullptr keyword explicitly.
Change-Id: I004a409892809e968c7a73c68a5b3c54a4680425
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
QAbstractItemView::setIndexWidget() does not trigger a relayouting when
a new widget is set. This results in a wrong editor geometry under some
circumstances. Fix it by triggering a delayed relayout.
Fixes: QTBUG-81763
Change-Id: I75d0e19bd5e56d63effe4990d782d202fb39e3e6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Pass on the option or the widget in order to ensure usage of the
correct DPI for High DPI scaling.
Task-number: QTBUG-82356
Change-Id: I5df903a83f88adebd143e514e2fead367d39f015
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
0. The recent patch fixed the case when we can suddenly (meaning from
a particular version of Darwin) bind on a port number 1. Unfortunately,
it's not the case for IPv4 and while fixing one test case, the patch broke
another - so this patch addresses this.
1. Unfortunately, binding on a fixed port 1 on macOS made the test flaky
- we run this 'bind' several times and sometimes OS thinks port is already
bound (because of the previous test case) - closing the connection seems
to fix this problem (thus this patch do this also).
2. As a bonus a proper resource management added (aka RAII) where we would
previously leak a socket in case some QCOMPARE failed.
Fixes: QTBUG-81905
Change-Id: I90c128a332903bb44ab37de4775ca00d390dc162
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Make the test operate in its own temporary directory, so that entries
left behind by other test functions don't impact this test.
Also, call QFileSystemModel::sort explicitly; it would otherwise only
be done once through a single-shot timer, and the test processes events
until the model is populated, which might not process that delayed
sorting. Since dirsBeforeFiles tests the sorting algorithm and not
the sorting logic, best to do this explicitly.
In case of sort failure, print diagnostics.
Done-with: Friedemann Kleint <Friedemann.Kleint@qt.io>
Fixes: QTBUG-75452
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
(cherry picked from commit 4e796e0b0d)
Change-Id: I144b68a17280a38cc7d6daf7ec343eea4453623d
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
We observe this happening on macOS in the CI system, and it might happen
if a VM doesn't get CPU cycles for long enough time so that two timers
time out. Then event processing will process two timer events, and we
overwrite the timerIdFromEvent with the second event.
Instead, skip the test when this happens.
This is an ammendment to 5c520f4b0a
Fixes: QTBUG-71751
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 67491e2df5)
Change-Id: I30eef8cfc94988e6cad500dd5e6722488c2985be
On macOS, the registerTimer test case fails frequently, and blocks
valid integrations. With this change we try to detect the condition
and skip the test.
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 5c520f4b0a)
Change-Id: I97644b5b4654b4c96fbc99858bbf191e6edb5977
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Change d603ee68 made the default DPI be 96, for cases
where a style option is not provided.
This causes inconsistencies, since there are in fact
several cases where QStyle API is called without a
style option.
Restore historical Qt behavior of using the primary
screen DPI. Single-screen systems should now be consistent,
as before.
Task-number: QTBUG-82356
Change-Id: I849934ca2e5604b9fb2f045ed4f6058f3e0426ff
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
It's slated for removal in c++20
Fixes: QTBUG-82240
Change-Id: I7b35c151413b131ca49b2c09b6382efc3fc8ccb6
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Currently QShaderGenerator will crash when encountering some expressions
in input nodes.
For example, this node prototype would make it crash:
"VERTEX_COLOR": {
"outputs": ["color", "alpha"],
"rules": [
"headerSnippets": ["in vec4 vertexColor;"],
"substitution": "vec3 $color = vertexColor.rgb;
float $alpha = vertexColor.a;"
]
}
Change-Id: I37abb8099d376843a4cb13228140467dc1b8f60c
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
It was already possible to declare a node prototype with multiple
outputs, but trying to assign to all those outputs was not possible and
instead resulted in a crash.
It is now possible to declare nodes like this without crashing:
"SEPERATE_XYZ": {
"inputs": ["vector"],
"outputs": ["x", "y", "z"],
"rules": [
{
"substitution": "float $x = $vector.x;
float $y = $vector.y;
float $z = $vector.z;"
}
]
}
Change-Id: I748e77e84c9120dc688c573eee33dc13c6bfbace
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Change-Id: I22a4c86034b399782115bb078c298b211095476a
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
A QTextDocument always contains a QChar::ParagraphSeparator, so
characterCount() will always return actual count + 1.
The tests confirm this behavior, make it explicit in the docs.
Fixes: QTBUG-80597
Change-Id: I91040fb6eb2c4fae5235458c695110f8f15bdfea
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
This fixes the shader generation for graphs like this one:
Function0 ------> Output0
(with unbound input)
Input ------> Function1 ------> Output1
With those graphs, createStatements will not return any statement for
nodes Function0 and Output0.
Change-Id: Iec32aa51623e176b03ae23e580f06d14df80a194
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
QShaderGenerator didn't handle substitutions like
`vec4 $color = mix($color1, $color2, $fac);`
Note that `$color` is a prefix to `$color1` and `$color2`. For the
substitution `QByteArray::replace` was used so if `$color` was handled
first and replaced by `v1`, `$color1` and `$color2` were never correctly
replaced and instead became `v11` and `v12` which caused a crash later
on.
Change-Id: Idaf800fdac468f33c323eb722701da5f8eb918d6
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Pass the correct screen as parent of the roll effect widget.
Fixes: QTBUG-82011
Change-Id: I25c163cb2e4c038e60ceced702a1ea6c18aa5424
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Otherwise, when Qt is built with system libmd4c, all applications using
Qt GUI have to link with it, even if they do not use it.
Change-Id: I662dfd4caf29bb692b62c20cef0e99148a87a99a
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
not to have arrows under some conditions. NSPopUpButton had a needed
color, except it also has arrow(s). Which looks quite confusing on an
inactive window on a tab button.
Fixes: QTBUG-82122
Change-Id: I40c57abe9ccae48fa906d592169c412f5f89f712
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 0e643bf783)
Change-Id: I3047cb24051c7f25d77d5b2b86ff145a52695107
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
It's too late for 5.14.0 release, but still good to have it
documented.
Change-Id: I76f323d80bb878c779caec2622d5917f868f9fc0
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Do not expect the .qm files to be there at qmake time; they will only be
generated at build time.
Fixes: QTBUG-77398
Change-Id: If73fdb51d40138e52f62eaee0491a5d73d9fe161
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Since the backend is async, the settings will not be ready to read/write
instantly as on other platforms, but only be ready after the
filesystem has been synced to the sandbox. This takes at least 250 to
500 ms. The QSettings status() or isWritable() can be used to discern when the
settings are ready for use.
This also fixes a crash in threaded wasm
Task-number: QTBUG-70002
Change-Id: I080bdb940aa8e9a126d7358b524f32477db151b6
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Future versions of emscripten will remove the timestamp, so we need to
replace this with the current timestamp
See a7f058a1e6 (diff-9a5d68085dc7db2938b37a2b7b05c1f5)
Change-Id: I8379d1adee1df1084461fddb1dd2e71684de9657
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
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.
Change-Id: I38abb2a191076ea04581c29552657ee3e0b87dbc
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
For graphs like this one:
Input ----> Function1 ----> Output
\
---> Function2
(unbound output)
We would have generated only 2 statements, for Function1 and Output.
This change fixes this by treating Function2 like an output.
Therefore it generates 4 statements: Input, Function1, Output and
Function2.
Change-Id: Iaada40b9b949d771806dd47efad4f7ef2a775b48
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
We do not have dlopen, harfbuzz seems to try and load the thai
plugin using dlopen when just iterating through the language
selector in virtualkeyboard..
Fixes: QTBUG-78825
Change-Id: Iee064a1d9a628784e3ce46d641cd157a69bcb696
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
QUtf32::convertToUnicode() was forgetting to set headerdone when it
dealt with the header (for contrast, Utf16::convertToUnicode() does).
Fixes: QTBUG-62011
Change-Id: Ia254782ce0967a6cf9ce0e81eb06d41521150eed
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Mirror the behavior in unixmake.cpp and do actually install
/uninstall files in target.targets. This fixes the installation of
.debug files on MinGW for a Qt with -force-debug-info
-separate-debug-info.
[ChangeLog][qmake] Install/uninstall rules are now generated for
target.targets on Windows. This mirrors the behavior on Unix.
Fixes: QTBUG-81354
Change-Id: Ie9366f132ebd8e18680f32f2e52cec64dbd87e9a
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
If a model is empty, there is no index (0, 0); requesting it
is undefined behavior.
Rather than protecting the calls with checks on rowCount/columnCount,
remove the Q_ASSERTs altogether: they're trying to do some
basic sanity checks on the model, something that doesn't belong
to a view (but, say, to QAbstractItemModelTester).
Change-Id: I0ea25604fdcf524a10f5922a03a4d0700447f6a7
Reviewed-by: Andre Somers <andre.somers@kdab.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
This can be used to set the pixmap format, and needs to be defined to
something sane even if there is no primary screen.
Task-number: QTBUG-81671
Change-Id: Ic0d41cec31ac71309123aa8bb8b840fa4a4122bb
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Qt Quarterly 31 was the last edition of Qt Quarterly to be
published exclusively as a PDF. We cannot fix the typo in the
PDF. As the content is >10 years old an in an unmaintained
archive section, remove the reference to it from this example.
Fixes: QTBUG-81972
Change-Id: I41a82487ff89dbe8ea5701c02c51e7f7c79bf73d
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
What I originally thought NLM_CONNECTIVITY_IPV*_SUBNET meant turns out
to be what NLM_CONNECTIVITY_IPV*_LOCALNETWORK is, leaving me to wonder
when *_SUBNET is actually used. Anyway we now also check *_LOCALNETWORK
to make sure we're not unnecessarily denying certain connections to be
made.
At the same time check for link-local connections where both local and
remote are link-local, in this case even NLM_CONNECTIVITY_IPV*_NOTRAFFIC
is valid. Unfortunately this check cannot be done in
QNetworkStatusMonitor, so QNAM will likely not allow these connections.
Task-number: QTBUG-80947
Change-Id: Ieb96ce9f4a478eef0c3ea47f2471f701c102b4d4
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
This makes no difference for the IA-64 C++ ABI nor for MSVC until MSVC
2019 16.6. But it does with 16.6, where the std::atomic constructor
becomes non-trivial, which makes QtPrivate::RefCount non-trivial, which
makes QLinkedListData non-trivial.
Before this change:
User code \ Qt MSVC <=16.5 MSVC >=16.6
MSVC <=16.5 works works
MSVC >=16.6 fails works
With this change, they should all work. The list of symbols exported
should not change either, so linking against a Qt compiled with MSVC
<=16.5 should continue to work.
[ChangeLog][MSVC] Fixed a compatibility issue found when linking code
compiled with version 16.6 to a Qt compiled with 16.5.
Fixes: QTBUG-81727
Change-Id: If79a52e476594446baccfffd15ee771397467f8b
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Apple changed on macOS 10.14 (Mojave). Windows has always allowed.
Fixes: QTBUG-81905
Change-Id: I572733186b73423b89e5fffd15f12fee3f03c055
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The comment in QNativeSocketEnginePrivate::fetchConnectionParameters()
talked about IPv6 v4-mapped addresses. However, toIPv4Address also
converts the unspecified address (::), which resulted in QAbstractSocket
saying that it had bound to QHostAddress::Any instead of
QHostAddress::AnyV6
Change-Id: I572733186b73423b89e5fffd15f138579c5c0c50
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Change b274f656b8 enabled the use of a
response file for application building specifically needed when building
an application for Android on Windows. The same cause can happen when
building a library too with a lot of object files, so the command for
the link step can be too long. So we expand the functionality to be
used for libraries too.
Task-number: QTBUG-71940
Change-Id: Ia6d1943bf33f6decb53f6e71a8dc65310d2f20a1
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
We don't have a -relocatable configure switch. Move the documentation to
the right place (configure -list-features).
The correct configure switches to turn the feature on/off are
-feature-relocatable and -no-feature-relocatable.
Task-number: QTBUG-80928
Change-Id: I96df0f44f12b2efe5a64132e9006d4b73de41255
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Tasuku Suzuki <tasuku.suzuki@kdab.com>
Reviewed-by: Yuhang Zhao <2546789017@qq.com>
In a case where a connection is refused, then it is possible for it to
fail at the time that the QHttpNetworkReply is being created and
therefore after the connections have been made it would have already
emitted the signal to indicate it was finished with an error.
To account for this, then it checks if there is an error code set on
the reply and if there is then it will call the relevant slot right away.
Fixes: QTBUG-57799
Change-Id: I4e73e5c82092c09f825343d18db40b47c3cdb9ac
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>