add a parameter that indicates whether the passed filename can be only
the basename of a prl file. if so, we can skip the other attempts at
interpreting the file name. that's not only faster, but also clearer.
Change-Id: I6f6da3f4485216021282a08acaefb53e60e7242a
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
move the logic for trying different extensions to
MakefileGenerator::processPrlFile(), which is the only user of that
functionality. that makes findLib() rather trivial and a bit of a
misnomer, so rename it to checkLib().
Change-Id: If9738cc17367452853ab8d3866fa36b5d4b57213
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
only .prl is actually supported (and we expect this to remain the case),
so just simplify the code.
Change-Id: Ia23f9f257bf89ca214c3deabd8a7744b155c7aa9
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
in principle, it would be good to be able to read libtool .la files as
an alternative to our "proprietary" .prl files. however, this code was
disabled 15 years ago, three months after being written and never
released, and apparently no-one was missing it.
Change-Id: Ib8b4b4017b6a611f78af4e357ebce4006567e6ab
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
this code operates way below the level integrating with a package
manager makes sense. consequently, remove the "TODO item".
support at a higher level is actually implemented anyway.
Change-Id: I8e1e43911dd40aa7585e49c1ad1e37b999779308
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Having the helpers in each respective module lets us implement the
helpers using private APIs without forcing the test to add private
dependencies.
It also makes it easier to test Qt using a third party testing
framework (for running the test suite), while still using the helpers
for ensuring tests behave expectedly.
Change-Id: I2a6ce24526ed345f3513548f11da05c7804c203f
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Without QT_CONFIG(library) qdbus_resolve_conditionally would be declared
but not defined.
Change-Id: Id90f6c736080e4c1609568b3fab1f464c0e46aa3
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Rewrote some of them away, in the process, using string arithmetic.
Change-Id: Ie1a29abefab001889a22a8bc66c7eee608496786
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
This is preparation (the WS-only parts) for splitting up some
over-long lines, in the course of which I also fix some indentation.
Change-Id: I800490e328b5e16d40685dff04c09cd145d5eacf
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
In the process, also have it only scan number systems once, caching
the result, rather than scanning all of them for each locale. This
means we only see the new warning messages once, too.
Task-number: QTBUG-69324
Change-Id: Ia0695a0ba6159b50748a61e9949ad5bd07e4c4c3
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
When I wrote zoneMSecsToEpochMSecs I seem to have copied names from
localMSecsToEpochMSecs, that need a s/local/zone/ change to their
names to make sense in this context. Flipped an if/else for clarity
in the process.
Change-Id: If2b288532b16d999f6ff0b9241e2dbcbc016b010
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
A bit depth 1 png image may contain a single color table item. The png
handler would in such cases reduce the size of the QImage color table
to 1, which could easily lead to crashes later on.
Task-number: QTBUG-69256
Change-Id: I01d78977c121bacc44b823231d8f32ca63d8a98c
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
The year label in the header would show an unlocalized year
number. Fix by setting it equal to the year editor's correctly
localized string.
Task-number: QTBUG-69038
Change-Id: I87148c607b8fb498c57bcf59bc175154c9e445d1
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
DeleteStartOfWord key behaves like Delete key when the cursor
is at the beginning of the line. Do nothing instead.
Task-number: QTBUG-65855
Change-Id: I56402961b44ec6fe3a382df68a76db36891c4522
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
This is the introduction text to signals and slots and should rather
show best practices. Using context is generally advisable to have
life-time of connections under control.
Change-Id: I213b13d978a38e13834cdbccf1bea06d53ba8320
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Some colors, like selectedMenuItemColor, won't return
the right value anymore. Other can be updated to new
system UI element colors for more accuracy.
Task-number: QTBUG-68891
Change-Id: I781ef47791648f332208eb780361c60ffb6fcb96
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
I don't know why Arvid subtracted 1 when he wrote this code. But it was
wrong. Fortunately, the section size was not used afterwards, but the next
commit will.
Change-Id: I117816bf0f5e469b8d34fffd153dc8383b00b94a
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
When using actual memory allocation, limit to 64 MB, not the full file
size. On most systems, the memory map technique will work, so this won't
even be tried. In any case, we don't need the fix for the OOM situation
that was applied in commit e211ab76d7.
As for the memory mapping technique, this commit limits the allocation
to reasonable values given the virtual memory addressing space. Half a
gigabyte is probably acceptable on 32-bit systems, where there should be
a contiguous space for the OS to allocate the file in. This commit also
fixes an overflow when converting from qint64 of the file size to ulong
(32-bit on 32-bit platforms and on Windows).
For 64-bit systems, we currently limit to 1 TB.
Change-Id: I117816bf0f5e469b8d34fffd153dc1705a8eedc4
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
They return regular iterators, since the container has been modified.
Change-Id: Id59bdd8f1a804b809e22fffd153f92d4460f9b76
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
By using constFind(), we won't detach if the item isn't there. Both
extract() and erase() can take const_iterators.
Change-Id: Id59bdd8f1a804b809e22fffd153f92989ef84644
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
All supported compilers support it.
Doing this just for the new API. We should do it throughout Qt, but only
if it won't interfere with the header review.
Change-Id: Id59bdd8f1a804b809e22fffd153f9254688e5152
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
It's a false positive, since we've checked that the item HasByteData.
But it's cheap to rewrite so the warning is silenced.
>>> CID 190741: Null pointer dereferences (NULL_RETURNS)
>>> Dereferencing a null pointer "this->byteData(idx)".
Change-Id: If48c5c2e920c433298f1fffd153f7534be42a30b
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Found by Coverity:
>>> CID 190746: API usage errors (STREAM_FORMAT_STATE)
>>> Changing format state of stream "dbg" for category basefield without later restoring it.
Change-Id: If48c5c2e920c433298f1fffd153f74f9bbe7ef29
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
In order to add the listener, we need to hook into the internal HWND.
Creating the QThreadData (thus adopting the thread) and the event
dispatcher are ok because they would happen anyway. QFileSystemWatcher
works only with the Qt event loop.
[ChangeLog][QtCore][QFileSystemWatcher] Fixed a bug that caused
addPaths() to crash on Windows if adding a path to be watched on
removeable storage, if that addPaths() was called on a thread not
created by QThread and no QEventLoop has been created yet.
Task-number: QTBUG-69320
Change-Id: If48c5c2e920c433298f1fffd153ee20bea56c62f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
In some places we call startingUp(), in others we don't. It's probably
ok for those that have just created an object of a given class, which
knows whether the virtual call is necessary or not. But for the generic
case, we do call it.
Change-Id: If48c5c2e920c433298f1fffd153ee1cc75703204
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
No need in ugly macro ioErr and if-ery, no need in generic noErr.
SecureTransport has its own, more specific error codes: errSecIO
and errSecSuccess (which have the equivalent values).
Change-Id: Ifd99fbcbee290fe27caa0c258923f4527c047ba8
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
The preceding snippet contains the same line of code. It is unclear
why this line is repeated, and it does not seem to serve a purpose.
This patch removes the line of code and the QDoc command used to set
it apart from the preceding snippet.
Task-number: QTBUG-56772
Change-Id: I400b22aa75ee4542bfb67f7e47e3c31c577a39e5
Reviewed-by: Martin Smith <martin.smith@qt.io>
[ChangeLog][Third-Party Code] Sqlite was updated to version 3.24.0
Task-number: QTBUG-69274
Change-Id: Icf3d7b2c1af0fb67033fd39240bee0cacccaf96f
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
It's unclear when the reference to Unicode 4.0 standard
got added - it certainly predates the qt 4 git repository.
Anyhow, nowadays we're using later versions, and it doesn't
make much sense to highlight one specific version here.
Instead, use the correct technical term - UTF-16 code unit.
Also I added a 'correspond _to_', which sounds more common
to me.
Task-number: QTBUG-56699
Change-Id: I4bdcd9060cb2b11521638019c15ef7ab67aa768b
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
There was no public API for doing case-insensitive comparisons
of QStringView.
Task-number: QTBUG-69389
Change-Id: I1b021eefec35e135b97fb87704c8dc137232d83d
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The flow of changing the window state, especially for fullscreen, is
complicated enough that it helps to keep the code together.
Change-Id: I216ff95c03fc149f42a0199f7c3bc4fb04ff5e6e
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
The loop was accepting any line with at least three entries, but the
code that then used this line needed four entries. At the same time,
the loop's check had to be repeated, in rearranged form, after the
loop, to handle some failing cases. Restructuring the loop, and
demanding at least four entries, fixes all of this, although care must
be taken about the virtual file-system lying about .atEnd().
[ChangeLog][QtCore][QStorageInfo] Fixed a bug on Android that could
cause QStorageInfo to skip some filesystems (if the mount table is a
virtual file and contains any short lines) or crash (if the mount
table contains any 3-field lines).
Change-Id: I1c2674372d0d0b7d16937de4345a910bc7d6e0ad
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
Reviewed-by: Johannes Rosenqvist <xeroc81@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
the sysroot flags need to be established even before setting up the
spec, because as soon as that happens, toolchain.prf will try to
determine the default paths and cache them.
this also fixes sysroot use in toolchain flag support tests, which run
(somewhat) independently from the toolchain setup.
Task-number: QTBUG-63483
Change-Id: I7be1540e766dac58fb16f63176aa8d2879b51ae0
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
OpenSSL has 'no-dtls' configure option (or can be too ancient to properly
support it), we shall respect such builds. This patch extends configure.json
with a 'dtls' test and adds protection against linkage/compile-time
issues in the QtNetwork's code.
Change-Id: I0c0dd94f5c226115cee4285b82c83aa546555aea
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
These are leftovers from the prototype version of DTLS connection
and no code is using them now.
Change-Id: I3970a56303a59ce95e9c22344fac89e89f6559c8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Instead, let's just use sendfile(2) in a loop until it returns 0, which
indicates EOF.
[ChangeLog][QtCore][QFile] Fixed a regression in QFile::copy() that
caused the original file not to be copied entirely if it was modified
outside of this QFile object between the last time we checked its size
and the copy() call. Note this is not a prevention against race
conditions.
Task-number: QTBUG-69417
Change-Id: Id59bdd8f1a804b809e22fffd15406c8aa31f4a1e
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Both delegate to the one that did do the if dirty: init() check, but
only after they've tested whether d->collator is set, which it might
not be when dirty.
Change-Id: I77533d6d32c4a8c9b42797c77003e50f5820775a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
On Android systems QStorageIterator uses /proc/mounts to parse mounted
volumes. For every call to QStorageIterator::next() a check was done
to see if we had reached EOF with atEnd(), but didn't take account of
the last call to file.readLine(), which might contain a valid entry.
[ChangeLog][QtCore][QStorageInfo] Fixed a bug that caused the last
entry in the mtab file to be ignored on Android.
Task-number: QTBUG-60215
Change-Id: I064452002922c72ffa1c8954fec5f28738c42bae
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Replaces the handling of tablet/touchscreen/touchpad/mouse input with a
unified implementation based on the Windows Pointer Input Messages added
to Windows 8. The legacy implementation is still used for Windows 7.
Task-number: QTBUG-60437
Change-Id: I0a0f48ee9d5365f84ba528aa04c6ab1fe4253c50
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Fixing some issues that could cause intermittent or environment-dependent
failures. One kind regards the use of multiple QTest::mouseMove()
calls in sequence internally using the QCursor API, causing timing
dependent failures. Switching to the override that does not require the
QCursor API, where possible. Other test could fail depending on the size
of the screen.
Change-Id: I4a368955ddbb48f729dcdf74c20eb163329936b2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
The logic seems to be simple - if client code on error signal
tries to close TLS socket and this socket has buffered data,
it calls 'flush' and 'transmit' or even 'startHandshake' as
a result, which in turn will set and emit error again. To auto-
test this, we initiate a handshake with pre-shared key hint
on a server side and both client/server sockets incorrectly
configured (missing PSK signals). We also do early write
into the client socket to make sure it has some data
buffered by the moment we call 'close'.
Task-number: QTBUG-68089
Task-number: QTBUG-56476
Change-Id: I6ba6435bd572ad85d9209c4c81774a397081b34f
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This patch allows the developer to pick which keyboard modifier
increases the number of steps a QAbstractSpinBox takes when the user
interacts with it.
The modifier can be either Qt::ControlModifier (default),
Qt::ShiftModifier or Qt::NoModifier. Qt::NoModifier disables the step
modifier. Note that on macOS, Control corresponds to the Command key.
Holding the modifier increases the step rate when:
- scrolling;
- pressing the up/down keys;
- pressing the spin box up/down buttons.
[ChangeLog][QtWidgets][QStyle] QStyle::SH_SpinBox_StepModifier allows
the developer to pick which keyboard modifier increases the number of
steps a QAbstractSpinBox takes for the following interactions:
scrolling, up/down keyboard keys and the spin box buttons. The
Qt::ShiftModifier can now be used, or the feature can be disabled
using Qt::NoModifier. Previously, only Qt::ControlModifier could be
used as the modifier.
Change-Id: Ib5518127e86a8f67798a9a1d6e860c6e35896e6f
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>