Better late than never.
Task-number: QTBUG-533
Change-Id: Ieb68d510f75553a6aa0a6e9046c11e3a34b8815f
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Eight bytes into the Binary JSON header there's a 32-bit little-endian
size, which qJsonFromRawLibraryMetaData uses to determine the size of
the stored metadata. That value is passed as a size to QByteArray, which
means certain values could cause crashes due to being too big or via
sign-extension in 64-bit.
[ChangeLog][QtCore][QPluginLoader] Fixed an issue that could cause a
crash when certain damaged or corrupt plugin files were scanned.
Change-Id: I117816bf0f5e469b8d34fffd153dc5425cec39a7
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
If QMAKE_BUNDLE is set then this should be used for the bundle
identifier value instead of the product name. This ensures that when an
application provisioning profile is used that it will correctly match
against it. This also brings it in line with the documented behavior.
Change-Id: I627d212f59d862e7a881941748db5ef98ab4f463
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
In the rare case where the known locations for the standard paths are
not known (such as when an application is used without a user logged
in), it will output a warning to indicate this. In the case of the
GenericConfigLocation, this can mean that it will hang due to the fact
that QLoggingCategory is looking for that location too before it can
output anything.
Therefore, the warning output is removed so that if this part fails it
doesn't cause it to hang as a result.
Change-Id: I4f189361899bd1f868292f30c09fbe50982d2288
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Glibc 2.21 and earlier have a bug that leaves the mode parameter unset
when O_TMPFILE is used. So we bypass the glibc implementation and go
directly for the syscall. We do this only for 32-bit x86, since of the
current, modern platforms, it's the only one that passes parameters on
the stack. Technically speaking, the glibc bug applies to all platforms,
but it turns out that on all others, it appears to work.
By doing this, we have two minor differences:
1) open() is a cancellation point, but syscall() isn't
2) if anyone tries to intercept open() calls via LD_PRELOAD, they're
not going to catch Qt's.
[ChangeLog][QtCore][QTemporaryFile] Worked around a bug in the GNU C
Library versions 2.21 and earlier (used on Linux) that caused temporary
files to be created with permissions 000.
Task-number: QTBUG-69436
Change-Id: I20fd00e600264ff98c6afffd1540dceea89fa91f
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Qt allows this as a property of QCheckBox, so it should
be enabled in its Cocoa counterpart.
Change-Id: I88eb6dddabb173050c4fe7229f15c768181ef527
Task-number: QTBUG-69453
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
CSS geometry constraints such as "min-height" or "min-width"
will set size constraints on the widget.
Removing the stylesheet should remove these constraints.
Task-Id: QTBUG-69418
Change-Id: I1008e4390281c90112303d72dd7d59a8acddfcd9
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.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>
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>
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>
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>
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>
Found while compiling on FreeBSD 11.2 (clang 6 update has the warning):
/usr/local/include/X11/Xlibint.h:675:7: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
Change-Id: I117816bf0f5e469b8d34fffd153e6482ccaed69f
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Specifically, commit e80a3b49c0 introduced
the use of some QT_VERSION_CHECK macros to distinguish some methods'
visibility between Qt 5 and Qt 6, however the QDoc falsehoods variable
(added sometime prior) was sensitive to whitespace, and did not
correctly recognize those version checks. This resulted in some methods
being incorrectly documented as public instead of protected, or vice
versa.
This change simply makes the QT_VERSION_CHECK in QDoc falsehoods allow
for optional whitespace.
Methods affected by this change (in documentation only):
* QListWidget::dropEvent()
* QTableWidget::items(), ::indexFromItem(), itemFromIndex()
* QTreeWidget::items(), ::indexFromItem(), and itemFromIndex()
Task-number: QTBUG-68005
Change-Id: Ibe3e780334a9a915989ed43b5cdda6915c9161ec
Reviewed-by: Luca Beldi <v.ronin@yahoo.it>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Extend description of QAction::checked() and QAction::toggled(), as
it is not clear from the documentation that calling QAction::toggle
causes the emission of a QAction::changed signal.
Task-number: QTBUG-68213
Change-Id: I5afa4d9a6e6f001dff81271d1e34d0c515da3c24
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
A touch press event's state has to be set to "stationary" after the
touch event (including its list of touch points) has been passed to the
QWindowSystemInterface. Following touch events (that are caused by another
id) will not change the press event's state which can otherwise cause more
than one press event for a given id in a multitouch setup.
Task-number: QTBUG-58793
Change-Id: I44628912251beacfbda7dd37059577cb1d085bd5
Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Register QXcbXSettings object as a listener of events
received by XSETTINGS window. It was forgotten to be done
in 0f31a5d91f which
introduced QXcbXSettings.
XSettings are used by QXcbCursor to get cursor theme.
Without this change QXcbCursor can't react on theme change.
Change-Id: I0fdd4c913b1d7a482b507c5a054b7052cac61666
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
When a screen is positioned to be above another, then the toolbutton
menu could be shown on the wrong screen if it was deemed to not fit
below the button the same screen. This ensures that it shows it on the
right screen when there is sufficient space to do so.
Change-Id: Ia626b28f74c1931904ff5b30cca17e63914d3c79
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
The copyright year of the qgrayraster.c dependency was incorrectly set
to “2006-2015”, instead of 2000-2016 (as stated in the file’s header
comments). This commit solves this issue.
Task-number: QTBUG-69261
Change-Id: I307b6eabdd133fe4f8371b963577b59af8620838
Reviewed-by: hjk <hjk@qt.io>
Add information about to which physical key this virtual key code is
commonly mapped.
Task-number: QTBUG-68497
Change-Id: I467516ad0c731efb48b62fe64d723acd7c38f2b1
Reviewed-by: Nico Vertriest <nico.vertriest@qt.io>
This event relates to xcb_screen_t (virtual desktop), not to
RandR crtcs, so move its processing to QXcbVirtualDesktop.
Currently it triggers redundant calling of RRGetCrtcInfo
(from QXcbScreen::updateGeometry()). It's called anyway after
receiving RRCrtcChangeNotify, so just drop it.
There is also a mess between the rotation of Screen and
crtcs, obviously they should be processed separately.
Task-number: QTBUG-65598
Change-Id: I124752ccbde03adb15e9ba592dd8b2d8d7fc35f4
Reviewed-by: Daniel Vrátil <dvratil@kde.org>
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
For some reason, the solution generator was looking for the xcodeproj
files in the source tree. It should look for them in the output tree
instead.
Task-number: QTBUG-69244
Change-Id: I7525886d614ddfdee705b27aacafc8f90a6f9d1d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
the code ensures that the path ends with a path separator, which is
unhealthy under mingw when the command ends with that path, because it's
interpreted as a line continuation.
the easiest fix is just duplicating the name of the moved file to the
destination side.
the cleaner fix would have been cleaning up the path separator mess, but
that's a more invasive change and doesn't seem worth it.
Task-number: QTBUG-69255
Change-Id: I338f8997b84ed7049b5665872dd25f90b9d4d16a
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Handle hard zero independently in each coordinate, otherwise hard zero
is never equal to anything but itself.
Task-number: QTBUG-69368
Change-Id: I8b1131472bb92efc706a04e0b067e2211a5ccb0c
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
We rely on AppKit repositioning the window if the original position
is not on any of the available screens. We do this by keeping the
original position, but using the primary screen as reference.
This doesn't work unless the window has a title bar, so in the corner
case where the window has an invalid position, we apply the title bar
style mask for a brief moment, so that AppKit will place the window
correctly.
Task-number: QTBUG-69221
Change-Id: If66cac36bf36f051570ba5854951ce4504fe771f
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
The types have the same size. So it's stupid for it to make the issue a
warning...
qkmsdevice.cpp:737:88: error: format specifies type 'unsigned long long' but the argument has type '__u64' (aka 'unsigned long') [-Werror,-Wformat]
Change-Id: I117816bf0f5e469b8d34fffd153e640b62bef635
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
qbsdfbscreen.h:57:10: error: 'initialize' overrides a member function but is not marked 'override' [-Werror,-Winconsistent-missing-override]
Change-Id: I117816bf0f5e469b8d34fffd153e649318d2fd7c
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
Qmake accidentally replaced all occurrences of the library name in the
build path. This would lead to problems if the (shadow) build path also
contains the library name.
Task-number: QTBUG-69279
Change-Id: If99acccc779ff0874433b193be7e7fc53625b245
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
QSKIP() discards the whole test it appears in; so is not the right way
to announce that (and why) the test has just skipped a few sub-tests.
This was concealing a later failure on macOS, here fixed.
Change-Id: I9b07208413b9e101569a22505ad41f07ade4062b
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
QSKIP() discards the whole test it appears in; so is not the right way
to announce that (and why) the test has just skipped a few sub-tests.
This was concealing a later failure on macOS, here fixed.
This matches an earlier fix for tst_QDateTime.
Change-Id: Idaf34a9d60d84202fd41d15455209457cc281f60
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QML fails to draw when this is used on at least one jacinto6 platform.
Works when it's disabled.
Task-number: QTBUG-68227
Change-Id: I7b3c081d4d5a4fe22136f4bdd8ad1f34495cd94a
Reviewed-by: Adam Treat <adam.treat@qt.io>
Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>