Deprecate the constructors, add guards.
Use a QStandardItemModel in tst_QCompleter::setters() instead.
Task-number: QTBUG-69410
Change-Id: If77298982bb3d0b5321ae1271fab3f33b196101d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
- Remove member m_testWidget; instantiate test widget on the
stack where needed
- Introduce nullptr
- Use range-based for
- Streamline some code
- Fix static invocation
- Fix class structure, add override
- Use initializer lists
- Fix some style issues
Task-number: QTBUG-76493
Change-Id: If339d51a16bb77565cf10404ad1266c8f63a68b4
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
The test requires High DPI scaling to be disabled since it
manipulates the factors itself in a test.
Turn it off initially and introduce a member variable
containing a suitable size depending on the screen to make the
test pass on High DPI screens without violating minimum window
widths on Windows.
Task-number: QTBUG-76493
Change-Id: I7b908940413d6a35a4bee781b4df07a31069bb17
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
The same change was done for QVector and QString for 5.6 while
QByteArray was not done/forgotten. For the sake of consistency
we should converge on one type of behavior.
The change mirrors the one for QString:
50ab7c16d4
[ChangeLog][QtCore][QByteArray] resize() will no longer shrink the
capacity. That means resize(0) now reliably preserves capacity().
Change-Id: I4fcfa92f75fa472af0eaab567e1cdd62e6d336b0
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
When reallocating we assume we will grow more and increase the size to
the next power of 2. However, this might be a size where we end up with
space we cannot take advantage of. Such as having 4 bytes free at the
tail when we have 8 byte objects. The larger the objects are the greater
the chance is that we will end up in this situation, and it would have
a greater chance to leave big allocated chunks unused.
Change-Id: Ifea3d92763c1bafd489b66605c741447e5a57d5a
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
If set, schedule a call to remove the notification (NSTimeInterval is
specified in seconds). The system might hide the notification balloon
earlier, but the notification will still be removed from the message
center after the specified interval.
Task-number: QTBUG-77150
Change-Id: I510e412beb16e9de271290798f3e66310f44df4f
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
This is default behavior on macOS, and also the behavior on Windows.
[ChangeLog][QtWidgets][QSystemTrayIcon] On macOS, clicking on the
message will remove the notification.
Change-Id: Ie30f7dacf478af76ccb53d16aea8f122869072c8
Fixes: QTBUG-77150
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Trivially reproduced by the systray example.
Task-number: QTBUG-77150
Change-Id: I888db728741c35e8b0378c38c8747ad163cad47d
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The classes are there. There is no need for the extra #if-ery.
Change-Id: Ic92ff894d6c9d26dbe32ca83b9501fa8d07e3d44
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
With libxcb 1.11 as minimal required version we can:
(a) (Maybe) Enable threaded GL for MESA, see QTBUG-67277.
(b) Avoid performance issues described in QTBUG-46017. Bundled xcb libs don't
contain the more modern SHM fd passing APIs. The official binaries use
"-qt-xcb", therefore we were shipping with the performance fix #ifdef-ed out.
(c) Make xcb-xkb a mandatory dependency avoiding issues described in QTBUG-30911.
Issues that appear when Qt was configure with "-no-xkb -xcb-xlib", but
X server has the XKB extension.
(d) Drop all, but xcb-xinput sources from src/3rdparty/xcb/, for which
we need "xcb-xinput >= 1.12". This way we can reduce maintenance
work. The xcb libraries were origianlly bundled because of lack of availability
on supported distributions. This is not the case anymore:
CI for Qt 5.13 has:
Ubuntu 18.04 - libxcb 1.13
RHEL 7.4 - libxcb 1.13
openSUSE 15.0 - libxcb 1.13
CI for Qt 5.12 has:
Ubuntu 16.04 - libxcb 1.11
RHEL 7.4 - libxcb 1.13
openSUSE 42.3 - libxcb 1.11
RHEL 6.x - not relevant because it was dropped from supported platforms.
Why 1.11 (released on Aug, 2014), but not 1.13 (released on March 2018)?
Based on what we have in CI for 5.13 and 5.14 we could update to 1.13,
but it means that Qt would require a very recent version of 3rd party
dependency.
[ChangeLog][Configure][X11] The minimal required version of libxcb now is 1.11.
[ChangeLog][Third-Party Code][X11] Removed all bundled XCB libs, with
the exception of xcb-xinput, which is not available on systems with
libxcb 1.11.
[ChangeLog][Configure][X11] Removed -qt-xcb, -system-xcb, -xkb, -xcb-xinput switches.
[ChangeLog][Platform Specific Changes][X11] XKB and XInput2 now are mandatory
dependencies for XCB plugin. XCB-XKB is a part of libxcb 1.11 releases.
XCB-XInput is not part of libxcb 1.11 releases, but Qt builders can use
-bundled-xcb-xinput switch.
Fixes: QTBUG-73862
Fixes: QTBUG-73888
Task-number: QTBUG-67277
Task-number: QTBUG-30939
Change-Id: I4c2bd2a0e667220d32fd1fbfa1419c844f17fcce
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Multi arch build in one go is need to support the new .aab packaging format.
By default the users apps are built for all Android ABIs: arm64-v8a armeabi-v7a x86_64 x86
The user can pass ANDROID_ABIS to qmake to filter the ABIs during development,
e.g. qmake ANDROID_ABIS="arm64-v8a armeabi-v7a" will build only for arm ABIs.
[ChangeLog][Android] Android multi arch build in one go,
needed to support the new .aab packaging format.
Change-Id: I3a64caf9621c2a195863976a62a57cdf47e6e3b5
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
QColorConstant is a C++11 version of Qt::GlobalColor, except that instead
of Qt::red being an enum, QColorConstants::red is an actual QColor instance,
a bit like in the Qt 3 days.
In addition, the SVG names that QColor understands are also available,
with the same values. Technically, when building a QColor from a color
name, QColor ignores casing and whitespaces; we stick to the SVG/CSS
official color names (which are lowercase), and prefix them with Svg
to clarify where they come from. For instance, note how SVG's gray
is not Qt::gray.
[ChangeLog][QtGui][[QColor] Added QColorConstants, a namespace
containing constexpr QColor instances.
Change-Id: Ic9fab26a9a537fcc43cc230da28f4c6314a32438
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
The test requires High DPI scaling to be disabled since it
captures widgets.
Turn it off initially and introduce a member variable
containing a suitable size depending on the screen to make the
test pass on High DPI screens without violating minimum window
widths on Windows.
Change-Id: Ida9f306cff6abd48ee5de7001c7670a0da60c6c2
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
- Fix includes
- Add window titles
- Introduce nullptr
- Remove unneeded C-style casts in QCOMPARE
- Replace remaining C-style casts
- Use range-based for
- Fix static invocation
- Fix class structure, add override, use member initialization
- Fix top level widget leaks and add a check
- Silence debug output by using a logging category
- Use Qt 5 connection syntax
Task-number: QTBUG-76497
Change-Id: I77532a517353d04d1da43ce844988ee0ac2ffc7d
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
- Replaced the usages of deprecated QWheelEvent::delta() and
QWheelEvent::orientation() with QWheelEvent::angleDelta().
In most of the examples it is acceptable to use only the vertical
component of angle delta.
- Made the docs APIs to build conditionally, based on the
deprecation version.
Task-number: QTBUG-76491
Task-number: QTBUG-76540
Change-Id: Id4230d483f724af49e4b6349b44881c3944de2a2
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Is pretty common on some architectures so we can avoid swizzling by
supporting it.
Fixes: QTBUG-45671
Change-Id: Ic7a21b5bfb374bf7496fd2b2b1252c2f1ed47705
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
For tst_QFrame and tst_QOpenGLWidget, force scaling off
since they do screen captures which would fail with
scaling activated due to different device pixel ratios.
For tst_QGraphicsItem and tst_QHeaderView, force
scaling on for Windows since some tests otherwise fail
due to violation of the minimum size constraints of
framed windows on Windows.
The tests will then pass regardless of any environment
setting of the scaling variables on a developer
machine.
Change-Id: Iefa4e84b433f7e51dce4e416546a9eda8ee6d0f1
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
The test contained outdated baseline images for
1) Windows Vista: They were only used for OS version Vista
and do not match any more.
2) macOS: They were apparently were not in use any more
Remove the testing and image comparison code.
Task-number: QTBUG-76493
Change-Id: I91cec5113db8d1845b43f97ad2987e63d9f86ac7
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
The commands are separated by "if errorlevel 1 goto VCEnd" lines to
make sure we abort on the first failure. However, we also insert magic
comments starting with "Rem" for IncrediBuild. These do not need
error checking. Also, the last command does not need error checking.
The XML line ending entities are also unneeded. By using proper line
endings we ensure that commands appear on separate lines in Visual
Studio's property editor.
Change-Id: Ifbf7525281e892c820034fafc64b555fff3dc756
Reviewed-by: Miguel Costa <miguel.costa@qt.io>
Add support for specifying the blend operation used when alpha-
blending KMS planes. Only available with atomic modesetting.
Set the environment variable QT_QPA_EGLFS_KMS_BLEND_OP to
the enum value of the 'blend_op' property.
Task-number: QTBUG-75659
Change-Id: If0ef5ba314b88adb530113b608d20fc9c027c5ec
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
And send it in our 'SETTINGS' frame. Add an auto-test
for this and (as a bonus) - fix a bug accidentally
introduced by the previous change.
Task-number: QTBUG-77412
Change-Id: I4277ff47e8d8d3b6b8666fbcd7dc73c827f349c0
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Otherwise, we get a warning:
QWARN : tst_NoQtEventLoop::consumeSocketEvents() QWindowsContext::windowsProc: No Qt Window found for event 0x2a3 (WM_MOUSELEAVE), hwnd=0x0x9b80646.
in the event loop which is running by another test. So, add missing
'delete' call.
Change-Id: Ib9b24155bdd6e78062a5234c317c9f878906e413
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Follow Google's BuildSystemMaintainers doc to simplify (a lot) the clang support
It is needed to support future NDK releases painlessly.
Also remove old workarounds.
[ChangeLog][Android] Android depends on NDK r20+
Change-Id: Ib4c07fc71e0f5a264d804b0b3baa18ff79d07630
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Now that result objects can't alias source ones anymore, the order of
writes no longer matters, and we can clean this function up. The
pattern of the algorithm now becomes visible. Before, it was just
drowing in noise.
Change-Id: I36c55ce09d6e13a994c7eda17d96cfe960e7fb95
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
If b becomes false, we won't call setData ever again.
Just bail out the loop early and return in that case.
Change-Id: I4b0ed7e21546d686bc3f785209a314a8bed08471
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
At least QBezier itself is calling the old function with *this aliased
to one of the arguments. Consequently, the implementation looks rather
... shuffled, to avoid writing into members that it will read once
more later.
Fix by returning a std::pair<QBezier, QBezier> instead. This
simplifies the code that doesn't actually pass existing objects in,
and avoids aliasing problems cropping up under seemingly innocuous
reorderings of statements in the implementation going forward.
While I'm usually vehemently against use std::pair or std::tuple in
APIs, preferring simple structs with aptly-named members instead, this
is one case where the .first and .second actually fit, and pair allows
us to use std::tie, which was handy in qbezier.cpp.
This patch preserves the body of the function as much as possible. A
follow-up patch will clean it up.
Change-Id: I017dfee4a0e69a2e171ce21b89ba04654772c33d
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
These functions tighten the integration of QMargins(F) with the rest
of the geometry classes by providing a way to apply margins to sizes
(and later, rects).
Apply them in a few obvious cases across QtWidgets.
[ChangeLog][QtCore][QSize/QSizeF] Added grownBy(QMargin(F))/shrunkBy(QMargin(F)).
Change-Id: I8a549436824cdb7fb6125a8cde89d5bf02826934
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This is really just an optimization, but I suspect the author of the code
assumed that the bitwise &= operator short-cicuits. (It doesn't). So this
patch should then fix the code to have the intended behavior.
We don't have to check for failures in the remaining output files once
we've found one. pullFiles() returns just a bool indicating if one of the
output files has a recorded fail, so checking the remaining output files
after the first found failure is just a waste (and ideally they should
contain the same failure (however, flaky tests might break this ideal)).
Drive-by fix.
Change-Id: I951e500a69198e7ed124be32199ac81bbddb9bf7
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
QHttp2Configuration is using entities (read definitions) from http2,
which is only conditionally included in the *.pri file (requires http).
So as a result we had linker errors.
Fixes: QTBUG-77759
Change-Id: I8b33b0a4802a295f67edad03da3743b24f7ce514
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
The VS project generator never calls the Win32MakefileGenerator code
that sets up DEST_TARGET which is used for checking for conflicting
DESTDIR/TARGET combinations on Windows. Replicate the setup in
VcprojGenerator::initProject().
This amends commit e75aed1a.
Change-Id: I4238eb2f57615095c372cee9ada9fc961cc36133
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
It's temporarily storing QByteArrays before we copy them directly to
QIODevice's internal buffer. We can save the extra work by just push
them directly into the buffer.
The signal compression is no longer useful performance-wise, but is
kept as it will throttle the amount of readyRead emissions the users has
to handle.
Reorder some of the operations as a result to make it more natural.
Change-Id: Ifc0481d56fec42545e95970125d883a5c68d647a
Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
This is a follow-up to commit b7d073e990,
which refactored memory allocation of QMetaCallEvent.
Change-Id: I363256c80ee941b545e6f9c659c65556fff5c907
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
QFontPrivate::screen was not used anywhere so remove it.
Change-Id: Ie9381d08b59b93c4e7bcaad58ebf1b389aa0a2e6
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Upon reading the Apple's documentation it would appear the indexing
is more complicated (they name the specific fields and which kind
of indexing must be applied to each). This requires a finer level
of configuration/control and probably a separate class (aka
QHpackConfiguration? ;). We'll provide it in future, if requested
by our users.
Fixes: QTBUG-77412
Change-Id: I6e9461b3966ed59c8b70873eab999a07a04eb289
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
And either compress or not.
Task-number: QTBUG-77412
Change-Id: I3b09385d2b3caf4f7de0455ad6e22c0f068c33a9
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Simplifies the code a bit and will be helpful when I add the Linux
equivalent.
Change-Id: Iec9c051acd73484c8d94fffd15b99879dc269db9
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
For forkfd, this is extremely useful, since users can rely on proper
atomic API, not the old GCC API or the internal API that backs the C11 /
C++11 implementation itself.
This also caught one more mistaken use of seq_cst.
Change-Id: Iec9c051acd73484c8d94fffd15b9985fe545e8b5
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Missing one "struct" and one #include <sys/wait.h> for
struct rusage.
Change-Id: Iec9c051acd73484c8d94fffd15b9a1274703afca
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
It couldn't find the test images if not build in sources.
Change-Id: Ieeb5a76694a37d05b3e9a4ed0154885040b0812f
Reviewed-by: Daniel Smith <Daniel.Smith@qt.io>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Sub-projects in VS solutions must have unique project names. If there
are multiple projects with the same TARGET then QMAKE_PROJECT_NAME must
be set to different values.
The .sln generation code did not use QMAKE_PROJECT_NAME and produced
.sln files with equally named sub-projects.
Replace the 'orig_target' member of VcsolutionDepend with a
'projectName' member and use it when writing the .sln file and for the
misnamed "GUID map" that's supposed to have unique keys.
This commit amends 9e750d34 (qt/qt.git).
Fixes: QTBUG-77639
Change-Id: I81c64f8bc6baeb6d99e9d5808fb73dfd7aaaeeb8
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Since its introduction in commit
65bb1a25419210e6097cad973fb847aa3719c09b (old internal history, 2005)
with the commit message "optimizations I've been sitting on here"
we're dragging along this dead code. It is time for removal.
Change-Id: Ic7902ebb8c402734974ad6651a1371d1e5bf93c5
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Saves a file by file download, where the user can choose
the file name and location using a file dialog.
Change-Id: I4d2ecc76fc33bb65fdf3d7ca3fcd9566c62547dd
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
- Build the docs for deprecated APIs conditionally, based on
deprecation version.
- Remove the docs of methods deprecated since 5.0.0, these methods
are not compiled anymore.
Change-Id: I2c1b038ce125ca737944f4fc4a28e2f6852eaded
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Had to port a lot of caching temporaries, too. Decided to leave them as
crefs to unique_ptr to catch any mischief users may be doing with the
raw pointer instead (like deleting it).
Also fixed a use of 0 as nullptr (by standardizing on pointer-to-bool
conversion, as is done everywhere else in qwidget.cpp), and made one
impregnable if condition readable.
Change-Id: Ifdc240bf352c52de0bc3c186fa7a5f4cb2882dd0
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
That way the image formats with color space supports all have both read
and write support.
Change-Id: Ib52ebd56192c4a8a0897a6afc7c4a26020319270
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>