don't try to execute a binary from the install dir.
amends 8e776d39f.
Change-Id: I37990bc83b295379f0c93f4ca712e1bbf980fd44
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Split the test in two: one test that requires the symlinks
and test files and one that does not need them.
In the test with test files, verify each step and the deletion
of the files.
Task-number: QTBUG-58654
Task-number: QTBUG-50835
Change-Id: I14de57ce7a1df2d834d5a7565c804dead1d89088
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This reverts commit 346cd79192. The bug
report was incorrect, since the suggested file name is actually valid,
it just happens to name an Alternate Data Stream (ADS) "20:803Z.txt" in
file "testLog-03".
[ChangeLog][QtCore][QFile] Reverted an incorrect change from Qt 5.9.0
that forbade the creation and access to Alternate Data Streams on NTFS
on Windows. This means that file names containing a colon (':') are
allowed again, but note that they are not regular files.
Task-number: QTBUG-57023
Change-Id: I81480fdb578d4d43b3fcfffd14d4f2147e8a0ade
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
Currently QLocale::c().bcp47Name() returns "C" which, according to [BCP47], is
not a valid language tag. In particular it does not conform to the ABNF grammar
in section 2.1 which specifies a minimum length of 2 characters for all language
tags.
[BCP47]: https://tools.ietf.org/html/bcp47
This patch changes the return value to "en" seeing as the documentation for
QLocale::Language states that the C language is identical in behavior to
English.
Task-number: QTBUG-61949
Change-Id: I2a381def8fb7156467e01d105da92bb1f4821204
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This is the result of running the (experimental) clang-tidy check
qt-modernize-qsharedpointer-create
Discarded changes:
- tst_qsharedpointer.cpp: not sure we want these replacements there
(→ separate change)
- tst_collations.cpp: hit in a template specialization that is
instantiated with both QSharedPointer and QSharedDataPointer.
Change-Id: I203c2646e91d026735d923473af3d151d19e3820
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This test verifies processEvents(WaitForMoreEvents)
behavior by first processing all pending events (in
a loop) and then verifying that a following processEvents
call actually waits.
But there is no guarantee that the OS won’t introduce
more events after the first loop has completed. This
does indeed seem to happen on recent versions of macOS.
Change the test to not require that the processEvents
call blocked and de-blacklist.
Task-number: QTBUG-61131
Change-Id: Ic8fa74a6085165442791264f6f137a2fa6083138
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
QVariant claims to be able to QVariantHash and QVariantMap, but the
actual conversion implementation is missing.
Task-number: QTBUG-61471
Change-Id: I0cba74642aa77dc423effed289bc7619922a89eb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
[ChangeLog][QtCore][QLocale] Fixed the conversion of QTime to string
form and parsing from string form to always treat the value as the
decimal fraction of the seconds component. That is, the string format
".z" produces/parses ".2" for 200 milliseconds and ".002" for 2
milliseconds. Use of "z" or "zzz" is discouraged outside decimal
fractions to avoid surprises.
Task-number: QTBUG-53565
Change-Id: Ia19de85ad35e4eb7bb95fffd14792caf9b4a5156
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
QWindowsFileSystemWatcherEngine uses one change notification
per directory to watch directories or files within that
directory. Adding files and their directories in a sequence
caused the value in QWindowsFileSystemWatcherEngineThread::HandleForDirHash
to be overwritten.
Relax the check for the flags (watcher attributes) to use >= and recreate
the change notification of a directory should its flags be insufficient.
This triggers when a file is added after its directory since files
require more attributes.
Task-number: QTBUG-61792
Change-Id: I371a72f1934fa82c53aaf84beb907825031f1c81
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Since the result is an actual zero, this section of code looking for
underflows kicks in. But we forgot to take the capital letter into
account when parsing the number.
Task-number: QTBUG-61350
Change-Id: Ia53158e207a94bf49489fffd14c6abbd21f0bac0
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
tst_QLocale::macDefaultLocale() was determining local-time's current
offset from UTC and using it when working out what to expect the
offset at 1:2:3 today to be. When a transition happens after 1:2:3 on
its day (which is usual for DST changes in Europe), this lead to using
the new offset to test a time before the transition; the test was thus
wrong and failed.
Use the time to be tested (and current date) to compute the offset to
use, instead of using the current date-time.
Change-Id: I1c02a5579bca859e1d1aeb4f45b24871a08287af
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Qemu uses some memory for each generated thread. This test creates
> 80000 threads and consumes about 10Gb of memory which is too
heavy for a VM.
Task-number: QTBUG-59966
Change-Id: I1bb8a0d7955778f5201948b41befcb9f1f391514
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
tst_qvariant.cpp(80): warning C4309: 'initializing': truncation of constant value
tst_qvariant.cpp(4635): warning C4309: 'initializing': truncation of constant value
tst_qbytearray.cpp(1438): warning C4267: 'argument': conversion from 'size_t' to 'uint', possible loss of data
tst_qbytearray.cpp(1440): warning C4267: 'argument': conversion from 'size_t' to 'uint', possible loss of data
http2srv.cpp(64): warning C4018: '<=': signed/unsigned mismatch
tst_qinputdialog.cpp(352): warning C4804: '<=': unsafe use of type 'bool' in operation
Change-Id: Id012d88b7b20c5c9f128f2ef53753cc1d479f358
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
It is flaky on macOS 10.12.
Task-number: QTBUG-61500
Change-Id: I3dfb6979808dec3a20896c2579dd1f5124c94a70
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
Randomly timeouts in the CI.
Task-number: QTBUG-59679
Change-Id: I28410b747b2033fc0ef6286a11c88cd0c07eb247
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
As the files are packaged into the binary, they have to be
extracted, before they can be ::open'ed.
Change-Id: Ie83086a2b9a73b6b0de462bdb52a71bb277ae06f
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
The motivation for this change is to make it simple to pass a
correctly sorted environment block to Win32 CreateProcess(). It is
also nice in other contexts that the environment variables are
sorted. The change is made for all platforms. This keeps it simple and
the only ill effect is slightly slower lookups.
Concerning the environment block passed to Win32 CreateProcess:
The environment block that is passed to CreateProcess() must be sorted
case-insensitively and without regard to locale. See
https://msdn.microsoft.com/en-us/library/windows/desktop/ms682009(v=vs.85).aspx
The need for sorting the environment block is also mentioned in the
CreateProcess() documentation, but with less details:
https://msdn.microsoft.com/en-us/library/windows/desktop/ms682425(v=vs.85).aspx
Task-number: QTBUG-61315
Change-Id: Ie1edd443301de79cf5f699d45beab01b7c0f9de3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
When punctuation is ignored then the kUCCollatePunctionSignificantMask
should not be set. This was originally thought to not be working due to
a bug on the Apple platforms, but this is not the case.
[ChangeLog][Platform Specific Changes][macOS][iOS] QCollator now
respects the ignorePunctuation property on Apple based platforms
correctly.
Task-number: QTBUG-41978
Change-Id: I62044076387d6e4479f4aaef3c2f48f49dbd160e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
QTimeZone("UTC") should be valid, as "UTC" appears in the list of
availableTimeZoneIds(), and tst_QTimeZone::dataStreamTest() constructs
timezones like this, which are considered valid.
The internal representation of a QTimeZone("UTC") as created by
QTimeZone::QTimeZone(const QByteArray &ianaId) is a QUtcTimeZonePrivate
which isValid(), so the containing QTimeZone isValid() too.
When QTimeZone is serialized into a QDataStream, it calls
tz.d->serialize(ds) which is QUtcTimeZonePrivate::serialize. This
writes QStringLiteral("OffsetFromUtc") followed by the IANA ID and
the offset (etc.) to the datastream.
When QTimeZone is deserialized it looks for this marker string, and if
present, it passed all of the parameters to the QTimeZone constructor
(not just the name). However, that constructor does not support standard
IANA timezones (only custom ones), and when it detects that the supplied
IANA ID is actually listed in availableTimeZoneIds(), it leaves the
pointer to the QTimeZonePrivate uninitialized (NULL), which leaves
the QTimeZone invalid (isValid() returns false).
Thus, a valid timezone which was serialized and then deserialized has
become invalid. This also affects serialization of QDateTimes with
timezones.
Fixed by calling the name-only constructor first, which works (only) for
IANA standard timezones and leaves the QTimeZone invalid (isValid()
returns false) otherwise. In which case, we can call the many-argument
contructor to create a custom timezone with the same offset as the one
which was originally serialized.
[ChangeLog][QtCore][QTimeZone] Fixed sending IANA standard UTC-offset
QTimeZones through QDataStream, which previously came out invalid after
deserialization.
Task-number: QTBUG-60595
Change-Id: Id9c47e8bda701faae4d800e012afb6db545b2fe9
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
It is possible that tmpdir already exists as a leftover from previous
tests. That is no reason for the test to fail.
Change-Id: I010633fb92defb064093af9872ae6fd2178f07dd
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
load(resources) makes embedding the test data into the executable
fail for platforms that use builtin test data. As the load call
is only used to obtain QMAKE_RCC we can avoid that call by
assuming that rcc was not renamed and assembling the path ourself.
Change-Id: I25b982d10f5617d9a213803e7e4bcc85fc66b2e7
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
The binary hangs rather than segfaults on that platform.
Task-number: QTBUG-59936
Change-Id: Id7d38edb7c746e3c0cd4b4941e0e19b3d42a628a
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
The documentation says that it's equivalent to
qgetenv(varName).toInt()
But the implementation wasn't. QByteArray::toInt() verifies that the
entire string was consumed, so QByteArray("1a").toInt() == 0, but
qstrtoll alone doesn't. That is, qstrtoll("1a", ...) == 1.
The implementation also detected the base, a behavior I kept. Instead, I
updated the documentation.
Change-Id: I0031aa609e714ae983c3fffd14676ea6061a9268
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
This method now returns -1 by default, due to commit 6255cb893d
which mistakenly replaced -1 with Qt::IgnoreAction (0x0).
As a result, dropping is forbidden in a number of applications
(I detected this in zanshin).
Change-Id: I4922451216e08d5d3fe36f8ba87364a361b691bf
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
tryAcquireWithTimeout(0.2s) was already blacklisted and
now the same failed with "(2s)".
Task-number: QTBUG-58745
Change-Id: I82363238c08056d2969a7616e3a6e5af080d537d
Reviewed-by: Liang Qi <liang.qi@qt.io>
tst_QSharedPointer can't create a pipe as the OS has too many files
open. Systems like macOS have a lower limit to these simultaneous files
open.
Task-number: QTBUG-60410
Change-Id: I21e89f992ada2a7d09b706522a05b5952f00ec33
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
They have been blacklisted on windows previously and now fail on
macOS 10.12 as well.
Task-number: QTBUG-60993
Change-Id: Ib7a3acfc7f2285c0a587d4abd88a4a218391d623
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
The test has been observed to be flaky on Windows. Introduce
QTRY_VERIFY_WITH_TIMEOUT for diagnostics.
Change-Id: I72abdd2e5544f8f35199876486ab15151f60e5f2
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
On winrt, the default application version is determined by its
manifest file. The template's default version is 1.0.0.0.
Additionally addRemoveLibPaths should not fail if libraryPaths
only contains currentDir.
Change-Id: Ifdd517f1bfe2fdf641f3d728ebe1fa144df1a8ca
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Found by GCC 7.
Change-Id: I90267617a038558e5b5213c598a949baf8d4d9be
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This commit fixes two bugs:
1) Two ranges should not be merged if they are of different columns.
The old code would have merged (0,0) with (1, 1). Tranforming a selection
of just two indexes in a rectangle of four indexes.
2) The QItemSelectionRange appended had wrong column and worked only for
indexes of the first column. For example if 'tl' was (0, 1) than br was (0, 1)
so the QItemSelectionRange would have be ((0,1), (0, 1-1)) so ((0,1), (0,0)).
This QItemSelectionRange is invalid because topLeft columns is greater than
bottomRight column. The fix take in consideration the bottomRight column.
Task-number: QTBUG-58871
Change-Id: I591ef0bcc63926f24a7b1ced002af9b7737a4b6e
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
... and update the unittest accordingly.
Compared to the 1.8 release there is one change in freedesktop.org.xml,
the magic for application/x-java-keystore was changed from host32 to
big32, as done upstream, see https://bugs.freedesktop.org/show_bug.cgi?id=99328
Task-number: QTBUG-60608
Change-Id: I47de71c9396cfc3eabc884d5679c73a3e4850a17
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The conditions checked are compile-time conditions anyhow.
Simplify or strenghten a few conditions while at it.
Change-Id: If07f2aedca4c3632d852a8fdb2b3f7eb55a96c93
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: James McDonnell <jmcdonnell@blackberry.com>