This would steal an existing binding from a property, which is most
likely not the intended action.
Alternatively, we could make it equivalent to
Qt::makePropertyBinding(foo), but that conflates properties with
bindings to it. On the other hand, this would avoid a potentially
source-breaking change.
[ChangeLog][Potentially Source Breaking Change] It was possible to
create a QPropertyBinding from a property; this would steal any set
binding from the property or create an invalid binding if none was set.
Use makePropertyBinding if you want to to create a binding which depends
on the property's value, or takeBinding if you want to repurpose the
property's binding.
Fixes: QTBUG-89507
Pick-to: 6.0
Change-Id: Icd2d3b9261b60f36948f2cea9c33ddbea36efbc1
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This adds functionality for marking properties (QProperty and related
classes) manually as dirty. This facilliates the integration of bindable
properties with non-binable properties and makes it possible for
bindable properties to change due to external events.
Fixes: QTBUG-89167
Change-Id: I256cf154d914149dacb6cadaba92b13c88c9d027
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
SIOCGIFNAME is now supported on QEMU.
This reverts commit 42b3ed763f.
Change-Id: I79caa371dc798464ab76851d2ea3189ec9eb0c57
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
When accessibility was not active it was possible to force its
update, causing a null pointer exception in java.
Pick-to: 6.0 5.15
Change-Id: I60f65612d6e9f712ba3c591ffcc6803f06f09efb
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Remove a second argument to the setSocket(qintptr, bool) function as
it makes the API harder to understand.
Change-Id: Ib1852a4e9d96adde35bfbf0fe03b386d9ded395a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
We only need to check QGuiApplication::quitOnLastWindowClosed() at
the point where we've actually concluded that the last window was
closed.
Checking for !q->parent() was redundant, as we were already
exiting early when !q->isTopLevel().
Pick-to: 6.0 5.15
Change-Id: I934e186d707361b31d19692c04d2e17b7ba0f49e
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
The child process inherits a standard handle of the main process in
such cases:
stdin - inputChannelMode == QProcess::ForwardedInputChannel,
stdout - processChannelMode == QProcess::ForwardedChannels ||
processChannelMode == QProcess::ForwardedOutputChannel,
stderr - processChannelMode == QProcess::ForwardedChannels ||
processChannelMode == QProcess::ForwardedErrorChannel ||
processChannelMode == QProcess::MergedChannels
For these combinations we should not create pipes and notifiers as
they would not be used.
Change-Id: I8e3836e4d840a40b338c85c54645539ebcaab3f6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Amend aa136d46e1 that changed qRound()
implementation to use __builtin_round() functions on ARM64 which do
not fail "round largest representable float less than 0.5" test,
unlike the simple version of qRound() used elsewhere.
Change-Id: Ic66cb0f826d91cd6a85ad72b646c79ded1c0eeca
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
For some reason, clang (and thus Qt Creator's code model) did still warn
about the offsetof usage. Moving the warning pragmas one layer higher
appears to fix the issue.
Change-Id: I1ee1cfd690fdcce9105c65e508203a722fe63151
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Fixed the following warnings:
- empty expression statement has no effect; remove unnecessary ';'
to silence this warning
- zero as null pointer constant
- no previous extern declaration for non-static variable
- use of old-style cast
- integer conversion warnings
Change-Id: Ieb31b127ce8e3b543aaf88a8e8fc463dcc8bc4e3
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
The pro2cmake script doesn't handle static scopes correctly, and the
generated "CONDITION static" must read "CONDITION NOT
QT_BUILD_SHARED_LIBS".
Change-Id: Ic5a5763e9fd5f5d04fb4c12227cbe85fac17b826
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
It can happen that updateApplicationState() is called before
m_androidPlatformIntegration is set. In such case, new applicationState
will be remembered and propagated later.
Before this change, pending application state was passed only to
QWindowSystemInterface.
ResumePauseListeners that are subscribed for changes to
ApplicationActive/ApplicationInactive state also should be informed
about new application state.
Fixes: QTBUG-84737
Pick-to: 6.0 5.15
Change-Id: I67e79860b340ee5de2d13d148a222e9f1c942b93
Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Another case when an OpenSSL's call can dump some errors into the shared
error queue discovered. An invalid certificate with non-null X509 * may
result in several errors appended to the queue.
Pick-to: 6.0 5.15
Change-Id: I1278b371bd1edf2d656760c371bfb6da5dcab6ec
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Unset all QT_FEATURE_foo values for every build.
If any of FEATURE_foo is different of QT_FEATURE_foo, mark whole Qt
build as dirty. Reset FEATURE_foo for dirty builds to the calculated
value if it doesn't meet its condition.
Set Qt module as NOT FOUND if its target was not created during
configuration.
Main issue with this approach are generated files, that became trash
once the related features are disabled. This especially affects features
that enable/disable Qt modules. FooConfig.cmake files are created and
generate lots of warnings if feature was disabled. We may introduce a
module cleanup procedure at some point.
Fixes: QTBUG-85962
Pick-to: 6.0
Change-Id: Id71c1edb4027b24c6793063e40cc9d612c24ebce
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Apparently some library definitions went overboard, link them directly.
Pick-to: 6.0
Change-Id: I009737f7e3edff5619241b700a627dc4e25e6018
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Build qtbase with -DFEATURE_static_runtime=ON, and then separately build
another module, following build error occurs:
error LNK2038: mismatch detected for 'RuntimeLibrary': value
'MT_StaticRelease' doesn't match value 'MD_DynamicRelease'.
That's because all the sources in this module are compiled with 'MD'.
When separately building a module except qtbase, FEATURE_static_runtime
is not exist in cmake cache. So we should use QT_FEATURE_static_runtime
instead of FEATURE_static_runtime in qt_set_common_target_properties.
Additionally, adjust the indentation.
Pick-to: 6.0
Change-Id: I2cf4737db9d3e8533570039a66c7d277d62a8d14
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Skip the memcpy when src is null.
Also silences a Codechecker warning.
Pick-to: 6.0
Change-Id: I5042d725000cb6dff6864408fa9ed9e0ca35145a
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
Something defined is always greater than undefined
Pick-to: 6.0
Fixes: QTBUG-89530
Change-Id: I7633dd4233f7b13c3c5be17352841ec873531ef9
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
After f08492c6fd was
merged this bug would manifest as an entry appearing twice
in the chain when a updating an existing entry (insert with
an existing key). This could sometimes result in crashes later
as the list filled up and the list was used in trim() to remove
various entries.
Fixes: QTBUG-89176
Pick-to: 6.0
Change-Id: Ide80160fb4317dc0aefe79eec5dce7ec6813e790
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Until now, all wheel events came from one "core pointer". It's useful
in Qt Quick to tell the devices apart, because some support smooth scrolling
and some don't.
Also remove the QHash storing legacy ScrollingDevice structs, and use
a subclass of QPointingDevicePrivate instead.
Task-number: QTBUG-46412
Task-number: QTBUG-72167
Task-number: QTBUG-69433
Change-Id: Ie6a3d8dd494f981e8706b9a66a1021dfb51baec4
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
The QString documentation is aligned with QList regarding common
wording and ideas:
- Extend general class description
- Revise description of several methods
- Fix examples to use qsizetype instead of int
- Wrap descriptions at 80 characters
Pick-to: 6.0
Task-number: QTBUG-87962
Change-Id: I7d5a7e829ce8b98a0a1a7fae6b7ae0dec4effbae
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
When using MSVC compiler and -DFEATURE_static_runtime=ON, qrc_foo.cpp
and qtentrypoint_win.cpp are still compiled with '-MD' or '-MDd' flag,
which will cause following warnings and other possible problems:
warning LNK4098: defaultlib "MSVCRT" conflicts with use of other libs;
use /NODEFAULTLIB:library
Pick-to: 6.0
Change-Id: I6794930a64e9cff4dc1c9632fc3fc64227848af0
Reviewed-by: Yuhang Zhao <2546789017@qq.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Remove heading that causes QDoc's autolinker to link incorrectly.
* Clean up language a bit while at it.
* Drop a double space.
Fixes: QTBUG-89283
Pick-to: 6.0
Change-Id: Ice778d66deab384b66eb50b790670c9e3c8b0e84
Reviewed-by: Andreas Buhr <andreas.buhr@qt.io>
Reviewed-by: Nico Vertriest <nico.vertriest@qt.io>
The case no conversion was needed wasn't handled, but was assumed to be
handled by some call sites.
This can speed up QPixmaps on devices with non-standard screen formats.
[ChangeLog][QPixmap] Opaque pixmaps on devices with a non-standard
opaque format will now correctly match format for faster blitting.
Same with semitransparent pixmaps on devices with a non-standard
semitransparent format.
Pick-to: 6.0 5.15
Change-Id: Ia05ff518fea36b7e3ed5c089fa9e8681a02fc574
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Historic QDateTime behavior when being asked to create a
QDateTime in the DST gap was to interpret the given date
as if it was in the time before that gap, mapping it to a point
in time after the gap. This has changed with
a04411119e .
Since then, the given date is interpreted as if it was in the
time after the gap, thus being mapped to a point in time
before the gap.
This patch restores the historic behavior.
This was not caught by Coin because machines ran in timezone
"Atlantic/Reykjavik" which does not have DST since 1967.
This patch changes tests to always run in "Europe/Oslo".
Driveby: Test function "findSpring" did some operations in
local time, even though being asked to work in a specific
time zone. Fixed that.
Fixes: QTBUG-86960
Fixes: QTBUG-89208
Pick-to: 6.0 5.15
Change-Id: Iecce5898bf9711a10e7dfc0a25e4bbeaed1c8ade
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The \Q_OBJECT macro has been removed but using Q_OBJECT in the file
would erroneously trigger automoc. Avoid the issue by moving
the snippet into its own file.
Task-number: QTBUG-89505
Pick-to: 6.0
Change-Id: I6630ff4bfcbf33eae348ac3d92aae1878dc573ea
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
QXcbVirtualDesktop::m_workArea is not updated after screen rotation
if _NET_WORKAREA is not updated, e.g. when a window manager is not
running.
Use width of -1 for m_workArea to indicate that _NET_WORKAREA is
not set and thus there is no need to find its intersection with
screens' geometries.
Pick-to: 5.15 6.0
Change-Id: Ic1f3ec23576ed8407a76cc2b9f84a145c67b1d4b
Reviewed-by: Liang Qi <liang.qi@qt.io>
The scripts that are used by Android test VMs are now located in qtbase
and are not easily usable by other modules. To fix that and allow other
modules to use those scripts, we install them with cmake into libexec.
Task-number: QTQAINFRA-4052
Pick-to: 6.0
Change-Id: Ibdd3658fd9fe7e007104a85d9999028a2de99a33
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Technically, having a single constructor limits the use-cases for this
class. We should take into account that:
- an opened socket descriptor must be available at the moment of
construction;
- the constructor unconditionally enables the notifier (the possible
solution
notifier = new QSocketNotifier(...);
notifier->setEnabled(false);
is suboptimal due to heavy operations inside the event dispatcher);
- for these reasons, QSocketNotifier most often cannot be a member of
another class (we have an extra allocation and indirect access).
This patch addresses this shortcoming by making it possible to set the
socket descriptor at a later point:
[ChangeLog][QtCore][QSocketNotifier] Added setSocket() and an additional
constructor which requires no socket.
Change-Id: I2eb2edf33ddafe99e528aac7d3774ade40795e7a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
These methods should never be used on strings not known to be valid UTF-16.
Their optimizations will produce undefined behavior otherwise.
Change-Id: I03a95140dcbdd1f7189eea1be69289ce227331a5
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Lexicographical is not the right word for the comparison description.
Other classes use the term "lexical", so QList is updated
in that way too.
The link to cppreference is left, because QList actually uses
std::lexicographical_compare, so it's completely valid here.
Pick-to: 6.0
Task-number: QTBUG-87962
Change-Id: I37bd3a92c5a3f857266e9c483d14e64eb90ce2c7
Reviewed-by: Andreas Buhr <andreas.buhr@qt.io>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
The QStyleOptionButton::CommandLinkButton feature is already set in the
QComnandLinkButton's initStyleOption() so remove its setting in the
paintEvent.
Change-Id: Ic1d723c0671d6d478825d7ba2173db72a8b39c36
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
We should return the result of the call of the base implementation for
all events that we did not handle. Also, QObject::event() does not
actually activate any filters, so the comment was inaccurate as well.
Change-Id: Iff6644b7b1621229f8351c83569ee72594e47197
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Provide execution context to QFuture continuations, instead of using
QMetaObject::invokeMethod calls for running in the main thread.
Change-Id: Ica7de19494065d677ffc94224781bfbe292b4f21
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Since QPushButton sets WA_MacShowFocusRect attribute upon init, this
will be set for QCommandLinkButton too. However, we do not want to draw
the Mac focus frame for QCommandLink buttons so remove this attribute
for them.
Pick-to: 5.15 6.0
Change-Id: Ida7a437a54be078caaebc2c0744243d50e14a87f
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
In QPushButton::initStyleOption() there is no style option feature set
to distinguish QCommandLinkButtons. The QStyleOptionButton::CommandLink
Button feature is only set during the paintEvent, but in some cases we
need to check for this feature before painting.
To fix, override initStyleOption for QCommandLinkButton and set the fea
ture there.
Pick-to: 5.15 6.0
Change-Id: I8831a6be7da642dcf8830812d99681213e7515dc
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>