It was converted over ARGB32PM, when it should have been directly
converted to not lose accuracy, instead there was an unnecessary direct
ARGB32->RGB30 conversion, which was converted to the necessary type.
This also improves the selection of conversion over ARGB32PM or RGBA64PM
for ARGB32 and RGBA8888 by using 32-bit conversion when alpha is not
relevant.
Change-Id: I5990d8a23b2909d3910d8c1213fa46477742b052
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Since the test was fatuous for i == 0, iterate from i = 1, instead.
Change-Id: I9b9c1b7b10639aefdd74f48051d592da4f84dc85
Reviewed-by: Jesus Fernandez <jsfdez@gmail.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Document QDateTime's methods by reference to QDate and QTime, to avoid repetition.
Use consistent descriptions between toString() and fromString(), in each case.
Document the truth: various things were simply wrong, in at least some copies.
Change-Id: Ie80017250cd470f65733f96d182ed7d043694f0e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
It's not guaranteed that QPlatformScreen::screen should always return a
valid pointer. Furthermore, you can run into this situation with, for
example, two screens setup.
Task-number: QTBUG-53022
Change-Id: Ic23bb2c30b1245f98a793a44cc5e0b39f9afac4b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
When building an application for Android on Windows it is possible that
the command line will be too long when doing the link step. So the code
for generating a response file is moved to MakefileGenerator so it can
be used by the other generators easily. The same variables used by
MinGW can be used elsewhere then.
Fixes: QTBUG-71940
Change-Id: I6c331d12e9541a90a4a95e0154d0ea1c056489bc
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
The code doesn't convert anything that might be a separator on other
platforms (most notably, '\') to '/', it only replaces platform-native
separators (i.e. '\' if running on Windows) with '/'.
Change-Id: I2e241b88b8bd271dfa5d7db61402fe8ef9a6bb6f
Fixes: QTBUG-79736
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
In single selection mode, the current selection toggled when the user
pressed the left mouse + Ctrl key and then moved the mouse over the
item. This was introduced with 28a21d98ef
which added the possibility to deselect an item in single selection
mode.
Fix it by adding a check if the event was a mouse move event and use the
old codepath for it.
Fixes: QTBUG-77353
Change-Id: Id845ada302c92646885dfd966721b00d940f1260
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
The controls were correctly grayed out when the entire window was not
active, but inactive subwindows showed their controls in color, and only
the titlebar had a slightly paler gradient to indicate that they are not
active. MDI is not a concept on macOS and there is no clear style guide
for how such windows are supposed to behave, but the look of the
inactive titlebar before this change is too similar to the active state
for it to be useful.
This change restores the pre-5.11 state, prior to the removal of HITheme
based styling in 8633e1a7b4.
Change-Id: If009bf085a87fe2610d888636348dc8b13a93ec1
Fixes: QTBUG-79648
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Change-Id: Ia5d208ace5086e8e92f95f859383773894a18768
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit dcbe25bbbb)
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Per earlier discussions we bump the deployment target for LTS releases
and follow up by requiring the latest SDK available for building.
As layer backed views and dark mode is a lot more stable these days in
Qt and on macOS in general we no longer support the option to build with
the 10.13 SDK. A workaround in case this functionality is still needed
is to explicitly set the QMAKE_MAC_SDK_VERSION qmake variable, which
will tell the linker to write that version into the MachO header of
the executable, which will then be read by AppKit when determining
which features to opt in to.
Change-Id: Ied4f6d75b710505a5c440c990b82567bea780db6
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
You can save a "skeletal" document with list items to fill in later,
the same as you can do in HTML or ODF format. Reading them back via
QTextDocument::fromMarkdown() isn't always perfect though.
Fixes: QTBUG-79217
Change-Id: Iacdb3e6792250ebdead05f314c9e3d00546eeb9f
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
The markdown parser generates empty lists in some cases when a character
that can be used as a bullet is found on a line by itself.
cbEnterBlock() and cbLeaveBlock() are called symmetrically in such cases.
QStack::pop() on an empty stack triggers an assert, so push and pop need
to be done symmetrically too. But it's difficult to actually create the
list as soon as the MD_BLOCK_UL or MD_BLOCK_OL callback occurs, without
breaking the case fixed in 7224d0e427 (and
probably other cases). That's because QTextCursor::insertList() creates
a list item at the same time as it creates the list itself, and also
inherits block formatting from the previous block. We now insert empty
lists with empty items whenever the need for that is detected though,
and there's a failsafe to prevent popping in case something still goes
wrong with that logic. We aren't strict about reproducing the original
markdown when regenerating it via toMarkdown(), but it's getting closer.
Fixes: QTBUG-78870
Change-Id: Ided194ce7aec2710c60dbac42761ee4169ed9b78
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
Introduce resources_functions.prf with the test function
qtFlattenResources which ensures that RESOURCES has a flat structure,
e.g. only contains *.qrc entries.
This can be called by other .prf files like qtquickcompiler.prf
without disturbing the ability to extend RESOURCES in other .prf files.
Task-number: QTBUG-79672
Change-Id: I43246e40f5ea52a9d9c917a1bd781aeeb1304acc
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
If a font with only a family set is resolved with one that has been setup
with setFamilies() then the family needs to be prepended to the families
list after resolving. This is so that the font still prefers the one set
as just a family with no famillies set.
This also amends the QFontDialog test to account for this too.
[ChangeLog][QtGui][Text] Resolving a font that just has a family set
with families set will prepend the family to the families so that it
is still the first preference for the font.
Task-number: QTBUG-46322
Change-Id: Icc4005732f95b2b4c684e592b06b31e133270e44
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
The signal QProcess::error() was deprecated in Qt5.6 but not annotated
with QT_DEPRECATED_X.
Change-Id: I9dd11c9b8019a0554cb82d6acb6b7e0a01c78123
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Change a1ea498789 did replace different pkg-config calls for
-L, -l arguments to one. Anyhow, it also removed the eval() call that
ensured that the return string was split by whitespace, meaning that
paths couldn't resolve anymore properly if multiple arguments were
returned.
Fixes: QTBUG-79668
Change-Id: I4091fea6891ef79836e05f8e87ffa9d69863a8f5
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
The CROSS_COMPILE variable wasn't picked up by the linux-g++ mkspec.
Now it's possible to cross-build Qt on FreeBSD to Linux, for example.
Fixes: QTBUG-79255
Change-Id: Ib1cd8ed3d5ef0af42f2d47af8f6d2c2ff5356adc
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Use QT_CONFIG consistently and enclose
sslConfigurationImplementation(), setSslConfigurationImplementation()
and ignoreSslErrorsImplementation() within QT_CONFIG as well.
This enables a build of Qt for Python with -no-feature-ssl.
Change-Id: Ia699293ab73a5dc86d8dcf95aa5f6369334d36a2
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
It makes -DQT_DISABLE_DEPRECATED_BEFORE=0x050d00 (in an application)
trigger a binary incompatible change and crash.
Change-Id: I9b9783d134821697180dc3fd8f2f69a51ddb7ac6
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Based on https://wiki.qt.io/Writing_Unit_Tests. Some of the
guidelines will be added to the documentation of a particular
class, function, or macro.
Task-number: QTBUG-18368
Task-number: QTBUG-63987
Change-Id: Ied267edc71e370a07f5124ba05432799f595dda6
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
From https://wiki.qt.io/Writing_Unit_Tests
Task-number: QTBUG-63987
Change-Id: I7229ac0712d1207c0c9ebdac868c33bb35dcb0f0
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Make it clear that the functions will return false if the socket was already
disconnected.
Fix the QLocalSocket example snippet to handle that case correctly by checking
state() before attempting to wait.
Fixes: QTBUG-50711
Change-Id: I4ab4062446a0041a35a3a1d65a19202ffa103298
Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This fixes issue with dialogs when the canvas is not at 0,0 in the
browser window
Change-Id: I14f6754746e064921635d6b3af3353bf3620ac44
Fixes: QTBUG-79160
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Add a section about using QEXPECT_FAIL() to skip known bugs.
Change-Id: Icf258b6e20add3b68d62e404fd9ac0db70420bf2
From: https://wiki.qt.io/Writing_Unit_Tests
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Re-apply 72e3d3633e, which
was omitted in 425df43d7f.
Task-number: QTBUG-79418
Change-Id: I0afa9ff9ace5bdc6cea103cf2acba6dbf9a64a72
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
972a0402be was merged before one of its
parent patches which changed this QHash into a QMultiHash. So in 5.14
it would overwrite values instead of adding new entries. No idea if it
has caused or will cause any regressions. But it was an accident so
let's fix it.
Amends 972a0402be.
Change-Id: I6623b0b7924024df148d5c83bcbb612f3e595f56
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
The short-cut for semi-transparent backgrounds has to take precedence
over the disabled gamma-correction short-cut. The order got inversed
in one function during 5.14 refactoring.
Change-Id: I0e54428839428068b602a13eddbf69897ed0797d
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Call adjustedFormat() as advised by the docs: "Applications are advised
to set this format on their QWindow in order to avoid potential BAD_MATCH
failures."
Task-number: QTBUG-79659
Change-Id: Ibf415fb0ee64bdd3f01d4ba744244bce811c0d27
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
We now avoid flushing GL if the exposed size does not match the window
size, so we don't need to halt update request delivery during resize.
Change-Id: Iaa89e67d50c987757a586b5958e08edf71a5dd0c
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
examples/corelib/tools/customtypesending/window.cpp: In member function ‘void Window::sendMessage()’:
examples/corelib/tools/customtypesending/window.cpp:79:71: warning: implicitly-declared ‘Message& Message::operator=(const Message&)’ is deprecated [-Wdeprecated-copy]
79 | thisMessage = Message(editor->toPlainText(), thisMessage.headers());
| ^
In file included from examples/corelib/tools/customtypesending/window.h:55,
from examples/corelib/tools/customtypesending/window.cpp:52:
examples/corelib/tools/customtypesending/message.h:62:5: note: because ‘Message’ has user-provided ‘Message::Message(const Message&)’
62 | Message(const Message &other);
| ^~~~~~~
examples/corelib/tools/customtypesending/window.cpp: In member function ‘void Window::setMessage(const Message&)’:
examples/corelib/tools/customtypesending/window.cpp:87:19: warning: implicitly-declared ‘Message& Message::operator=(const Message&)’ is deprecated [-Wdeprecated-copy]
87 | thisMessage = message;
| ^~~~~~~
In file included from examples/corelib/tools/customtypesending/window.h:55,
from examples/corelib/tools/customtypesending/window.cpp:52:
examples/corelib/tools/customtypesending/message.h:62:5: note: because ‘Message’ has user-provided ‘Message::Message(const Message&)’
62 | Message(const Message &other);
| ^~~~~~~
Change-Id: I563d53f7dd1e0e0dc5fd4db06299b2d0a70c62ff
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This amends cc873ec23a which worked around
a problem that was showing up on earlier versions of Windows. This
extends the workaround up to Windows 10 1703 as the problem was still
occurring up to that version.
Fixes: QTBUG-79143
Change-Id: Ib7eace17fb8e3817c556e2bcd462e37834b1cbcf
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: André de la Rocha <andre.rocha@qt.io>
Do this by templating the floating-point tests, which removes some
existing duplication as well as avoiding new duplication. Did some
renaming in the process. Added some tests of fuzzyCompare that come
closer to its boundary. Increased number of tests from 69 to 97. Use
std::numeric_limits to replace assorted hard-coded constants and old
C-library boundary-value macros.
It turns out MSVC's float conflates quiet and signaling NaN (although
MinGW's doesn't); and WebAssembly's old fastcomp compiler conflates
NaNs for both float and double; so XFAIL the test for distinct NaNs in
those cases.
Change-Id: I0a1c0d2f68f75d51b8cda9e3ddfe7fa9c190a3e2
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Erik Verbruggen <erik.verbruggen@me.com>
Img width and height are separate tags. Alternatively, they could
be defined in the style tag.
Change-Id: I0a4a93b63a99a7b644e9096bb9238739f408c0df
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Testes file load and save, computes a sha256 hash
for verifying file content.
Change-Id: Id7f697c4dfd41e051442350f4050f04b493cfc18
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Change-Id: I31b4ed6e6597e22172dcca7180750f1392b9ad68
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>