We won't shrink on manipulation when we have memory allocated, but it's
a good idea to create a non-shared copy if we can. It's an unlikely
scenario, though, because it requires the QDateTime object to have been
set to a large state then manipulated back into a small state.
Change-Id: I06bae9392f534e45b3f1ffff144dfee755bafa01
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
The file has an organization, so let's follow it. This commit has no
other changes besides moving code around.
Change-Id: I06bae9392f534e45b3f1ffff144e0b1f6dd72622
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Well, maybe not for so long: we may want to revisit it for Qt 6. At the
very least, we should enlarge the size of QDateTime on 32-bit system so
that they too can benefit from the optimization.
With this optimization, on 64-bit systems, the most common uses of
QDateTime now no longer allocate memory at all. The range is slightly
reduced from 584,554,049 years to 2,283,414 years around 1970. The other
drawback is that calling QDateTime::offsetFromUtc() on a localtime now
needs to recalculate the offset, instead of using the cached offset.
(QDateTime::toMSecsSinceEpoch() didn't use the cache).
Change-Id: Id5480807d25e49e78b79ffff144a8b2c9af91814
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This commit moves QDateTimePrivate functions setTimeSpec, setDateTime,
getDateTime, checkValidDateTime and refreshDateTime outside the
class. Like the previous commit, this is done in preparation for the
"Short QDateTime Optimization" as the "msecs" field will be placed in
the short data, if possible.
By making them file-level static, this also improves code generation, as
the compiler doesn't know whether it has to emit the class members for
out-of-line use or not.
Change-Id: I06bae9392f534e45b3f1ffff144df4d73cbc9184
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This commit changes most accesses to the d->m_status (including
d->spec() and d->setSpec() uses) to use new static functions. This is
done in preparation to the "Short QDateTime Optimization" as the status
byte will be kept in the short data.
Change-Id: I06bae9392f534e45b3f1ffff144dbd795d03227a
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Instead of using a macro for maybe passing an extra parameter, pass the
d pointer and let the function decide what to use and what not to use.
Change-Id: I06bae9392f534e45b3f1ffff144dbeb68a30cb48
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
They're superfluous, since b491fab02a
removed the distinction between null and invalid. Just use the
isValidXxx equivalents.
Change-Id: I06bae9392f534e45b3f1ffff144db9badad010fd
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
We're going to have to stop using QSharedDataPointer because of the
upcoming short-datetime-optimization. By dropping the inheritance, I am
also able to rearrange the members and remove the padding hole that
existed.
The second padding hole was removed in the previous commit, which merged
two 32-bit fields into one.
On 64-bit systems, there's no way around a remaining 4-byte hole
somewhere due to the odd number of 32-bit members. I chose to leave it
in the middle of the struct, before the m_timeZone member, instead of
tail padding, so that the layout of the first members structure are the
same in bootstrapped and non-bootstrapped builds. That should help
debugging the bootstrapped tools in Qt Creator. It's also now the same
in 32- and in 64-bit systems.
Change-Id: Id69569111e7d4e619e22ffff144b1fba708885f7
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Storing them in a single byte is the first step towards the Short
QDateTime Optimization.
The bump in the "private version" by 10 is to accommodate possible
changes in the Qt 5.7 branch.
Change-Id: Id5480807d25e49e78b79ffff144a59420457bcf0
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This enables creation of autotests which use touch events, without using
private API.
Task-number: QTBUG-44030
Change-Id: If8fe89f8423aaafd9e6501e231c33580b9365eb8
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
This was no longer used and always false.
Change-Id: I981055e6cc736cfe3432914c173c8b3edc31b46e
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
This works only on Aarch64, because the vaddv instruction is only
available on 64bit ARM. Doing something equivalent on 32bit ARM has the
high chance to run into micro-architecture differences: on an Cortex-a8,
transferring a single vector element from NEON to the regular CPU
registers takes 20 cycles(!).
Change-Id: Iccbfe84da82abb9b10f3f3dc35c8b950df69e251
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
The problem was that in some cases, the cursor position was used to
calculate the anchor rectangle instead of the anchor position.
This caused selection handles to be shown at the wrong position.
Change-Id: I8d866b644fc3c4d530529b7f468d16ae1088cd98
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
GetTickCount64 is available on Windows Vista and WinRT. Since Windows CE
is no longer supported on dev, we don't need to dynamically resolve the
function anymore.
What's more, QueryCounterFrequency is documented to never fail since
Windows XP, so we haven't needed GetTickCount64 for years (no clue when
we dropped support for Win2k).
Change-Id: I115db302eb114bed8cd1fffd14558a81353d2aed
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The implementation used the QString::compare_helper(QChar*, int, char*, int)
overload, which, however, interprets the rhs as a UTF-8 sequence, not as
Latin-1.
Fix by using the (QChar*, int, QLatin1String) overload.
Extend the test to cover this case, too.
Change-Id: I59b26d63d0caec036b80ef8818c75d0cebe519d2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
As in 032efc2cb2, which added the
API-symmetry test, define the missing relational operators
locally in the test harness until they are fixed in the library.
Change-Id: Ic2688e6b6b3e028a9c29f1a5eb01058375ef3fe9
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Some constructors were added, but the comparison operators were missing.
The STL has them, so we ought have them too.
Change-Id: I030c14a3b355988f509716b4b1b1a835b3ab9481
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Makes things symmetrical with the windows configure and cleans
up the logic in ssl.pri
Change-Id: I4a373afe78e904de7d04baea38c250ff0c9d5062
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Some methods were already marked, this adds noexcept to even more methods.
Change-Id: I420bb1cc985058c7976ce3a1f251fadbba7ddceb
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
This makes the hash algorithm play nicely with qDebug.
Change-Id: I6db651cd5c73e8be65442dd68d6b865dcb975f4c
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
The \fn command to specify the function signature is not needed when
the documentation precedes the function itself.
Change-Id: I9de0d1ae73af443f0beded77538d62cea85b5e72
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
This is not being used anywhere anymore.
Change-Id: I4d8ded9e9f6c28b594930bd1ea9347ba2db8a2e8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
CFG_WEBKIT is never set to anything (removed in 1b716724f, 2012),
so simply remove the dead code path.
Change-Id: I63ef7cc6a2bf2fbf9ceb63f1a54e28882ec6e01e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Old versions of OpenBSD and NetBSD mkspecs had the QT_AOUT_UNDERSCORE
define declared in their qplatformdefs.h to support systems still
using a.out format. As those systems are long obsolete and the defines
are removed, remove the obsolete code, too.
Change-Id: Ia9e2f2d6de81fb182ef4c995b29062afe570b8b9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
- This is more readable in my opinion.
- Fixes the bug where configure script would fail in certain
cases for CFG_XCB="auto" by complaining of missing xcb
dependencies. "auto" should not fail, in case of missing
dependencies it should set CFG_XCB to "no".
- Error messages are more accurate.
Task-number: QTBUG-47624
Done-with: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Change-Id: I0572be4ad441931b7c771246bbd70f819d810d22
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Now that the minimum deployment target (and thus SDK) is 10.9 for OS X
and 7.0 for iOS, all code paths affecting platform versions lower than
the aforementioned are removed.
Change-Id: Id985c7259c4ac069319d88f2c29c9559ae9e8641
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Instead of placing the assignment of false in the impl() function, move
it to the inline QSlotObjectBase::compare() function. That means it's
assigned in one place (two, actually, inside qobject.cpp), instead of
for every static member, non-member or functor we connect or disconnect.
Change-Id: I87e17314d8b24ae983b1fffd1453623ad4c4dcb2
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
I don't think anybody would do this today.
Change-Id: Id4eb69fb0a38bbd2a28099b66896e55d2b8c9022
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
the test should be executed in every case. configure's use of pkg-config
implies that intention.
Change-Id: I722c88da5c2a0f2cc1f926d796093b78cd79bea8
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
This is needed for generic property access to work correctly.
Change-Id: I76613ace730985001fc5fe1bb1b3fa5c6a8bdf70
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This allows external integrations to be developed against it.
Also uniforms all class names as QEglFSFoo.
Change-Id: I72ff37c0fcdf1ccd37110b4c36874d6c99b2e743
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
This commit also reverts fecaa6aae8.
The Microsoft documentation says _beginthreadex and _endthreadex are
used to initialize the C/C++ runtime and are necessary when linking to
libcmt(d).lib (that is, when using the -MT or -MTd options). For regular
builds linking against the .dll runtime, there should be no impact.
Inspection of the CRT source code which gets installed with Visual
Studio or Windows SDK proves that.
It's preferable to use CreateThread directly as _endthreadex will try to
call FreeLibraryAndExitThread, which can cause a deadlock if we try to
wait for the thread to exit from a global destructor.
For -MT builds, since there can be no DLLs, it's not a problem to
continue to use _beginthreadex and follow Microsoft's recommendation.
Task-number: QTBUG-53031
Change-Id: Id5480807d25e49e78b79ffff144af62c3c59dfe0
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Those enumerations and their associates are being deprecated,
and so the backing of their replacements cannot rely on it.
Change-Id: Id544aa757313065f435b5e66cd0475975cd5b825
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Pass the name as parameter to the constructor of QTemporaryFilePrivate
and use delegation in the convenience constructors.
Change-Id: I4087600b804fe22910b4985a59a02547f54a6acd
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
We need to get QtWayland in the CI asap, and that's why we need to
blacklist every test that fails in the CI without really looking what's
the problem behind it. Sorry for that!
Task-number: QTBUG-53786
Change-Id: I64102c35ad879df07a692a112163f318ffb2f658
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
Remove every usage of the _WIN32_WCE macro outside of 3rd party
source code directories.
Change-Id: Ia7e859bd6dcaef10c66674612c8e440f9a2dee56
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
QMAKE_SWITCHES (dead/broken since d1c10615e, 2012) and QMAKE_VARS
(dead since 389f8b039, 2006) were set, but never used in configure.
SUPPORTED was defined but never used since 018aff49cd (2003).
Removed dead command line arguments -depths (qws-related, dead since
f220f99a6d), -arch, -host-arch (both 921e5193), and -qconfig (710ec5ca).
Change-Id: I6bbed56c538cdd74b68432e7fd1e51177f79cc85
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>