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>
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>
Replace ${QT_SOURCE_TREE} with top level project directory when
encountered in include statements.
This is required to parse tests/auto/testlib/selftests/test/test.pro.
Change-Id: I80f31142cf5a35441d1424c38e21bb097e44cd0f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
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>
Uncovered while building qtdeclarative.
Change-Id: If1a36f2640a3a5d765e7ca74b0ba1d39ef2a18f0
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
It's needed when building qtdeclarative.
Needs to be copy_or_install to support non-prefix builds as well.
Change-Id: Ied59f6a1f8403be3721a0ad46f5a3b2f569028ca
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Aka the version of C++ that needs to be supported when compiling
applications that use Qt headers (C++17 at the moment).
Change-Id: I64dec297e8329f31b1d9864f216a95782049ed06
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Matches the LIBS_SUFFIX define we use in Android conditions
and replaces it with a sane amount of escaped characters.
Change-Id: I7d870f992c70b105dd80b6fa94f87d3fa5644006
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
It is needed when cross-building Qt using CMake, where the zstd
feature might have different values between the host and target,
in which case the build system tells rcc not to use zstd when
the feature is disabled.
Amends d20c980576
Change-Id: I9dc55b59b1be5272b79aa5f1e2daf2b516a157d6
Reviewed-by: Joerg Bornemann <joerg.bornemann@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>
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>
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>
If there is a file present in the globbed mkspecs_subdirs file list we
run into an invalid argument error for the install(DIRECTORY) command.
Change-Id: I0fe61a8f0a863854f55cf62a87417bcaec1d2c29
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Due to a bug in upstream CMake regarding relative paths being encoded
into the build.ninja file when performing in source builds, we need to
build the tests in a standalone directory outside of the source
directory.
Failing to do so will cause the source directory for the test to be
incorrect which can cause tests to fails and never read the
BLACKLIST.txt file. See the mentioned issue for details.
Task-number: QTBUG-82820
Change-Id: Ie5c178a92369d6b9decff625bd9641e53088a9fa
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
[ChangeLog][Potentially Source-Incompatible Changes] QtConcurrent::run
has the following signatures: run(Function &&f, Args &&...args) and
run(QThreadPool *pool, Function &&f, Args &&...args). If f is a member
pointer, the first argument of args should be an object for which that
member is defined (or a reference, or a pointer to it). See the
documentation for more details.
Fixes: QTBUG-82383
Change-Id: I18f7fcfb2adbdd9f75b29c346bd3516304e32d31
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Sona Kurazyan <sona.kurazyan@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>
Amends 33cd680ddb, which removed the
Qt5CompatiblityHook class. However, the template line above it was not
removed, and now applied to isBuiltinType. As that function should not
be a template, we remove it now.
Change-Id: If8e276daebce5480b59d9c21b049818f9a46ec98
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
src\corelib\kernel\qmetaobjectbuilder.cpp(1489): warning C4267: '+=':
conversion from 'size_t' to 'int', possible loss of data
Change-Id: I9cf9bdcb62b796eb8d3f3c633640b648cb11b39f
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>