C++11 has been required for a long time.
Pick-to: 6.7 6.6 6.5
Change-Id: Ib6c1571b100dd4eb8194d515f2180ca26481b556
Reviewed-by: David Faure <david.faure@kdab.com>
according to DRY. Also don't use erase after unique call,
just use new past-the-end iterator.
Change-Id: I5c033b6433105842e72eca9a7a2d5ea9ec0032ec
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QEXTRACTTESTDATA returns a QSharedPointer<QTemporaryDir>, so the member
variable has to be of that type so that all code paths work.
Amends 986b5b4f47 (QDirIterator) and
c39a0d1e89 (QDirListing).
Change-Id: Ie4b76687125f0506a2c899acca222123f0b1c44a
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Add `f`-suffix to float assignments to avoid implicit conversion from
double to float.
Fixes: QTBUG-122303
Change-Id: I456e2952fe8c96783ab116ac4cb56a28b38de9d0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
The postgresql server by default returns the datetime in it's local
timezone. This works as long as this is the same as on the client. If
they are different, the parsing is going wrong.. Therefore let the
server return the datetime in UTC. Also do not convert the datetime into
local time to be in sync with the MySQL plugin.
[ChangeLog][SQL][PostgreSQL] Fixed a bug where a wrong QDateTime might
be returned when the PostgreSQL server and the Qt client had different
time zones configured.
Fixes: QTBUG-115960
Change-Id: I1a6dda69359a34b99ef399b2a54f35c8ba041326
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
We only activated our fake context sharing logic for offscreen
surfaces. This commit removed that restriction this allows the
rendercontrol example to run
Fixes: QTBUG-117410
Change-Id: Id86617f57c6a98a920f5dd82332dcd8277f103e4
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
The test does not run just like that it is necessary to:
set maxSizeBits to 28
mapOffsetOverflow: Settings copied from Linux
Change-Id: Idc276a7e2d777a9a6ad0c0e90d729fb4646a38b6
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
We link object files with the same names into the BundledLibjpeg
static archive.
This caused warnings when running dsymutil on shared libraries using
that archive:
skipping debug map object with duplicate name and timestamp
could not find object file symbol for symbol _jpeg_start_compress
Avoid that by creating copies of the source files with different
names, so that all object files are unique.
Pick-to: 6.2 6.5 6.6 6.7
Fixes: QTBUG-123324
Change-Id: I1d4ebdd111b4172cde793671fbe059957f102871
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
At the time of bb1f616ff1 the
Flickable.flickDeceleration property still applied to both touch
flicking and mouse wheel scrolling. In qtdeclarative
b1766d9d629f61d824146e69f1f3b319cbee3d11 we decoupled them. Switching
from the traditional 1500 logical pixels/sec² to 5000 was not enough to
satisfy those who complained about the mouse wheel "not being linear"
and at the same time made touch-flicking feel too sluggish. So let's
restore the traditional default deceleration value.
The flickDeceleration property is still adjustable, and the default
can still be overridden in any QPlatformTheme subclass.
[ChangeLog][QPA] The default value for the platform FlickDeceleration
hint is reverted to 1500 (rather than 5000 as in Qt 6.6). This sets
the default value for Flickable.flickDeceleration, which can be
overridden directly; and the default can also be overridden in any
QPlatformTheme subclass.
Pick-to: 6.7
Task-number: QTBUG-35608
Task-number: QTBUG-35609
Task-number: QTBUG-52643
Task-number: QTBUG-97055
Fixes: QTBUG-121500
Change-Id: If52b61dfcd0c08a7c6e753f39dbe01f417e94bf4
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Even in the original patch where the comment was added the
callouts were made with the lock held.
Change-Id: Id8d122010d2195d83ddd4fdaf638f7fc4ac8163d
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
A qt installation might not contain the non-versioned the qtpaths.exe
installed, but keep the versioned qtpaths6.exe.
Try to use the versioned version before the non-versioned one.
If none exists, show a warning at deployment time.
Amends 571201603a
Pick-to: 6.5 6.6 6.7
Fixes: QTBUG-122664
Task-number: QTBUG-119619
Change-Id: I23caf9ed3c7928fbab9657b0c0c64517dfc7d68e
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Change 997fd3b88e fixed integer overflows
with huge texts. This was done by using qsizetype for size calculations
instead of int. However, that change introduced a serious regression
due to an itermediate imultiplication result being "promoted" to unsigned,
and therefore a negative value being converted to a large positive.
The solution is to make sure all values in the expression are signed.
Fixes: QTBUG-123339
Task-number: QTBUG-119611
Pick-to: 6.7
Change-Id: I3f9189f77b383c6103cf5b35981cdb607b065f6f
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
to reuse existing buffer of QString and save some allocations
Change-Id: I31810c2fd3f0f70b19c19a530600e8cee5d6631a
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Add a template argument a la std::set and a ctor taking a Compare
object (thus supporting stateful comparators, too), and storing it in
QtPrivate::CompactStorage. Rewrite lookup() to use the stored
comparator instead of std::less, carefully avoiding a copy to match
what std::map implementations do, even though key_comp() itself is
specified to return by value.
Change-Id: I4f74aaf5eda0a4ed276e99f73f407042c2767828
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
python must be installed with higest version 3.11
Change-Id: I14ca5fa09b088903c95b2f6e2d6ace8400a7b015
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
... moving it away from between a comment and the C++ code the comment
pertains to.
Pick-to: 6.7
Change-Id: I56b3ded01d1800bae19121e4b9340d0c43f1da85
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
There's no reason to check whether the timer has expired after
rounding the timer's native nanoseconds up to milliseconds, so delay
the ceil<ms> operation to after the timer expiry check.
As a drive-by, protect the std::min call from Windows macros with the
parentheses trick and employ C++17 if-with-initializer.
Remove the break-if-expired, as it now obviously duplicates the while
exit condition.
Pick-to: 6.7
Change-Id: If30421012143640c75a9a44fe711d0c1c7cd23b9
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Some outputs weren't guarded with the optVerboseLevel which caused them
to occur even with the --list option. Add a guard to prevent for that.
Fixes: QTBUG-122257
Pick-to: 6.7 6.6
Change-Id: Ide060cda4ac6f9b4470ca608120e2b8aa4819de5
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
When connecting a QFutureWatcher to the QFuture it will connect to the
output interface, which will queue up events to notify about the current
state. This happens in the thread of the QFutureWatcher.
Since 07d6d31a4c unfortunately the sending
of those events was done outside the lock, meaning the worker-thread
could _also_ send events at the same time, leading to a race on which
events would be sent first.
To fix this we move the emission of the events back into the lock
and because it is now inside the lock again anyway, we will revert
back to posting the callout events immediately, so this patch also
partially reverts 07d6d31a4c
Fixes: QTBUG-119169
Pick-to: 6.7 6.6
Change-Id: If29ab6712a82e7948c0ea4866340b6fac5aba5ef
Reviewed-by: Arno Rehn <a.rehn@menlosystems.com>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Creating a QString from a QDate/QTime works even when
QT_CONFIG(datestring) is not defined, so no need to ifdef it out.
Pick-to: 6.7
Change-Id: Ib3594036f309393b612d3fbf21f51be9c36a9391
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Use view types more to avoid needless allocations
Change-Id: Ifdf5c8f6fecc54a0583444fbf3fe151c2c20002e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Also add some categorized logging output to make it easier
to check if native menus are being created.
[ChangeLog][Qt Core] Added AA_DontUseNativeMenuWindows
application attribute. Menu popup windows (e.g. context menus,
combo box menus, and non-native menubar menus) created while this
attribute is set to true will not be represented as native top level
windows, unless required by the implementation.
Task-number: QTBUG-69558
Change-Id: Iba11b89c67d942ce6c5a28a7c57a86e63c020618
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The MYSQL_TIME structure doesn't support per-datum timezone and in any
case the server would not store it: the TIMESTAMP type is always stored
in UTC. So instead let's configure the session time zone to UTC and use
QDateTime to convert to/from it.
Fixes https://bugs.kde.org/show_bug.cgi?id=483060
[ChangeLog][SQL][MySQL] Fixed a bug in passing QDateTime to be passed as
local time to the server, regardless of the QDateTime's time zone
setting. This would cause certain timestamps to be rejected by the
server, such as a UTC time stamp whose time numerically matched the
local timezone's spring forward gap in the transition into Daylight
Savings Time.
Change-Id: I6818d78a57394e37857bfffd17bbce4ae43e823c
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
It was the only place that called it. Makes the code slightly uglier,
but removes a function that returned a raw pointer. More importantly, it
gets the actual type from QVariant, without relying on it internally
converting from QDateTime to QDate and QTime, or failing to do so in
some cases. This is going to be needed for the next commit.
Pick-to: 6.5 6.6 6.7
Change-Id: I6818d78a57394e37857bfffd17bbcd3f5057eadc
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Replace all divisions by constant with multiplications of its inverse
Change-Id: I05aa0631e8117e7d42da0eaa30077cd230caa919
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
When declaring a constructor, you must use the injected name, not a
template.
qfutureinterface.h:472:37: error: template-id not allowed for constructor in C++20 [-Werror=template-id-cdtor]
Pick-to: 6.6 6.7
Change-Id: I6818d78a57394e37857bfffd17bbbf2313001cbf
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
This reverts commit c23d3ca1f0.
Reason for revert: Update to Emscripten 3.1.50 has been merged.
Change-Id: Ie2082dcc2ee34a6d4e519c143037fda9678be234
Reviewed-by: Even Oscar Andersen <even.oscar.andersen@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
Allows to use it without Qt Widgets or Qt Graphics Views.
Since anyone having imported this through Qt Widget will also be
linking Qt Gui this should be compatible.
qt_halfScaled is also unexported for lack of known users.
Change-Id: I39406dfd4839ed46f8cbfd4651577ab6ece9932c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
It was not setting the value _back_ to 0 when the function ended
and this caused qtbug68821proxyError to fail fairly consistently
on Windows when it was running in the same run.
qtbug68821proxyError was always succeeding when ran by itself so
it was quite odd.
Pick-to: 6.7
Change-Id: Ifa4982f1b10128674081136a30bdab4b0ce7004a
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
When a QDeadLineTimer::isForever() then its remainingTime() is
chrono::nanoseconds::max(), which is exactly representable as
chrono::milliseconds, and greater than 10ms, so the following code
would have done the right thing already.
Let it.
This also removes the duplicate mentioning of the 10ms sleeping
timeslice.
Amends fa296ee1dc.
Pick-to: 6.7
Change-Id: Ibc32d6069b78cd4583df07d0707d98645440b36c
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
...and adjust it to its presence in the new QDeadlineTimer overload,
which sports nanoseconds granularity.
Pick-to: 6.7
Change-Id: Ifa9658ca32c5dc4bef5cf36dec2e452174eebe1c
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The current approach doesn't work correctly because external project
steps that we run on per-ABI build directories look as
'cmake --build <abi/build/dir> --target <target_name>'. When the
project has a single APK this works perfectly fine. But when building
more than one apk this leads to the simultanous build in the same
'abi/build/dir' which causes undefined behavior and concurrent access
to the build artifacts. This is especially sensible when APK targets
have the common dependencies.
The solution is split for two usecases:
- Ninja-like generators, that support job pools.
- Other generator.
For Ninja-like generators we now create job pools per-ABI with job number 1,
this convinces ninja to run only one 'cmake --build' command in single ABI
scope.
For other generators the solution is not that good. We create the dependency
chain between all APK targets and this leads to the build of the unwanted
dependencies. For example if project has apkA and apkB targets, then
apkB_x86 will depend on apkA_x86(assuming x86 is not the main ABI). This is
the only way we may ensure that 'cmake --build' commands won't be running
simultanously.
Fixes: QTBUG-122838
Pick-to: 6.7
Change-Id: I6f48fae57047a29129836168c28e14cde4eaa958
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
CMake's AUTOMOC thinks it has to call moc on this file, because
qrestreply.cpp includes moc_qrestreply.cpp.
Since qrestreply.h doesn't contain anything that requires moc, we see
moc's "No relevant classes found." warning. Remove the superfluous
include to fix this.
Pick-to: 6.7
Change-Id: I48f8da234d6381e2c4f21042055b357f4e67c490
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Currently qtloader.js fetches and copies the files manually. By doing
so we are missing some preproccessing by Emscripten preload plugins.
Use Emscripten API to preload files, so preload plugin for .so can
download, compile and resolve dependencies of imported shared libraries.
This makes looking for dependencies in preload_qml_import.py no longer
needed. Remove redundant code.
Fixes: QTBUG-121817
Change-Id: Idd35f25d5f54123910f813a636407eea23e157cb
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
...in particular when doing multisampling with multiview.
With this the results are now identical with multiview and
multiview+MSAA on the Quest 3. (previously the depth buffer
was clearly broken when doing multiview+MSAA)
Change-Id: Iec3c6af66510ab76cb0591eb8d002aa5855a399e
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Also implement this for OpenGL ES since it can be relevant with tiled
architectures wrt performance.
Task-number: QTBUG-122669
Change-Id: I90dcfe4f5f9edbb8dfb51189d46b89ef2c7a7c06
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>