Only require TYPE if no OUTPUT_DIRECTORY, ARCHIVE_INSTALL_DIRECTORY
and INSTALL_DIRECTORY is provided.
Change-Id: I6db1cfaa576bfa3ee3dc8ecf81db20e3afcd61e2
Reviewed-by: Alexandru Croitor <alexandru.croitor@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>
The operation was using an empty set as a base, so it was not really
functional.
Change-Id: I98fd80c1ede31994857aa1f0c8947ca7b9f76649
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
We can use all cores. Sadly it doesn't balance cores well as
corelib.pro takes most of the time anyway, but the speedup is
visible from ~15 to 5 min.
Change-Id: Id8209c58491b38d19c6e9f1163d366c3e33a182c
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
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>
Without this, xkbcommon feature would not be detected even if all
xkbcommon dev libs are present.
Change-Id: Ic247461dda9e7ddfed547708cccaad88f123903b
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
QKeyEvent instance requires Qt::Key but currently X11 keysym is assigned
and the IBus QT module forwards the wrong key events.
Now QXkbCommon::keysymToQtKey() can generate Qt::Key from keysym and
forward the correct key events.
Change-Id: I25f0a9e9319b4a5f42847f8592ad3a30f6c9349d
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
... because API from qxkbcommon_p.h includes xkbcommon headers.
When we use "QT += xkbcommon_support-private" in *.pro files, we
should not explicitly require "QMAKE_USE += xkbcommon" in those
projects.
Change-Id: I21049034ce93bee13a1107723f26498c221f8ea4
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Add a field remembering the tab position of the dock widget area to
QDockWidgetPrivate and use that when grouping floating docks.
Fixes: QTBUG-74242
Change-Id: I2a453080cb39dd4a5491976f1aeca70ae681682a
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>