comply with the api version used by default with androiddeployqt and
in docs. Google play also requires api 29 as minimum.
Task-number: QTBUG-90943
Pick-to: 6.1 6.0
Change-Id: I05e2a90b4d7f2120b0198e3fb7b8b1b2398eba93
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
A few formats were not treating the input QColor correctly. Fixed and
added more exhaustive test.
Pick-to: 6.1 6.0 5.15
Change-Id: I872aeeb45e518f9a34b4ac35642264821f9927f2
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
.. instead complete size for the affected range. The complete size was
calculated before for every call of createSectionItems() and then the
function calculated the size per section back for no reason.
Passing the sum of all sections is therefore not needed and may lead to
an integer overflow for big datasets.
Task-number: QTBUG-88728
Change-Id: I8af0b0c3e97021ff0637fe1ee3ca3adfa23a2d0e
Reviewed-by: David Faure <david.faure@kdab.com>
Include Qt::TimeZone as a possible spec, use a \list for the spec
values. Incidentally use the public QTimeZone::abbreviation() instead
of digging around in its privates to achieve the same effect.
Change-Id: Ibabbeac9b085b4d09de46bda911356c20faadae8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Instead of an XFAIL, actually test what we expect will happen for the
test, namely that the milliseconds will be lost. In the process,
verify that milliseconds since epoch also matches what was expected,
change an "expecting empty" condition to check for the "invalid"
test-case to which it's actually relevant and note that this test-case
shall need amended when we update our ISODate support to the 2019
update, which extends the year range.
Task-number: QTBUG-56552
Pick-to: 6.1 6.0 5.15
Change-Id: I680aa31ee0dcc8fadabb5d4cd6c083a8afd48573
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The test verified that a LocalTime's time since Epoch changes when the
system time-zone changes. This works when the QDateTime object is in
short form and recomputes its offset from UTC every time it is needed,
but fails with a pimpled QDateTime, as this caches its offset from UTC
when it is created, saving the recomputation which - in the far more
usual case where the system time-zone does not change in the lifetime
of a QDateTime object - would normally produce the same result.
Changed the test to use a newly-created QDateTime constructed with the
same parameters, which doesn't have the cached out-of-date knowledge
of its zone offset. Removed the XFAIL. Made the test data-driven and
added test-cases: one so close to the Epoch that it should be short
even on 32-bit systems, one so far that it's pimpled even on 64-bit
systems (used in reproducing the issue in order to debug it).
This then revealed that Android 5 doesn't seem to support the POSIX
zone IDs used by this test, so it now verifies that LocalTime has the
expected offset from UTC after zone changes, QSKIP()ping if not.
Documented that the behavior of LocalTime is undefined after a change
to the system time-zone. Cleaned up the existing doc of Qt::TimeSpec
in the process.
Fixes: QTBUG-89889
Pick-to: 6.1 6.0 5.15
Change-Id: I1058f47a1ff3ee1c326f3579ac80bd8bab242e28
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This reverts a limited part of commit ad2da2d27a
that deleted .pro files for snippets compilation.
Some .pro files which contain snippets used in the documentation
itself should be restored.
Task-number: QTBUG-90483
Change-Id: I1b03833c8ff17b5fca43a5b6c5417e8545b1711b
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
A recent patch made it so we don't need to keep patching the includes
of the sources. However it changed how we use double-conversion ourselves
which meant that system installs would no longer work. Keeping an extra
directory and adding another INCLUDE_DIRECTORY fixes both of our problems.
Amends dca74b45a3
Fixes: QTBUG-90961
Change-Id: If17aa1670535867343374eec846055441592f36b
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Use {} instead of \, this fix a badly generated block of text.
Task-number: QTBUG-89632
Pick-to: 6.1
Change-Id: Ia4aad4c06285eb016a092f4340669fcbef1a6780
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
The operation is sketchy for a number of reasons:
1) Mathematically, it doesn't make sense. The code interprets the
QVector3D as a point, extending it with w=1, and uses it as a
row vector. But similarly, the vector could be intepreted as a
directional vector, with w=0. No semantic is "better" than the
other.
2) QMatrix4x4 is not meant to be post-multiplied. Granted,
one could use a QMatrix4x4 as arbitrary storage for 16 floats,
but QMatrix4x4 builds itself to be always *pre* multiplied
(e.g. translate changes the 4th column, not the 4th row). We
can keep post multiplication for the general case if we do it
against a QVector4D, but I don't feel that we should support it
also for QVector3D.
[ChangeLog][QtGui][QMatrix4x4] The multiplication operator
(operator*) between a QVector3D and a QMatrix4x4 has been deprecated.
User code needs to extend the QVector3D to a QVector4D first
(by specifying the intended w coordinate), and then multiply
the QVector4D by the matrix.
Pick-to: 6.1
Change-Id: I41b64d8ab7eb6126dc4c49fe29cf3f1b7afc7987
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Addressing feedback that came after the reviews
ended from both bot and people.
Added CLASS_NAME to the CMakeLists files for the plugins so that
cmake can generate the correct import.
Fixes: QTBUG-91061
Change-Id: Ib3f1e863100c1c421a6c0a4081b1d40696d67b23
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
In a small example program using HTTPS (on Windows with Schannel) >40%
of the time was spent initializing the backend, attempting to find the
time zone used in various certificates.
By adding an early check to see if the requested time zone is UTC (or an
alias ('Z')) we can skip most of the lookup that was required.
In the example program this cut away ~200ms of a total of ~550ms.
Change-Id: I4d29568653e02b64feebbf329469899eb7be1494
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Cuts off 1 second from the timezone test locally
Change-Id: I184728e97bcd65ca0362df4c26a3407576e12dfb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
The operation does not make sense at the "fundamental" level
for these classes (algebraic, in this case), so it shouldn't exist.
It's also a semantic trap:
* it interprets a _vector_ as a _point_ instead (the vector gets
1-extended in 4D)
* after the multiplication, it gets perspective divided.
These semantics do not belong to operator*.
operator*(QVector3D/QPoint(F), QMatrix) will be tackled in a next commit;
we don't have a straightforward replacement for it.
Drive-by, document that map() interprets vectors as points.
[ChangeLog][QtGui][QMatrix4x4] operator* between a QMatrix4x4 and a
QVector3D, QPoint, or QPointF has been deprecated in favor of map()
and mapVector().
Pick-to: 6.1
Task-number: QTBUG-89708
Change-Id: Iad78d6eb68cc8cdc3ac16b1635c4d3b522c95213
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Add a private function to handle checking/clearing and deleting the
local reference to jobject before returning a QJniObject.
Task-number: QTBUG-89633
Pick-to: 6.1
Change-Id: I0ea28c8ba4da0bfc1e341c6b4c1f61fecfec87a6
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
The initial implementation and the commit
c00ab6f8ea was wrong:
* env->findClass() in fact returns a global reference, and in any
case we shouldn't be calling that, instead QJniObject would be
enough.
* The size param provided to env->RegisterNatives was wrong.
* A test for registerNativeMethods() is added to ensure such break
is not repeated again.
Task-number: QTBUG-89633
Pick-to: 6.1
Change-Id: I4d3a6a9270755f465c40add25521fb750dd4de0a
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
A typical Qt application, such as a QML application, is a single full
screen QUIView, containing all of the granular controls of the UI.
The view accepts first responder status, so that we can pass on text
input to a possible text field inside the UI. That however triggers iOS
to bring up the editing interaction menu whenever the user taps with
three fingers, as iOS can't know that only parts of our view is suitable
for interaction.
To mitigate that we override the editingInteractionConfiguration getter
of the view, as documented, and dynamically report the correct enablement
based on whether we have an active focus object that accepts input.
This works because iOS queries the getter from the three finger tap
gesture recognizer, before showing the menu.
Change-Id: I0874340c42e437e1d7251896993f2eafe122f09e
Fixes: QTBUG-89735
Pick-to: 6.0 6.1 5.15
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Allow passing command line arguments such as -AppleLocale, that override
user preferences for the test process.
Change-Id: I9e58e91fcb01a36f9d6c64ef52369308be5e95b5
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
The system locale of a macOS application is not affected by environment
variables like LANG. Yet, we were reporting a name determined from
environment variables as the fallbackUiLocale(), rather than one based
on the language and country of the actual system locale.
This lead, via the usual CLDR likely-subtag fallback, to claiming the
system locale's name, language, script and country were those obtained
from these environment variables, even when they were at odds with the
actual locale being used by the system, which was being used for some
queries.
Worse yet, any data not supplied by these queries was being obtained
from the same CLDR locale as the name, making for an inconsistent mix
of locale data.
While we cannot avoid the likely-subtag fallback step for fallback
data, it is more consistent to use the actual system locale's name
as start-point for that fallback.
At the same time, add support for the language, script and country
queries, so that the QLocale::system() describes itself faithfully,
instead of claiming to be the locale that results from that fallback.
If we want to support LANG or other environment variable overrides,
they should be handled by the layer above the system locale, by
changing the default locale of the Qt application, as if the user
had called QLocale::setDefault().
[ChangeLog][QtCore][QLocale] QLocale::system() on macOS no longer
pretends to support LANG or other environment variables as overrides,
as this is not a feature that the system locale on macOS supports.
To override the locale of an application, use QLocale::setDefault(),
or pass -AppleLocale en_US.
Fixes: QTBUG-90971
Change-Id: Ibdaf5ff9a2050f61233a88eabf3c29094f7757f1
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
The standard user defaults are initialized from an ordered list of domains,
as documented by NSUserDefaults.standardUserDefaults. This includes e.g.
parsing command line arguments, such as -AppleLocale "fr_FR", as well as
global defaults. AppKit does this during [NSUserDefaults init], which in
turn initializes the locale returned by CFLocaleCopyCurrent() and
NSLocale.currentLocale.
If those functions are called before NSUserDefaults does its thing the
locale will already have been created, and the logic in NSUserDefaults
won't have any effect -- nor is there any way for us to set/override
the locale after this.
To ensure that the -AppleLocale command line override is available through
the lower level Core Foundation preferences APIs, we need to initialize
the user defaults as early as possible via the Foundation-API.
Change-Id: I906a5a8b05a7216e60020ec45f8da725b801d2c5
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Previously the only test was that it produced no warnings,
if anyone paused to read the output to notice them.
Change-Id: I225ca99c7ec316186702c0fdb355585374c014a4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Normal Android apps require Qt::Gui dependency and since tests don't
need to handle any special cases for an app without Qt::Gui, let's add
it by default.
This also will allow us to remove some workarounds done on CI side to
run tests for Android.
Fixes: QTBUG-90870
Pick-to: 6.0 6.1
Change-Id: I845650c17a1b73e4c4977043f863ec44e50f06c3
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
We must not guess the compiler from the -platform argument if one of the
following holds:
- the CXX/CC environment variables are set
- the CMAKE_CXX_COMPILER/CMAKE_C_COMPILER variables are passed
Pick-to: 6.1
Fixes: QTBUG-90914
Change-Id: Iff7a0e7b8857f77333f1705f118d7952af5234ba
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
The attempt to call target_link_libraries on OpenSSL::Crypto failed when
this target was added as UNKNOWN library by FindOpenSSL.cmake.
Instead, set the INTERFACE_LINK_LIBRARIES property directly.
Pick-to: 6.1 6.0
Fixes: QTBUG-90925
Change-Id: Idbc1379c89480225fc7a8d417416ed20404a1122
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Lines smaller than 1e-12 would not be drawn even when scaled up.
Pick-to: 6.1 6.0 5.15
Fixes: QTBUG-75630
Change-Id: I8f261876c325b60f61e95ca2e5fde2cb227d4cba
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Qt CMake uses a fake_prefix as install dir when running tests instead of
the main qt install path, this will throw androiddeployqt off since it
expects the real qt install path which has gradle and java sources.
Fixes: QTBUG-88579
Pick-to: 6.0 6.1
Change-Id: I6580470840ae14d4a4a68a95f217b30408d7ab44
Reviewed-by: Craig Scott <craig.scott@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
When a feature is set in qtbase and is later set to another value,
an error occurs and an error message is given. This patch
changes the error message to contain both the preexisting and the
new value
Change-Id: Ifa9fc1f06bfde40e8fd5dfdf30165d4393abbd28
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This prevented androiddeployqt from properly deploying libraries which
specify init class via the ":" delimiter.
Pick-to: 6.0 6.1
Change-Id: Ib9cfa7edc864d7d540577df22284ceb9714a2511
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Andreas Buhr <andreas.buhr@qt.io>
Somehow QList::fill(t, newSize) introduced a regression in Qt6:
when newSize < QList::size() we should resize to the newSize.
This is aligned with QVector::fill() in 5.15 and std::vector::assign()
While 6.0 is already out, picking it to 6.0.x could save someone who
haven't migrated yet as well as fix some accidental bugs in Qt's code
[ChangeLog][QtCore][QList] Fixed QList::fill() regression introduced in
6.0: calling fill() with size < current list size wouldn't truncate the
list
Fixes: QTBUG-91042
Pick-to: 6.0 6.1
Change-Id: Ic166e2c5e42390b61df1030f7c705e344433f7f2
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Keep the c++2a feature, but make it an alias for compatibility
purposes.
Pick-to: 6.1
Change-Id: I6f153109be84659806f1b7a57a88a187875166d8
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
PostgreSQL package delivers several header files such as pthread, zlib,
zconf, uuid, etc. within Windows installation package. The headers are
exposed to the compiler by PostgreSQL include paths and have different
versions. When compiling PCH of the QPSQLDriverPlugin plugin, MinGW uses
the pthread.h header from the PostgreSQL include paths, that cause an
error related to pthread implementation mismatch.
Disable PCH for the QPSQLDriverPlugin plugin, when using MinGW.
Fixes: QTBUG-90850
Change-Id: I0be91bbefe37731acb2658d679b5b644ef552b23
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
They cannot be built due to QTBUG-91033.
Task-number: QTBUG-91033
Fixes: QTBUG-88758
Pick-to: 5.15
Change-Id: I6f75cac1b20208c7813addd1ebe578c9edae295a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
gcc 9 consumed enourmous amounts of memory building the test, regularly
dying on a VM with 4GB RAM. Splitting it up helps.
As a drive-by, use inline static variables, and rename the header used by
other tests to tst_qmetatype_common.h.
Change-Id: Ib716d8e3506aac6c87845e57b04cb1a4f6c68387
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>