When calling resize() from showEvent(), we'd set the full geometry
on the widget's QWindow. This resulted in the top-level window
being moved to the top-left corner, even though no other call to
move() or setGeometry() had happened before.
The solution consists on calling the proper QWindow methods depending
on whether setGeometry_sys() is called for a move, a resize or both.
Furthermore, this needs QWindow::resize() to set its position policy
to frame-exclusive. The documentation states that is already the case
and we're setting the full geometry on the platform window, so we need
to convey that bit of information.
This also solves the age-old conundrum: "### why do we have isMove as
a parameter?"
Change-Id: I2e00fd632929ade14b35ae5e6495ed1ab176d32f
Task-number: QTBUG-56277
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Speeds up testing by a factor of 2.
Task-number: QTBUG-61827
Change-Id: I9d6c9d9786d35af3083bc7e98beb9a79dbcc7e11
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Unsetting the SOFTWARE environment variable will force lpstat to use
English for the output, so we can ensure that the test will pass
regardless of the language used for the machine.
Change-Id: Iddf5e8aadaa546ae3e0dd172df84e4e43ee02c2a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Introduce helper function which uses a number to build
unique names. Remove helper for deleting files since it
now uses a temporary directory. Add a few cases
that were overlooked in 88c68f4d9e.
Task-number: QTBUG-61827
Change-Id: I53355f99ffc3bfe6ad6994a5439710c9fa8cdad5
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
A case of nested Qt::WindowStaysOnTopHint may occur when
context menus are created on windows with Qt::WindowStaysOnTopHint
set. Raise the popup in that case.
Amends 329a029c36.
Task-number: QTBUG-62004
Change-Id: Ifb761edbd42b1447bec30735810c006d02e1aa97
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
[ChangeLog][Binary Compatibility Note] The variable
QOperatingSystemVersion::AndroidOreo was added in this release.
Code that uses this variable will not run under Qt 5.9.1.
If backwards compatibility is desired, use instead
QOperatingSystemVersion(QOperatingSystemVersion::Android, 8)
Change-Id: I1da5a5577bf6b719e543a1ded1f9b912a83665c3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Move deprecated and obsoleted enum values to the end, as there already
was a category for them.
Fix linking to 'Q(Gui)Application'.
Update the usage of the name macOS.
To make the table more readable in online style, add zero-width spaces
to long strings, allowing browsers to word-break them, thus avoiding
text overflow/horizontal scroll bar.
Task-number: QTWEBSITE-783
Change-Id: I0a96156d24cba4a0405c4edd8d3829def30c69bf
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
We have to exit composition mode before inserting text. Otherwise, the
state of the input method will be out of sync with the contents of the
text editor.
Task-number: QTBUG-61717
Change-Id: I58bf3988ae9e0acf3302e810e46bb0ebeda30d17
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Propage event to all sibling screens resulting in enter and leave
events being properly sent.
Change-Id: Ia89d53105f6303fae3f304ce0920b5a4a24f86ae
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
The artefacts appeared for square-capped dashed pens when the end of
the line fell a tiny fraction into the start of a new dash. At that
point in the dashing algorithm, accumulated precision errors in the
'length' variable could make it slightly differ from the actual length
between the start and end points of the line fragment. Although both
values would be "almost zero", the rasterizeLine() function's square
capping would make the error very visible; see the bug report.
Fix by calculating the precise length of the last line fragment.
Task-number: QTBUG-56969
Change-Id: I7b69c0d465649be61fb87ac7b8348f0c299486ee
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
The $${TARGET}_manifest.bak file was not removed on "nmake clean".
Task-number: QTBUG-59827
Change-Id: Ia5b636f4917f3e7a2df8d753824b72e63d278005
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Change-Id: Id9558fa1db6a7a8f29149e26c761450f58b74b81
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Change c12072c685 fixed a problem
where tab labels would overlap with the icons if the tab became
too small to contain the text. But it did not properly account
for the full area occupied by the icon, because the horizontal
padding is hardcoded to 4 in the mac style, whereas in the
common style (where the icon is drawn) it uses the pixel metric
for this.
In addition, the change only allocated space on the left side,
causing the label to no longer be centered.
Task-number: QTBUG-61235
Change-Id: Ieec4f7044584361f92045addbc8bbd81bd5c9fc7
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Calling QCoreApplication::processEvents() from a slot connected to the
readyRead() signal might cause desynchronization in the waitForXXX()
loop, if the process has been finished during the event processing.
This results in unnecessary timeouts and causes waitForFinished() to
fail unexpectedly.
So, a proposed solution is to check the state on each iteration of the
loop, as Windows implementation does.
Given issue is tested by tst_QProcess::processEventsInAReadyReadSlot()
which was unstable in CI.
Task-number: QTBUG-62584
Change-Id: I7438cf67b0163bbf49314008a9dc660c0977fb7b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Unified headers now defines _POSIX_THREAD_SAFE_FUNCTIONS but not all
libc functions are available in all Android API versions.
Change-Id: I01c94f0b89e7f8aa8575e7bbda28d9fe41a68ff1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The only reason our code wants PKCS12 files is for a private key, but
a valid file needn't contain one; and reading a file without lead to a
crash in QSslKeyPrivate::fromEVP_PKEY(). So check for missing key and
fail the load, since the file is useless to us. Also ensure the
caller's pkey is initialized, as we aren't promised that
PKCS12_parse() will set it when there is no private key.
Add a test for this case (it crashes without the fix) and update the
instructions for how to generate test data to cover it also.
(Corrected the wording there, too; at the interactive prompt,
"providing no password" really provides an empty password.)
Task-number: QTBUG-62335
Change-Id: I617508b903f6d9dee40d539b7136b0be8bc2c747
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
The function returns a const char * out of a QByteArray. We must
be sure that the QByteArray outlives the function, otherwise the
pointer returned would be dangling. Add an assertion for that.
Found by clazy.
Change-Id: I3416af4eb5ec79ddb3e4baf3bdcfe046b44d4225
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
The function and type is only used in the tests and has no benefit in
applications so it should be marked as internal to avoid confusion for
those implementing their own drivers.
Task-number: QTBUG-56278
Change-Id: I0f2ae27d41b133c4f0d3b0d390688fd3307592ce
Reviewed-by: Andre Somers <andre.somers@kdab.com>
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Although the window is refused input for the most part from the system,
it does not act like that it is blocked by the application modal dialog.
This ensures that it is the case and prevents things like being able to
double click on the title bar to maximize the window on Windows.
Task-number: QTBUG-49102
Change-Id: If1582819b90cb2ec9d891f664da24f13bfec7103
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
5ad2e1cea1 exposed a
latent bug when matching font weights that do not exactly
match any of the canonical weights in the system .
It seems that when we registered the font with FontManager,
it would modify the font weight to match a system weight,
while we now get raw values from the font instead.
So for Roboto Medium, for instance, we would now get
0.2 instead of 0.23, and since our conversion logic
would convert everything between Light (-0.4) to
Medium (0.23) to QFont::Normal, we would regard this
as normal weight instead of medium.
But on a linear scale, it makes more sense to match
to the closest canonical weight instead of requiring
exact matches.
Note that the definition says that the middle between
two weights should tend upwards, therefore we do the
comparisons in decreasing order.
[ChangeLog][QtGui][Text] Fixed matching of non-regular
font weights for application fonts on macOS.
Task-number: QTBUG-61520
Change-Id: Ieda4927c2c69ec72125257340cf06c683b031d05
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
On Windows and macOS, that area of the menu can become inaccessible
if the menu is tall enough. Since these are not popups but tool
windows, the test for UseFullScreenForPopupMenu should not apply
for torn-off menus.
Change-Id: Ife7836bef568896a5bb67d42a2af412f06a871d6
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
So far this only covered the QT_xxx_LIB define, but not any other defines
a module might export (such as QT_NO_QML_DEBUGGER which hasn't been ported
to the new configure system yet).
Change-Id: I8aae2354fed77a6f0e527ad8d63d25654bb067d0
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
A loopback address warrants the same exception as local files.
Task-number: QTBUG-59219
Change-Id: Ie0a75faa558d6596455da38656c8749c994d0fd8
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QMAKE_LINK_OBJECT_MAX is actually a property of the host, not the
target.
this works around binutil's inability to use thin LTO objects in
conjunction with an MRI script
(https://sourceware.org/bugzilla/show_bug.cgi?id=21702).
Task-number: QTBUG-61335
Change-Id: I90a1334b9c905c433b35546e8f3f3b5089d2c65b
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
doing so is somewhat likely to cause follow-up issues, as it turns the
source tree into a build tree as a side effect.
note that this change does not affect building examples inside an
install tree, even if doing that is still ugly.
Change-Id: I386bf2ab959269f55553c70b7551dd9afec2bcba
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
qt_example_installs.prf is loaded by every sub-project inside the qt
tree, as qt_build_config adds it.
Change-Id: Ice7e81b280b6964ed5cc1b9f1501bf74df737d7e
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
don't complain about library inline sources which have 'builds' but no
'libs'.
Task-number: QTBUG-62150
Change-Id: Ib215d438fc02ebdafde95f31cd48088b1bafc663
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
there doesn't appear to be a reason for the former complexity.
QMAKE_CONFIG_LOG was already assigned the simple way.
Change-Id: I6b7e3b5b97c7647237841fa5e16c4959079edc16
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
The strings remember in which file they were created/assigned.
However, this used a non-counting reference to a ProFile, which could
become dangling. If a subsequent ProFile re-used the exact same address,
a string's source would be mis-identified, which would be fatal in
conjunction with discard_from().
Since we actually need only a unique id for comparison, let's use an
integer for that.
Task-number: QTBUG-62434
Started-by: Simon Hausmann <simon.hausmann@qt.io>
Change-Id: I395153afaf7c835d0119690ee7f4b915e6f90d4a
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Empty menus on a menubar are hidden by default. If the menu gets
added to the menubar before it contains any item, we need to get
the menubar to sync the menu, which will update its native menu
item hidden property.
Menurama manual test's 'Add Many Items' button should now work.
Change-Id: I8ce1df21031c171789318fdf28ae495819458d71
Task-number: QTBUG-62260
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Calling -[NSMenu update] every time we add a new item can result in
a quadratic behavior since the function itself will iterate over all
the items in the menu. We solve this by using a 0-timer which will
trigger the call to update the next time the event loop spins.
Menurama manual test updated.
Change-Id: Ic155d364515cc93eb81b1c8085c8e44c93799954
Task-number: QTBUG-62396
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Statics and threads don't mix well. There can be multiple threads
calling QEvdevTabletHandler::readData() simultaneously if you have
several tablet devices registered with the plugin, creating a race on
the static buffer array.
Make the buffer a simple local variable instead, the array is small
enough that we can afford the per-thread stack allocation.
Change-Id: I4487add8df50743b8178ca6faeb9be45231ccb78
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
If we reach the maximum reconnect attempts for an HTTP request with
pipelining enabled, those also need to be requeued during cleanup for
the connection channel. Otherwise future successful requests on that
same channel will incorrectly assign the data to replies from the old
pipelined requests, resulting in swapped data in the replies.
Task-number: QTBUG-62286
Change-Id: I804b8ac280957b518d63b2341e469a13315a8c27
Reviewed-by: Markus Goetz (Woboq GmbH) <markus@woboq.com>
Added binary compatibility files for Qt 5.9.0.
'QOpenGLExtraFunctionsPrivate::Functions' and
'QOpenGLExtraFunctionsPrivate' have been blacklisted in
qtqa/tests/postbuild/bic/tst_bic.cpp, because those give false
positive fail in the binary compatibility tests.
Change-Id: I2231daef61a0c4677af36c85575b8dcd81070d44
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QLineEdit with a mask does not return empty fields with the
ImSurroundingText query. This is a problem for the input
context that is not aware of the mask and relies on the
fact that the cursor position never exceeds the boundaries
of the surrounding text.
This change fixes the issue by returning unmasked text with
the ImSurroundingText query.
[ChangeLog][QtWidgets][QLineEdit] Fixed behavior of the
ImSurroundingText query. Previously, it returned a masked
text whose length may be less than the cursor position.
Now it returns unmasked text, so the text length is always
greater than or equal to the cursor position.
Task-number: QTBUG-60319
Change-Id: I1c8009164836a1baa2e3a45958bf1ea5fa9be38d
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
it's unclear where to look for the error when the message talks about
'g++' when '${CROSS_COMPILE}g++' would have been expected. help it by
saying whether it was supposed to be the host or target compiler.
this also centralizes the error emissions in a function.
Change-Id: I454c6ff7c0e7dd945dcee0de01e2818caeeb7409
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Using int as the operation parameter was wrong. It meant any write or RW
ioctls (which have the MSB set) would be sign-extended to 64-bit when
calling the native API. Depending on the OS, the upper 32 bits were not
cleared prior to comparing with the call number, resulting in
unexpected errors.
Linux and FreeBSD operated properly; I only got the error on Darwin.
Change-Id: Iaf4157b7efa2416d898cfffd14d985af65c1ff89
Reviewed-by: Jake Petroules <jake.petroules@qt.io>