That's how CommonMark specifies it. The HTML codec-guessing algorithm
was making it fall back to Latin1 in practice, which was screwing up
any Unicode characters found in the markdown source.
Change-Id: I4021adc4a68591ecfd56ef24971af53ce3e9c96d
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Some compilers (hello, MSVC) do not produce literal types in Qt
because their constexpr support has been blacklisted.
Therefore, amend the check for literal types in Q_ARRAY_LITERAL:
only do the check if the compiler supports constexpr.
Change-Id: I7cffe00dde447d975aa6a7d02248df9c351508ff
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
In all of these cases, the effect of the change is local to one file.
Change-Id: I3bda3aadee3b42e7797183c2330183390b92d1f2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Move the recursive mutex use case out of QMutex into a separate class,
unsurprisingly called QRecursiveMutex. As an immediate benefit, 90% of
the QMutex users now enjoy a constexpr QMutex ctor.
This change prepares for a real split in Qt 6, so that both use-cases
are no longer bundled up in one class.
[ChangeLog][QtCore][QMutex] Added QRecursiveMutex as a replacement of
QMutex(QMutex::Recursive).
Change-Id: I79b8724e8a8ee65e4bd0f06acd76103fe4197b8c
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
When I added the QEXPECT_FAIL the http proxy was the only one.
That's no longer true after fixing the SOCKS proxy, so let's make the
condition more specific.
Change-Id: I1eaa5117d5d0219e04cbd091ec54e522fe7b5509
Reviewed-by: Dimitrios Apostolou <dimitrios.apostolou@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
- Replaced QOperatingSystemVersion::WindowsVersion,
QSysInfo::windowsVersion(), QSysInfo::macVersion(),
QSysInfo::MacintoshVersion with QOperatingSystemVersion::current().
- Added QOperatingSystemVersion::WindowsVista for convenience, as it
is used in lots of places.
Change-Id: If9c4ac496005b2e70b5c70be160747afa74b98c1
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
- Replaced the usages of deprecated APIs of corelib by corresponding
alternatives in the library code and documentation.
- Modified the tests to make them build when deprecated APIs disabled:
* Made the the parts of the tests testing the deprecated APIs to
be compiled conditionally, only when the corresponding methods are
enabled.
* If the test-case tests only the deprecated API, but not the
corresponding replacement, added tests for the replacement.
Task-number: QTBUG-76491
Task-number: QTBUG-76539
Task-number: QTBUG-76541
Change-Id: I62ed4a5b530a965ec3f6502c6480808f938921aa
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
... except for tests, which manually undefine the macro.
Like QT_NO_FOREACH, this is a technical way to keep JSI-free
modules JSI-free going forward.
Change-Id: Icf1342da00a700f42f9e32a253d1cdb94c38dd7e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This seems to be a common use case, and to be expected from pastes
of MSWord documents.
Change-Id: I5849d7f51408e76f15a0b03c2118649f118af1d6
Fixes: QTBUG-66794
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
We stopped storing the patch release number of Qt in the plugin metadata
in commit 7bd79b3cff (5.13), to make it
simpler to parse the validity of plugins before decoding the CBOR
payload.
Fixes: QTBUG-76855
Change-Id: I6aed4df6a12e43c3ac8efffd15adbbf83e928866
Reviewed-by: Liang Qi <liang.qi@qt.io>
RenderHint::HighQualityAntialiasing and NonCosmeticDefaultPen are
obsolete since Qt5 but not marked as such. Therefore add
Q_DECL_ENUMERATOR_DEPRECATED_X now so those two enumerations can be
removed with Qt6.
[ChangeLog][QtGui][QPainter] HighQualityAntialiasing and
NonCosmeticDefaultPen are marked as deprecated and don't have an effect
anymore
Change-Id: Ib0c966a078a1d23d492d0255288e2066c50e87b6
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Remove the mainW, edit widget member variables from the test and use
widgets instantiated on the stack in the tests.
For the data-driven tests, use a static QScopedPointer, which is
reset by a newly introduced TestEnd action.
The book-keeping logic maintaining a list of shortcuts can then be
removed.
The setupShortcut() helpers are simplified and the special case
TestWidget::SendKeyEvent is replaced by a lambda in
keypressConsumption().
Task-number: QTBUG-76493
Change-Id: I15dfa86dfa0666ed8288b7190e37cdb862c261c8
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
This is the most flaky-pass test currently.
It fails the first time it is run on MacOS_10_12, but
succeeds all the following times.
This happens extremely often, so disable it until the issue
is resolved.
Task-number: QTBUG-76566
Change-Id: I94359eceb91c3b958930424e6c8b5957fb3f1252
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
QWidgetPrivate::updateIsTranslucent sets the surface format of the
window with the alpha based on the translucency attribute, so we need
to call this function when the attribute value changes. The test can
confirm that the window's requested surface format has changed, we
can't rely on what is actually set, and don't have to rely on
hard-coded values like 8bit alpha.
While WA_NoSystemBackground needs to be set for WA_TranslucentBackground
to have an effect, we can't clear the attribute when clearing
translucency (as it might have been set explicitly).
Change-Id: I238d6930b7e0488397467a4e035b5f530566a1ff
Fixes: QTBUG-60822
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
When calling waitFor{ReadyRead,Disconnected} it will wait for data but
if the data is already received and the read notification has been
queued (and there's no more data coming in) it will return false.
By checking if a read notification has been queued and then handling
this we can easily take care of this scenario.
Fixes some flaky tests which missed the read data in waitForDisconnect
and similar.
Fixes: QTBUG-38385
Change-Id: Ic05d59883c1175783e56ff1822b6636c35aec874
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
- Use nullptr
- Fix static method invocations
- Use QString() instead of QString("")
- Use override
- Use member initialization
- Remove unimplemented code related to status bars
- Use Qt 5 connection syntax
- Fix apparent oversights in ambiguousItems() and
unicodeCompare(),where the 2nd shortcut was assigned to the wrong button
- Use Q_ENUM for the enumerations which will output the value in
QCOMPARE and automatically declare them to be a metatype
- Use enums in helper function signature for clarity
Task-number: QTBUG-76493
Change-Id: I0ed6ee7ee8dc2dbb48160a8383e6ed29164c3449
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
- Replaced the usages of:
* QDateTime::toTime_t() -> QDateTime::toSecsSinceEpoch().
* QDateTime::fromTime_t() -> QDateTime::fromSecsSinceEpoch().
* QDate::shortDayName() -> QLocale::system().dayName().
* QTime by QElapsedTimer, where the deprecated methods of QTime
were used.
- Modified the tests for the deprecated methods to be enabled only
when the corresponding methods are enabled: when the deprecated
APIs are disabled, the tests will be also disabled, and the
compilation won't be broken.
Task-number: QTBUG-76491
Change-Id: I4d565db2329e580c567aae511696eb1efe120843
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Otherwise "QVarLengthArray<Foo> x = {};" gives a warning. Also, some
compilers get confused about "QVarLengthArray()" this way.
Task-number: QTBUG-76199
Change-Id: I4296586c0181d3e6e82ca8b7b79aeb9a21645d1f
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
As planned when adding YearRange: now that it's merged up to dev, move
it to QDateTime, since we can add to the API at 5.14.0.
This follows up on commit 82ad4be4a2.
Change-Id: I81b6c2331121a71e2592514781c02c5756e70c52
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Have feature flags as appropriate. OpenGL is causing a mess here
but let's support what we can since some of this will become relevant
in more sophisticated mesh drawing cases with 3D in particular.
Change-Id: Idfa7b4642ec87147978e03d78d6233efbd151491
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Draws 1024 cubes at random x,y positions with varying color with
a single instanced draw call.
Change-Id: I8737503acf23866ad4734b1d88753415a3b93445
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
...but this will vary between backends, or in some cases
even between implementations of the same API.
Point size is settable only via the vertex shader (gl_PointSize).
It is silently ignored with D3D and HLSL.
Line widths other than 1 are supported only on OpenGL and Vulkan.
(but this is in fact deprecated with GL and optional with Vulkan)
Add QRhi::Feature values for both.
The line width is now settable on QRhiGraphicsPipeline. It is not a
dynamic state since the static, per-pipeline width is good enough for
most cases. (and the feature is not supported on half of the backends
anyways so it will get limited use in practice).
Change-Id: I6d3a32269527c452b794b2cb8b0f03101eab40b2
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
[ChangeLog][QtCore][QStringList] Added QStringView overloads of join(),
filter(), and replaceInStrings().
Change-Id: I9636e21e2e43ed46cce0aa7fa23ab0710aa641ba
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
This change is used to generalize a template docker-compose file for all
modules. Ideally, the leaf module only need to keep a docker compose
file for all platforms (docker-compose.yml).
NOTE:
The version of docker-compose file downgrades from 3.4 to 2.1 because
the 'extends' keyword is not supported in Compose version 3.x.
Change-Id: I2e36fd9236eda86cb5fcf940d787ccefe9200696
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
... and schedule it for removal in Qt 6.
This appears to have come to some fame on the internet, so better add
a deprecation warning before we remove it in Qt 6.
Change-Id: I42d91d933f47dfd2d8d54c92358e9e46ced6bf21
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
The -d option makes rcc output a dependency file with the specified
file name.
The resulting dependency file is useful for make or ninja based build
systems.
[ChangeLog][Tools][rcc] Added -d option to generate a dependency file.
Fixes: QTBUG-45460
Change-Id: I495ade50f8d9865d4c00dce9373b2b6d1a6c8f2f
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
A recurring problem with the Q_NAMESPACE macro is that it declares
an object (staticMetaObject) in the surrounding namespace. That
object lacks any export/import qualification to make it usable
with shared libraries.
Introduce therefore another macro to work around this issue, allowing
the user to prefix the object with an exporting macro, f.i. like this:
Q_NAMESPACE_EXPORT(Q_CORE_EXPORT)
The old macro can simply then be rewritten in terms of this new one,
supplying an empty export macro.
Note that NOT passing an argument to a macro expecting one is well
defined behavior in C99 -- the macro will expand an empty token.
Of course, MSVC doesn't like this and emits warnings. As a
workaround, use a variadic macro.
[ChangeLog][QtCore] Added the new Q_NAMESPACE_EXPORT macro. It
can be used just like Q_NAMESPACE to add meta-object information
to a namespace; however it also supports exporting of such
information from shared libraries.
[ChangeLog][Potentially Source-Incompatible Changes] Prefixing
Q_NAMESPACE with an export macro may no longer work. Use the new
Q_NAMESPACE_EXPORT macro for that use case.
Fixes: QTBUG-68014
Change-Id: Ib044a555ace1f77ae8e0244d824ec473550f3d8e
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Fix warnings:
Using QCharRef with an index pointing outside the valid range of a QString. The corresponding behavior is deprecated, and will be changed in a future version of Qt.
introduced by qtbase/c2d2757bccc68e1b981df059786c2e76f2969530 (5.14).
Change-Id: Ie6f0e2e3bb198a95dd40e7416adc8ffb29f3b2ba
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This is usually the case on Android, where running this test would
require deployment of files to the emulator. This doesn't give us any
further testing that we don't already do by running this test on regular
Linux, so skipping the test instead if the preconditions aren't met.
Change-Id: I3722796634871213ba51c89ae7f40b19f954f2cb
Fixes: QTBUG-73566
Reviewed-by: Daniel Smith <Daniel.Smith@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Fix our generation of font-family CSS so it contains the full list of
families.
Change-Id: I37d5efa64faeb4b6aeb7e2c5d6a54ff07febe9cc
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Fix most clang warnings about override, nullptr, range-based for loops.
Change-Id: Id47e57adb63a38e2f397a31511b788a2432c97cf
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
The completer popup has focus, making QShortcut direct to it's window
rather than to the window the completer belongs to. As QShortcut handles
the case for Tool windows that have a parent, but doens't do the same
for popups. And they shouldn't be treated the same way, as a context
menu popup for a e.g. text edit should in fact block the text edit's
shortcuts while open.
However, the completer popup is special, in that it explicitly makes the
widget completes for its focusProxy, which is what we can use to fix
this issue.
Change-Id: Ie7177d39668b3af14a1d9e0ee5d93eca9c67c8af
Fixes: QTBUG-4485
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Function did not handle default-constructed (null d_ptr) path correctly.
Fixes: QTBUG-76516
Change-Id: I2925d4306f7fce34ece6739b18a8e275e7970837
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
It is sufficient to run this test on systems where we don't need to
set up dependencies and satisfy other assumptions the test makes. It is
safe to assume that if this test passes on regular Unix, then
QTemporaryFile will behave as expected on Android as well.
Change-Id: Iaf9a67d7c12b3acfd0992bab591c3f906b073d9e
Fixes: QTBUG-73564
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
D3D11 and GL (4.3+, ES 3.1+) will come separately at a
later time.
Change-Id: If30f2f3d062fa27e57e9912674669225b82a7b93
Reviewed-by: Lars Knoll <lars.knoll@qt.io>