And use it to clean up the reimplementations in Qt DBus.
Change-Id: I8e3fe35e8db6405cbcbfb45b42a8f2efecc1cef0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Put all connections that get disconnected into a singly
linked orphaned list.
Whenever the refcount on the connectionData drops down to
one, this list can safely be cleared, even with the planned
removal of locking in activate().
Use an id integer in the connection to acoid activating newly
added connections.
Fixes: QTBUG-72649
Change-Id: Ide3d116ae7fc9ca497598c1c2b71d43b4339c92d
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
The DNS entry for the host has changed, dig answers with dns.google,
not with google-public-dns-a.google.com. While developing a proper
fix to the test, blacklisting this particular lookup allows
integrations to pass in the meantime.
Change-Id: Id37da6b24554803bf4e2c84be5b949ded40566e8
Reviewed-by: Kari Oikarinen <kari.oikarinen@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Avoid using inline assembler
Task-number: QTBUG-72716
Change-Id: I696efb5a787416eb4fc5ba3a250461aaa9a4afc2
Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io>
Do not categorize the license anymore as 'Public Domain', because the
actual text is not explicit on whether it allows modifications. Instead
show the original license text.
Also remove the Homepage link, which now just displays (arguably
outdated) information about patents.
Finally, do not misuse the "Version" field for metadata information,
use the newly introduced "PackageComment" field instead.
[ChangeLog][Third-Party Code] Changed classification of the wintab
license from Public Domain to Custom.
Fixes: QTBUG-74453
Change-Id: Ibae36be1deee3b9c498c45d03ed741c3d5ff630c
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Otherwise it can happen that we pick up the tool for the host system,
which will break compilation.
Users can still pass
-psql_config /path/to/pg_config
or
-mysql_config /path/to/mysql_config
manually.
[ChangeLog][QtSql] When cross-compiling pg_config, mysql_config
are not looked up in PATH anymore. Pass -psql_config path/to/pg_config
or -mysql_config path/to/mysql_config to explicitly enable PSQL or
MySQL in this setup.
Fixes: QTBUG-73565
Change-Id: I35ff32322bac69f1575ce6c846a56ac2ae3b8d55
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
The test was added as commented in 2012, before it was not even
mentioned in the pro file. I guess it was never run.
Change-Id: Ib787c7811ab4f7f32a99869167cde2e12dbe3156
It is constantly passing according to grafana.
Change-Id: I4953cd54e27adde8dad79e9a0f025960802e6c7a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Fixed the other tests that used the methods, so that they now get the
data from QLocale instead; and added the missing feature #if-ery, as
these are textdate methods.
Change-Id: I896f356bdf88037db23590c71d0aeb0b8722bfa7
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
The code had min and max of an integral type and tested min + min / 2,
which naturally overflowed, provoking a compiler warning. The test
was meant to be testing min - min / 2; but min is even, so this is
just min / 2; and doubling that won't overflow (which is what the test
is about). As it happens, min + min / 2 is in fact max - max / 2,
which *would* be a good value to test, since max is odd. So add a
test for that and remove the broken test.
Change-Id: Iec34acbf0d5d7993d41ff844875dc10480b8eb1f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
In particular, document the mis-behavior it takes for granted in one
test. Renamed some variables so that they're visually distinct from
one another and actually mean something intelligible. Renamed the
sub-tests to say what's actually happening. Reading the test output
now at least makes it possible to see what's wrong. I'll fix that in
a later commit.
Task-number: QTBUG-61774
Change-Id: I3e5f83b8baa3c6afbca9231b5bbc89d17f3e57e2
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
Don't just wait for 300ms for the thread to finish, this can
lead to faling tests esp. on slow hardware.
Also fix a mem leak.
Change-Id: Ifa90da5507fc6d65ef77e368d7c238271623ff53
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
Configure will print notes in the following situations:
- redundant options, e.g. -gui -gui
- contradictory options, e.g. -gui -no-gui
Fixes: QTBUG-53499
Change-Id: I6cf023e7730907069cf971f5982a41453f611c3c
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
It has been completely untested for a while and saw some breakage.
So let's add a selftest for it. ('-vs' when running tests)
Change-Id: Ibfb5ac0a2d741de7c3f519d91202d4977996045e
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
The Windows and Cocoa font engines ignored the stretch factor when
the pixel size is so large that QPainterPath rendering is used
instead of native.
Fixes: QTBUG-14315
Change-Id: I93390528ac264452b7d6af7d39f49f4b0dd56279
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Use move on the existing value as well so the constructor makes more
of a difference.
Change-Id: Iee2080da7b7d2d88eb108f0448c61423c7256979
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This benchmark was not compiled, and it only covered some parts of the
API. Enable it, and also measure the performance of PMF and Functor API
variants, for both QTimer::singleShot and QMetaObject::invokeMethod.
This uncovers that the zero-timeout optimization for the singleShot is
not applied to the PMF and Functor API variants:
********* Start testing of qtimer_vs_qmetaobject *********
Config: Using QtTest library 5.11.0, Qt 5.11.0 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 7.2.1 20171224)
PASS : qtimer_vs_qmetaobject::initTestCase()
PASS : qtimer_vs_qmetaobject::bench(singleShot_slot)
RESULT : qtimer_vs_qmetaobject::bench():"singleShot_slot":
5.20 msecs per iteration (total: 520, iterations: 100)
PASS : qtimer_vs_qmetaobject::bench(singleShot_pmf)
RESULT : qtimer_vs_qmetaobject::bench():"singleShot_pmf":
75.93 msecs per iteration (total: 7,594, iterations: 100)
PASS : qtimer_vs_qmetaobject::bench(singleShot_functor)
RESULT : qtimer_vs_qmetaobject::bench():"singleShot_functor":
77.90 msecs per iteration (total: 7,790, iterations: 100)
PASS : qtimer_vs_qmetaobject::bench(singleShot_functor_noctx)
RESULT : qtimer_vs_qmetaobject::bench():"singleShot_functor_noctx":
76.23 msecs per iteration (total: 7,624, iterations: 100)
PASS : qtimer_vs_qmetaobject::bench(invokeMethod_string)
RESULT : qtimer_vs_qmetaobject::bench():"invokeMethod_string":
4.99 msecs per iteration (total: 499, iterations: 100)
PASS : qtimer_vs_qmetaobject::bench(invokeMethod_pmf)
RESULT : qtimer_vs_qmetaobject::bench():"invokeMethod_pmf":
5.37 msecs per iteration (total: 538, iterations: 100)
PASS : qtimer_vs_qmetaobject::bench(invokeMethod_functor)
RESULT : qtimer_vs_qmetaobject::bench():"invokeMethod_functor":
4.74 msecs per iteration (total: 474, iterations: 100)
PASS : qtimer_vs_qmetaobject::cleanupTestCase()
Totals: 9 passed, 0 failed, 0 skipped, 0 blacklisted, 50220ms
********* Finished testing of qtimer_vs_qmetaobject *********
Change-Id: I46336613188317124804638627f07eb135dc0286
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Under the 'Dark' theme as a system one, in an application forcing
'Aqua' (and thus 'Light') appearance, disclose button (drawn as
a triangle) can suddenly become transparent (apparently selecting
a 'Dark' codepath internally). Different ways to fix this (attaching
NSButton to a view, setting appearance on this button manually, etc.)
- all seems to have no effect. We resort to manually drawing this
button on macOS > 10.14 if 'effectiveAppearance' is 'Aqua'.
Change-Id: I6f54c0c4cf8fdd1ba53263ba9535e3055be46d42
Fixes: QTBUG-74515
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
It is documented for the use, but we were rarely using it.
Change-Id: I812b9e6c8fbf204aba43ce2b79eca308ca75de88
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
We may get calls to the MessageTypes-overload of addMessage via e.g.
qSkip, or other functions in QTestLog, so we have to implement the
function.
Change-Id: I9d58c73e93ca918c42448c246c37cc9ae6aa04de
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Saves 234kB of read-only data (when compressed with zstd) in QtCore,
plus one load-time execution. With Zlib, the size was 315 kB.
[ChangeLog][QtCore][QMimeDatabase] Added configure option
-no-mimetype-database that tells Qt not to bundle its own copy of the
XDG MIME database. If this option is passed, QMimeDatabase will only
work if there's a system copy in $XDG_DATA_DIRS/mime. This option is
useful for Linux distributions that ensure the data is always present.
Change-Id: I1004b4b819774c4c9296fffd158e69c490e88fb6
Reviewed-by: David Faure <david.faure@kdab.com>
DragEnter events always should start with the default state, which
is accepted = false. This was a copy-and-paste error introduced by
f8944a7f07.
Fixes: QTBUG-73977
Change-Id: I34b3ea97c9b4f4fc040a9e6f1befd6124533361d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
QDoubleSpinBox did not resize when setPrefix() was called because the
cached size hint was not reset.
Fix it by resetting the cached size hints and update the geometry the
same way it's done for QSpinBox::setPrefix().
Fixes: QTBUG-74520
Change-Id: I6f42a24ab0a4ce987ecbe1505a634d929474436b
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
In this threaded setup the server can sometimes have the data before it
calls "waitForReadyRead", what happens then is that we fail the wait and
as a result the test fails overall.
Let's check if we actually got some data after all and then continue if
we did. Since both the client and the server currently wait the same
amount of time (2s) the max timeout for the client was increased by
0.5s so it has some time to notice that the server got the message.
Change-Id: Ib5915958853413047aa5a7574712585bcae28f79
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
And export the required symbols in OpenSSL so we can run the test there
as well even if it's not needed for any functionality.
Change-Id: I4246d2b0bbdd42079d255f97f3c66ce8bb37390b
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Doing endian-dependent selection of bytes of the value was a clumsy
surrogate for just accessing the intenal quint16 shifted suitably.
Change-Id: Icfd9d1d18f69eb94b041b8d32275df606c14c2b4
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Prevent namespace collisions and make sure Qt functions
are grouped together.
Change-Id: I217188ee93e4300e273d10a79d6014179fc5a1ef
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
QSqlError::text() returns single space if QSqlError is not valid. In
addition, it adds space in case one of driverText or databaseText
is empty.
Change condition upon which space is added between databaseText and
driverText, and update unit test to cover these cases.
Fixes: QTBUG-74575
Change-Id: I52cce9b0287a523d7ff9059cff38bcd8b26eb303
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Change d15b02ff29 was missing the
implementation of:
void setData(int xOffset, int yOffset, int zOffset,
int width, int height, int depth, int mipLevel,
PixelFormat sourceFormat, PixelType sourceType,
const void *data, const QOpenGLPixelTransferOptions * const options = nullptr);
Change-Id: Ie0d1679cc54bc6bd6b51392a22707566d238845a
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
When using a style that wants to draw into the layout's margin (like
macOS style does with group box titles), parts of the widgets would be
clipped by the parent if the available margin is smaller than necessary.
This moves the x/y coordinates to at least 0/0, and adjusts width and
height accordingly.
[ChangeLog][QtWidgets][QLayout] Prevent clipping of group box titles
on macOS (and similar styles that draw into layout margins)
Change-Id: I32148a92858c13fb2325da4d0a2a58996e0e8930
Fixes: QTBUG-67608
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Enabling makes QtQuick to attempt to access window.devicePixelRatio
[via QWasmWindow::devicePixelRatio()] from a web worker.
Change-Id: I957df29060c7eb8c47d02bc67c8c5c2219b570f4
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
[ChangeLog][QtCore] Added support of deduction guides for QPair
Change-Id: I41a798390dc2c925b0f8432ba12aa345724de2d7
Reviewed-by: Martin Smith <martin.smith@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Fix styling and positioning of QTabWidget tabs on macOS Mojave while
using dark mode
Change-Id: Ibe0c90b7625c4f4ff895083fefaade74305ba0ea
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Fixes the text color displayed in the QToolBar on macOS Mojave dark
mode
Change-Id: Ic4415295e314a8fc1c4fbb58964386e0563b8d44
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>