QFile/QFileInfo::readLink() functions are obsolete but were not marked
as deprecated.
Explicit mark them as deprecated so they can be removed with Qt6.
Change-Id: I52424dc5441e1f5b01015713df990bbec5186caa
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
QProcess::finished(int)/readChannelMode()/setReadChannelMode() are
obsolete but were not marked as deprecated.
Explicit mark them as deprecated so they can be removed with Qt6.
Change-Id: Iedbfd80a3c987f35caf93181e9277913a18961d9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Useful in contexts such as other QDebug operators, where the class
is already known, and the full scope of the flags is not needed.
Change-Id: I546381b1722c9c846e2412e56763563b8f625212
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Useful in contexts such as other QDebug operators, where the class
is already known, and the full scope of the enum is not needed.
Change-Id: Ibd04b1fd4f0f914c7224a007fc248d4ebabcde3e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
tst_QString::localeAwareCompare() is failing since
ab448f731e because the 'C' locale no
longer initializes ICU and falls back to simple QString comparison.
Fix it by explicitly setting the locale for the testdata to en_US so the
QCollator is properly initialized.
Task-number: QTBUG-73116
Change-Id: I9d4d55e666c5c52f93298dedb7e22da01a25318d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
tr() recognizes %n and %Ln. it offers no way to escape lone percent
signs, which implies that they must be interpreted verbatim, which is
what the code actually does. except that it would run off the end if the
% appeared at the end of the string.
Fixes: QTBUG-57171
Done-with: Mateusz Starzycki <mstarzycki@gmail.com>
Change-Id: Icf81925c482be1ea66ec8daafb3e92ad17ea7fab
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
qtbase/src/corelib/kernel/qmetatype.cpp: In static member function ‘static void QMetaType::destroy(int, void*)’:
qtbase/src/corelib/kernel/qmetatype.cpp:2599:27: error: ‘info.QMetaType::m_destructor’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
if (m_typedDestructor && !m_destructor)
~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
qtbase/src/corelib/kernel/qmetatype.cpp:1868:15: note: ‘info.QMetaType::m_destructor’ was declared here
QMetaType info(type);
^~~~
qtbase/src/corelib/kernel/qmetatype.cpp:2600:26: error: ‘info.QMetaType::m_typedDestructor’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
m_typedDestructor(m_typeId, data);
~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
qtbase/src/corelib/kernel/qmetatype.cpp:1868:15: note: ‘info.QMetaType::m_typedDestructor’ was declared here
QMetaType info(type);
^~~~
The extended (not inlined) function may be called on a half
initialized invalid instance.
Change-Id: I26d677a8ad2bd0c5846233f06393e774d377936d
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Also blacklist tst_QRawFont::unsupportedWritingSystem() and
tst_QGlyphRun::mixedScripts() on windows for now.
Conflicts:
qmake/generators/makefile.cpp
src/corelib/itemmodels/qstringlistmodel.cpp
src/platformsupport/fontdatabases/windows/qwindowsfontengine_p.h
tests/auto/corelib/itemmodels/qstringlistmodel/tst_qstringlistmodel.cpp
tests/auto/gui/text/qglyphrun/BLACKLIST
tests/auto/gui/text/qrawfont/BLACKLIST
Task-number: QTBUG-72836
Change-Id: I10fea1493f0ae1a5708e1e48d0a4d7d6b76258b9
QStringListModel::setData documentation states that
"The dataChanged() signal is emitted if the item is changed."
This patch actually respects the doc. setData will check that the data
actually changed before sending the dataChanged signal.
[ChangeLog][QtCore][QStringListModel] setData will now emit the
dataChanged() signal only if the string set is different from
the one already contained in the model
Change-Id: I4308a6f3b4851203fb899c5e29a36076e0c32f2f
Reviewed-by: David Faure <david.faure@kdab.com>
The current implementation of wildcardToRegularExpression doesn't
anchor the pattern which makes it not narrow enough for globbing
patterns. This patch fixes that by applying anchoredPattern before
returning the wildcard pattern.
[ChangeLog][QtCore][QRegularExpression] The wildcardToRegularExpression
method now returns a properly anchored pattern.
Change-Id: I7bee73389d408cf42499652e4fb854517a8125b5
Fixes: QTBUG-72539
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Previously, the C locale was treated as English because each back-end
takes the locale's bcp47Name(), which maps C to en. However, the C
locale has its own rules; which QString helpfully implements; so we
can delegate to it in this case. Extended this to sort keys, where
possible. Clean up existing implementations in the process.
Extended tst_QCollator::compare() with some cases to check this. That
required wrapping the test's calls to collator.compare() in a sign
canonicalizer, since it can return any -ve for < or +ve for >, not
just -1 and +1 for these cases (and it'd be rash to hard-code specific
negative and positive values, as they may vary between backends).
[ChangeLog][QtCore][QCollator] Added support for collation in the C
locale, albeit this is only well-defined for ASCII. Collation sort
keys remain unsupported on Darwin.
Fixes: QTBUG-58621
Change-Id: I327010d90f09bd1b1816f5590cb124e3d423e61d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
All types that can be trivially copied and destructed are by definition
relocatable, and we should apply those semantics when moving them in
memory.
Types that are trivial, are by definition not complex and should be
treated as such.
[ChangeLog][QtCore] Qt Containers and meta type system now use C++11
type traits (std::is_trivial, std::is_trivially_copyable and
std::is_trivially_destructible) to detect the class of a type not
explicitly set by Q_DECLARE_TYPEINFO. (Q_DECLARE_TYPEINFO is still
needed for QList.)
Done-with: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Change-Id: Iebb87ece425ea919e86169d06cd509c54a074282
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
[ChangeLog][QtCore][QUrlQuery] QUrlQuery now provides an
initializer list constructor. It can be created using a list of
key/value pairs.
Fixes: QTBUG-68645
Change-Id: Ief5939aa477718f6dd3580f2c60f95ff3aa892ae
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
You cannot manipulate variables in custom target dependencies, so the
following code was invalid:
i386_d.depends = EXPORT_VALID_ARCHS=i386
In order to still build the fat binary, we split the project in four,
one for each architecture, plus one to create the final package.
Change-Id: If08cf54e2e4098a7e10df41b7ea8d2bf699f58be
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Some tests were fixed and others were skipped/blacklisted.
Task-number: QTBUG-63152
Change-Id: Ica7df555f8d152ee589865911130525101d4b941
Reviewed-by: Liang Qi <liang.qi@qt.io>
Fixed a misguided condition in the check for bogus texts in the sscanf
branch of the decoder; it checked for 'e' but neglected 'E', which is
just as valid.
Change-Id: I9236c76faea000c92df641930e401bce445e06c8
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Revised some toFloat()s to be consistent with the matching
toDouble()s; previously, they would return infinity if toDouble() did
but return 0 if toDouble() got a finite value outside float's range.
That also applied to values that underflowed float's range, succeeding
and returning 0 as long as they were within double's range but failing
if toDouble() underflowed. Now float-underflow also fails. Amended
their documentation to reflect this more consistent reality.
Added some tests of out-of-range values, infinities and NaNs.
[ChangeLog][QtCore][toFloat] QString, QByteArray and QLocale returned
an infinity on double-overflow (since 5.7) but returned 0 on a finite
double outside float's range, while setting ok to false; this was at
odds with their documented behavior of returning 0 on any failure.
They also succeeded, returning zero, on underflow of float's range,
unless double underflowed, where they failed. Changed the handling of
values outside float's range to match that of values outside double's
range: fail, returning an infinity on overflow or zero on underflow.
The documentation now reflects the revised behavior, which matches
toDouble().
Change-Id: Ia168bcacf7def0df924840d45d8edc5f850449d6
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
They actually return infinity if conversion overflows, while still
setting ok to false; they were documented to return 0 on failure, with
no mention of this special handling of overflow. Documented reality
rather than changing the behavior. Gave underflow as an example of
failure other than overflow (toDouble()s do indeed fail on it).
Added some tests of out-of-range values, infinities and NaNs.
[ChangeLog][QtCore][toDouble] QString, QByteArray and QLocale return
an infinity on overflow (since 5.7), while setting ok to false; this
was at odds with their documented behavior of returning 0 on failure.
The documentation now reflects the actual behavior.
Fixes: QTBUG-71256
Change-Id: I8d7e80ba1f06091cf0f1480c341553381103703b
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
A couple of QLocale tests were using setlocale twice to provide a
transient locale tweak in tests; however, if the test in between
fails, that can leave the program running in the "transient" locale
after. So implement a proper class whose destructor ensures the
transient is tidied away. Also change the locale in use by one of
these transient changes: it purported to be checking things didn't
depend on locale, but was using the same local as most of the
test-cases for its test.
Change-Id: I0d954edcc96019a8c2eb12b7a7c568e8b87a41d5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Use 'msvc' instead of 'win32-msvc' or even 'win32-mscv*'.
Change-Id: I21dc7748a4019119066aea0a88a29a61827f9429
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This test was taking so much time that it regularly timed out on WinRT
and when running in qemu. Reduce it from around 40 to 7 seconds on a
powerful desktop.
Now it either runs for two full seconds for each test function or until
it has done 50 iterations.
Fixes: QTBUG-71405
Change-Id: If752c1e65d3b19009b883f64edc96d020df479d1
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
QFile::map() is documented to continue working after the QFile is
closed, so this should work for the resource file engine too.
Change-Id: I343f2beed55440a7ac0bfffd1563243a3966441f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
We were returning a pointer to the compressed data and comparing to the
compressed data size.
Change-Id: I343f2beed55440a7ac0bfffd1563232d557c9427
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Instead of using a QString with only the prefix, let's do a full
comparison to make sure there's no junk at the end of the file.
Take the opportunity to remove the nonsense of a space at the end of
most of these files (I didn't remove from all).
Change-Id: I343f2beed55440a7ac0bfffd15632228c1bfe78f
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Both use same source, but link without and with Qt Gui library.
Task-number: QTBUG-71751
Change-Id: I5643a07a8067f5fc10fc66f717f19bc3e16a33ab
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
The test has been failing over and over since it was removed from the
blacklist. Obviously it is not stable.
This is a partial revert of commit
b10ee45546.
Task-number: QTBUG-71773
Change-Id: Ie2588538ee704652c2f09ce6ad947da3011e7dad
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
The test needs to also unregister its timers when it fails. Therefore,
wrap the registering and unregistering in an RAII class.
Task-number: QTBUG-71773
Change-Id: I6ef44e580880deecb32763b5b0cd71e1c26929be
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Including 4f7ad5ec44
to make appimage not ambiguous
Change-Id: I8db13fc785b267c09667ef38430bf98135c7f0d6
Reviewed-by: David Faure <david.faure@kdab.com>