UWP expects these functions to be opened via the XAML thread, so we
ensure this is done by running those functions on that thread.
Change-Id: I57ae3a7d9b45d0b1a00ac23b103386bd34b65c6d
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Include WordBreakTest.html, since a test uses sample strings from it,
albeit without actually reading the file.
Had to comment out more of the new tests, as at Revision 24, pending
an update to harfbuzz and the text boundary detection code.
Task-number: QTBUG-79631
Task-number: QTBUG-79418
Task-number: QTBUG-82747
Change-Id: I0082294b09d67ffdc6a9b5c15acf77ad3b86f65f
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
QWindowsWindow::updateFullFrameMargins() which is called
from the screen changed handling does not take native menus
into account.
Since the size of the menu is not known when using
EnableNonClientDpiScaling(), obtaining the correct frame
size requires triggering a WM_NCCALCSIZE message. Extract
the helper forceNcCalcSize() from QWindowsMenu and
use that from updateFullFrameMargins() in case menus are present.
Amends d2fd9b1b98.
Fixes: QTBUG-82580
Change-Id: I306f1faf84e26c88608cb22ffd42eccc848905c3
Reviewed-by: André de la Rocha <andre.rocha@qt.io>
Return the value from handleWindowSystemEvent so platform plugins can
detect whether it was accepted or not.
Change-Id: I53ffb713afc8e0ec1789107c912433133cfaa11a
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
On a high-dpi screen and AA_UseHighDpiPixmaps set, QIcon will ask its
engine for a scaled-up pixmap. When the icon has been created from a
theme, the engine is a QIconLoaderEngine. For a SVG icon, that engine
would recursively use QIcon to load the scaled-up pixmap, leading to
double scale-up. Fix by bypassing the QIcon API in the SVG case,
loading the SVG icon directly from the SVG icon engine.
Done-with: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Fixes: QTBUG-73587
Fixes: QTBUG-75039
Change-Id: I7fba02b6454decb5fcbca9c5a092e75954261dfd
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Make the copy explicit.
qhighdpiscaling_p.h:282:24: warning: loop variable 'rect' has type
'const QRectF &' but is initialized with type 'const QRect' resulting
in a copy [-Wrange-loop-analysis]
for (const QRectF &rect : pixelRegion) {
^
Change-Id: I4080ff42c41e464d081ab2b01cb2d010867b041b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Keep using the old/deprecated behavior for the Qt 5.14
series.
Task-number: QTBUG-74601
Change-Id: Icee99803f300dfa0116a4de75f9fb26d1010625d
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
When shaping is disabled we also skipped the step which set
dontPrint to true for soft hyphens, line separators, and
similar characters. This caused boxes to appear in text with
e.g. line separators.
There is a minor modification to the code that is moved:
In the case on unshaped text and only the CMAP able is used,
the font engine for the soft hyphen can be a fallback engine,
so we need to also set the correct engine index when changing
the glyph index.
[ChangeLog][QtGui][Text] Fixed an issue with QFont::PreferNoShaping
where boxes would appear in place of unprintable characters.
Fixes: QTBUG-81994
Change-Id: Ifc9f4f89d928475ca0487a92b4480bd5db5918fd
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
The link is actually a self-reference; setCurrentSection() is setter
for the currentSection property, and has no dedicated documentation.
Change-Id: I4977650566913c590d46aede92d8678b7b7ea291
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
This has been flaky on OpenSuSE; if the stored geom.topLeft() is 0,0
it apparently means the window manager (probably kwin) didn't get around
to decorating and repositioning the dialog by the time
qWaitForWindowExposed() returns. Because we check later to see whether
it moved, we need to be certain of its initial position.
Waiting for the extra "fleece" widget to be shown was based on the
theory that by the time the X server has processed messages related
to that new window, the WM should be done processing the consequences
of the resized dialog window. But there's no such guarantee, so let's
try removing that. On the other hand, removing the delay does open
us up to miss a regression (maybe the dialog gets moved after we have
checked that it didn't move).
Rename because we don't name autotests after bugs.
Amends 26ddb586ac
Task-number: QTBUG-32473
Change-Id: I6bbfe2b4baaee389db0d4112f0fec3b7cb9da554
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Liang Qi <liang.qi@qt.io>
QVLA *does* have iterators and *can* be used with foreach
(... I didn't say it should). Move its description together
with the other containers.
Change-Id: Ib60d1f7b3dc0e8c7004991bd4fdff95b3f23af60
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
There's no need to scale the cursor down to 1x, since we're now passing
the correct device pixel ratio on to the NSImage by setting its size.
Letting macOS deal with the scaling produces a higher resolution cursor.
Change-Id: Icdb3d59998f9a32094c2973c3b222cf22b6398ac
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
The QIcon can be turned into a NSImage directly, with all the supported
representations that the icon contains. This allows macOS to choose the
best representation for whatever context it's rendering the NSImage in,
and will likely do a better job of scaling it if none of the sizes fit
target context.
This fixes e.g. application window icons not taking retina screens into
account.
Change-Id: Idbd97cae4ef50cc0dd3f38c355cfceec007e0d19
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
The conversion uses NSBitmapImageRep and correctly sets the display
pixel ratio and size of the resulting image, reducing the need for
clients to deal with this.
It also propagates the isMask property of the icon to the NSImage.
The function returns an auto-released object, as is customary for
class-functions like these.
Change-Id: If97f3d383959cd0f58a0d1249f5c26e52c1da9cd
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
The conversion uses NSBitmapImageRep and correctly sets the display
pixel ratio and size of the resulting image, reducing the need for
clients to deal with this.
The function returns an auto-released object, as is customary for
class-functions like these.
Change-Id: I5124d1d8145a7f5266921b22fda1987798771ec1
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
There're some uses we can't get rid of until the deprecated functions
are deleted, so suppress them for now.
Change-Id: I85b737eefc71f8f3ac939dfa961383220a8244af
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
We can't get rid of internal use, so let's work around that by not
marking it deprecated in private code.
Change-Id: If6cbfff4f16c30892335633567326141fbc44092
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
It's needed by QStringTokenizer, and it's more generally useful as a
public type (you don't need to match the type of the conversion
operator, but can just access the nested typedef).
Change-Id: I2cf8b22f1ca31c38d51d2143932115da6aefc5a7
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Just mark the constructor constexpr. If std::basic_string isn't, then this
will be silently dropped. If std::basic_string is, we can now construct
QStringView from std::basic_strings at compile-time.
[ChangeLog][QtCore][QStringView] Conversion from std::basic_string can now
be constexpr (when std::basic_string is).
Change-Id: Ia608f1a71c9a24f417b3e21e150ff6bd3d2f4fc4
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Use QTRY_COMPARE in the flaky tests instead of waiting.
Change-Id: Ic18fc5fde3fa47f3b3ef21e6acd876bd6990981d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Create the pixmap with a device pixel ratio set.
Change-Id: I7f7e90aec4d117304852f050be70e14a0c6bf69d
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Use QFileDialog::ExistingFile and check whether file can be opened,
fixing warnings like:
QIODevice::read (QFile, "/home/.../blub"): device not open
Change-Id: I7ee1d59f01383c581bc09fb44855835aae8c246b
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
The changed buffer usage priority that was introduced in our ANGLE
update caused severe performance regressions for Qt applications.
Fixes: QTBUG-73835
Change-Id: I49839bb272cdeec0027264f2751b88bc149665ad
Reviewed-by: André de la Rocha <andre.rocha@qt.io>
Reviewed-by: Miguel Costa <miguel.costa@qt.io>
Files ending with .mm are Objective-C++ files, so we don't need
a separate file for the C++ parts.
Change-Id: I3ef52bc98291fd461b889978a538e81630d17c6e
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Change depreciated and removed preferLowPowerToHighPerformance to the new
powerPreference
Fixes: QTBUG-82730
Change-Id: I53e4e39626fce75897701b0134adadf00dac2dea
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
This exercises the multi-threaded codepath and also tests precision
a bit higher.
To avoid quadratic blowup, only a short set of formats are tested in
the larger conversion tests.
Task-number: QTBUG-82818
Change-Id: I411deb97aea61a69fbdb24cbaf6559dd9436b703
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
We are, arguably, not testing QProcess and its ability to start or finish,
we test QUdpSocket. If, for some reason (as we discovered on some
specific machines recently) the process does not start or does not produce
any output (canReadLine), we QSKIP instead of failing. Also, all those
QCOMPARE will bypass the part there we stop processes - so must be
RAII-protected.
Fixes: QTBUG-82717
Change-Id: Idfb0d4a483d753f336b3827875eeaf51c79270e2
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
If XLIB_SKIP_ARGB_VISUALS is set, we might fail to find visuals for
supported configurations.
Task-number: QTBUG-81904
Change-Id: Ib0d26faabe430925881b7f2acfc5361df3af416b
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
The conversion takes place in separate blocks, but may need to be
compressed after converting.
Fixes: QTBUG-82818
Change-Id: I71431af3d41e1bfe1f9b3d8cd7c1e0a2020846cd
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
This is similar to how the similar table in qblendfunctions.cpp is now
set, and is easier to read and maintain.
Change-Id: I43a885fae7b1a92110bb33f0b22a5b02fddc0115
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
The effect of the soft-hyphen needs to be updated once the final the
break point has been found.
This change cleans the logic by using two variables keeping track of
soft-hyphen at current evaluated position and at last confirmed break
point. Also adds tests for supression of soft-hyphens in the tight
WrapAnywhere case.
Fixes: QTBUG-35940
Fixes: QTBUG-44257
Change-Id: I7a89a8ef991b87691879bb7ce40cec4a3605fdd5
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
This class has documented member functions, but only the related
\headerfile was documented. The class documentation itself was
omitted with the \dontdocument command.
Replace the \headerfile with a \class command, and move the global
functions to be related to the class itself. Keep the title as a
\keyword to avoid breaking any external links. The new class page
will inherit the .html file name of the header page, so we're safe
in that regard as well.
Fixes: QTBUG-82800
Change-Id: Id51539b45e0642d91b304a37f95461ca3d6c9841
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Due to Android's multi-abi the build will fail due to concurrent
access:
cmd /c C:\Projects\Qt\repo\qtbase\src\corelib\mimetypes\mime\generate.bat C:\Projects\Qt\repo\qtbase\src\corelib\mimetypes\mime\packages\freedesktop.org.xml > .rcc\qmimeprovider_database.cpp
The process cannot access the file because it is being used by another process.
Change-Id: I647e0a6d8aa03cf116b08a1dce6e61e8882661f4
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Show a warning but allow applications to survive by not attempting
to call VS/PS/CSSetWhatever() with an invalid number of resources.
Relevant for samplers in particular, where the limit is 16. Qt Quick 3D
exhibits problems with this when using custom materials combined with
shadow mapping, and while this is not a solution to the problem there,
at least the problem is now clearly indicated instead of crashing.
Task-number: QTBUG-82719
Change-Id: I83914b7648001fa421ed1cf07a7b7444e0ef8fc0
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
Following the incomplete data guesstimation optimization the
tst_QSslSocket::readBufferMaxSize test would fail due to it waiting for
16K, but the readBufferMaxSize was 10 bytes.
Amends 559b563d71
Change-Id: I5d17fac24e73c1305161aff744710b4c5b0b457a
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
For QNAM:
Deprecate the to-be-unused enum and mark the property deprecated in docs
For bearermanagement:
Add a warning on the bearermanagement documentation page that it is
deprecated.
Change-Id: I2cbe12ddec444d9f704601f07f3a7c9b70dc4f3c
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Fix warnings about float constants and comparison.
Use member or constructor initialization.
Introduce some const for clarity.
Use Qt_CONFIG.
Task-number: QTBUG-81254
Change-Id: I71a6ebfba397c0f8e1dd2e61167233c8e5c137af
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Use QThreadPool to process QImage smooth-scaling, format conversions,
and colorspace transforms multithreaded.
Change-Id: Ic142b1fa899f56e7e5099d36ca713701a47b681b
Reviewed-by: Lars Knoll <lars.knoll@qt.io>