Commit Graph

10948 Commits

Author SHA1 Message Date
David Faure
fc8f5afc87 QMimeDatabase: fix handling of glob-deleteall
Binary provider:
  It was not possible to remove the first glob in a local override,
  because the mainPattern handling would re-add the first glob back.

XML provider:
  It didn't support glob-deleteall.
  Also, the order of the providers was wrong. We want to pick local
  overrides first, the internal DB has to go last in the list.

Fixes: QTBUG-85436
Pick-to: 5.15
Change-Id: I9a4523f37cd962c730df9a6ed992bd01c075bf03
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-09-22 20:40:45 +02:00
Mårten Nordheim
a07f35409b QDecompressHelper: limit decompression ratio
To avoid potential decompression bombs. This is implemented with just
a simple check that the ratio doesn't pass some hardcoded preset.

Change-Id: I17246f0f43e73280cdb35a8f03d65885f5678ad6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-09-22 19:08:53 +02:00
Alexandru Croitor
a3bd80c08c CMake: Regenerate projects
Clean up the state of the projects,
before changing the internal CMake API function names.

Task-number: QTBUG-86815
Change-Id: I90f1b21b8ae4439a4a293872c3bb728dab44a50d
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-09-22 19:08:53 +02:00
Alexandru Croitor
9959090da8 CMake: Fix failing tests on macOS developer builds
tst_qguiapplication was missing an Info.plist file.
We can't directly reference the tst_qcoreapplication Info.plist
file like the qmake project does, because that breaks ninja
(says multiple rules create the same output file), so use a
copy instead.

Blacklist the qpluginloader loadMachO test when doing CMake builds.
The qmake projects use multiple custom rules to build the macho
plugins, which need to be ported to CMake.

Task-number: QTBUG-86053
Task-number: QTBUG-86792
Change-Id: Iaff2b2d5e9e84a457b4f2ffc011a580388498f00
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-09-22 19:08:53 +02:00
Ulf Hermann
4b57246a61 Remove default ctor for QIterable
MSVC has strange problems with it and we don't actually need it.

Change-Id: I2c443946d52d475208800f310b5f910da165c99b
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-09-22 13:52:19 +02:00
Allan Sandfeld Jensen
5f198584e2 Define inverted QRects consistently
Changes the definition of invalid QRects to be more consistent.
This simplifies the logic, and makes it possible for us to fix
normalized() so dimensions don't change.

The actual API is not changed except for inverted rects.

Only one use-case for the old normalized() function existed,
and has been reimplemented as QRect::span().

Fixes: QTBUG-22934
Change-Id: I29dad2952dc6c8e84a6d931898dc7e43d66780f3
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-09-21 15:04:51 +02:00
Lars Knoll
848927b688 Cleanup API of QMimeData
Do not use QVariant::Type anymore, instead use QMetaType

For some reason, this pushed the qvariant autotest over the limit where
MSVC requires the /bigobj flag, so add that one.

[ChangeLog][QtCore][QMimeData] The signature of the virtual retrieveData()
function has changed and now takes a QMetaType instead of a QVariant::Type.

Change-Id: Ib46773bd731ee2177b1ef74d8162d744be7017ef
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-09-21 14:56:09 +02:00
Liu Yang
0148c6925e QAbstractEventDispatcher: change event dispatcher timer interval to qint64
Resolve remaining Qt6 TODO

[ChangeLog][QtCore][QAbstractEventDispatcher] The signature of the abstract virtual registerTime function now takes a qint64 value for the interval parameter.

Change-Id: I10166ad5cfb455edc404d465a3731ff094a8977e
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-09-21 09:30:54 +00:00
Christian Heimlich
10bc093d4f Add reentrancy guard for processEvents() in QProgressDialog::setValue()
Current implementation of QProgressDialog always calls
QCoreApplication::processEvents() when the user calls
QProgressDialog::setValue() if the PD is modal. For most cases this is
fine, but when using a Qt::WindowModal PD with setValue() connected to
a signal in another thread using Qt::QueuedConnection a reentrancy
issue is present if setValue() is triggered too frequently as the
execution of its previous call may not have finished. If this happens
too many times in a row a stack overflow will occur.

Current documentation notes this potential issue but offers no way it
avoid it while still using QProgressDialog (user must implement a
custom dialog) without resorting to using Qt::BlockingQueuedConnection,
which unnecessarily reduces performance.

Introduces the boolean reentrancy guard "processingEvents" that is
checked before calling QCoreApplication::processEvents() in a modal
PD when setValue() is used. It is set before the first call to
processEvents() and cleared after that call returns. This ensures that
only one invocation of processEvents() is possible from within
setValue() at a time, and thereby minimizes iterations of the main event
loop and eliminates the aforementioned stack overflow condition.

See - https://forum.qt.io/topic/118292/

Fixes: QTBUG-10561
Pick-to: 5.15
Change-Id: Ifa9b91cbb66881981356954ead0906bdc91fab60
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
2020-09-21 03:19:55 -04:00
Ulf Hermann
217a25a6bf QMetaType: Allow registration of mutable views and register iterables
In order to modify a container through an iterable, we need the original
container to be mutable. The iterable, then, is not a conversion of the
container, but rather a view on the container. The concept may be
extended to other types.

In order to facilitate this, provide a set of methods in QMetaType and
QVariant similar to the convert family. The new methods are non-const
and expect the original value to stay available during the life time of
the view.

Change-Id: I363621033f7fc600edcea2acb786820ccba49c86
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-09-19 11:14:36 +02:00
Ulf Hermann
5c808073af Extend QSequentialIterable and add QAssociativeIterable
And add mutable iterators. This requires some refactoring of the
existing iterators.

Task-number: QTBUG-81716
Change-Id: I61b3a3e8c0df5fd449679257a29d9f0c3d19c4f0
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-09-19 11:14:30 +02:00
Mårten Nordheim
107ff4c1d6 Q(Any|Utf8)StringView: move array size deduction feature to fromArray
The constructor taking an array literal will now stop at the first
null-terminator encountered.

And fromArray is introduced which only supports array literals.
Constructs a view of the full size. Explicit so it shouldn't be
surprising.

Change-Id: I1497c33a5c12453a95e87c990abe6335b2817081
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-09-18 23:34:52 +02:00
Mårten Nordheim
bbe7570ddc QByteArrayView: move array size deduction feature to fromArray
1. Make the ctor unable to construct a QByteArrayView from
array literals other than 'char'.
    With the new behavior it would either be (very likely) unintended to
    pass e.g. a std::byte array to the ctor. And it would be confusing
    because you would get different sizes based on signed-ness.
2. Introduce fromArray
    Only supports array literals. Constructs a view of the full size.
    Explicit so it shouldn't be surprising.

Change-Id: Ifdb55eb21057dfe7053b2561bd81e2c9825e9bc6
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2020-09-18 23:34:49 +02:00
Sona Kurazyan
e8843b5610 Remove a leftover of qlinkedlist test
Change-Id: I5f64ef8fc6134e0670606771a48d6f392c0fa223
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
2020-09-18 04:51:34 +02:00
Zhang Hao
3983afd48f QGraphicsView:QGraphicstextitem show error after lose focus
The reason for this bug is that after the TextItem loses focus,
the focusItem in QGraphicsScene is already empty.
When QGraphicsScene responds to the inputMethodEvent event again,
since focusItem is already empty,focusItem will no longer deliver events.

Fixes:QTBUG-85088
Pick-to:5.15

Change-Id: I329054333c2adec133d35318761612aca3afcf0d
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2020-09-18 09:17:37 +08:00
Volker Hilsheimer
18cda2f669 Fix warning about discarded return value in QTranslator test
Use QVERIFY in test functions, and (void)tr.load outside.

Change-Id: I18d2eb3aeaf00f9f2bbe75d0a2d8b12569b541e1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2020-09-17 22:23:37 +02:00
Shawn Rutledge
153dcfbbba Rename is[Begin|Update|End]Event, reimplement in QWheelEvent
These states correspond well with ScrollPhase, and this abstraction
makes it possible to handle wheel events the same way as mouse events
in Qt Quick: on "begin" we deliver to all Items and Handlers until
all points (the only point) are accepted; on "update" and "end" we
deliver only to the exclusive grabber, if there is one, and to any
passive grabbers.

Change-Id: I702dbd4f2c1bf5962eb3dbb9e4b725300a00a887
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-09-17 19:03:24 +02:00
Volker Hilsheimer
861c4d8548 Deprecate implicit QPixmap conversion to QBitmap
It is lossy, so should be requested explicitly, using a dedicated
fromPixmap factory function.

Deprecate the constructor and assignment operator, and make the
constructor explicit.

[ChangeLog][QtGui][QBitmap] Implicitly constructing and assigning
to a QBitmap from a QPixmap has been deprecated, and the respective
constructor has been made explicit. Use the fromPixmap factory
function instead.

Change-Id: I68ce85b26c901415137b664a1db687021d48bae0
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-09-17 13:26:50 +02:00
Volker Hilsheimer
e8b1e7e319 Fix warning from shadowing virtual function
QToolButton::initStyleOption is const. Apply some DRY while at it.

Change-Id: If29a52e828bbc2aa58df2852c4c434545acfef3e
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2020-09-17 13:26:39 +02:00
Volker Hilsheimer
fe3bebbd68 Fix deprecation warnings in tests
Adjust to changes to QIcon::pixmap, QMetaType::type, and
QAbstractItemView::itemDelegate.

Change-Id: I9eb0331ef899131afc86c33f27feeee76331ffc8
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-09-17 06:45:59 +02:00
Cristian Adam
0aa4b33b92 CMake Build: Add qtnetwork docker testserver support
qt_add_test supports now QT_TEST_SERVER_LIST, which will add the test
servers as docker test fixtures.

The docker server will be started before the test is run, and stopped
after the test is run.

Running the tests in parallel is not supported.
Docker tests are currently only supported on Linux hosts.

Task-number: QTBUG-85034
Change-Id: If3cefe05c5dec19c14b05d2fa8b01a0b6d95e259
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-09-17 00:11:04 +00:00
Allan Sandfeld Jensen
8c8b9a4173 Normalize rounding
Change the rounding of negative half values to match standard C++
round, this will also allow future optimizations.

Change-Id: I8f8c71bed1f05891e82ea787c6bc284297de9c5c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-09-16 18:33:58 +02:00
Alex Trotsenko
2180b4c84a QEventDispatcherWin32: create internal window on construction
When QCoreApplication object is instantiated, creation of the internal
message window is delayed until QEventDispatcherWin32::processEvents()
is called or socket/event notifier is registered. But, if the user uses
a native event loop, posted events are not delivered and timers do not
work.

This problem was fixed in a4ac4b3263 for
QWindowsGuiEventDispatcher in the same way. So, the risk of regression
is minimal.

Change-Id: I7bbb721d96046f64d21a7b0e553e46798b37189c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-09-16 19:26:02 +03:00
Shawn Rutledge
a54988c822 Mouse->touch synthesis: send touch event with mouse device
In 4e400369c0 we began to send synth-mouse
events from the touch device, but in the opposite direction it was not
consistent.

Add autotests to prove that it's consistent both ways now.

Change-Id: I7df2328fef224dc1529ca5d27411cd8a5a9c8df9
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-09-16 14:47:45 +02:00
Shawn Rutledge
1fdbbb49d9 Calculate velocity in QMutEventPoint::setTimestamp() with Kalman filter
This functionality was only in Qt Quick in Qt 5.  Now we move it up to QtGui
so that every QEventPoint will have a valid velocity() before being delivered
anywhere.

[ChangeLog][QtGui][QPointerEvent] Every QEventPoint should now carry a valid
velocity(): if the operating system doesn't provide it, Qt will calculate it,
using a simple Kalman filter to provide a weighted average over time.

Fixes: QTBUG-33891
Change-Id: I40352f717f0ad6edd87cf71ef55e955a591eeea1
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-09-16 14:47:36 +02:00
Shawn Rutledge
2692237bb1 Track grab state in QPointingDevicePrivate::activePoints
QQuickEventPoint instances were very long-lived and got reused from one
event to the next.  That was initially done because they were "heavy"
QObjects; but it also became useful to store state in them between
events. But this is in conflict with the ubiquitous event replay
code that assumes it's OK to hold an event instance (especially
a QMouseEvent) for any length of time, and then send it to some widget,
item or window. Clearly QEventPoints must be stored in the QPointerEvent,
if we are to avoid the need for workarounds to keep such old code working.
And now they have d-pointers, so copying is cheap. But replay code
will need to detach() their QEventPoints now.

QEventPoint is useful as an object to hold state, but we now store
the truly persistent state separately in an EventPointData struct,
in QPointingDevicePrivate::activePoints. Incoming events merely
update the persistent points, then we deliver those instead.
Thus when event handler code modifies state, it will be remembered
even when the delivery is done and the QPA event is destroyed.

This gets us a step closer to supporting multiple simultaneous mice.

Within pointer events, the points are moved up to QPointerEvent itself:
 QList<QEventPoint> m_points;
This means pointCount(), point(int i) and points() can be non-virtual.
However in any QSinglePointEvent, the list only contains one point.
We hope that pessimization is worthwhile for the sake of removing
virtual functions, simplifying code in event classes themselves, and
enabling the use of the range-for loop over points() with any kind of
QPointerEvent, not just QTouchEvent. points() is a nicer API for the
sake of range-for looping; but point() is more suited to being
non-const.

In QML it's expected to be OK to emit a signal with a QPointerEvent
by value: that will involve copying the event.  But QEventPoint
instances are explicitly shared, so calling setAccepted() modifies
the instance in activePoints (EventPointData.eventPoint.d->accept);
and the grabbers are stored separately and thus preserved between events.
In code such as MouseArea { onPressed: mouse.accepted = false }
we can either continue to emit the QQuickMouseEvent wrapper
or perhaps QEvent::setAccepted() could become virtual and set
the eventpoint's accepted flag instead, so that it will survive
after the event copy that QML sees is discarded.

The grabChanged() signal is useful to keep QQuickWindow informed
when items or handlers change exclusive or passive grabbers.

When a release happens at a different location than the last move event,
Qt synthesizes an additional move.  But it would be "boring" if
QEventPoint::lastXPosition() accessors in any released eventpoint always
returned the same as the current QEventPoint::xPosition()s just because
of that; and it would mean that the velocity() must always be zero on
release, which would make it hard to use the final velocity to drive an
animation.  So now we expect the lastPositions to be different than
current positions in a released eventpoint.

De-inline some functions whose implementations might be subject to
change later on.  Improve documentation.

Since we have an accessor for pressTimestamp(), we might as well add one for
timestamp() too.  That way users get enough information to calculate
instantaneous velocity, since the plan is for velocity() to be somewhat
smoothed.

Change-Id: I2733d847139a1b1bea33c00275459dcd2a145ffc
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-09-16 11:33:03 +02:00
Edward Welbourne
7a67c01a49 Use qint64 for value of that type in tst_QDateTime millisecond tests
The test was previously using int; I shall be wanting to add tests
that exercise the bounds of qint64. Clean up the layout of the
test-row additions in the process of making a trivial change to them
all. Also const the QFETCH() types so we catch any use of non-const
methods on the values fetched.

Change-Id: I4b0187de71f5f14b39b4eabe8afd12a196f73d23
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-09-15 21:53:34 +02:00
Jarek Kobus
6ca50b79bc Fix tst_QElapsedTimer::elapsed() flaky test
Instead of using imprecise QTest::qSleep() to estimate the
elapsed time, we trigger a single shot PreciseTimer and
gather all the data in lambda. We wait for lambda to be
executed - we give it twice as much time as is in theory
needed. Afterwards we verify all the data collected in lambda.

Task-number: QTBUG-82903
Change-Id: I0147b7cd2aaf4bf58a216caff167d2db8712541a
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2020-09-15 21:07:00 +02:00
Alex Richardson
44920e7fb2 CMake: Fix building with -DQT_FEATURE_gui=OFF
Some CMake files currently assume that QtGui is always enabled and we
get a configure-time failure without these changes.

Task-number: QTBUG-86053
Change-Id: I28e32c180c32221f32519017bac6b518a19d5983
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2020-09-15 20:05:32 +02:00
Alexandru Croitor
9ce8281417 Fix tests to build in a no-widgets configuration
The qfilesystemmodel.pro was recently moved to the gui tests subfolder,
but it uses widgets inside. Skip it in a no-widgets build.

Amends fb9ec8ad44

Task-number: QTBUG-86187
Change-Id: I955556ffddad483d4c25602ae126b8c2433091b2
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2020-09-15 15:55:47 +02:00
Ulf Hermann
1162b4bfc9 Add a QMetaAssociation
This requires refactoring of QMetaSequence, as they share a lot of
common functionality. QMetaAssociation provides a low level interface to
an associative container.

Task-number: QTBUG-81716
Change-Id: I273e00abd82f1549ba8803c323d82aa3a2d12ded
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-09-15 15:55:46 +02:00
Volker Hilsheimer
757a9c21c1 QStyleSheetStyle: Fix push button hit testing with padding
Amends f9940b15f7, which
amended 6e1d70ae12.

The bevel of the button is not defined by the contentsRect, but by the
borderRect that the stylesheet style calculates.

Change-Id: I9a0d5bf29a06ce2270014f0d144e33cc3a1a7473
Pick-to: 5.15
Fixes: QTBUG-86587
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2020-09-15 11:32:09 +02:00
Assam Boudjelthia
588cbca5b7 Tests: fix json test for Android
test.bjon file doesn't exist, however, it's still included in json.qrc.
That causes the test to fail on Android because it's using that resource
file.

Change-Id: I1e93076069073a1a621459a7d90aec5c0c03f768
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-09-15 09:32:09 +00:00
Assam Boudjelthia
3bab2d234e Tests: fix qlogging build fail for Android
The macro BACKTRACE_HELPER_NAME is defined inside a block with
#ifdef __GLIBC__ which is not defined on Android, thus causing the test
to fail on Android.

Change-Id: I55e9b3e3bae2da182481239ad88107c36e3bd438
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-09-15 09:32:08 +00:00
Mitch Curtis
d12a5da678 Blacklist tst_QTimeLine::interpolation on Windows in general
Task-number: QTBUG-61037
Change-Id: Ie44c7355e2aefbbd16cef95f1a093302bd789e45
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2020-09-15 11:32:08 +02:00
Lars Knoll
e96a311334 Use UTF-8 when converting 8 bit data in QTextStream
This was overlooked when doing the conversion to use UTF-8 as the
standard 8 bit encoding for text.

Fixes: QTBUG-54942
Change-Id: Ib7b1b75b4d694648ab7143f6930b6bb1dcad19c9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-09-15 08:13:27 +02:00
Lars Knoll
cb78972e37 Remove deprecated API
And replace it's few remaining usages

Change-Id: I2dfbbaa5259acfece028606bef1e872c5692f9fe
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-09-15 08:12:39 +02:00
Lars Knoll
79e0374143 Remove the SAX parser from QtXml
It has been deprecated and will live in qt5compat from now on.

Fixes: QTBUG-86480
Change-Id: I3744c7cee058d51d0fce633a174ab1a0f9235d2c
Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
2020-09-15 08:12:20 +02:00
Edward Welbourne
0aaebc3378 Trim trailing 0s from QTime construction, where neither use nor ornament
The seconds and milliseconds default to 0; so omit them when they're
zero, unless there's nearby code that contrasts nicely with them.

Change-Id: Iea049015e976f5a5209fe87a2cbfdae9de49a559
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-09-15 02:47:28 +02:00
Mitch Curtis
fb65b32d76 Add qHash implementation for QPoint
[ChangeLog][QtCore][QPoint] Added qHash() implementation.

Change-Id: I65332e7aafab53af40a6e11457b9b457196d584c
Fixes: QTBUG-86457
Reviewed-by: Thorbjørn Lindeijer <bjorn@lindeijer.nl>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-09-15 02:46:40 +02:00
Mårten Nordheim
2253d5eca6 Schannel: Properly handle request for certificate
Certain servers, like smtp.live.com, will send a request for a
certificate even though they don't require one. In Schannel this
manifests as a warning/info status (SEC_I_INCOMPLETE_CREDENTIALS).
In the cases where it's not needed we should suppress the warning and
try to connect anyway, which is done by calling
InitializeSecurityContext again when we get the status.

Pick-to: 5.15
Change-Id: I3c48140f2949d8557251a49a2b66946da9395736
Reviewed-by: Joshua GPBeta <studiocghibli@gmail.com>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-09-14 17:14:00 +02:00
Edward Welbourne
533df067e9 Purge Q_{STDLIB,COMPILER}_UNICODE_STRINGS
These were now always defined, hence redundant.
Leave the #define in place so that we can verify we actually do always
define it, in a #else of an existing #if check on it.

Change-Id: Iea4c3dbc8f9982268bcf81da5ef17fe2ebf5c462
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-09-14 09:47:51 +02:00
Edward Welbourne
e926e68f50 Don't use default-constructed QTime() where QTime(0, 0) is intended
QTime() is invalid. Only the seconds and milliseconds are optional,
for valid times. Use startOfDay() for zoned times, QTime(0, 0) for
fixed-offset ones.

Change-Id: I3b65d5c3733ac83dc3a6c214859c3f56a480bb94
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-09-14 09:47:50 +02:00
Edward Welbourne
184e385aa2 Remove some unused private methods and replace another
Nothing used defDateTime(), nothing but it used defTime().  The only
other use of defDate() were from one test, which might as well make it
a local variable.

QDateTime's default is invalid, making invalidDateTime() redundant,
and the invalidDate() and invalidTime() it called had no other users.

Change-Id: I0e07ee58478bfe8ba680eafb52e2f73a962edd33
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-09-14 09:47:50 +02:00
Lars Knoll
2c698a6d07 Fix compiler warnings about missing overrides
Change-Id: I52bf9fe45607f4a99cafa441bd78dfe5f7adb0e1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-09-13 21:03:31 +02:00
Andy Shaw
65afcef217 Interbase: Handle EXECUTE BLOCK statements correctly
Since an EXECUTE BLOCK statement can have a mix of ? and :var syntax
then a special case for this needs to be added so that it does not try
to convert the :var parts into positional placeholders as they need to
kept as-is when preparing such a statement.

Pick-to: 5.15
Fixes: QTBUG-83152
Change-Id: Iff891207ad6dea1681a1b3a335acbbbb668b465d
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2020-09-13 16:39:06 +02:00
Lars Knoll
557623cc4f Rename QLibraryInfo::location() to path()
As per ### Qt6 comment. Also rename the LibraryLocation enum
to LibraryPath.

Change-Id: I556025a19c5bcdf2ff52598eaba32269522d4128
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-09-12 23:35:56 +02:00
Lars Knoll
14dece57e9 Remap QMetaType ids to create more space for builtin types
We were starting to run out of space for builtin core types.
Remap the type id's to create lots of additional space.
We now reserve the first 64k id's for Qt, and have 16k id's for
Qt Core. That should hopfully be enough for a while ;-)

Fixes: QTBUG-85914
Change-Id: I0dab6bf23652e46a9557d9b38af7990b68c572b6
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
2020-09-12 23:35:29 +02:00
Tor Arne Vestbø
55687924e3 cmake: Re-enable qcoreapplication and qtimer tests
They were disabled in ad0e3e26fa,
but that was probably accidental.

Change-Id: Ia9cbccfbeecfe84768c3465f5699ed44b7f932a5
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-09-12 15:11:52 +02:00
Ulf Hermann
ef93fdeb09 Provide methods for adding values to a sequential iterable
Provide functionality to add and remove values, so that you can use a
sequential iterable as stack or queue if the underlying container
supports this. To this end, provide a way to specify whether the
value should be added or removed at the beginning or the end of the
iterable.

Change-Id: If63d302f3ca085e56d601116ce4dfaa6b94a0c4f
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2020-09-12 09:12:26 +02:00