Tests focusProxyAndInputMethods and
multipleToplevelFocusCheck will be blacklisted
Task-number: QTBUG-84259
Change-Id: I7d5baf1e700192eed3c7c8dcfe671e247f11b8c7
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
Instead of manual string splitting (EW!), use QDateTime parsing.
Moreover, X.509 certificates *must* have a valid start/end date.
In case of parsing failure, reject the certificate. An autotest
for this last case is coming in a separate patch.
Change-Id: I934bf9e6a4a92e4befdb3b0f9450f76f67bad067
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
When storing a void* pointer to the texture handle, we had
to ensure that the variable would exist until the build phase,
which is error prone and caused errors in QQuickWidget because
we copied the texture ID from the FBO into a local variable
before passing it into QQuickWindow::setRenderTarget().
The reason for using a void* was that we cannot know the width
of the handles in the different backends, but we do know that
they are 64-bit at maximum, so instead of storing potentially
dangling pointers, we just make it a 64-bit integer and cast
it back and forth in the backends.
Task-number: QTBUG-78638
Change-Id: I7951e24351ddb209045ab6197d81eb1290b4da67
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
resize() to a smaller size does not reallocate in Qt 5 if the container
is not shared. Match this here.
As a drive-by also fix resize calls on raw data strings to ensure
they are null terminated after the resize.
Change-Id: Ic4d8830e86ed3f247020d7ece3217cebd344ae96
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Added QFuture::onCanceled() method, for attaching handlers to be called
when the QFuture gets canceled.
Change-Id: I1f01647d6173ba0c1db6641e14140108b33ac7c4
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Introduced QtFuture::connect(sender, signal) function returning a
QFuture object, which is resolved when the signal is emitted.
Task-number: QTBUG-81589
Change-Id: Idbe301eb247b468b9b34f3470c3359d6a7af2f3a
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
The class is documented as obsolete, and the majority of APIs is marked
as deprecated. In this first phase, remove all explicitly deprecated
APIs and trivial implementations.
The test case is complete removed; what's left when code that uses any
of those deprecated methods is removed is not testing anything
meaningful.
For some methods, there is no practical replacement using QScreen yet,
and QDesktopWidget is still used in QWidget internals. Those require
refactoring to only use QScreen before the rest can be removed.
Change-Id: I8f7c968ec566820077221d37b817843758d51d49
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Rather than have a paletteChanged() signal which can be connected to for
tracking when the application palette has changed, then it is better to
use the event that is sent to all windows and the application itself.
That way it is easy for a window/widget or item that cares about the
change to the application font to catch it in the event() function.
[ChangeLog][QtGui][QGuiApplication] Deprecated paletteChanged() signal
in favor of QEvent::ApplicationPaletteChanged.
Change-Id: I95da211e30590e357007cc14d8ee266baceba7b3
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Even in Qt 5, remove() can be passed an alias to *this. In Qt 6, with
the advent of substring sharing, this will become even more
pronounced. Use the same fix as was already used in QString::insert().
Pick-to: 5.15
Change-Id: I1a0d3d99fd7dff6e727661646d2cbfdc94df2682
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
As best as I can guess, this used the QString::operator=(char), which
I locally removed. Before that lands in Qt, remove this ... wtf?
Pick-to: 5.15
Change-Id: Ie083fe69500d6b5b633416f89f5dd1d7068c20b2
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
We now assume that source code is encoded in UTF-8 by default on
all platforms (and verify this with an auto test). Provide
a CONFIG+=no_utf8_source option for backwards compatibility.
[ChangeLog][qmake] qmake will tell the compiler that source code is
encoded in utf-8 by default. This mainly has an effect on Windows, where
MSVC still assumes source code is encoded in the current ANSI code page.
Use CONFIG+=no_utf8_source to get back the Qt 5 behavior.
Change-Id: I6dcafcaeefdea7d3907ccb723aeb7d23ccc0f04f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Centralize, rather than keeping adding constructors from any
array-like container.
A more robust implementation, likely following the converting
constructor for std::span ([span.cons]), is out of scope for C++17
and will require C++20's ranges and concepts.
[ChangeLog][QtCore][QStringView] QStringView can now be constructed
from any contiguous container, as long as they hold string-like data.
For instance, it's now possible to create a QStringView object
from a std::vector<char16_t>, a QVarLengthArray<ushort> and so on.
Change-Id: I7043eb194f617e98bd1f8af1237777a93a6c5e75
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
It has been the case for both QStringLiteral and QByteArrayLiteral
since Qt 5.0, and Q_ARRAY_LITERAL since Qt 6.0.
Since it's definitely surprising, add a note in the docs, which
is "somehow" consistent with the interpretation of capacity as
the biggest possible size before we reallocate. Since it's 0,
any manipulation of the size will cause a reallocation.
(Alternatively: the capacity() is for how many elements memory was
requested from the free store. No memory was allocated, so 0...)
Task-number: QTBUG-84069
Change-Id: I5c7d21a22d1bd8b8d9b71143e33d537ca0224acd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
... without moving the mouse.
This allows to update drop action and cursor.
Task-number: QTBUG-56218
Task-number: QTBUG-82934
Pick-to: 5.15
Change-Id: I8b0ac2a008a9dbcc4c2d6abce282e6f169c2f542
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Add an operator QVariant() to QRegExp to keep things at source compatible
as possible.
Add a hack to QVariant::load/save() to recognize the old typeid
for QRegExp and stream them correctly as long as the streaming operators
for QRegExp are registered.
Also move the datastream test for QRegExp to tst_qregexp, and adjust it to
the qvariant changes.
Change-Id: I120b38a7541b43ec07a21b17f7f35c55f071eb75
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Replacement methods do now exist in QRegExp, or
for QRegularExpression when porting to it.
Remove all autotests associated with the old methods.
Change-Id: I3ff1e0da4b53adb64d5a48a30aecd8b960f5e633
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The prepares for the removal of those methods from QString and
QStringList. The new methods in QRegExp are left as a porting help.
Change-Id: Ieffa33a79caf53b83029e9b070c4eb5cadca1418
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Move pre/and post condition handling out of the main loop
to make that one as fast as possible.
Remove special handling of a corner case when the input length
is zero, where the utf8 decoder did something else than all
other decoders.
Change-Id: I94992767ea15405b38f7953adadaa6ff98b20b6f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Just so we can get this cleaned up as well and remove it from
Qt Core.
Change-Id: I2b5b821b039ce2c024ec3cb7338a1a9becdd2157
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
There's no real dependency to QTextCodec in those files anymore.
Change-Id: Ifaf19ab554fd108fa26095db4e2bd4a3e9ea427f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Document QStringConverter, QStringDecoder and QStringEncoder.
In addition, do some touches to the API, renaming one enum value,
add a flags argument to one constructor and make some members private.
Change-Id: I8f99dc3d98fb8860cf6fa46301e34b7eb400511b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Use QStringConverter instead. Also change the default
encoding of QTextStream to utf8.
Change-Id: I30682e75fe0462d1a937539f773640c83a2d82e1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
As a first step add setEncoding/encoding() methods that use the
QStringConverter::Encoding enum, and port all uses of setCodec()/
codec() over to the new API.
Internally QTextStream still uses QTextCodec, this will be ported
over to QStringConverter in a follow-up change.
Change-Id: Icd764cf47b449b57f4ebd010c2dad89e6717d6c0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This is a replacement for Qt::codecForHtml().
Change-Id: I31f03518fd9c70507cbd210a8bcf405b6a0106b1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Add method that tries to determine the encoding of the data
from an initial byte order mark.
Change-Id: I348c51a3d4db9b434af53359b739a7e17acfc760
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Add static methods that allow converting between a name for an
encoding and the Encoding enum.
Change-Id: I12bc503cf757ea31d3ca8d5e1f1216efddcb16d4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Add a constructor, that allows constructing a string converter by
name. This is required in some cases and also makes it possible to
(in the future) extend the API to 3rd party encodings.
Also add a name() accessor.
Change-Id: I606d6ce9405ee967f76197b803615e27c5b001cf
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Always encodee INI files as utf-8 in Qt6. This is mostly backwards
compatible, as old ini files would encode all non ascii characters.
[ChangeLog][Important behavioral changes] QSettings will now always
encode INI files as utf-8 (and the iniCodec/setIniCode methods are
removed). This is a change from Qt 5 and earlier, where QSettings would
by default escape all non ascii characters. The behavior is equivalent to
what you got in Qt5 by setting a utf-8 iniCodec on the settings object.
Settings files written in Qt 5 will still be readable in Qt 6 (unless
an iniCodec different from utf-8 was used), but to read Qt6 based ini
files in Qt 5 applications, setting the iniCodec to utf-8 is required.
Change-Id: Ic7dffcca17779bd5e3dae50d42ce633170289f6c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Feed the data one by one to the encoder or decoder to
verify that the handling of incremental decoding is
correct.
Change-Id: I565e4f1872e00859026334f7662b6778772e159d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
IgnoreHeader was a rather badly defined enum, in addition the
utf8 and utf16 codecs where handling BOMs somewhat different
for stateless decoding.
Fix this by introducing explicit flags for writing a bom when
encoding and not skipping the initial bom when decoding.
Source compatibility for QTextCodec is done with a couple of
static constexpr variables.
Change-Id: I0b2d94f84c937cec1e0494c16ef448c00382691d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Remove support for setting a codec different from UTF-8
for writing XML files.
All XML readers today can handle UTF-8, and there is no
reason anymore to write a file in a different encoding.
Change-Id: If89fb2d2474a2b55644d9bed7473c11ad91033eb
Reviewed-by: Simon Hausmann <hausmann@gmail.com>
The new QStringEncoder and QStringDecoder classes
(with a common QStringConverter base class) are
there to replace QTextCodec in Qt 6.
It currently uses a trivial wrapper around the utf
encoding functionality.
Added some autotests, mostly copied from the text codec
tests.
Change-Id: Ib6eeee55fba918b9424be244cbda9dfd5096f7eb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Handle wheel grabbing via wheel_widget in a single place, and
propagate events in the same way for all (spontaneous) events.
Handle ScrollMomentum the same way as ScrollUpdate to allow
partial sequences.
Fix the incorrect ignoring of wheel events by default; like all
other input events, they are now again accepted by default and
ignored in the default event handler implementation of QWidget.
This way, implementing the handle suffices to accept the event.
Note that QWidget::wheelEvent doesn't need to be changed, as the
event is ignored there today (an oversight of the change made in
f253f4c3, perhaps).
This also fixes changing of direction of a wheel event while
the event sequence is grabbed by a widget.
Change-Id: Ia0f03c14dede80322d690ca50d085898a0497dbe
Fixes: QTBUG-67032
Task-number: QTBUG-79102
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
The former messes in bad ways with the overload set (it, fatally,
attracts char16_t, e.g.). The latter was probably added in response to
ambiguities between (char) and (QChar). While it's harmless now,
remove it, since it no longer pulls its weight.
The no-ascii warning is now coming from QChar(char), so the protection
isn't lost.
[ChangeLog][QtCore][QString] The += operators taking char and
QChar::SpecialCharacter have been removed as they cause adding a
char16_t to QString to call the char overload, losing information. The
append() function was not affected.
Change-Id: I57116314bcc71c0d9476159513c0c10048239db3
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Will be useful when DecompressHelper gets taken into use for both.
Task-number: QTBUG-83269
Change-Id: Iaf253219bed193025c2b82d6609f4dcc4de33df8
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Also port its callees. These functions scream to the QStringView-ified...
Change-Id: I13c95d65941eb8d02223306d80efd1437b4bd9b7
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
The fromUtf16(ushort*) and fromUcs4(uint*) overloads are going
to be deprecated. Use the newer fromUtf16(char16_t*) and
fromUcs4(char32_t*) overloads.
As a drive-by, use std::end()/std::size() where applicable.
Change-Id: I5a93e38cae4a2e33d49c90d06c5f14f7cb7ce90c
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
We use the Catch2 testing framework to test Qt Testlib, which also opens
up the possibility of using it for other internal testing once it's made
available through the build system.
The test now has a --rebase mode which will write out the actual results
as new expected files. Once we add the required post-processing to the
results to remove timestamps and other testrun-specific data we can
remove the standalone python script generate_expected_output.py that
today has to be kept in sync with the test itself.
No attempt has been made to clean up the comparison-functions, but
these could all benefit from moving their logic from the comparison
to the sanitization step. This will both make the expected files
more generic, and will reduce the diff once a failure occurs, since
we're not seeing all the hunks that the comparison-functions ignored.
Change-Id: I1769d42e7958d56d1ad5da958db0e8fe3a2a3c23
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Update the auto test accordingly, and at the same time remove
all uses of QTextStream (as they aren't required).
Change-Id: I71b7cf6a6b54ea59507f27d5d2d04cc5ae5885fc
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
The fromUcs2() named ctor is designed to replace all the non-char
integral-type constructors of QChar which make it very hard to control
the implicit QChar conversions, which have caused a few bugs in Qt
itself. As a classical named contructor, it simply returns QChar.
The fromUcs4() named "ctor", however, needs to expand surrogate pairs,
and thus can't just return QChar. Instead, it returns a small struct
that contains one or two char16_t's, can be iterated over and be
implicitly converted to QStringView. To avoid bikeshedding the name
(FromUcs4Result, of course :), it's defined inline and thus can't be
named outside the function. This function replaces most uses of
QChar::requiresSurrogates() in QtBase.
[ChangeLog][QtCore][QChar] Added fromUcs2(), fromUcs4().
Change-Id: I803708c14001040f75cb599e33c24a3fb8d2579c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This part of the patch changes all remaining occurrences of the local
versions of Orientation to Qt::Orientation.
Change-Id: Ic9ec19b8f069f614061f319abd30841e10cdd626
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
wchar_t hasn't been QStringView's storage_type for a very long time
(at least since 5.10). And in Qt 6, we require char16_t support not
only in the compiler, but also in the stdlib, so drop the guards and
the alternative code paths.
Change-Id: I99f28b575f61c16a2497840708beaa4b54a80f57
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
We end up with an absurd situation:
QSslConfiguration conf;
//we set CA certs so that on demand loading is disabled:
conf.setCaCertificates({...});
QSslSocket s;
s.setSslConfiguration(conf);
Q_ASSERT(conf == s.sslConfiguration); // this assert fails.
Pick-to: 5.15
Change-Id: I272bed145434082acc6ead95fe3640d222b21131
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
They don't work with std::span, since std::span has neither
const_iterator nor cbegin()/cend().
To fix, perfectly forward the return type with decltype(auto) instead
of mentioning T::const_iterator, and rely on the const-qualfication of
the help::c{r,}{begin,end}() functions' arguments to select the
correct T::{r,}{begin,end}() overload.
Change-Id: I4992d4bd521d2dc0f9ea51ae70cde8286ae543a5
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
The message to ignore is given in source code, hence UTF-8; it was
being ingested as local 8-bit, which lead to problems when a debug
message wasn't 7-bit clean and the system's native encoding wasn't
UTF-8. Modified QtTest's selftest to check encoding failure.
Pick-to: 5.15
Change-Id: I898744a450115b6d2ee992f1d3b36d8efaeeff7e
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
It's documented to be undefined if the number of seconds is outside
the allowed range, but it doesn't hurt for that undefined behavior to
happen to be that the result is invalid. Added a simple test.
Change-Id: I20c3f680c7948b3904f213452272133be77e4d62
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
[ChangeLog][Important Behavior Changes][QDateTime] Removed all
locale-dependence from QDate, QTime and QDateTime, including the
Qt::DateFormat members that select the formats of the default and
system locales and the toString(Qt::DateFormat, QCalendar) overload,
which only used its calendar for these formats. All toString()
methods now use, and all fromString() methods only recognize, the C
locale's names for days and months. Use QLocale's methods if you need
to take locale into account.
Fixes: QTBUG-80441
Change-Id: I3a8968438741afb00f44262f79659c51e9b06c35
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
It clearly belonged in tst_QDate::toDateTime(), for which it adds a
few more test-case and in which it inspires some further testing.
The new testing of case-insensitivity doesn't work if the format
contains stray non-format characters, so added a new data column to
take care of that.
Pick-to: 5.15
Change-Id: I73619be02091c97024a84cb963c7029e9fd0569a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
They use the Qt::TextDate format, so do depend on the feature.
Rename one in the process; nothing in its test has anything to do with
de_DE locale.
Pick-to: 5.15
Change-Id: I2adae5c46e6009c13b433993ed2c3c761a500bfb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The native command buffer handle was not updated, so the subsequent
finish() call attempted to record an invalid VkCommandBuffer. The
problem was not present with offscreen frames, only when finish() is
called with a swapchain-based frame active.
Task-number: QTBUG-84066
Change-Id: I9c4cb701c3dbbc28f237d6ae1cbf65aafd1fa95f
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
We checked against integer overflow, but not against overflowing the
QByteArray size limit. That caused a std::bad_alloc to be thrown, which
is bad when decoding unknown data. QCborStreamReader wasn't affected,
since it doesn't merge chunks.
Change-Id: I99ab0f318b1c43b89888fffd160c36f495fada87
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
It simplifies the API and reduces surprise to have rotation working by default.
On Android, the manifest specifies which orientations the application has
been designed to support; on iOS, it is controlled via the
UISupportedInterfaceOrientations property list key.
In addition, QWindow::contentOrientation() is another way to give
a hint to the window manager, or on iOS to directly control whether
the window's rotation is locked or not.
Task-number: QTBUG-35427
Task-number: QTBUG-38576
Task-number: QTBUG-44569
Task-number: QTBUG-51012
Task-number: QTBUG-83055
Change-Id: Ieed818497f686399db23813269af322bfdd237af
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Test the case where reduce function of the form:
V function(T &result, const U &intermediate)
has T and U types different.
Task-number: QTBUG-83802
Change-Id: Ic89396caba16e7e47ae3ec1527e31b8620f1b08c
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Get rid of code repetition in concurrentfilter test.
Move tests with initial value next to their original version.
Join new lambda tests into a common functions
testing all possible 16 combinations of
functor / function / member / lambda, as they
test in fact the same function. There is no need
to distinguish lambda case over other cases.
This helps in test readability and maintenance.
Add missing tests for lambdas with a combination
of initial value.
Task-number: QTBUG-83802
Change-Id: I45930c1e18a9e4e561909f46a5cbbdf0ad7ba333
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
If any of the temporary directories and files can't be created, skip the
test. Otherwise, the cleanup routine would recursively delete "/".
Change-Id: I51f908a468be8fd2ebd523ff7ce27a7c78d1b4e2
Fixes: QTBUG-83863
Pick-to: 5.15
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
The system APIs expect an absolute "display name" of the file path,
so make it absolute.
The test was overly tolerant in accepting failure, as a QStorageInfo
initialized with a file path that doesn't exist is invalid, and thus
always different from the QStorageInfo of the home directory. Fix the
test to compare only valid QStorageInfo objects, and postpone the check
until the file we want to move has been created.
[ChangeLog][QtCore][QFile] moveToTrash supports relative file paths
on Windows
Change-Id: I94c8cd40c60fde469e38f76a98f867f20c6a0b15
Fixes: QTBUG-84015
Pick-to: 5.15
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Also remove dead code that isn't compiled anymore in Qt 6 builds.
Change-Id: I7a7ae35e61fb2ad9cc21180fb7224357ade1505f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
The replacement is to set, and configure, a QCompleter directly via
setCompleter. With the removal of the separate properties in QComboBox,
the configuration of the completer is not maintained if the line edit
is replaced. A QCompleter is created and set implicitly when the line
edit is set, unless the line edit came with a completer. This is what
the auto test verifies as well.
Change-Id: I9a4c73db5e39a2558aad346c0904be6deb4f1cd2
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
This amends 23b998fa45, and the commits
3e7463411e and
947883141d. This change restores the
pre-5.13.1 behavior of setFocusProxy to not move focus away from a
previously set focus proxy.
With the previous changes, focus would move away from a proxy when a
new proxy is set, if the old proxy had focus. While there are arguments
in favor of this behavior, it is a change of behavior that shouldn't
be introduced to 20+ years old functionality in order to fix the real
bugs addressed by the initial commits.
Instead, move focus only to the new proxy when the focus widget was
the widget that gets a focus proxy.
[ChangeLog][QtWidgets][QWidget] setFocusProxy no longer moves focus
away from a previously set focus proxy, restoring pre-Qt 5.13.1
behavior.
Change-Id: Icf2ad7cba5b860014aeef91cb274c442a2ab9d42
Fixes: QTBUG-83720
Pick-to: 5.15
Reviewed-by: David Faure <david.faure@kdab.com>
We already had this approach for QtWidgets, so to avoid
adding the specific cases every time, we import all the
classes from QtCore and QtGui.
Change-Id: I38dd2eec3bbdfb83f156a48f35a2f4fda44528c7
Pick-to: 5.15
Fixes: PYSIDE-1287
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
This file mustn't have changed at all, aside from the copyright headers,
since we switched to Git in October 2008.
Quick check shows the data from W3C is still online:
https://dev.w3.org/cvsweb/2001/XML-Test-Suite/
I didn't check that the CVS server is actually running because none of
my machines even has the cvs command anymore...
Pick-To: 5.15
Change-Id: I4e559af2a9a1455ab770fffd15f4e740114a2433
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Turns out that crashing on purpose is more difficult than it seems. It
should be easy, given how often we do it accidentally...
Let the null pointer dereferencing be the fall back. Some compilers are
too smart for their own good and remove the fault. Instead, let's rely
on raise(SIGABRT) on Unix and on the UD2 instruction on Windows.
Pick-To: 5.15
Change-Id: Ibdc95e9af7bd456a94ecfffd1603f1c9b73b167d
Reviewed-by: Simon Hausmann <hausmann@gmail.com>
Expected and actual were inverted.
Pick-To: 5.15
Change-Id: Idc3fae4d0f614c389d27fffd15e9fa6a0a8f25e6
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
In that specific wrapping mode, it will first try a normal word wrap. If
it doesn't fit within the specified line width it will discard the
result of that and try WrapAnywhere by calling layout_helper()
recursively. The problem was that at the point it called itself again it
had already adjusted eng->maxWidth:
eng->maxWidth += line.textWidth;
This was not restored, but carried on to the recursive call to
layout_helper(), so the end result was that the maximumWidth would
accumulate text widths from parts of the same line twice.
Due to the same recursive behavior the minimumWidth also had a problem:
It always returned the width of the widest word because it took the
qMax() of the minimum widths of the two passes, (WordWrap and then
WrapAnywhere) effectively making the minimum width always be the width
of the widest word (even though it could wrap at finer granularity).
Pick-to: 5.15
Task-number: QTBUG-77337
Change-Id: Ie7e9c17b157506352c2da38cc7f4a8dfa1283966
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Should improve performance and is going to be required in
the future anyway.
Change-Id: I89d7c50441d2491da1ab0a4d564dcc91f52ade85
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Qt Designer let's you add custom slots and signals to the main
form; they should use string-based connection syntax since the
class is not known in setupUI(). Amends
da3cb1deb6.
Task-number: QTBUG-76375
Change-Id: I5a3a5630f77c812d48db1cdb7a8658a4d2718228
Reviewed-by: Liang Qi <liang.qi@qt.io>
A failure in testlib is apt to imply misleading failures elsewhere, so
catch those first. Likewise, broken tools or corelib break
everything. Put the rest of the list in alphabetic order.
Restructure auto.pro to use conditional SUBDIRS += (in the right
order) instead of setting SUBDIRS to a full list and then doing
conditional SUBDIRS -= for most entries. This more closely matches the
way the generated cmake config does things, although it still doesn't
regenerate cleanly.
Change-Id: Idc15326c3534eb4fdce55394269f2dfbc17fcd99
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
As discussed in the mailing list and in the Qt Contributor Summit 2019.
Tested on Linux, macOS and FreeBSD, showing these fallbacks:
OS environment setlocale() call
FreeBSD empty "C.UTF-8"
FreeBSD LC_ALL=C "C.UTF-8"
Linux empty "C.UTF-8"
Linux LC_ALL=C "C.UTF-8"
Linux LANG=en_US "en_US.UTF-8"
Linux LANG=de_DE@euro "de_DE.UTF-8"
Linux LANG=en_GB.iso885915 "en_GB.UTF-8"
Linux LANG=hy_AM.armscii8 "hy_AM.UTF-8"
Linux LANG=ja_JP.sjis "ja_JP.UTF-8"
Linux LANG=ru_RU.koi8r "ru_RU.UTF-8"
macOS empty "UTF-8"
macOS LC_ALL=C "UTF-8"
Versions tested: FreeBSD 12.1, Linux w/ glibc 2.30, macOS 10.14.2.
See
* https://wiki.qt.io/Qt_Contributor_Summit_2019_-_QtCore
* https://lists.qt-project.org/pipermail/development/2019-October/037791.html
Change-Id: Ia2aa807ffa8a4c798425fffd15d97ddb4f35b0ae
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
The proper solution is to use qint32 everywhere, but that is left as
a separate exercise.
Change-Id: Id0c06b102b56a1b3b48dd67c6c29c28da7d1f22d
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>