Commit Graph

3397 Commits

Author SHA1 Message Date
Tony Sarajärvi
8c2ca29045 Revert "Blacklist tst_QTimer::basic_chrono on macOS"
Incorrectly blacklisted.

This reverts commit 40a7c57ba9.

Task-number: QTBUG-61013
Change-Id: I7d9dc4a4b1c8d7ff77ab75c61027b908ffb74552
Reviewed-by: Liang Qi <liang.qi@qt.io>
2019-01-04 09:45:41 +00:00
Luca Beldi
ff835a5030 Fix QStringListModel::setData to check for actual changes
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>
2018-12-24 08:07:36 +00:00
Samuel Gaist
649ee12aba QRegularExpression: anchor wildcard pattern
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>
2018-12-15 13:24:16 +00:00
Edward Welbourne
ab448f731e Handle QCollator with locale C by delegating to QString
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>
2018-12-11 19:05:07 +00:00
Thiago Macieira
962bded90f Fix QSettings parsing of spaces after comment lines
[ChangeLog][QtCore][QSettings] Fixed QSettings parsing of blank spaces
after comment lines in INI-style configuration files.

Fixes: QTBUG-72007
Change-Id: Idd0c85a4e7b64f9c9c7dfffd156c5b219f3b5c0a
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2018-12-07 18:53:34 +00:00
Edward Welbourne
4ee59cf96d Remove one out-of-date comment, refine another that was imprecise
The former is a follow-up to c17563eca8.

Change-Id: I3cd41e6e38f740de67605f785a804ffd879b9e67
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-12-07 15:59:38 +00:00
Ville Voutilainen
c0dd445564 Fix a nullptr compile error with gcc 4.8
template argument deduction/substitution failed:
qtbase/tests/auto/corelib/kernel/qobject/tst_qobject.cpp:6756:71: note:   mismatched types ‘const typename QtPrivate::FunctionPointer<Func2>::Object*’ and ‘std::nullptr_t’

Change-Id: I8e7872457d1fc30c4b29e96c16091915264f9bce
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-11-30 14:50:00 +00:00
Ulf Hermann
042707a633 Avoid invalid qmake code in macOS-specific pluginloader test
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>
2018-11-30 14:47:29 +00:00
Qt Forward Merge Bot
1b5bbacdb0 Merge remote-tracking branch 'origin/5.11' into 5.12
Change-Id: I12bcee17e349edd0dd4fd08da76361d1ffb1a727
2018-11-27 01:00:09 +01:00
Sami Nurmenniemi
71bd06d516 Make developer build tests pass for boot2qt
Some tests were fixed and others were skipped/blacklisted.

Task-number: QTBUG-63152
Change-Id: Ica7df555f8d152ee589865911130525101d4b941
Reviewed-by: Liang Qi <liang.qi@qt.io>
2018-11-26 07:06:59 +00:00
Edward Welbourne
d8b401959f Recognize E along with e as exponent character in asciiToDouble
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>
2018-11-23 10:05:33 +00:00
Edward Welbourne
ce159d1a3e Fix toFloat()s between float and double ranges and document
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>
2018-11-23 10:05:24 +00:00
Edward Welbourne
a992367403 Change documentation of some toDouble()s to reflect reality
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>
2018-11-23 10:05:06 +00:00
Edward Welbourne
704137f8de tst_QLocale: Add tests for toFloat()
Mirror those for toDouble().

Change-Id: Ide0ef3cd99528d575f6a578ef19547f3b1119c5d
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-11-23 10:04:56 +00:00
Edward Welbourne
108c9015b9 Implement transient locale as instantiating a class
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>
2018-11-23 10:04:46 +00:00
Joerg Bornemann
eef9b4f0d5 Use msvc qmake scope where appropriate
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>
2018-11-22 14:16:52 +00:00
Joerg Bornemann
c02d579c56 Remove usage of win32-msvc2012 qmake scope
We don't support MSVC 2012 anymore.

Change-Id: I454ba0f8e893f5910a17e473ab7cf70a1c581e81
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2018-11-22 10:16:08 +00:00
Frederik Gladhorn
e00c73911a Reduce run time of tst_QRegularExpression::threadSafety
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>
2018-11-19 11:45:38 +00:00
Liang Qi
4d180586cd Merge remote-tracking branch 'origin/5.11' into 5.12
Conflicts:
	src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm

Change-Id: I66a08c770767a93cd26535689e3e7806486aab06
2018-11-19 12:42:10 +01:00
Thiago Macieira
6b088b7a1d QResourceFileEngine: fix use of mapped files after close()
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>
2018-11-19 09:09:36 +00:00
Thiago Macieira
6a792d6f0b QResourceFileEngine: fix map() for compressed files
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>
2018-11-19 09:09:31 +00:00
Thiago Macieira
460866ee47 tst_QResourceEngine: use QTest::addRow instead of QString concatenation
Change-Id: I343f2beed55440a7ac0bfffd156322c95aebb847
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2018-11-19 09:09:26 +00:00
Thiago Macieira
6125fce799 tst_QResourceEngine: store the actual byte contents that we expect
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>
2018-11-19 09:09:20 +00:00
Liang Qi
7a4f41bad9 tests: Distinguish tst_qeventdispatcher and tst_qguieventdispatcher
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>
2018-11-16 14:16:09 +00:00
Liang Qi
37d3bc9ad7 Merge remote-tracking branch 'origin/5.12.0' into 5.12
Change-Id: Ic1dd39044e19f50e1068d4ac70dacaad6440e570
2018-11-16 08:10:15 +01:00
Liang Qi
527406cbd9 Modernize the "settings" feature
Change-Id: I9b8a61ecb1413b513ae5c9e77d3ee1b3e8b6562c
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-11-15 17:20:15 +00:00
Ulf Hermann
900b57ea90 Re-blacklist tst_QEventDispatcher::registerTimer() on macOS
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>
2018-11-15 12:08:20 +00:00
Ulf Hermann
16830c827b Make sure QEventDispatcher::registerTimer() cleans up after itself
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>
2018-11-15 12:08:11 +00:00
Tor Arne Vestbø
27fb51fa52 macOS: Remove blacklist entries for no longer supported OS versions
Change-Id: Iae6552f1fdcf1dea07a03d3788d378af9140d1a7
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2018-11-12 07:16:30 +00:00
Thiago Macieira
e7998dc187 QCborStreamReader: make sure setDevice() clears the last error
The unit tests weren't running into this problem because the every
setDevice() was preceded by the object being initialized with the exact
same data, so there was never a previous error state. I've only changed
a couple of tests, left the other setDevice() unchanged so we test both
behaviors.

Fixes: QTBUG-71426
Change-Id: I1bd327aeaf73421a8ec5fffd1561a590e3933376
Reviewed-by: Nils Jeisecke <nils.jeisecke@saltation.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-11-08 15:19:45 +00:00
Gary Wang
e3c84b6da1 QMimeType: Use default key as fallback for comment() property
When QMimeProvider parses the shared mime database xml files,
it will read the <comment> element for mime comment and treat the
`xml:lang` attribute as locale language string. When no `xml:lang`
attr is provided, QMimeProvider will read the value and treat it as
a en_US locale string as the default key.

When we call QMimeType::comment(), it will try to get the locale
comment string with the default language (QLocale().name()), once
it can't find a matched result, it should return the default key
(which QMimeProvider set it as en_US locale before) as fallback.

Task-number: QTBUG-71314
Change-Id: I444f8159d6f19dfef6338cd79312f608d8f13394
Reviewed-by: David Faure <david.faure@kdab.com>
2018-11-02 08:27:10 +00:00
Allan Sandfeld Jensen
00674a1643 Treat shorts as int in QVariant::canConvert()
Follow the pattern of char and float, and treat shorts as a more generic
type in QVariant::canConvert()

Task-number: QTBUG-60914
Change-Id: Ib1cc7941ee47cb0fc0098f22f98a03cd6f6b63fe
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-11-01 17:31:13 +00:00
Kari Oikarinen
a952fd7d5b QObject: Fix isSignalConnected() when signals have been disconnected
The bitmap cache for the first 64 signals being connected was only set when the
connection is added. It was never unset when the connection was removed.

Internal use of the connectedSignals bitmap is not hurt by it occasionally
saying a signal is connected even though it is not, since the purpose of those
checks is avoiding expensive operations that are not necessary if nothing is
connected to the signal.

However, the public API using this cache meant that it also never spotted
signals being disconnected. This was not documented. Fix the behavior by only
using the cache if it is up to date. If it is not, use a slower path that gives
the correct answer.

To avoid making disconnections and QObject destructions slower, the cache is
only updated to unset disconnected signals when new signal connections are
added. No extra work is done in the common case where signals are only
removed in the end of the QObject's lifetime.

Fixes: QTBUG-32340
Change-Id: Ieb6e498060157153cec60d9c8f1c33056993fda1
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
2018-10-31 10:32:41 +00:00
Jüri Valdmann
497f43c90f tst_QCborValue: Disable support for spaceship operator
Spaceship operator was disabled for QCborValue, but not the test.

Change-Id: Icb91da689f62ef6de9f4fa926346505c5e50e9eb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-10-31 09:46:11 +00:00
Oliver Wolff
7e7514482f winrt: Skip a test row of tst_QRegularExpression::threadSafety
PCRE2 does not support JIT on winrt. This test row takes a long time
(30 seconds here) without JIT and thus might cause test timeouts in
COIN when run on winrt.

Change-Id: I79d9f6be16dbe16594ae2bf51f353acd06b3d2fe
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-10-31 09:35:29 +00:00
Ivan Komissarov
95476bfcf6 qendian: Fix float conversions
Since Qt 5.10, qTo/FromBig/LittleEndian<float/double> stopped working.
It may be confusing, but big endian floats do exist, so not to break old
code, we should support them.

Change-Id: I21cdbc7f48ec030ce3d82f1cd1aad212f0fe5dd0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-10-28 22:26:56 +00:00
Timur Pocheptsov
b10ee45546 tst_qeventdispatcher: remove macOS from the BLACKLIST
the test is stable in Qt 5.12.

Task-number: QTBUG-60993
Change-Id: I0c366567121688d9518e90b5e8f9ec1b4006b7b9
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-10-25 11:51:53 +00:00
Timur Pocheptsov
95ba049f87 Remove QSKIP and bring the test back to business
on macOS, where it was skipped but where it now seems to be stable/work.

Task-number: QTBUG-39983
Change-Id: I100a57f23b43074ebacc012be247d92acc6ae336
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-10-25 11:51:42 +00:00
Jüri Valdmann
cea2b5510c Fix building tests with -no-gui
Change-Id: I37307080e5adc334fcfcdd2fee650d675228a746
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-10-20 20:38:59 +00:00
Allan Sandfeld Jensen
16ebc78ef3 Fix odd test in tst_qflags
This test triggered a compiler warning for good reason, it made no
sense, trying to change it to what it was probably meant to be.

Change-Id: I01a848272b42dae2aaa58a4f5bed998644d864da
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-10-17 09:15:22 +00:00
Anton Kudryavtsev
aa633ff276 QMetaEnum: fix UB
Check ptr before usage.

Change-Id: Iac757a2e260b237d837318932cc0b5896c6e04c2
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-10-17 08:48:13 +00:00
Eirik Aavitsland
f2f040ae1c Improve support for QImages in QDataStream read transactions
QImage's operator>>(QDataStream&) did not set an error mode on the
stream on read failures. That would break QDataStream transactions.
Since the current QImage serialization cannot differentiate between
truncated and corrupted data, we set the ReadPastEnd error as expected
by the transaction system.

Also specify the expected file format on decoding QImage from stream,
to avoid all the format handlers' canRead() being invoked. This is
necessary since some of them may call ungetChar(), which fails when
the stream is in a transaction.

Also add testing of this feature to the QDataStram transaction
autotest. That required a slight rewrite of the fake sequential
QIODevice subclass. The previous implementation had incorrect
behavior of peek(), which is required by QImage decoders.

Task-number: QTBUG-70875
Change-Id: If3f1ca7186ad1e6ca0e6e8ea81d2b2fbece6ea01
Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-10-15 07:18:57 +00:00
Edward Welbourne
bc099f33dd Support QCborMap::operator[] taking a string literal
Use a template on the size of the char[], as suggested by Ville
Voutilainen.  This resolves ambiguity about whether such look-ups
should be done via QString or QCborValue (not that it would have made
any difference).

When we come to add mutating indexing of QCborValue, chained
dereferences like map[i][j][k] need to stay in operator[] const
throughout, to avoid detaching intermediates to create references into
them due to using the mutating operator[] on the earlier dereference's
return.  So const-qualify the QCborValue operator[] const variants at
the same time, to match those of QCborValue itself.

Change-Id: Ib1652ae9440fe3767a653afa2856b74040210e07
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-10-08 14:11:23 +00:00
Qt Forward Merge Bot
b4da5c6b93 Merge remote-tracking branch 'origin/5.11' into 5.12
Conflicts:
	src/corelib/tools/qtimezoneprivate.cpp

Change-Id: Icbb5999d378711ce3786a4fe0aba176a45ac702c
2018-10-08 10:00:49 +02:00
David Faure
ddeec1b07e QSFPM: don't let setFilterRegExp(QString) overwrite CaseSensitivity
This is a regression from commit 346c15102b, which creates a new QRegExp
in setFilterRegExp, losing previously set case sensitivity property
(i.e. when the code does proxy->setFilterCaseSensitivity(Qt::CaseInsensitive)
before setFilterRegExp).
Interestingly that commit ensured that setFilterFixedString would still
preserve CaseSensitivity, but not setFilterRegExp(QString).

Change-Id: I3d37d001ce6e86dd90e7e07431440a42607172f9
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Luca Beldi <v.ronin@yahoo.it>
2018-10-03 11:45:50 +00:00
Edward Welbourne
ced34cb3d5 QDateTimeParser: avoid using an invalid hour by default
When a time-zone does a spring-forward, skipping an hour (either to
start DST or to move its standard time), there's an hour that doesn't
exist on the day in question.  That hour can be the first hour of the
day, in which case using 0:0 as the default time is broken.  So catch
this case and use the first time that day that makes sense.

Fixes: QTBUG-70823
Change-Id: I23dae9320a3cdd2c988841a7db1b111edb945730
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-10-02 13:49:45 +00:00
Qt Forward Merge Bot
07e9261105 Merge remote-tracking branch 'origin/5.11' into 5.12
Change-Id: Iaa438d14357be1bf75bb645cb8d3245947c055b8
2018-09-30 01:00:19 +02:00
Thiago Macieira
caa598c843 Fix QUrl::matches for when removing authority parts (other than host)
QUrl::RemoveAuthority is RemoveUserInfo | RemovePort | 0x10, so the
condition

    if (options & QUrl::RemoveAuthority)

would match if any of the other bits for the username, password or port
were set, which meant we would skip the host comparison. Ditto for
username and RemovePassword.

[ChangeLog][QtCore][QUrl] Fixed a bug that caused QUrl::matches to
incorrectly compare two URLs with different hostnames or different
usernames as equal, if certain QUrl::RemoveXxx options were passed.

Change-Id: I015970a03b874898bba7fffd155856ab9d6cb1be
Fixes: QTBUG-70774
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2018-09-29 00:33:39 +00:00
Alexander Akulich
94884246d4 QCommandLineParser: Ensure that an option text ends with a newline
Before this change we inserted newline only if an option has a
description and ended up with an arbitrary long line with all options.

[ChangeLog][QtCore][QCommandLineParser] Fixed a bug that caused the help
output to show two options or more in the same line if the options didn't
have a description.

Task-number: QTBUG-70174
Change-Id: Id54b9ae13ee596869e4dc14e09301aea19eed2f8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-09-28 22:01:05 +00:00
hjk
f286027e6b Fix QXmlStreamWriter xmlns attribute placement
Done-by: Eugenio Rustico
Change-Id: Ibd6aa6cc8be9090a4fad4f96628086d8a498b8e0
Fixes: QTBUG-63434
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-09-28 13:19:48 +00:00