Add the move ctor and move operator for QSqlField
Task-number: QTBUG-109938
Change-Id: Ib66eff76c3a920de9cfb3288f4219555005e7ae5
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Use QSharedData for the private class instead a home-brew version.
Change-Id: Id3625bb0eb8f81c9caa672e2453dab3d44b15ea9
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
When I broke them out from functions in the QLocalTime namespace I
didn't notice that's where I was putting them; they don't belong
there.
Change-Id: If4c9d996b3e46b3b46a29a97d0bcc2cac72c91ab
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Creating a continuation with QtFuture::Launch::Async policy does not
work well with the example, because it still needs to update the UI
once the async continuation is finished. If the user decides to
close the application while the async continuation is executed,
the next continuation will be accessing data from the destroyed
Images object.
Fix it by using QtConcurrent::run() to do the "heavy" work in a
separate thread, and use a QFutureWatcher to handle the results of
the async execution. Update the example documentation accordingly.
After this patch the example still shows the usage of continuations
and onCanceled()/onFailed() handlers. However, it now does not
illustrate the usage of different launch policies and continuation
contexts. It might not be a big issue, because the QFuture
documentation describes these topics rather extensively.
Fixes: QTBUG-103514
Pick-to: 6.5
Change-Id: I8142535064ff7a4e8007a5c0a8fe7709d6d942ec
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Changes code snippets that are visible in the docs.
Task-number: QTBUG-113116
Pick-to: 6.5
Change-Id: If743234bfe6947acf02307bf1144daad4fba5d73
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Use SPDX-License-Identifier also for shell scripts. Also change
license to LicenseRef-Qt-Commercial OR GPL-3.0-only, which makes
arguably more sense than LGPL.
Pick-to: 6.5
Change-Id: I3a46468f264747916aacbf206f5ccba28b6c6593
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
SPDX/reuse does not feature any generic 'public domain' license
identifier. So far we claimed CC0, which is however not entirely correct.
Now that we have LICENSES directory, let's correctly claim this as
a specific license.
Also, remove the LGPL in-code claim. The adaptations for Qt code is
minor so it doesn't make much sense to claim a different license.
Pick-to: 6.5
Change-Id: I4e943a45baae192b54c38184e8eb85fc6d4035e5
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
QTabBar lays out the tabs when the bar's size or content changes,
often lazily. This should not change the scroll offset of the tabbar,
which is controlled by the user, or at most when a tab needs to be made
visible (e.g. when it becomes the current tab).
Move the logic of updating the scoll offset into the makeVisible
function, so that the scroll is only adjusted to either leave no gap
between the last tab and the right edge of the widget of there is still
a scroll; or to reset it to 0 if there is enough space for the entire
tab bar. Since layoutTabs does show and hide the scroll buttons, we
cannot skip this when the buttons are invisible. However, the
normalizedScrollRect helper now needs to return the entire widget rect
if there are no visible scroll buttons.
Add a test case that simulates the previously broken behavior where
the scroll got unnecessarily reset to 0 when resizing.
Fixes: QTBUG-113140
Pick-to: 6.5
Change-Id: Ic19fbb82821ea09cc5e7646dcbce3aa7607909c2
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
This commit introduces fine-grained Bluetooth permissions control to
the QBluetoothPermission class.
For now the fine-tuning of the permissions is only supported on
Android. On Apple enabling any of the permissions is equivalent to
requesting full Bluetooth control.
Task-number: QTBUG-109964
Change-Id: Ie7ac6577cf6a21419b73b33f8cf7e87bc3f8cf43
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The crash is caused by the cleanup sending trace messages when the
plugin has already been destroyed. Add shutdown callback to the plugin
to indicate this has happened. We can't use signals since that also
generetes trace event.
Pick-to: 6.5
Change-Id: I2e490fc51c2aaa97c240c1496a528a6ff6077bd0
Reviewed-by: Hatem ElKharashy <hatem.elkharashy@qt.io>
Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io>
Add common prologue and add error message when tracing is used in a
module that doesn't have Q_TRACEPOINT enabled, but tracing is enabled.
Pick-to: 6.5
Change-Id: I64ca074942f6e89b4f5b5e3b6048b2b713c06df8
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io>
This patch implements a public getter for the hasStandalone attribute.
It returns true, if standalone has been explicitly declared in an XML
header and false otherwise.
As this is no longer necessary it removes accessing QXmlStreamPrivate
from QDomParser.
[ChangeLog][QtCore][QXmlStreamReader] added hasStandaloneDeclaration()
Change-Id: Iaaa0a728a6f7186e40637186077f7b49c112f7a9
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Yuhang Zhao <yuhangzhao@deepin.org>
These classes depend only on Core, not Gui.
This allows dropping the dependency of tst_qxmlstream and tst_qzip on
QtGui, and prevents a tst_qxmlstream FTBFS when building with
QT_NO_TEXTODFWRITER.
Symbols move from QtGui to QtCore, but the classes are private API, so
not under BC constraints.
The classes are not used outside qtbase, so no other in-tree users
need porting.
Task-number: QTBUG-3897
Change-Id: Ifa148f43ec139d7f9ac1f3893e2fcf4640e3c60c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Just call itself after copying the buffer, thus avoiding instantiating
insert_helper() for QVarLengthArray.
The other two cases of QtPrivate::q_points_into_range + QVLA in
qstring.cpp are not worth changing.
Change-Id: I9671dee8ceb64aa9b9cafffd1742fa7bb4cbebd8
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
MSVC binaries can also be stripped and according to my
experiments they still work normally. So we should not
limit this check to MinGW only.
Change-Id: I026d75a38b94f309ad695cf8f700ed3ac160dd87
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Timothée Keller <timothee.keller@qt.io>
For our purposes, the sem_t code is better, so we've preferred it since
commit c7ab816af1 (5.7). Olivier wrote in
that commit's message, "It makes tst_QMutex::contendedQMutex with no
msleep 8 times faster".
That's true because QMutex didn't lock the underlying pthread_mutex_t in
QMutex::lock(), as we used the inlined atomic code for the uncontended
case.
It is probably possible to merge the qmutex_mac.cpp and qmutex_unix.cpp
code now (both are based on semaphores), but I won't do that for two
reasons:
1) At best, the PThread functions are going to be thin-wrappers around
the code we already have, like FreeBSD's are around usem (see [1])
2) Darwin has a private API that resembles futexes so we may want to
go that way eventually (see [2])
[1] https://github.com/freebsd/freebsd-src/blob/main/lib/libc/gen/sem_new.c
[2] https://codereview.qt-project.org/335849
Change-Id: Idd5e1bb52be047d7b4fffffd175369b13ba47bed
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Populate a subset of the font families at startup if the local fonts
access API is supported, and the access permission has been given.
Since this code runs at app startup there is no opportunity to request
font access. That should be done in response to user action, for
example by having a "load local fonts" button in the application.
Pick-to: 6.5
Change-Id: Ib6826deeec06ee3def0e793dd1462977710462be
Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
Reviewed-by: Aleksandr Reviakin <aleksandr.reviakin@qt.io>
lttng ctf_array does not support float types which
causes compilation error when a float type is passed
to the function. A solution is to pass the array
elements one by one to TP_FIELDS.
Fixes: QTBUG-112761
Pick-to: 6.5
Change-Id: I30e7049d9eda1141298145897df372213145c1b4
Reviewed-by: Antti Määttä <antti.maatta@qt.io>
Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io>
Start tracking the window geometry before a mouse drag, so that we can
revert back to that geometry when we restore from maximised. Previously,
when dragging from maximised to maximised, the restore geometry would
end up being the final drag place before snapping to maximised, instead
of where the window was before the first maximised.
Fixes: QTBUG-112814
Pick-to: 6.5 6.2
Change-Id: Ic2ddf29d6c4abdc9e8b0c5161b17aa6ee9474ea3
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
We should be able to just pass `0L` and avoid defining a None macro.
Pick-to: 6.5
Change-Id: I513d726120454523627a1e66515a5a533c0238b1
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This fixes the assert raised on overwriting event handlers
Fixes: QTBUG-113041
Change-Id: Ie2afe09f4111ea542297b82a51382f1eb04ec960
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Aleksandr Reviakin <aleksandr.reviakin@qt.io>
This reverts commit e0cec08480.
Reason for revert: this can't possibly be the correct solution. It
set properties in headers (not .cpp sources) and headers can't cause
a build issue because they aren't built. Moreover, the problems
were seen in another module, so the properties set in those files
shouldn't even be visible to CMake.
Change-Id: I8473bb819e768bd203f89034d18132186da0371c
Pick-to: 6.5
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
wasm heap uses a shared array buffer, which cannot be fed to
FileSystemWritableFileStream.write due to security limitations.
Heap memory has to be copied to a temporary buffer for the operation to
succeed.
This is only done if __EMSCRIPTEN_SHARED_MEMORY__ is on to optimize the
non-threading path.
Fixes: QTBUG-112881
Pick-to: 6.5
Change-Id: I0d117a8703caf4c17abc67b30df5248a53406d5f
Reviewed-by: Aleksandr Reviakin <aleksandr.reviakin@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Old examples inherited from Qt 4 tend to set some state, such as
enabling the depth test or culling, in initializeGL(). Newer examples
tend not to do this; they rather set the necessary state in paintGL().
This mattered little (or not at all) in the past, but with WebAssembly
and WebGL there are limitations in the GL context management in the
wasm platform plugin. Under certain conditions, esp. when
QOffscreenSurface is involved, it looks like the same native context
gets reused, which means there is a chance of unexpected changes to
the current state between calls to initializeGL() and paintGL(). (and
also between paintGL() calls) See QWasmOpenGLContext for details.
Update the textures example the same way we did for the cube one.
Add a note to the QOpenGLWidget docs about this problem.
Task-number: QTBUG-111304
Pick-to: 6.5 6.4
Change-Id: I29d2b2cdeb07bcecc5dc915d79c12b4323ca9ab3
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Inho Lee <inho.lee@qt.io>
- qt_finalize_target missed a reference to qt_add_plugin()
- qt_generate_deploy_app_script is also supported on Linux
- Use simplers examples for QT_DEPLOY_SUPPORT and
qt_standard_project_setup()
Task-number: QTBUG-113116
Pick-to: 6.5
Change-Id: If6bfd01b9615a73ab1bafddee350e49f6902a6c0
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Make a manual call to the geometry change handling function after a
WM_DPICHANGED event if the window is frameless, since WM_SIZE and
WM_MOVE will not be called.
Fixes: QTBUG-109429
Pick-to: 6.5
Change-Id: I79b9f386fe120ee3d06d6490d3f31a7a5d7121b0
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
The \include command includes the source in its entirety when the
second parameter is omitted. This pulled in also the license header
which was visible in the generated documentation.
Add snippet tags and use them to extract only the content we need.
Pick-to: 6.5
Fixes: QTBUG-113138
Change-Id: Ie3fe2fede1e81d08201ec4353352ef069aebc388
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Rounding distances up can result in coordinates outside of
the clip rect. So stick to always round distances down when we multiply
a scaling.
Fixes: QTBUG-109640
Pick-to: 6.5
Change-Id: I784b7c90da9b6e7f5a925d4275eb67497616001d
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
By using an iterator-based for loop.
Change-Id: I9ae12f16bc2a5c2d74c8557a0324438102fec5b1
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Drive-by change: use QByteArrayView instead of allocating a QByteArray.
Change-Id: Iaf7acbbdb4efbb101b73b30061ce38dd1fa99ca3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
"notifier->socket()" returns qint64, but sockfd should be int, because
pollfd.fd is a gint (aka int).
Change-Id: If6618aa5e652d4284b989352d61a28b605106d09
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
b1802a164b added handling for a parent to
become focus proxy of a child. The respective 'else if' branch didn't
check whether setFocusProxy() was called with a nullptr argument.
This patch adds the missing nullptr check.
It also adds functionality to tst_QWidget::tabOrderComboBox() to test
the removal of a focus proxy, as well as the complete removal of an
element from the focus chain.
Change-Id: I4cb865b9ac4497fc5e2595910738fb77694f5837
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
In some rare situations the display link may fail to create, or will
be created in an uninitialized state:
https://bugzilla.mozilla.org/show_bug.cgi?id=1201401#c123
When the latter happens the display link thread will crash in
CVCGDisplayLink::getDisplayTimes(). Based on the Mozilla bug
report, and subsequent patch, we can detect this situation via
CVDisplayLinkGetCurrentCGDisplay(), so we follow the same
approach, and then bail out:
https://bugzilla.mozilla.org/show_bug.cgi?id=1201401#c158
Once we bail out we fall back to the timer based approach
to delivering the update request. The next requestUpdate()
will try to use the display link again, which will likely
work this time around, as the display has had time to fully
initialize.
Pick-to: 6.5
Change-Id: Ib80fd792516d1e4e7f863a82755cbf00d1eb6c34
Reviewed-by: Robert Griebl <robert.griebl@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
- Definition of 'standalone' attribute:
An XML declaration containing the attribute 'standalone' with its
value set to 'yes', tells the parser to ignore markup declarations
in the DTD and to use them only for validation.
The declaration attribute is optional and defaults to 'no'.
- Behavior Qt5
In qt5, DOM documents contained the standalone attribute,
regardless of whether or not it was explicitly specified.
- Behavior Qt6
In Qt6, the standalone attribute was only contained in a DOM document,
if its value was 'yes'. If it was explicitly declared with the value
being 'no', it was dropped in the DOM document.
- Expected behavior
If the source specified it overtly, then the generated XML should
contain the attribute, even when it takes its default value.
- Code base
QXmlStreamReader provides a public bool getter isStandaloneDocument().
This says whether the document is standalone or not.
The information whether the attribute was actually specified gets lost.
In consequence, the attribute was always dropped on non-standalone
documents.
- Fix
This patch makes hasStandalone a member of QXmlStreamReaderPrivate, to
record whether the attribute has been explicitly specified.
QDomParser is modified to retain the standalone attribute, if
QXmlStreamReaderPrivate::hasStandalone is true.
- Test
The patch adds a test function in tst_QDom.
Fixes: QTBUG-111200
Pick-to: 6.5 6.2
Change-Id: I06a0f230a2d69597dd6453f8fd3b036943d08735
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
MSVC complains because we call Data::allocate(args.size()) and, of
course, initializer_list::size() returns unsigned std::size_type,
while the relevant Data::allocate() overload takes a signed qsizetype.
The constructor from iterators potentially has the same problem, if
the iterator type's difference_type is unsigned, so make the
type-conversion overt there, too.
Pick-to: 6.2 6.5
Change-Id: I521eca26a48aed570855b13242bf2df8bfa38f96
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
If not excluded, some of the macros in X11.h and Xlib.h conflicts with
symbols defined in `UrlFormattingOption` and `Type` in `qurl.h` and
`qjsonvalue.h`.
Pick-to: 6.5
Task-number: QTBUG-109394
Change-Id: Ic1b056f0bcd6643394401bca464f751b3489202d
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
In 939b7bfe66 we synced up the NSMenuItem's
title to that of the corresponding NSMenu, as AppKit was observed to use
the NSMenuItem title for its heuristics of when to add dictation and
emoji entries to the menu.
But AppKit's heuristics are based on the localized name of the edit menu,
so we need to follow suit and look up AppKit's own localizations. This
is of course fragile, as we're relying on this localization continuing
to live in the InputManager table, but if that changes we'll just fall
back to using the title from the NSMenu, as we did before.
In addition, AppKit's heuristics also look for menu items in the menu
that match selectors such as copy:, paste:, etc, so even if our lookup
of the localized title fails, the additional heuristics would in most
cases still succeed in detecting the edit menu.
Task-number: QTBUG-53085
Task-number: QTBUG-79565
Pick-to: 6.5
Change-Id: I5e12973b86ab35f10a8f7434bcae8a4cf134ecfd
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
There seems to be a Value already defined in Integrity, and we `#undef`
it here: `text/qcssparser_p.h:39` to avoid symbol confusion. However,
this is not robust during the unity build where we might not necessary
end up with the preferred ordered of things.
Pick-to: 6.5
Task-number: QTBUG-109394
Change-Id: Ide37ab2035f0aa482a1d53d8e1511e0ab0109b3a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Not using structured bindings because those functions will be changed to
return QSimpleParsedNumber directly.
Change-Id: Ic52b6754da14b86d8ddc5f399262f227e05527ce
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
In commit 482a75fef9 the code was changed to return early, but that
missed appending the organization and app names while test mode is
enabled.
Issue spotted by Edward.
Pick-to: 6.5
Change-Id: Ifd220f8990874a173413dcf71d105c04b605c800
Reviewed-by: David Faure <david.faure@kdab.com>
ISODate only supports years in the range 0-9999; instead of printing an
empty string, use date.toString(Qt::TextDate) instead.
This is mostly useful for debugging DateTime unittests.
Change-Id: Id09951ce0a15452e28cb41a3b918c5ef05caab09
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Icon library for file and text operations.
This is private library to be used with Qt examples.
Instructions on usage found in README file.
Task-number: QTBUG-110428
Pick-to: 6.5
Change-Id: I762503c74aecc3a8efbf25877628cb8e85efe414
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
When a parent became a new child's focus proxy in an existing focus
chain, the child was appended at the end of the chain.
That leads to broken tab order, e.g. with a QComboBox which became
editable after a focus chain has been set.
This patch captures the case and insertes the new child after its
parent in the focus chain.
A corresponding test function is added in tst_QWidget.
Fixes: QTBUG-111978
Pick-to: 6.5
Change-Id: I3a426c0560fa830b7b7ffead54f26dd0adef499f
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
In QEglFSCursor::draw, There are two missing pipeline states
SCISSOR and STENCIL.
Fixes: QTBUG-110080
Pick-to: 6.5 6.2
Change-Id: Ifb2495de2685b7a2f80f8d39ab57d5985fe0eec1
Reviewed-by: Lisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Blobs can be any mime type, add function that sets up mime type
This allows Safari to play videos that are Blobs
Pick-to: 6.5
Change-Id: Ide63851934058935d94f42721b246d832e3bcb85
Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
Amend 4d90c4e74a by clarifying why
moving the QSingleShotObject to the receiver's thread is a good
idea. Move that logic into a separate function and use that also
for the string-based connection.
Optimize the implementation by delaying the timer creation until
after we have moved the QSingleShotTimer object to the target
thread, using a queued metacall if needed to create the timer.
This avoids the creation of the timer in the wrong thread and
then the recreation of the timer in the new thread when QObject
handles QEvent::ThreadChange.
To avoid that the timer is created when it has already expired in
real time, use a deadline timer and fire timeout immediately when
it has expired by the time we get the metacall.
Since the timerId might now not be initialized in the constructor,
initialize it to -1.
Augment the crossThreadSingleShotToFunctor test function by
deliberately not starting the thread until the deadline expired.
[ChangeLog][Core][QTimer] Single-shot timers with a string-based
connection are now started in the receiver's thread, not in the
thread that creates the timer.
Task-number: QTBUG-112162
Change-Id: I3fc94c34c21d9f644da41a2e4c2da479980b8580
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
When a tab was moved by dragging, the tab's rectangle was drawn empty,
without the tab text. When a tab was moved by animated snap back to
its original position, the tab text was already drawn on the original
position, while the rectangle was still moving due to animation.
Adds the enum value QStyleOptionTab::TabPosition::Moving
When this option is set, QCommonStyle draws the tab text at the
current position instead of the original home position of the tab.
The QMacStyle switches over the TabPosition enum. As a moving tab
is laid out like the last tab in the given orientation, the enum value
Moving is treated like End.
Fixes: QTBUG-112277
Change-Id: I42a2d9c269dadfe9819c12dbc69e3ae995a45b09
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
The compilerRuntimeLibs now pays attention to if the user is running
MinGW, or LLVM-MinGW, before deploying the corresponding runtimes from
the Qt binary folder, or from the path if it cannot find any in the Qt
binaries.
[ChangeLog][QtTools][Windeployqt] Windeployqt now supports LLVM-MingGW
runtimes.
Pick-to: 6.5
Change-Id: I9c464cdb933795e491992f5d1adb18bcc7d69f02
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Yuhang Zhao <yuhangzhao@deepin.org>
This modifies 9e453dacc3 to make sure
that QPainter uses the adjusted DPR when doing the tile copying.
Fixes: QTBUG-99990
Pick-to: 6.5 6.2
Change-Id: Id9c7b5576d5036e20bb399f3c8b82d4a467dc70f
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
It turns out that Alaska and The Philippines had historical offsets
exceeding 15 hours, prior to day-transitions to bring their dates in
sync with their respective sides of the international date line.
Change-Id: I48fdf3aa6d8c0bacb368d08316733a10ee11a281
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Clarify that a zone whose territory() is AnyTerritory may simply not
have a known association, or cover several territories.
Added more \sa links to territory(), where relevant.
Fix some surviving uses of country for territory.
Split some long lines.
Pick-to: 6.5 6.2
Change-Id: I9196f785afed9bc185a459608c5d9361127401cb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This is now the official format for Files, when there's more than one,
rather than using space-joined lists.
Pick-to: 6.5
Change-Id: I4a6247fff0ece8ece2944178af38894fd5a2e1e2
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
Replace the old abuse of other fields as comments, to be overwritten
by a later setting to a proper value, with actual Comment fields, now
that we have them.
Added a new comment to the valgrind files to say where they come from
in the upstream.
Pick-to: 6.5
Change-Id: I2edcfa2949fa9e59f3f67d3e578d8e5009854cf6
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
The corelib/text/qt_attribution.json didn't mention the
time/q*calendar_data_p.h files which are also generated from CLDR.
Pick-to: 6.5 6.4 6.2 5.15
Change-Id: I768555d4623204245006897c45af58635761bfa1
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
We rely on this function discovering extra fonts if we cannot find any
or only find poor matches for our font request. Whether that be because
we had only partially populated the fonts of a given family or because
the user specified a font using a localized name.
It's a copy-paste of the implementation in qwindowsfontdatabase
Fixes: QTBUG-111854
Pick-to: 6.5
Change-Id: I0dd97b68d84417a26ce82a46f39804b36602ed67
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
The gtk_fixed widget was used as a reference to obtain a fixed font
and HeaderViewFont.
This is a mistake, because the gtk_fixed widget is a container for
other widgets with fixed geometries and no layouting.
This patch makes the default style being used for a fixed font and, as
a drive-by, the combo box as a reference for a header view font.
A monospace based css provider as explicitly added to the style
context, in case a fixed font is requested. The provider is removed
afterwards.
Task-number: QTBUG-112896
Pick-to: 6.5
Change-Id: I6bfb2ee9e7befdd2102bdcc6e53ced954a024034
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
If not excluded, `VK_USE_PLATFORM_ANDROID_KHR` might end up being
undefined due to the order of includes.
Pick-to: 6.5
Task-number: QTBUG-109394
Change-Id: Ib7bbf42af319568bc39db0b9e5c796d25db3c364
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This should make it clear enough that the issue here is a quirk of
Qt::Key and not something otherwise special about case-change affecting
whether a character is in Latin-1 (for all that this is the root cause
of the quirk in Qt::Key).
Pick-to: 6.5
Change-Id: I80fa6b78a0d0c431401a3fea18edf6149de08b92
Reviewed-by: Andrey Butirsky <butirsky@gmail.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
qtbase/c27d2a57a441f9a1ce760e71635bd4c96882249d caused the code
to go through QStandardItemPrivate::setItemData() which does
not handle the special treatment of Qt::EditRole completely.
In the constructor of QStandardItemData; map Qt::EditRole to
Qt::DisplayRole to fix this as is done in setData().
Adapt the existing tst_QStandardItemModel::getSetItemData() to check
whether both roles are received in the dataChanged() signal.
Pick-to: 6.5
Fixes: QTBUG-112326
Change-Id: I133d058bacc3388c612c5b4fb18b54f5ef5cb56f
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Reviewed-by: David Faure <david.faure@kdab.com>
Turn some of the static variables into private static data members to
avoid symbol duplication during the unity build.
Pick-to: 6.5
Task-number: QTBUG-109394
Change-Id: I9e3ee18f6e85a0f806de77f753d89a45ceaff7ac
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
There are several duplicate symbols defined across android source files.
For now, excluding the conflicting files allows us to continue working
on bringing unity build to CI. I added some explanation and TODO's on
what I think can be done for resolving the conflict.
Pick-to: 6.5
Task-number: QTBUG-109394
Change-Id: Ic0b31c4ae845c69570ea5dd86316e5a795c166c4
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
A little reading leads me to learn that there are several variants, so
document which this one is; also note the accurate form of the
yearLength constant, and fix a mis-indented comment-end.
Change-Id: Ia1987dda9f4caee4e52c0cfd894976908c8f4b1a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This is invalid and might assert in the model (e.g. in
QConcatenateTablesProxyModel)
Pick-to: 6.5 6.2
Change-Id: I6602d8b9eca83ef6cae760944a999d55244bb181
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
In Qt 5, the system font would resolve to MS Shell Dlg 2, which
was always an alias for Tahoma. Since it was not a real font,
but a so-called "logical font", it was manually added to the font
database whenever we detected that the system font was not
automatically enumerated.
In Qt 6 we modernized the selection of system font. This causes
real fonts, such as Segoe UI, to be selected as the default and
the manual adding of "MS Shell Dlg 2" to the font database never
happens.
However, "MS Shell Dlg 2" was still preferred as the primary
fallback font, but we now always failed to resolve it because
it wasn't in the font database. For many writing systems not
supported by the main system font, such as e.g. Thai, people
still expect to get Tahoma as the default, but we now return
an arbitrary font from the alphabetically ordered list instead.
To work around this, we avoid returning the non-existing logical
font, since this is no longer useful, and just return Tahoma
directly.
[ChangeLog][QtGui][Text] Fixed an issue querying a default font
for certain languages not supported by the primary system font.
Pick-to: 6.2 6.5
Change-Id: Iacc7a7e7742114efcd82620d0ed099dc4e897fc6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This is handy if you want to reserve if possible or just fill the
container right away if not.
Task-number: QTBUG-112227
Change-Id: I3d085c1ce2448150bc044c3513572e02161244f4
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
This reverts commit be09628e15.
because db346e711c avoids the issue
entirely by calling this code after connecting the event.
Task-number: QTBUG-43674
Pick-to: 6.5
Change-Id: I72f5b161208aa3691e194f4ba7782d288602bbf3
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This reverts commit 2991c66b75.
Reason for revert: it caused a regression with translucent Qt Quick windows. We need to find alternative way how to fix QTBUG-106583
taking into account QQuickWindow's own color property.
Fixes: QTBUG-112473
Fixes: QTBUG-112537
Fixes: QTBUG-111969
Fixes: QTBUG-112524
Pick-to: 6.5
Change-Id: I34258f4c8b045b63c8462e325b09fff927684223
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Old Android Extras related classes were missing. Now added.
Fixes: QTBUG-111823
Pick-to: 6.5 6.2
Change-Id: Ib45daf687fc24a1c528f62da8ffe52422bea0b6b
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
QComboBoxPrivate::itemIcon() wasn't checking for an invalid index,
unlike QComboBoxPrivate::itemText().
QComboBoxPrivate::setCurrentIndex calls updateLineEditGeometry,
which calls QComboBox::itemIcon, even for an invalid combobox.
Pick-to: 6.5 6.2
Change-Id: I5e6105ae56836cd237a91a405d331f1424f49b37
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
We only use monotonic clocks now (std::chrono::steady_clock). This
probably didn't work very well anyway.
Change-Id: Ieec322d73c1e40ad95c8fffd17465f06b5b2816f
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
This removes all uses of QDeadlineTimer::t2 member in the .cpp (so it
gets marked [[maybe_unused]]) and greatly simplifies the code.
Change-Id: Ieec322d73c1e40ad95c8fffd17465bd50c1113ea
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
You can't partially specialize a template function, so these
specializations for steady_clock only worked if the Duration parameter
was nanoseconds. This could have been solved with function overloads
instead, but I find the if constexpr code simpler to read.
Pick-to: 6.5
Change-Id: Ieec322d73c1e40ad95c8fffd17468bd73fc2fe24
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
This matches the work that was done for QElapsedTimer. The
QDeadlineTimer::t2 member is now always 0.
This also removes the last distinction of timer types. Originally I had
intended to use CLOCK_MONOTONIC_COARSE on Linux[1], but that created
more problems than was worth, so I abandoned the idea in 2016.
[1] https://codereview.qt-project.org/c/qt/qtbase/+/159933
Change-Id: Ieec322d73c1e40ad95c8fffd17468b313798ef79
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
This commit deletes the direct, low-level functionality that
QElapsedTimer has carried since it was introduced. Everything now uses
only std::chrono::steady_clock and std::chrono::nanoseconds.
QDeadlineTimer temporarily still uses qt_gettime(), which is moved to
qcore_unix.cpp.
Task-number: QTBUG-110059
Change-Id: Ieec322d73c1e40ad95c8fffd174641a469b1eee5
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
We don't need to hand-roll our own conversions when QDeadlineTimer can
convert to the time points of any std::chrono clock. In particular, if
the clock we ask for is the clock its internal representation is already
storing, then it's more efficient too.
Change-Id: Ieec322d73c1e40ad95c8fffd174689a171cb6f18
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This actually saves two clock_gettime(CLOCK_MONOTONIC) system calls
(albeit to the vDSO): one inside QDeadlineTimer::remainingTimeNSecs() to
calculate the remaining time from the deadline, then one other inside
pthread_cond_timedwait_relative_np() to calculate the deadline from the
timeout, so it can place the FUTEX_WAIT_BITSET system call.
In fact, I can't find __pthread_cond_timedwait_relative() in the Bionic
source any more. The last reference was removed in 2015, when Bionic
started using FUTEX_WAIT_BITSET. So this commit is just removing dead
code in current Android.
Pick-to: 6.5
Change-Id: Ieec322d73c1e40ad95c8fffd174689c4fcff40ae
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
This avoids creating and destroying the pthread_condattr_t on systems
without a monotonic clock (INTEGRITY) or for which we can't ask that
pthread_cond_t use it (Darwin).
Change-Id: Ieec322d73c1e40ad95c8fffd1746878316ab8708
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Old versions of the Apple operating systems did not implement the POSIX
realtime monotonic clock, so we used the Mach absolute timer. The LLVM
libc++ implementation[1] unconditionally uses CLOCK_MONOTONIC_RAW on
these OSes:
* macOS >= 10.12
* iPhoneOS >= 10.0
* tvOS >= 10.0
* watchOS >= 3.0
Qt 6 doesn't support the latter two and the former two are much older
than what we require, so we can use this functionality too.
[1] https://github.com/llvm/llvm-project/blob/main/libcxx/src/chrono.cpp
Change-Id: Ieec322d73c1e40ad95c8fffd174641c723b81be2
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Modeled after Metal's cb.GPUStart/EndTime. Implemented with timestamp
queries for other APIs.
Implemented for Metal, D3D11, Vulkan for now. No more callback, just
a getter on the command buffer which returns the latest known value,
referring to some previous frame. This makes it a lot more usable
than the original solution that is not really used anywhere at
the moment.
Now works for offscreen "frames" as well, this was not implemented
before.
Opt in with a new QRhi::create() flag because we cannot tell in
advance if the getter will be called or not, and this way we can
skip recording the timestamps by default. The cost is probably
minimal, though. Qt Quick will set this automatically when running
with QSG_RHI_PROFILE=1.
Change-Id: I903779984a4e0bbf1d03806d04bf61571ce23d72
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
...even when the QRhi is already gone. This should not happen in
well-written applications and libraries, but we handle this
gracefully in the regular dtor and destroy() for resources that
register themselves to their creator QRhi, so by registering
everything we can offer this to all QRhiResource subclasses.
We still want to differentiate between native resource owning
QRhiResources and others (that do not create native graphics
objects), so do this via a flag passed to registerResource().
This way the behavior with QT_RHI_LEAK_CHECK=1 does not change.
Pick-to: 6.5
Fixes: QTBUG-112914
Change-Id: I9bafc81ef7a4ae76f356fc5f6248628d1f8791e0
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
The makes sure that the scale factor used by the style
is identical to the scale factor used by Qt Gui, by for
instance taking scale factor rounding into account.
Task-id: QTBUG-109715
Change-Id: Ia0354a7ce0f51eb9fd5f2591ee6c4057291943f3
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The custom dialog-deleting lambda in QFileDialog::saveFileContent
is redundant
Change-Id: I03c2fa29ab0502b981460e34674a40a704a22e2d
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
- handle only winrt::hresult_error exceptions, as this is the only
reported cases, so we don't need ellipsis there
- print relevant warnings
Pick-to: 6.5
Change-Id: Ibf18a7eab7862e2c20f5729545387ddc7ca42952
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Depending on the corner that the size grip lives in, the style sheet
style rotates the painter before rendering the drawable. However, that
needs to be done around the center of the size grip, not around the
origin, as otherwise the image rotates out of the rect.
Use a static array to map the corner to the rotation value, and
translate/rotate/translate back only if there is a rotation.
Pick-to: 6.5
Fixes: QTBUG-112252
Change-Id: I59f69385bd6699ecc8db46390c5f7cc933574ce8
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Avoid capturing the same property multiple times in a binding by
storing them in the BindingEvaluationState. We store them in a
QVarLengthArray array, as the number of properties involved in a binding
is expected to be rather low, so a linear scan is fine.
Avoiding double capture is a good idea in general, as we would otherwise
needlessly reevaluate bindings multiple times, and also needlessly
allocate memory for further observers, instead of using a binding's
inline observer array.
Even more importantantly, our notification code makes assumptions that
notify will visit bindings only exactly once. Not upholding that
invariant leads to memory corruption and subsequent crashes, as
observers allocated by the binding would get freed, even though we would
still access them later.
Fixes: QTBUG-112822
Pick-to: 6.5 6.2
Change-Id: Icdc1f43fe554df6fa69e881872b2c429d5fa0bbc
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
If the QOpenGLFramebufferObject (which owns the OpenGL texture object)
is destroyed, the wrapper QRhiTexture must be destroyed too.
This surfaced with WebAssembly for some reason, likely due to an event
(most likely resize) sending pattern that is different from other
platforms. Sending more resizes likely triggers another recreateFbos()
call which, until now, did not correctly dropped the wrapper
QRhiTextures so those continued to refer to the now-destroyed texture
IDs.
Pick-to: 6.5 6.4
Task-number: QTBUG-111304
Change-Id: Ieed9a11c5c28da0fee497107ebe88da9eb5f45a8
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
QIOSTracker registers itself as handlers for system notifications about
changes of the screen environment. If no QIOSIntegration instance
exists, newly detected screens are not added to the list of known
screens (see screenConnected()). This, in turn, will result in a crash
if a screen is disconnected and removed in screenDisconnected() as it
is not known to qtPlatformScreenFor() and the function returns a
nullptr.
Consider the QIOSIntegration also whenever a screen is "changed". This
is more of a safety measure do avoid crashes for unknown screens.
This situation occurs if an iOS device is used to mirror the display
via AirPlay and no actual QGuiApplication exists, e.g. Qt is only
embedded in a Framework.
Pick-to: 6.5 6.2
Fixes: QTBUG-106701
Change-Id: Id778fc5afa7c284b0536ee02b1ba2c10321cc5b1
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Lars Schmertmann <lars.schmertmann@governikus.de>
Setting up the args and types arrays is cumbersome and error prone, and
we do it at least twice in qtbase. Provide a central implementation as a
variadic template function, and make it exception-safe with a unique_ptr
(the destructor of QMetaCallEvent will destroy the cloned arguments).
Change-Id: I5ff400467928446264eaedddb394691e9e23d22e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The MinGW runtimes were imported through the PATH, which creates
mismatches with the expected libraries that are installed directly
through Qt. Check if those can be used instead, and issue a warning
(and default to PATH) if not.
Fixes: QTBUG-112448
Pick-to: 6.5
Change-Id: I061baabb6d6188bd0817b68c39a5d9f04ff391b5
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
There's no 2nd translate() method. Instead, link to the section about
I18N in the summary.
Pick-to: 6.5
Change-Id: I7c3177cee91eeb550eb24b6f272a175b5c0e5487
Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io>
As usual this is only doing anything when launched with
QSG_RHI_PROFILE=1. Otherwise the debugMark* functions are
no-ops.
Uses the old PIX API (pix.h) since that is what is available in the
Windows SDK. This works well with RenderDoc. The strings show up
in PIX captures as well although that will warn that the pix.h stuff
is deprecated. Unfortunately using the PIX3 API involves headers and
libraries not part of the Windows SDK so we do not want to open that
can of worms now.
Problem is, pix.h may not be present in some SDKs as shown in the CI.
So use __has_include and lose the whole feature if the header is not
present at build time.
Change-Id: I8606d151f75a492071bf0c8d98b16026ff94d45c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
qtconfigmacros:
Otherwise we'd need to include <QtCore/qassert.h> before using
QT_REQUIRE_CONFIG. It cannot be added here as qassert.h itself uses
QT_CONFIG, i.e. qassert.h needs to include this header. And
Q_STATIC_ASSERT_X is only kept around to keep old code working.
_Static_assert is deprecated in C23:
https://en.cppreference.com/w/c/language/_Static_assert
Change-Id: Ie60a02274cc5be8bd1c6dc3819ccfbc2e7864a21
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Although undocumented (which is weird, as other docs refer to it),
fix the spelling and the formatting.
Change-Id: Ief8b04e3b9272386c663c463c3659e8b837260f5
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io>
Fixes compiler warnings about narrowing conversions.
Found by compiling with clang and -Wshorten-64-to-32.
Drive-by changes:
- use range-for instead of an iterator based loop
- use strlen("*.") instead of magic number 2
Pick-to: 6.5
Task-number: QTBUG-102461
Change-Id: I0bf2299049c0411ed496468238ca30b69946ffc2
Reviewed-by: David Faure <david.faure@kdab.com>
The previous patch for QTBUG-112019 could lead to an uneven length which
in results in an incorrect center. Fix it by making sure that the length
(and width) of the two rectangles are even so we always get a proper
center without fiddling around with float values. Also honor
PM_ButtonShiftHorizontal/Vertical now (was forgotten in the last patch).
Pick-to: 6.5
Fixes: QTBUG-112019
Fixes: QTBUG-112861
Change-Id: Ifc19b863c761ae545208b996ba60d1f33bceb2b3
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Accessibility actually works when running applications as root, but we
would never properly connect, since the enabledChanged signal would be
emitted from the constructor in this case. So after connecting the
signal, check the value by hand to make sure not to miss the
notification.
Only applications running as root would be affected, because all other
applications would go through the asynchronous pattern of getting the
bus address from dbus instead.
[ChangeLog][QtGui][Accessibility] On XCB applications running as root are
now accessible.
Pick-to: 6.5
Fixes: QTBUG-43674
Change-Id: I82cdc35f00693a8366dfcdab2f2c3c6dc5f5b783
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Some Windows SDKs seem to throw an exception from winrt::check_hresult()
We need to handle this accordingly. Catch the exception and print relevant warning.
Fixes: QTBUG-110408
Pick-to: 6.5
Change-Id: I1434ec425f0d0e597308b53f25f4f15049640060
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Avoid some code duplication and enhance the documentation about
thread-safeness of QSQLDatabase::cloneDatabase()
Fixes: QTBUG-60505
Change-Id: I6ca6b9f47d818d49ca51395da14051e40317cef6
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Temporary exclude `qwaitcondition_unix.cpp` from the unity build, until
either of the mentioned change sets get merged.
Pick-to: 6.5
Task-number: QTBUG-109394
Change-Id: Iaacd090647ba007e0ab714dc674e67552f85c350
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Otherwise, it could break the unity build.
Pick-to: 6.5
Task-number: QTBUG-109394
Change-Id: Ic1b3ac51b8a9e8bb93a3b1a4d6717fa45099e91b
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Previously it only got the answer correct to the minute. That's good
enough for most transitions, but those involving local solar mean time
(LMT) may have second deviations. So check the second before or after,
that'll usually be the other side of the transition; if it isn't, do a
further binary chop on seconds to hit the correct value.
Most zones' canonical locations are only specified to the size of a
city, so second precision is all anyone cares about; a few hundred
metres difference in location would change that. The one exception is
Europe/Amsterdam, which had its own Royal Observatory and time
standard, hence had an offset known to greater precision; but the IANA
DB duly approximates that, too, so we won't have data with millisecond
precision even in that case, so don't try to refine beyond second.
Change-Id: I20fb355f8113c32387ed8a84fbf5a41004273978
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
Taking the size() of a list before append()ing to it saves the need to
subtract 1. Add some missing assertions.
We can now use sliced(), rather than mid(), to trim a string or byte
array. We can do such trimming on a view, rather than allocating for
the trimmed part.
Change-Id: I8eff46ea6545a66c765c2d79aa1162c3044ca1cf
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Mate Barany <mate.barany@qt.io>
This reverts commit c0b0c7bebb.
QPlatformTheme::MouseCursorTheme and MouseCursorSize was added in
qtbase a823366f77 and qtwayland client
supports it in 1c25db5e3f23d48e330170f41b94fbd532932b02.
Pick-to: 6.5
Change-Id: Icef2f50d495ac802e3a591d92c222523972b2066
Reviewed-by: Liang Qi <liang.qi@qt.io>
This reverts commit d42cfeb84f.
Trying to help AppKit by adding the dictation and emoji edit menu items
ourselves resulted in sometimes adding the entries twice, when we failed
to detect the existing entries, or AppKit failed to detect our entries
as a reason to not add its own.
In addition, even if the entries we added were detected by AppKit and
AppKit was smart enough to not add its own, our entries were relying
on the developer to provide translation, instead of building on the
translations that AppKit already provides. And the keyboard shortcut
we set for our entries were not following system and user preferences
for which keyboard combination should trigger the entries.
Fixes: QTBUG-104709
Task-number: QTBUG-79565
Pick-to: 6.5
Change-Id: I3fabc41f85df917dbb669253ad441bccea8a5e35
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Removed the two identical functions and directly call the `static_cast`
in their place. This is to resolve a build issue when doing unity build.
Pick-to: 6.5
Task-number: QTBUG-109394
Change-Id: I174b601e06c4acdea45cc66495c09aafba6f48f6
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
It's unlikely we will ever use pro2cmake at this project stage,
so it doesn't make any sense to keep the 'special case' markers
in the CMake scripts. Remove them and replace with TODO where
needed.
Change-Id: I84290c20679dabbfdec3c5937ce0428fecb3e5a7
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
We sometimes use Objective-C++ code in files with a .cpp extension,
to avoid the churn of adding a foo_mac.mm file. Instead of manually
telling the compiler to build these files in Objective-C++ mode, we
use CMake's intended mechanism, which means genex constructs such as
$<$<COMPILE_LANGUAGE:OBJCXX> will work for these files as well.
Pick-to: 6.5 6.2
Change-Id: If295c3f34f6bee9f4d9f877f519c9c7770665fee
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
A QPointer is used as a guard for calling setChecked on a stale object.
The guard is not checked on accessibility updates.
This patch wraps the accessibility update in a guard check.
Fixes: QTBUG-112759
Pick-to: 6.5
Change-Id: Ida47c181b7968911c1805dc244b86347e7afe81b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Make QSqlError implicitly shared and adjust the ctors / assignment
operators to be consistent with other implicitly shared Qt classes.
Fixes: QTBUG-91912
Change-Id: Ie73292817fd4e7b274a3033a74d62e712a01c2b0
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Found some documentation saying NVidia provided desktop GL for
development purposes only, and recommmended against using it. Not sure
if that applied to all NVidia drivers, or only that one embedded
platform, but since we have multiple bugs about EGL not working on
NVidia, default to using GLES2 like it suggested.
Change-Id: If8ac8dd61c4ceb88162360f1eaa2a096acefa9c6
Pick-to: 6.5 6.2
Fixes: QTBUG-105921
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
When the DPI of a window changes due to being moved to another screen,
or the current screen reconfiguring, the mask we've set earlier is no
longer correct, as the mask was set based on the original screen's
scale factor and in relation to the former platform geometry of the
window, which now has changed.
Like the geometry of a QWindow, the mask is expressed by the user in
the QtGui coordinate system, so it's the platform's job to transform
this into the platform coordinate system and update it when needed.
Add a manual test that users a QWidget and a Q(Raster)Window side by
side.
There's still an issue with the screen change being triggered to
early, via QWindow::setGeometry, instead of when the window has
actually moved to the new screen, resulting in the paint event
flushing to a window and backingstore that is in the wrong state,
but this requires further research to fix.
Task-number: QTBUG-97642
Pick-to: 6.5 6.2
Done-with: Volker Hilsheimer <volker.hilsheimer@qt.io>
Change-Id: I7ab2d267fbaf6ac32b507d05a418eb025b354a0b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
virtualkeyboard is a qt module and thus covered by the "no-<module"
switch. The special handling is no longer needed with the more dynamic
approach of handling Qt modules.
Pick-to: 6.5
Change-Id: Ice6e30261e60b484669748411e019764bbdeaa55
Reviewed-by: Yuhang Zhao <yuhangzhao@deepin.org>
Reviewed-by: Timothée Keller <timothee.keller@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
The original issue for doing this was that invalidateCursorRectsForView
would not result in an updateCursor callback in certain scenarios on
macOS 11 and below.
In macOS 13, improvements to how tracking areas work now result in
also missing cursorUpdate calls when the mouse is pressed, which
makes sense for tracking areas in general (you don't want a drag
over a text field to reset the cursor to the I-bream), but not for
our specific case of setting a cursor synchronously.
To ensure the cursor is updated immediately, even if the mouse is
pressed, we synthesize a updateCursor event, just like we did for
the invalidateCursorRectsForView workaround.
It's up to clients of QWindow to manage their setCursor calls to
not happen during a drag operation, which we already manage in
Qt Widgets.
Pick-to: 6.5 6.2
Change-Id: I67d6e0f8e270b40da9879828455f4de943da7839
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
This is an additional attempt to have more "smoke testing" in
place for systems where there is no real 11_1 level driver
present. (we already test for Shader Model 5.0 above, now
also check this 11.1 feature indicating that
VSSetConstantBuffers1 is actually implemented)
This probing is important in particular for Qt Quick, where
there is an automatic retry with the software (WARP) adapter
when the initial QRhi::create() returns false.
This may or may not help the virtual machine case in the
associated issue, but is a valid check regardless since
we absolutely require constant buffer offsetting.
Task-number: QTBUG-78648
Pick-to: 6.5 6.4 6.2
Change-Id: I4d3c7b5c6c1f2b04b16c84b42c92651a3e671617
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
And implement the rvalue overload of addResult() using it.
[ChangeLog][QtCore][QPromise] Added emplaceResult() and
emplaceResultAt() member functions.
Fixes: QTBUG-112270
Change-Id: Id369542215a60c0818f1afa8d564498be84732e8
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
glBlitFramebuffer is affected by the scissor test.
Fixes: QTBUG-103792
Pick-to: 6.5 6.4 6.2
Change-Id: I2eccc9f3e469af8b2fdff22e9fb7c2311c25b867
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
Properly initialize outBinds - even it should be initialized by
mysql/mariadb client lib we should correctly initialize it with 0 to
avoid valgrind warnings about accessing uninitialized data.
Pick-to: 6.5 6.2 5.15
Change-Id: I85b99a7e639dad9f8d24f554cd96c5997a5838ae
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This saves us a few more roundtrips.
For rows and columns we could check if their accessibilityFrame
instersects with the table and so ignore rows and columns that
are outside of the view, but I'm observing weird corruptions in
the list returned by NSAccessibilityUnignoredChildren when
ignoring any objects.
Task-number: QTBUG-34337
Pick-to: 6.5
Change-Id: Ia2d13fff463ff26abb39acfceafcfa0761171203
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Since macOS requires us to return an array with elements as the children
of a table's row. And it might ask for the children of many rows. This
is very costly, and results in a lot of QAccessibleInterface instances
being created unnecessary.
Instead, use unassociated QMacAccessibleElements as place holders for
cells, and place them in the column array of the QMacAccessibleElement
that represents the respective row. Those placeholder elements have the
synthesizedRole set to AXCell, and have the same axid as the table, for
as long as there is no corresponding QAccessibleTableCell created. Until
that point, they are in practice "managedByParent" just as the row and
column elements.
Since the place holder object knows about its column, row, and table, it
can respond to many inquiries directly without needing to create the
interface.
Once the QAccessibleInterface for the cell is required for an already
existing place holder, then we need to promote the place holder to an
independent element. We reset the synthesizedRole to nil, and change the
axid to the ID of the cell interface.
However, the cell interface might have been created and assocated with
an element before the placeholders were created when navigating through
the children of a row. So when we create an element for a table cell,
then we need to make sure that the table elements' corresponding row
is also populated, with the new element in the right place.
Pick-to: 6.5
Fixes: QTBUG-34337
Change-Id: Iff78e3b8335df8cf294fffb6579605bfeb8409ed
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
We only need to compare elements to determine whether this element has
focus.
Task-number: QTBUG-34337
Pick-to: 6.5
Change-Id: Ic1388ac00381735acfbf1e5877a658f4bd534dfb
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Instead of explicitly creating an ID from an interface and then asking
for the element for the ID, ask for the element for the interface
directly.
In that helper we can also make sure that the created element is
correctly configured if the interface for which it was created was for a
table cell.
Task-number: QTBUG-34337
Pick-to: 6.5
Change-Id: Id0f9247b0b50195301b293dcabb8925c3fc2d2cf
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Store row and column in the QMacAccessibilityElement when creating it so
that we can avoid linearly looking for ourselves in the parent's data.
Row elements have their m_rowIndex set, Column elements the
m_columnIndex, and elements representing a cell have both set. Cells
are not managed by the table.
Task-number: QTBUG-34337
Pick-to: 6.5
Change-Id: I319fad1f1fda0cfa4c0b95e9e16c25c87df04351
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Make getting a QAccessibleInterface from a QMacAccessibilityElement a
member function that also tests for the validity of the interface, and
replace the respective code duplication.
Remove unused member functions accessibilityMin/MaxValue.
Task-number: QTBUG-34337
Pick-to: 6.5
Change-Id: Ie15cf0b71285e63cc485d87ced050dc541967c98
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
In debug builds, don't fail silently in QImage::save, but emit the error
string of the QImageWriter to the warning stream so that developers have
a chance to know what's going on.
Task-number: QTBUG-103257
Task-number: QTBUG-41043
Pick-to: 6.5
Change-Id: I29718b1445d0c99a3b35d57b58ec915a503cd5f0
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
The window device pixel ratio may change when the DPI
changes. Call the DPR update function, which will poll
for the current value and update the cached value and
send DevicePixelRatioChanged events if needed.
Change-Id: I5d5ac5d24a693d06eb9b1f005a91677e703f8a58
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Make each QWindow instance cache the current DPR value.
This will make calling QWindow::devicePixelRatio() less
costly, since it now does not have to compute the DPR
value on each call.
The cache is invalidated when the DevicePixelRatioChange
event is sent. The common logic for handling this is
implemented in QWindowPrivate::updateDevicePixelRatio().
Change-Id: I97231a230347358d8e565d2fd62e8a398adaedfc
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Don't activate the mainwindow layout while it is being restored.
Otherwise we might end up in recursive calls to setGeometry.
Pick-to: 6.5
Fixes: QTBUG-111538
Change-Id: I4b6cba9e0abfbae479f71a65b1c4526d92dac081
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Don't append separator widgets at the end if their slot in the list is
still free.
Pick-to: 6.5
Task-number: QTBUG-111538
Change-Id: Id9ada2c083345cfd69633e506cceedc9ae6f2ae4
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
lld 16.0 is more picky about symbol versioning than previous versions
(and other linkers such as ld.bfd, gold or mold).
It now errors out if a symbol is versioned but not defined
(see 8796677de8900dc154aef45f8620c3f987a40291).
Outside of detecting support for symbol versioning (fixed by 462832),
this causes linking Qt6 libraries other than Qt6Core to fail because
their linker scripts try to add versioning to qt_version_tag, which is
defined in Qt6Core rather than the library being linked.
The obvious (and working) fix is to version qt_version_tag only where it is
defined (Qt6Core), but this is not what the original intent seems to be.
Task-number: QTBUG-111514
Change-Id: I963d417befb0f6b2260c57f059eeda1fe79200c9
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Since Qt 6, qIconCache does not store null icons. In case an icon name
lookup is unsuccessful, the (expensive) lookup is repeated each time.
This patch reverts 9e7c567050, which
removes a null icon from the cache once it has been found in the cache.
In fact, that could no longer happen due to
4dc7102c84, which prevented null icons
from being cached at all. Therefore, it is also reverted by this patch.
The cache will be cleared when
- the system icon theme name changes or
- QGuiApplicationPrivate::processThemeChanged is called (e.g. due to
a change of the system's color scheme)
Fixes: QTBUG-112257
Pick-to: 6.5
Change-Id: I80cd21fa39dc31c4bae60a8e66e78d9da20e9b4b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
There are patches for addressing the issues raised by these two source
files; however, it would be beneficial to exclude them temporary while
we are testing, and debugging the unity build on CI.
Pick-to: 6.5
Task-number: QTBUG-109394
Change-Id: Ie8631cf1df086b22967a8cc41874a3ef856c3ef8
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
QMenu::exec opens a blocking loop, which is problematic for webassembly.
Replace with QMenu::popup, and reset the down-state of the button when
the menu is about to hide. QMenu emits aboutToHide immediately before
existing the event loop in the hideEvent override, so the timing is the
same.
Change-Id: Iccb418d10fcb25f6ad1f73f9cdce6ea6581bd73b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
The "two widgets at a time" API to set the tab order is awkward and
easily misused (as the documentation explicitly explains). Add an inline
overload that takes an initializer_list, and call the existing function
for each consecutive pair of widgets in the list.
Add documentation with snippet, and a test.
Change-Id: I8e6f14a242866e3ee7cfb8ecade4697d6bdfb4d4
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
A failed response also carries response text. Read it and assign it
to the response.
Fixes: QTBUG-112474
Change-Id: I5565e3809e2c9c95bf8e0744b3ab15a62b07106c
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
A subclass of QFileSystemModel might override columnCount to return a
value smalller than QFileSystemModelPrivate::NumColumns.
In that case, constructing the bottomRight index for the dataChange
signal would fail if we create it for column NumColumns - 1, and result
in undefined behavior where the topLeft and bottomRight indices do not
have the same parent.
So ask for the columnCount of the parent index explicitly to construct
the bottomRight index.
The assert can be triggered via the "filesystemexplorer" example in
qtdeclarative, which overrides columnCount to always return 1.
As a drive-by name the variables correctly, bottom and top where mixed
up.
Pick-to: 6.5
Fixes: QTBUG-110632
Change-Id: I8a635ec733348d1eda2037c156ac0f7b09a2183d
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Hardcoded 0, 1, 2, 3 make it hard to follow the logic of this code.
Replace those values with values in the already existing unnamed enum,
and use everywhere.
Pick-to: 6.5 6.2
Task-number: QTBUG-110632
Change-Id: I325ab9edb5f3f996e87c83be1ec7226d5453f2cc
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
ioctl call for FIONREAD takes an int arg, it won't work correctly
otherwise. Cast the return of the read() call to int, because it won't
read more than buffSize (which is an int).
Change-Id: I130202a732684257bbb0e79c9358b60a61010c46
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
- Don't use unsigned to avoid negative values (if an unsigned variable
is assigned a negative value it'll wrap around and become a huge
positive value, which is usually not what's required)
Change-Id: I5d41280b9ca14c15727f9f2447ed50573b187931
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Sync the IBASE driver behavior for primaryIndex() and record() with the
rest by assuming that the given table name has the correct casing.
Change the tests for these two function to pass an unescaped table name.
Change-Id: I6d96359f97e1acc6970b9a22fdf0e968a616b7bc
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
[ChangeLog][SQL][SqlQuery] Added two new functions
boundValueName()/boundValueNames() to return the names of the bound
values.
Fixes: QTBUG-97847
Change-Id: I8df5f15e8df13141a34d38b0a2e13b37f4e7829c
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Makes it easier to troubleshoot issues.
Pick-to: 6.5
Change-Id: If50fafde8748bb0fde58f54ed55fe1ddf9bcf088
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Fixes the macos build with the disabled opengl feature.
Include inttypes.h that used to be implicitly included by
qopenglcontext_p.h. It's needed for 'PRId64' macro.
Amends: ef27cc126c
Pick-to: 6.5
Fixes: QTBUG-112656
Change-Id: I970329c4aacc70790f50e1ff3a57ab2aa6f6bff7
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
When the change from quint64 to bitsets was originally made, the return
value of the qtModule function was not adapted. Where returning 0 was
fine for the quint64 values which started at 1, returning 0 now adds
the first module instead of adding nothing to the used/required modules
Fixes: QTBUG-111984
Pick-to: 6.5
Change-Id: Id1e2b3237a36335ec5071180b4c73f99d5eb5c8d
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
When QStyleFactory::create() is unable to find/create an override style
set with QT_STYLE_OVERRIDE or "-style", clear the styleOverride. Reason
for this is that Qt Quick Controls otherwise tries to use this invalid
style.
Task-number: QTBUG-100563
Pick-to: 6.5
Change-Id: I48fa6c211ce27d902e2eaf90c34cb5694ad7ecfd
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
If windeployqt is not able to retrieve any translation information
from the catalog, the translationNameFilters will be empty. This allows
the '.' and '..' folders to be passed to lconvert which in turn causes
an error for the whole deployment. Added a check for the filters being
empty, and a warning in case we have to preemptively return from the
translation deployment.
Fixes: QTBUG-112204
Pick-to: 6.5
Change-Id: I0d114186e630cc3696250006fa093c4c596eb40d
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Removed fetching the infix through the QtCore Module, since
it is already provided by qtpaths -query
Pick-to: 6.5
Change-Id: I844305fc66b21af094724dd3f516078447ee1dd2
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Bring back missing code snippet src_corelib_tools_qmultimap.cpp#19,
fixing:
qtbase/src/corelib/tools/qmultimap.qdoc:1007 Command '\snippet (//!
[19])' failed at end of file
'qtbase/src/corelib/doc/snippets/code/src_corelib_tools_qmultimap.cpp'
As a drive-by, use a more modern form, avoiding repeated invocation
of end().
Amends 3236b64db8.
Task-number: QTBUG-105109
Pick-to: 6.5 6.2
Change-Id: I09635eedd773ed16517773a9bf282b0386beba26
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
The alias created by QSqlRelationTableModel to avoid duplicated field
names was not escaped which lead to an inconsistency in the returned
alias name from the database (e.g. postgres lowers all unescaped column
names).
Also adjust the test for QSqlRelationTableModel to use escaped table
names for it's tests and fix it for QIBASE.
Change-Id: I01426320c0c1a70cb9bf8e6dfa2f8b07dbb1c06b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Add the two options MYSQL_OPT_TLS_VERSION and MYSQL_OPT_SSL_MODE to
properly support encrypted connections to MySQL 8.0 servers.
MYSQL_OPT_SSL_MODE will not work when compiled against the MariaDB
C-Connector since it's not supported by the MariaDB client.
[ChangeLog][QtSql][MySQL] Added the two new connect options
MYSQL_OPT_TLS_VERSION and MYSQL_OPT_SSL_MODE.
Fixes: QTBUG-84797
Change-Id: Iec7d682fc00072ce5b2a824c4ea00fca4575a93e
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
When a context object is provided, then callers expect that the functor
or slot is executed in the thread of the context object. And if the
context object has been destroyed by the time the permission response
is received, the functor shouldn't be called at all.
To implement this, we either have to plumb the call back through a
signal/slot connection and benefit from QObject's infrastructure. This
is not practical here, as we don't have an "engine QObject" that would
emit a signal.
Instead, we can create a QMetaCallEvent explicitly, following what we do
in e.g. QHostInfo, and using a temporary QObject that handles the event
to then call the functor.
Add test coverage.
Pick-to: 6.5
Change-Id: Id878e45b304857304165ab4a7c6aae76fbee46ce
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
QtGui/private/qopenglcontext_p.h needs to be guarded to avoid
compilation errors when building Qt with openGL disabled.
Fixes: QTBUG-112656
Pick-to: 6.5
Change-Id: I21d120ed2bdb22e7aa2338e396a9a426adb80dbe
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Fix qdoc warning by documenting the new value.
Change-Id: I8c289cf103ccf008b6592a9e6e940d02e5cab7b3
Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io>
Reviewed-by: Safiyyah Moosa <safiyyah.moosa@qt.io>
Fix rendering to cutout areas so that they are filled both
in portrait and landscape modes.
Fixes: QTBUG-96877
Pick-to: 6.5 6.2
Change-Id: I8a29557236ed1b7084afc902dc1fb42d9535ef32
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Jarkko Koivikko <jarkko.koivikko@code-q.fi>
Some platform sdk packages have names that contains non-integer
characters such as android-33-ext5 or android-UpsideDownCake
which fail building with androiddeployqt because build.gradle
expects an integer only. This allows using string based versions
and also fallbacks to setting an integer only value if it finds
that the build.gradle of the project is still explicitly
converting to integer (this to avoid breaking existing projects).
Fixes: QTBUG-112465
Pick-to: 6.5 6.2 5.15
Change-Id: If8cfc0fb84f0880a43644dc0a4188671736d3e21
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Fix the qtforandroid (i.e. libplugins_platforms_qtforandroid) check
and avoid calling llvm-readobj on non-library files and only add them
to the dependency list.
Task-number: QTBUG-94232
Pick-to: 6.2 6.5
Change-Id: Id1a415b6d9834daaf5337e9bd15e7daf69fd574f
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
avoid breaking when looking for the android plugin when the dependencies
include opengl lib, since that was valid only in the early days where
the Android plugin was separated into two raster and opengl. Now, that
assumption is wrong and might affect the way the manual dependency
works.
Task-number: QTBUG-94232
Pick-to: 6.2 6.5 5.15
Change-Id: I025a5c8b2b064bb43a356a4ad5cb4a1ada41b09b
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
[ChangeLog][Deprecation Notice][QtCore] The QtFuture::makeReadyFuture()
method and all its specializations are deprecated since Qt 6.10.
The reason for the deprecation is that the method has a
makeReadyFuture(const QList<T> &) overload, which behaves differently
from all other overloads (including other non-const ref QList
overloads).
Use QtFuture::makeReadyVoidFuture() when you need a ready void QFuture,
or QtFuture::makeReadyValueFuture() when you need to propagate the
input type to the returned QFuture, or QtFuture::makeReadyRangeFuture()
when you need to create a multi-value future based on an input
container.
Fixes: QTBUG-109677
Change-Id: I55125269989df0a02840d5ddd5763ef5f1070df5
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
[ChangeLog][QtCore][QFuture] Added QtFuture::makeReadyVoidFuture()
and QtFuture::makeReadyValueFuture().
Basically, these methods behave like QtFuture::makeReadyFuture(), but
QtFuture::makeReadyValueFuture() does not have a "const QList<T> &"
specialization returning QFuture<T> instead of QFuture<QList<T>>,
which allows it to always behave consistently.
This patch also introduces usage of the new methods around qtbase.
Task-number: QTBUG-109677
Change-Id: I89df8b26d82c192baad69efb5df517a8b182995f
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
[ChangeLog][QtCore][QFuture] Introduce
QtFuture::makeReadyRangeFuture(). This method takes a container
which has input iterators and returns a multi-value
QFuture<ValueType>, where ValueType is the underlying type of
the input container.
This commit also replaces the usage of buggy
QtFuture::makeReadyFuture(const QList<T> &) overload with the new
method.
Task-number: QTBUG-109677
Change-Id: I019e62eac74c643d88a65b3cc0085bc7c33bc712
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
QPermission might resolve to multiple underlying permissions on Android.
The existing code was only using the first permission from the list
in checkPermission(), and also checked only for the first result
returned by requestPermissions().
This can lead to a situation when only one of the requested permissions
is granted, but the API reports that all required permissions are
granted.
This patch fixes it by checking the combined status of all permissions.
If at least one of the permissions is denied, the whole list of
permissions in considered denied.
Fixes: QTBUG-112527
Pick-to: 6.5
Change-Id: I243b73bb5a842197cd0ef70937b8eac344ff9596
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
This can happen if the same project has two or more Q_IMPORT_PLUGIN
macros in their source. And that can happen when converting from qmake-
based builds to CMake, as qmake didn't generate a source file with the
macro but CMake does.
[ChangeLog][QtCore][QPluginLoader] staticInstances() will not call
duplicated registrations of the same instantiation function, which can
only happen as a result of duplicated Q_IMPORT_PLUGIN for the same
plugin name.
Fixes: QTBUG-102745
Pick-to: 6.2 6.5
Change-Id: Idd5e1bb52be047d7b4fffffd174fb9dd62d8583d
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
PostgreSQL supports the utf-8 encoding ('UNICODE') since at least
version 7.3 which is the oldest version we support. Therefore remove the
non utf-8 codepath completely.
Change-Id: I64b1a4e7b0b85141fe13f5f57e6f35f9eb7d542e
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This use the unity launcher specification which is defined here
https://wiki.ubuntu.com/Unity/LauncherAPI
This spec is used by Plasma and Unity. On other Linux desktop platform
where the unity DBus interface is not detected this is no-op.
Change-Id: I81a9b95fe4886ad597bb4e775641926b161c49a5
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: David Edmundson <davidedmundson@kde.org>