Refactor the fixString() helper, moving the code into a streamable
class using a helper which can be used for different encodings.
Task-number: PYSIDE-797
Change-Id: I0f82945b6b334da8524882dda2f104327eba79d4
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
The only use of this method got removed already in commit bebae37376.
Change-Id: I9757cbe34710efd9a9d31c74f81e01da40453ff9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This runtime warning was recently introduced in the fix for an
assert/crash when creating a brush with an invalid Preset
value. However, that overlooked the usage where an unknown value is
passed to QGradient constructor, and the code afterwards checks if
the result is a NoGradient or not. It turns out that such usage is
already established as legitimate, including in the Qt Quick Rectangle
code, so this warning would be spit out continuously for perfectly
legal qml code.
Change-Id: Id60aed0817da0214b6cf17edd245f67e26470413
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Hardcoding IP addresses and their respective DNS records is fragile.
We care about Qt producing the same result as other DNS querying tools,
so testing that instead.
Running a python script for this is easiest, and assumed to be quite
reliable.
In case where python fails/is not present, fall back to nslookup.
That tool is available on Linux, macOS, and Windows, although the
output it produces varies. This change implements very basic
line-parsing that can interpret the various results encountered
during testing on those platforms.
This also reverts commit bbaceff253fae13d8e56691bc9de7e1981db5118,
which blacklisted the tests that failed due to changes in DNS
records.
Use the opportunity to replace usage of gitorious.org.
Change-Id: I967de226bd603c805df7fe3ed4e871d92d2d0750
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Pass it through as a traditional clang argument instead of relying on
what MSVC cl.exe can take.
Change-Id: I94405ce6ab80d16b687e62c9aa4b2866ba84f0e2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
qatomic.h included qbasicatomic.h which included qatomic.h.
Due to a define in qbasicatomic.h, the definitions from QAtomic would
change depending on which was included first. Fortunately qbasicatomic
does not need qatomic.h so the include can be removed.
Change-Id: I086009f2e16a6e20b2b76fc6b3bf66a343414206
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This reverts commit 3cdf46059a.
It seems change is causing regression & is reverted now to be able to
proceed with releases
Task-number: QTBUG-74912
Change-Id: Ib2365b96ee98fbbcc8853cc7f8726c157c1913a7
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Makes qtextcodec test succeed
Like qmake does
qt_test_helper.prf says
"
If an auto test needs a helper application, this helper should
be put into the same directory as the test itself.
"
Change-Id: I02cb36d2237cdb72912c943250b843c33ffcd64a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
In Korean text, they typically can use both the "Western" style of
word wrapping, i.e. breaking on spaces, as well as the East-Asian
style of potentially breaking between all syllables. However,
the Unicode Line Breaking Algorithm, TR14 defaults to breaks on
syllables and specifies a possible tailoring where Hangul is
mapped to the AL class instead:
"When Korean uses SPACE for line breaking, the classes in rule
LB26, as well as characters of class ID, are often tailored to AL"
When using Qt, the user would expect the WordWrap wrap mode to
break between words in Korean. If you want the syllable-based
text layout, you would use WrapAnywhere, probably accompanied
by line justification.
To avoid breaking QTextBoundaryFinder and other potential clients
of QUnicodeTools which depend on getting the precise Unicode
data from the algorithm, we do this by passing a flag from
QTextEngine when initializing the attributes. This way, it
can also be made optional later on, if we decide there is
a reason to add an additional wrap mode specifically to
handle cases like this.
[ChangeLog][Important Behavioral Change] WrapWord now
correctly prefers line breaks between words in Korean text.
WrapAnywhere can still be used to get breaks between syllables
instead.
Done-with: Alexey Turitsyn <alexey.turitsyn@lge.com>
Task-number: QTBUG-47644
Change-Id: I37b45cea2995db7fc2b61e3a0cc681bbdc334678
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Add a "sibling" function for QMetaProperty::propertyIndex() for the
relative index. That way in QtQml we can avoid using
propertyIndex() - metaObject.propertyOffset()
where the latter traverses the parent chain.
Change-Id: I113a956801b0e8d56a30a847b5b919da703824e2
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
9204b8c31e broke font matching on Windows.
After this change, if you request a specific face of a family, such
as "Arial Black", and Qt detects that its typographic/preferred name
is "Arial", then it will be added as the single style of the Arial family,
which will in turn be set as populated=true.
So if you later request a regular font of "Arial" family, then it will
see that the family has already been populated, skip this step, and
then see that there is only one style available, i.e. "Arial Black".
To work around this, we need to make sure the typographic family is
properly populated the first time it is registered.
[ChangeLog][Windows][Fonts] Fixed a bug where it would be impossible
to request different faces of a font family after a specific type face
has been in use.
Task-number: QTBUG-74748
Change-Id: Ia0caace2b88a32e6114ff23ad10ee1ea8f5a3e03
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
targetX and targetY are canvas-local coordinates,
while Qt generally works with window-local and global
coordinates.
Add coordinate mapping calls where needed and make
sure we pass correct coordinate types to Qt.
This starts mattering when we have canvases which
are not located at (0, 0).
Change-Id: I28563310ca17d0cc5535317cff99fcd82d3723db
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
Another side effect of setting contenteditable on the
canvas. Seen on Firefox.
Change-Id: I789ba4d7e6fbbdbf14b66fe1ae57183ec04e04bb
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
Typing in invalid URLs results in empty result lists.
Emit rejected() in this case.
Task-number: QTBUG-71785
Change-Id: Ia257b85a5c4370227f753752f6a473bbb3a054be
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
...starting with Qt 5.0.0.
The text is manually inserted there, because \since does not work
within sections.
Task-number: QTBUG-74737
Change-Id: I0fe2d0a113d48be0266030c8466b062c6f743aab
Reviewed-by: Robert Szefner <robertsz27@interia.pl>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
- Remove unused dummyWidget and thus empty slots initTestCase(),
cleanupTestCase().
- Add slot cleanup() checking for an empty top level widgets list
and introduce QScopedPointer to ensure it passes.
- Use QTRY_VERIFY in hideAndShowOnWindowStateChange().
Flakyness has been observed on openSUSE:
FAIL! : tst_QSizeGrip::hideAndShowOnWindowStateChange(Qt::Window) '!sizeGrip->isVisible()' returned FALSE. ()
Loc: [tst_qsizegrip.cpp(126)]
Change-Id: I340fc1892dc00bcff1985e5a8a1e535975736484
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Replaced the display of the calculation output, generated using
fprintf(stdout, ...), with qInfo() << ... In WinRT, fprintf to stdout
does not cause output to be generated.
Task-number: QTBUG-67566
Change-Id: I3b95bbf888e863683cbaf54deb26c3821433a5b8
Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
In preparation of Qt6 move away from pre-C++11 macros.
Change-Id: I44126693c20c18eca5620caab4f7e746218e0ce3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This includes:
- tests
- tools that are only used duing the Qt build (tracegen and
qfloat16-tables)
Change-Id: I3a5f678682b5b9318012568a9e4dcdda0967f89b
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
The actual variable that contains the architecture is
TEST_architecture_arch. TEST_architecture only contains the value
if the test was performed or not.
Fix the conversion script and all the generated files.
Change-Id: Icb3480832cab894948f4fef03b8bc8187cab6152
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This FindCups defines a target, which the FindCups.cmake in the currently
required CMake version does not:-/
Change-Id: I76c5bb72ece80415db1971e4f2079682126fde36
Todo: Remove again once we depend on CMake 3.15.
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
It was needed to allow lazy resize of the backingstore IOSurfaces, but
that feature hasn't been enabled yet, and explicitly setting the layer's
contents placement to NSViewLayerContentsPlacementTopLeft resulted in
the layer animating when the window was moved from screens of different
scale factors.
We need to investigate this further, but in the meantime fix the
visual regression by disabling the explicit layer contents placement.
Change-Id: I63ea1eab9cf3fa6480e88844918ed98e6aa72620
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
We no longer have any MSVC support that wouldn't set Q_DECL_NOEXCEPT
Change-Id: I3e2c74cb89b9c56ffaf17001004c87b88622da82
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
GetFileInformationByHandleEx() which is used to to obtain the ID, has been
found to fail on FAT32 (USB removable drives). Fall back to
GetFileInformationByHandle() for these.
Fixes: QTBUG-74759
Change-Id: Ib3ef60a6bf9e9edaf41af86bf71666001cb0aa58
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This is especially important on macOS when doing a debug build,
because QPluginLoader is looking for the cocoa QPA plugin
suffixed with "_debug" when executing a test or example.
Change-Id: Ief23b3a82c567c16ab9dd30d04d1729031262d7d
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Previously a condition like APPLE AND (NOT APPLE_OSX) got simplified
to APPLE, which is wrong.
This happened by accident due to some sub-family simplifications
involving BSD, which APPLE was part of.
Technically APPLE is BSD derived, but for the purposes of the
conversion script consider APPLE not to be a BSD (hopefully there
should be no cases of using the bsd scope for apple machines in
qmake files.
Also regenerate the fontdatabase project, where the issue was found.
Change-Id: I18dcf4f29ffbff48c183ba95ca2a2e5cd5325d86
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>