This needs a zone with transitions near the epoch; and the only CET
with DST that winter was Italy (copied by Malta), for which the Olson
database had a recent (2016) correction to its data, for that winter.
That means we get inconsistent results on O/Sen of different ages.
So add a separate testEpochTranPrivate(), alongside testCetPrivate(),
and test it with America/Toronto. (Unfortunately, MS-Win gets the
date wrong on the first transition after the epoch, so we have to code
round that.)
Since information before the epoch isn't reliably available, only test
the search backwards if nextTransition does find something before it.
(We can safely assume all real transitions happened since 1601;
non-celestial time-keeping wasn't accurate enough, before that, for
anyone to synchronize with anything but celestial time.)
Change-Id: I984b46938a2805b93bb2afd6855e317b5d66b386
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Found while working on suppressing the warning about the return value
(which is either 0 or -1) was being ignored.
Task-number: QTBUG-61968
Change-Id: I02d22222fff64d4dbda4fffd14d148b1724547ca
Reviewed-by: Florian Bruhin <qt-project.org@the-compiler.org>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Passing a null pointer as a parameter to the setChild function no
longer crashes when calling the
QStandardItemModelPrivate::itemChanged signal. The child is removed
from the model.
The patch also fixes the behavior of deleting a item. A
dataChanged signal is emitted.
Change-Id: I027e8b0d84fe33c5fca056df870f0e60a020824b
Reviewed-by: David Faure <david.faure@kdab.com>
This reverts commit 346cd79192. The bug
report was incorrect, since the suggested file name is actually valid,
it just happens to name an Alternate Data Stream (ADS) "20:803Z.txt" in
file "testLog-03".
[ChangeLog][QtCore][QFile] Reverted an incorrect change from Qt 5.9.0
that forbade the creation and access to Alternate Data Streams on NTFS
on Windows. This means that file names containing a colon (':') are
allowed again, but note that they are not regular files.
Task-number: QTBUG-57023
Change-Id: I81480fdb578d4d43b3fcfffd14d4f2147e8a0ade
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
The test is marked as expected failure for the last 3 years, in CI it
is proven to be somehow flaky and it is failing now because of XPASS
which is not covered by blacklist feature.
This patch extends efforts of 7eba6d039d
and 03b4838cb5 by blacklisting the test
completely.
Change-Id: Ia295d61620fa6bc97b168d4de9456a18ed5c064f
Task-number: QTQAINFRA-1333
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
In the past, we had an undocumented text flag that worked with
one of the QPainter::drawText() overloads. This was never intended
as public API and served a specific cause in Qt WebKit at one point.
But there is a general need for such API, as disabling shaping features
easily gives 25% performance improvement on text rendering even for
fairly short strings.
This patch adds a new style strategy flag to disable shaping and
will just uses the CMAP and HDMX tables to get glyph indices and advances
for the characters. In Qt 6, the TextBypassShaping flag can be removed
completely and be replaced by the style strategy.
[ChangeLog][QtGui][Text] Added QFont::PreferNoShaping style strategy to support
improvements to performance at the expense of some cosmetic font features.
Task-number: QTBUG-56728
Change-Id: I48e025dcc06afe02824bf5b5011702a7e0036f6d
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Currently QLocale::c().bcp47Name() returns "C" which, according to [BCP47], is
not a valid language tag. In particular it does not conform to the ABNF grammar
in section 2.1 which specifies a minimum length of 2 characters for all language
tags.
[BCP47]: https://tools.ietf.org/html/bcp47
This patch changes the return value to "en" seeing as the documentation for
QLocale::Language states that the C language is identical in behavior to
English.
Task-number: QTBUG-61949
Change-Id: I2a381def8fb7156467e01d105da92bb1f4821204
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
When QCOMPARE(,) reports two 12-digit numbers, it's not always
immediately obvious what the difference is (much less what 1/3600000
of it is); nor is it obvious that (or why) a given 12-digit number is
in fact correct. In contrast, our eyes can make sense of a
QDateTime's reported value quite well, enabling us to see what's
different; and it's possible to at least confirm the plausibility of
2-or-3 am on a spring or autumn day at a plausible transition (or even
to confirm it exactly by consulting suitable web-sites). Also
document the actual transition happening in each case (since I *did*
consult a suitable web-site). So prefer to QCOMPARE(,) two QDateTime
values instead of two 12-digit qint64s.
Where a that would be unsuitable, at least compare the difference to
zero, to make the error easier to understand (except when one of the
twelve-digit numbers consists entirely of 9s; that, for once, actually
is easy to see).
Write various multiples of 3600 as the relevant intelligible whole
number times 3600, rather than premultiplying, to make it obvious to
reders what's going on.
None of this changes what is actually tested.
Change-Id: I488e751283a55d4623c93612af13ad631144900d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
A loop initialized i = 0 and used i > 2 as its condition; it didn't
get very far. Consequently, the test it was in never checked whether
CET's 2011 transitions happened at the times expected - which they
didn't, as the times in question were in fact the times at which
Pacific/Auckland had its transitions that year.
Change-Id: I94d1f8df615c5bcfe48e73d41b4c7faf2beccb96
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The original test is quite unfortunate - it has cipher names hardcoded,
and it fails with OpenSSL 1.1 - no matching cipher found for 'RC4-SHA'
and QSslContext::initSsl fails with 'Invalid or empty cipher list'.
We skip this test entry for 1.1.
Change-Id: I810b80a62d9e27a60db71fd412af0c80630d976c
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Moving the cursor is not synchronous.
Change-Id: I6b820af026585e1fcfef845cc712fa8f6812e941
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Make QVariant::toJsonValue do conversions as well as
QJsonValue::fromVariant.
Change-Id: I175d43677061470691e2e0104a800be355fbbd3d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
internalInsert() will set the cursor to the right position which accounts
for any input mask set on the control as well. Therefore it will already
be placed at the next correct position and should not be changed again
after that.
Task-number: QTBUG-40943
Change-Id: Ic0f5fad6999ddd367e435ec4409a5db5b9eacb7b
Reviewed-by: Daniel Teske <qt@squorn.de>
Reviewed-by: David Faure <david.faure@kdab.com>
Change-Id: Id220f10f4ff756230155c7c8f37713d53ed3ca0c
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
It's flakey/failing on macOS, the menu is opened but opened above
the button, so the intersection test fails.
Change-Id: I6b13a1b0df2b07fa36bbb73071cdeb55547ac93a
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
...tst_qlineedit.cpp:1938:9: warning: explicitly assigning value of variable of type 'Qt::Key' to itself
-Wself-assign]
key = key;
~~~ ^ ~~~
Change-Id: I18a46f61e13f6e2c74edce869a1c36a7f3a0fb70
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Counting draw calls in the style is not a reliable way to count
italic items in the combobox.
Task-number: QTBUG-62080
Change-Id: I6cb6d54535f073f66cfcf61bb19eb645284c835d
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Don't assume signals will not be emitted during show. The test should
focus on testing that changing the model results in change signals. What
happens before that is not under test, and not stable.
Change-Id: I71e62abc15fc81c069d7685e4342e795449c3632
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This hasn't done anything since at least Qt 5.0. It's possible it was
only used in Symbian, which we removed before the 5.0 release. This only
served to make the tst_QNetworkProxyFactory test slow.
[ChangeLog][QtNetwork][QNetworkProxy] The functions related to
QNetworkConfiguration are deprecated. They've performed no action since
Qt 5.0, so code using them can safely stop doing so.
Change-Id: I84e45059a888497fb55ffffd14d31b7c2978a04e
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
It's failing when enabling synchronous expose events, but likely
due to making assumptions about expose behavior. Will be looked
at in more detail once the expose event patch is in, so we can
move forward.
Task-number: QTBUG-62092
Change-Id: Ie76b5f11ccf841981a42d2eda19fbcda8b43c36c
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Getting the end position of the selection was not possible.
[ChangeLog][QtWidgets][QLineEdit] Added selectionEnd(), selectionLength(),
complementing selectionStart().
Change-Id: Iaecc624063d7c043f9502351f07eb76f869e86f1
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Fixes flakiness where we enter and exit window states too fast on macOS,
while also removing 2 second waits in the positioning tests that were
slowing things down needlessly.
Change-Id: Ia4ee4d4812474c520fdd3f76b047f4eabe1a8220
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
They fail when enabling synchronous expose events. Disabled for now
until we can look into why, but it's assumed to be an issue with the
test harness/how we hook into Quartz to send/observe events.
Task-number: QTBUG-62042
Change-Id: I723d049ec5d1029edb0ad3b1f47fffc829a8924b
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This is the result of running the (experimental) clang-tidy check
qt-modernize-qsharedpointer-create
Discarded changes:
- tst_qsharedpointer.cpp: not sure we want these replacements there
(→ separate change)
- tst_collations.cpp: hit in a template specialization that is
instantiated with both QSharedPointer and QSharedDataPointer.
Change-Id: I203c2646e91d026735d923473af3d151d19e3820
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This test verifies processEvents(WaitForMoreEvents)
behavior by first processing all pending events (in
a loop) and then verifying that a following processEvents
call actually waits.
But there is no guarantee that the OS won’t introduce
more events after the first loop has completed. This
does indeed seem to happen on recent versions of macOS.
Change the test to not require that the processEvents
call blocked and de-blacklist.
Task-number: QTBUG-61131
Change-Id: Ic8fa74a6085165442791264f6f137a2fa6083138
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Verify that all pixels of the grabbed image are green instead
of comparing an image loaded from file.
The test then also passes when High DPI scaling is active in
which case a twice as big pixmap with DPR=2 is obtained when
grabbing the widget.
Change-Id: Ie5244a39a68ea0defd2590cf30f251d660d0869b
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Scale coordinates in a few places, remove pixmap scaling in
grabWindow() (Windows).
Change-Id: Iba9e5d3ca55422a14eda09c8d04329a455d3acb3
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This removes a lot of duplicated code that existed in both qglobal.cpp
and qsystemerror.cpp, including the hack to get the correct strerror_r
signature.
This removes the incorrect use of EACCES, EMFILE, ENOENT, and ENOSPC
from qt_error_string on Windows. qt_error_string is supposed to be used
only with Win32 error codes from GetLastError(), despite there being a
lot of uses in cross-platform and even Windows-specific code that pass
errno constants.
It may or may not work: that depends on whether the constants happen to
match. ENOENT matches ERROR_FILE_NOT_FOUND and one could argue that
ENOSPC matching ERROR_OUT_OF_PAPER is acceptable, but EMFILE isn't the
same as ERROR_BAD_LENGTH nor is EACCES, ERROR_INVALID_DATA.
Change-Id: I1eba2b016de74620bfc8fffd14cccb7f77f4b510
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
ASN UTCTime uses two characters to encode a year (YY). When converting it
into QDate, it's quite naive to just add 2000. According to RFC 2459,
these YY represent dates in the range [1950, 2049].
This patch also introduces a helper function doing the checked conversion
from a string to int (to be reused in the following-up patches).
Task-number: QTBUG-61934
Change-Id: I3f6f471d24e8357b83b2f5973023b2b842751389
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
It's broken due to tst_QWidget::testDeletionInEventHandlers,
but the root cause is not known yet.
Task-number: QTBUG-61986
Change-Id: I5b77efaf6910123d10a1456c54b873100e538a69
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The QWidget overload of qWaitForWindowExposed waits for the widget's
top level QWindow, which for the viewport is the graphics-view.
We want to explicitly wait for the viewport to be exposed, as the
viewport is covering the whole graphics-view, preventing it from
being exposed. See a6991376c.
Change-Id: I86df43871126562f09e4ce14931bc6fc7f06263d
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Change-Id: I7dbe9c7a91301e0002f9e1827f6d0b495d2b9ec5
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The tests uses QWindow::requestActivate() to verify that a window does
not become active when a modal dialog is running, but on macOS we have
no guards for this, so the test can potentially fail.
In addition, due to a bug in QCocoaEventDispatcher, we end up waiting
5 seconds for that failure to manifest.
Task-number: QTBUG-61965
Task-number: QTBUG-61964
Change-Id: I2f1b62d953e9b6dabf2df0c3023564f27919c498
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
The test assumes that resizing a QWidget to 0x0 will result in the
QWindow ending up with that size, and hence not being exposed, but
this is not the case. On a QWindow level we treat 0x0 as a trigger
for the platform layer to set the default size, and the window
ends up exposed.
Ideally QWindows should allow 0x0 sizes, but this is a bigger change.
In the meantime, we skip the tests so that other changes can be
integrated without the test failing.
Task-number: QTBUG-61953
Change-Id: Ib17187b4afd1b06eaa76653be18e93abea555b59
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Consider the raw string \\\\. The previous algorithm would consider
the last 3 \ to be escaped because the previous character is a \ and
thus calculating a maxLength of 3.
But this should be treated as two escaped \ with a maxLength of 2.
Change-Id: I6c4b8d090a2e1c6e85195d5920ce8b80aea1bc2d
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
When you are using a query that pulls from a number of different tables
then it can be ambiguous as to which table a particular field belongs to.
So this will make it possible to determine the table that a given field
belongs to if it is set.
Task-number: QTBUG-7170
Change-Id: I49b7890c0523d81272a153df3860df800ff853d5
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
QVariant claims to be able to QVariantHash and QVariantMap, but the
actual conversion implementation is missing.
Task-number: QTBUG-61471
Change-Id: I0cba74642aa77dc423effed289bc7619922a89eb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The child viewport window covers the entire client
area of the parent window, which prevents the parent
window from being exposed.
This worked by accident until now, and was uncovered
by changes to the cocoa platform plugin implementation.
Change-Id: I0d62a1a33f125e5a9030c8def452a49886e54956
Task-number: QTBUG-50414
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
setDoubleStep works in the same manner as for setIntStep in that it is
just available for input dialogs getting a double.
[ChangeLog][QtWidgets][QInputDialog] Added setDoubleStep to enable
changing of the step amount for getDouble().
Task-number: QTBUG-17547
Change-Id: I5cabcfceb23324f8045f2b1e49017644418db01a
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Several tests are not valid for 1.1 anymore:
1. SSL2 was removed, but there is no OPENSSL_NO_SSL2 and the 'protocolServerSide'
test is trying to use QSsl::SSLv2 and thus is failing.
2. We now use the generic TLS_server/client_method instead of version specific
methods we have in pre-1.1 back-end. So, for example, a client socket with
QSsl::TLS_V1_0 in its SSL configuration will be able to negotiate
TLS 1.2 if our server socket wants it, while with TLSv1_client_method
(OpenSSL < 1.1) our test was expecting SSL handshake to fail.
Change-Id: I18efd5921c79b189e4d9529be09299a361a8a81d
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Now the parameters from the prototypes are used as default values and
the graph file can overload them.
Change-Id: I9a8a73963c7e578bd0a34e96f76f147a12224f4f
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
This will allow to make the prototypes more extensible when referred to
from a graph file while providing some sane defaults.
Change-Id: I1ae10182427d8a7d29c51a64e19e99139494ea92
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
This will allow to create nodes having an entry point for tuning, still
need to be exploited by the loaders and the shader generator. Coming in
further commits.
Change-Id: I8384b0f528c9919e9f8d35102adde2b307f08b80
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
We forgot to check that the node content was correct and complete when
loading the graph.
Change-Id: Id4ee6aaba6ca268b0785e7fa3fb51a19817e7c9c
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Changes internal data-size and pointer calculations
to qssize_t.
Adds new sizeInBytes() accessor to read byte size, and
marks the old one deprecated.
Task-number: QTBUG-50912
Change-Id: Idf0c2010542b0ec1c9abef8afd02d6db07f43e6d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Now that QFileDevice::setFileTime() provides a portable way to prepare
our test file, we can verify QFileInfo does handle the distant past,
notably including negative time_t values. The old MS-specific code
used a time back in 1601, which we can't hope to support
cross-platform, so use one in 1901 that's a little inside the range of
32-bit time_t.
Task-number: QTBUG-47985
Change-Id: I2de3e79d8c7864221f92395813b63f373e4d8a3b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The output didn't previously make clear that the datum was invalid.
It's now explicitly invalid. At the same time, use QDebug's space()
and nospace() methods to make spacing choices explicit.
Revised a QDate test to match.
Change-Id: I4699f5897530b4caa31c22fdb07de149832b30f4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Separate the part varying between tests from the common form of all
the tests, so the reader can see the common pattern and know for sure
that there's not a typo or copy-and-paste glitch.
Change-Id: I3145a26ab42c104eb27756d906ac87f937024bad
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
macOS hasn't had SC_ScrollBarAddLine and SC_ScrollBarAddLine
since 10.7, when transient scrollbars first appeared.
We also make the warning message a bit more informative.
Change-Id: Idef4684162456d9bc274eea77908a6afe24fa0f5
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Subtract the viewport margins from the contentsRect in
QCommonListViewBase::updateHorizontal/VerticalScrollBar(). This
affects list views in icon mode and list mode / ScrollPerPixel.
Task-number: QTBUG-61383
Change-Id: I6f2f7951ac9344ac21cef1eba061780d130e2467
Reviewed-by: David Faure <david.faure@kdab.com>
[ChangeLog][QtCore][QLocale] Fixed the conversion of QTime to string
form and parsing from string form to always treat the value as the
decimal fraction of the seconds component. That is, the string format
".z" produces/parses ".2" for 200 milliseconds and ".002" for 2
milliseconds. Use of "z" or "zzz" is discouraged outside decimal
fractions to avoid surprises.
Task-number: QTBUG-53565
Change-Id: Ia19de85ad35e4eb7bb95fffd14792caf9b4a5156
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
QWindowsFileSystemWatcherEngine uses one change notification
per directory to watch directories or files within that
directory. Adding files and their directories in a sequence
caused the value in QWindowsFileSystemWatcherEngineThread::HandleForDirHash
to be overwritten.
Relax the check for the flags (watcher attributes) to use >= and recreate
the change notification of a directory should its flags be insufficient.
This triggers when a file is added after its directory since files
require more attributes.
Task-number: QTBUG-61792
Change-Id: I371a72f1934fa82c53aaf84beb907825031f1c81
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Fixed crash on QCoreApplication::translate() call from qqmlThread while
QCoreApplication::{install,remove}Translator() is called from the GUI
thread.
[ChangeLog][QtCore][QCoreApplication] Calling
QCoreApplication::translate() is now thread-safe.
Task-number: QTBUG-57095
Change-Id: Ie5340a42040a829f311c01332e05d4bbaf60462c
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Covers non-document mode, tab icon, and adds a more
useable interface. Some parts are still missing, like
tab orientation and long tab titles.
Task-number: QTBUG-61092
Change-Id: Idbda84f513e3ff7f87fa04ae4476b11bd8bb6bf2
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Fix a number of issues that caused polygons to not always be drawn
fully connected.
Ensures the original lastPixel is set when drawing closed polygons,
ensure we don't round away from the original starting point, and add
handling of edges that need to be rounded half a pixel sideways to line
up with endpoints.
Task-number: QTBUG-27053
Change-Id: Ib51ee5623a629996af51a0967096383f04e91e2f
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Especially in examples, where we should show off our convenience
functions, prefer calling these functions over doing arithmetic with
M_PI (or approximations thereto) and 180 (give or take simple
factors). This incidentally documents what's going on, just by the
name of the function used (and reveals at least one place where
variables were misnamed; the return from atan is in radians, *not*
degrees).
Task-number: QTBUG-58083
Change-Id: I6e5d66721cafab423378f970af525400423e971e
Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Since the result is an actual zero, this section of code looking for
underflows kicks in. But we forgot to take the capital letter into
account when parsing the number.
Task-number: QTBUG-61350
Change-Id: Ia53158e207a94bf49489fffd14c6abbd21f0bac0
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
tst_QLocale::macDefaultLocale() was determining local-time's current
offset from UTC and using it when working out what to expect the
offset at 1:2:3 today to be. When a transition happens after 1:2:3 on
its day (which is usual for DST changes in Europe), this lead to using
the new offset to test a time before the transition; the test was thus
wrong and failed.
Use the time to be tested (and current date) to compute the offset to
use, instead of using the current date-time.
Change-Id: I1c02a5579bca859e1d1aeb4f45b24871a08287af
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reads the v4 and v5 info-header together with the rest of the info-
headers, and use that to report the correct image format before
decoding.
Change-Id: I69e2bcc54367b7f14820815ae2ae1fa2d8d5dc8c
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Qemu uses some memory for each generated thread. This test creates
> 80000 threads and consumes about 10Gb of memory which is too
heavy for a VM.
Task-number: QTBUG-59966
Change-Id: I1bb8a0d7955778f5201948b41befcb9f1f391514
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
A visibile QOpenGLWidget receives a QEvent::WindowChangeInternal which triggers
a QOpenGLWidget::reset(). A hidden QOpenGLWidget never received this event
so it was never reset, resulting in a black rendering.
Includes unit-test that fails without this patch.
Change-Id: I9d2c57d66fa629f631a9829a5ebf4de09998ad75
Task-Id: QTBUG-60896
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
The getentropy function, first found in OpenBSD, is present in glibc
since version 2.25 and Bionic since Android 6.0 and NDK r11. It uses the
Linux 3.17 getrandom system call. Unlike glibc's getrandom() wrapper,
the glibc implementation of getentropy() function is not a POSIX thread
cancellation point, so we prefer to use that even though we have to
break the reading into 256-byte blocks.
The big advantage is that these functions work even in the absence of a
/dev/urandom device node, in addition to a few cycles shaved off by not
having to open a file descriptor and close it at exit. What's more, the
glibc implementation blocks until entropy is available on early boot, so
we don't have to worry about a failure mode. The Bionic implementation
will fall back by itself to /dev/urandom and, failing that, gathering
entropy from elsewhere in the system in a way it cannot fail either.
uClibc has a wrapper to getrandom(2) but no getentropy(3). MUSL has
neither.
Change-Id: Ia53158e207a94bf49489fffd14c8cee1b968a619
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Fix regression introduced by 175f33ed8. 'expanding' property set to true
was ignored when QStyle::styleHint() returned Qt::AlignRight for
SH_TabBar_Alignment.
When we calculate tabs geometry, we put an empty tab at the front and
back and set its expansive attribute depending on tab alignment AND
'expanding' property.
Task-number: QTBUG-61480
Change-Id: I6a1827ae8a3f2c6bee5124c18c7f2b1c0a7862f3
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
tst_qvariant.cpp(80): warning C4309: 'initializing': truncation of constant value
tst_qvariant.cpp(4635): warning C4309: 'initializing': truncation of constant value
tst_qbytearray.cpp(1438): warning C4267: 'argument': conversion from 'size_t' to 'uint', possible loss of data
tst_qbytearray.cpp(1440): warning C4267: 'argument': conversion from 'size_t' to 'uint', possible loss of data
http2srv.cpp(64): warning C4018: '<=': signed/unsigned mismatch
tst_qinputdialog.cpp(352): warning C4804: '<=': unsafe use of type 'bool' in operation
Change-Id: Id012d88b7b20c5c9f128f2ef53753cc1d479f358
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Print time in the error handler to get some diagnostics
about when the network connection is dropped.
Task-number: QTBUG-61673
Change-Id: I376bec81f52d75c9b601f2af9b7e0b63f5883bb0
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Use 15s instead of 10 (one check took 7.5s on my development machine, even).
Port to QTR_VERIFY_WITH_TIMEOUT instead of rolling our own waitForDone(),
as that reports (within limits) by how much the timeout was exceeded.
Change-Id: Id76a66d5f4fe3a4e814915add329eb4de3d264a7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
It breaks sth in QLocalSocket which is used in QtRemoteObject.
This reverts commit 5c6210e345.
Task-number: QTBUG-61668
Change-Id: Ib11890923773496e5d998b7709ef93b0a839a759
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>