Include test data on Android.
Change-Id: Ic0890495c0bf8d2e38595585226a03073b043d57
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com>
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Fixed a few instances of files that should be deployed to the
file system. The way we do this on Android is via qrc. We also
need a special case for the resources/test.txt, because
QFINDTESTDATA will find this in qrc, but that's not the one
we are looking for.
Change-Id: I7097e8b7795b3a8fd483adad090208f295478412
Reviewed-by: BogDan Vatra <bogdan@kde.org>
QVersionNumber will gain a small-version-number optimization, which
stores sequences of less than 4 (32bit) or 8 (64bit) 8-bit signed
segments inside the class instead of a QVector. Make sure the tests
cover those cases, too.
Change-Id: If1d875c75d284908756b305f767a7218cab5226f
Reviewed-by: Keith Gardner <kreios4004@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Skip the tests that require building and deploying an external
command line application, since that's not how we do things on
Android, and it's really not very relevant for that platform.
Change-Id: I2c1985687e25fb0cf124b1d57c8ba60e37d2ff96
Reviewed-by: BogDan Vatra <bogdan@kde.org>
On Android the POSIX implementation of QCollator is used, and
this does not support setting other locales than the default.
Change-Id: I25d23949341fc555e8be4f6836ae68cc8813cc46
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Include test data in qrc so it can be found on Android.
Change-Id: Iaca8422120f1ef842aafeb0cc209cb9fdd70f05f
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Bundle test data in qrc on Android. Extract it, as the tests
expect to find it in the file system.
Change-Id: I251eca3c23141a608b1cbac5ee0b7164c068f9b4
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Instead of leaking the QLockFile instance, which causes
leak-checkers to emit false positives, simply call exit(),
which doesn't run the destructors, yet doesn't lead to
leak-checker warnings.
Change-Id: Ia61010671e5218ae412e2bcf873e66255a2c5a99
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Added support on QDateTime::fromString to read correctly dates on ISO
format with Time zone designators at format [+-]HH
Change-Id: Ied5c3b7950aee3d0879af0e05398081395c18df5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
The /home path doesn't exist on Android, so it doesn't work as
a non-writable current dir. Instead we use /data on Android.
Change-Id: Ib779f60822da1bef421a16a00c1030245a8c5b90
Reviewed-by: BogDan Vatra <bogdan@kde.org>
The qtlogging.ini file needs to be detectable by QFINDTESTDATA,
so we put it in a qrc file on Android.
Change-Id: I5fb0217098c56f2b2e99ab8d1642c4a7904b18d1
Reviewed-by: BogDan Vatra <bogdan@kde.org>
This test requires building a console application first, deploying
this as part of the APK and then being able to execute the
bundled file from the main application. Since IPC is a limited
use case on Android, we just skip this test instead.
Change-Id: Ie68e495ff64b69e7027924291a411b5de0e2da76
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Test requires that tst_qiodevice.cpp is available on file system,
but since we're not able to deploy directly to the file system
on Android and since we want to actually test file system access,
we bundle it in qrc and copy it out during initialization.
Change-Id: Ida2b5bf6f1dcd43bc740a2b9380352bab5eb6c62
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Some of the tests expect QDir::homePath() and QDir::currentPath()
to be different, so we just set the current path to something
other than QDir::homePath().
Change-Id: Ib048d323f4745369821765230b995a73b8a97145
Reviewed-by: BogDan Vatra <bogdan@kde.org>
This test may not be possible on Android, since the file system
can be mounted with noatime or relatime which means read access
will not be registered.
Change-Id: I40f587e1a1f131ee06f0e3700e908ccaa19c83ce
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Since there's no way to deploy files directly to the file file
system on Android, we put them in a qrc file and extract them
on startup.
Change-Id: I6a42aa5e0372bfd9fb2f7ccfea964c9c3c2e45d8
Reviewed-by: BogDan Vatra <bogdan@kde.org>
This test requires that the resources are also available
in the file system. Since it's not possible to deploy directly
to the file system using Android, we extract the files on
startup instead.
Change-Id: I1d1fe7d62c4c618a89713e3a7d1903e42bfb10b8
Reviewed-by: BogDan Vatra <bogdan@kde.org>
There's no way to install files automatically into the file
system on Android, so to test QDir on the file system, we have
to bundle the files in qrc and then copy them into the file system
on startup. This adds some complexity, but at least it will detect
regressions.
We also need to make sure the current directory is the same as
the data path, since the test assumes this, and /usr/ does not
exist on Android, so we have to use a different path to find the
root path.
Change-Id: I18d79b5ed99a0afff573beb30c61745c403f8991
Reviewed-by: BogDan Vatra <bogdan@kde.org>
This will arbitrarily fail at certain points. Adjusting the
timeouts helps, but it's very unpredictable, so it's better
to do what we do on Windows and just expect-fail the results
that we get.
Change-Id: Ie6033c73539c2dd69115b06096919e173f097367
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Add test data to resources.
Change-Id: Ib8a5688e7caab8434b8f0676f53a2a79ec94b264
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
QStandardPaths::writableLocation() is documented to return the
empty string if no matching writable location can be determined.
This is the case for e.g. FontsLocation and ApplicationsLocation on
Android. We need to still accept this as a valid response.
Change-Id: I2824e9dcfd41b1c24dbf3896b7ae9b5260e9accd
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: BogDan Vatra <bogdan@kde.org>
The test expects all the files to reside in the file system,
both for loading the runtime resources and for comparisons.
Since we can't deploy directly to the file system on Android,
we go via qrc and extract the files on startup instead.
Change-Id: I17ff8985cb17dbfc45f0fb692ca46558bb5c5cdc
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Since those are unpredictable, there's little we can match, besides the
"0x" for the QThread pointer. For the PID, at least we can compare it to
the value from QProcess.
Change-Id: I89420306863b95c82be761baabd733a7f17eba5e
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
This test fails if the environment has the variable set.
Change-Id: Ibd54ff3e6e22a885341898889088ac56e84282b1
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Conflicts:
dist/changes-5.4.0
7231e1fbe2 went into 5.4 instead of the
5.4.0 branch, thus the conflict.
Change-Id: I70b8597ab52506490dcaf700427183950d42cbd1
The code in 4696e9dbaa was incorrect. It is perfectly valid to call
these methods with row=-1 column=1 parent=some_index, this is exactly
what happens in QListView and QTableView. Child row/column is only for
trees.
Move the coordinate mapping from QSortFilterProxyModel into a new
mapDropCoordinatesToSource internal method, used by QAbstractProxyModel.
Task-number: QTBUG-39549
Change-Id: I3312210473d84b639cbe4c01f70ea36437db3e91
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Stephen Kelly <steveire@gmail.com>
Somehow, it doesn't shrink with btrfs, even if you write 1 MB of non-
null data. This does not seem to be a bug in QStorageInfo. strace
confirms that there is a second statvfs call happening.
Change-Id: I9ed99d27d25e191916278e6b8faeae132469fc63
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
The testcase always returns the expected result, independently of the
QEventLoop::ExcludeSocketNotifiers flag to processEvents.
In Qt4 the same test uses an intermediate QEventLoop and already runs
it before the QEventLoop::ExcludeSocketNotifiers:
QEventLoop loop;
// allow the TCP/IP stack time to loopback the data,
// so our socket is ready to read
QTimer::singleShot(200, &loop, SLOT(quit()));
loop.exec(QEventLoop::ExcludeSocketNotifiers);
This fixes and improves the test by connecting, processing and
checking the bytesWritten signal for the pending connection socket.
Change-Id: I1b1d2b7b83910c87ba3fe48e29ac9fd585ac62ad
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The default should be the actual time of day. Showing the process's time
is the optional case. In the future, we'll provide a way to showing the
monotonic reference time ("boot") and we should improve the detection of
actual application runtime.
Change-Id: I41936d77ab9fad2073dc0ce1c97cabe57ec39f16
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Whenever the source model of a QSortFilterProxyModel changes, and
the changes involve the sorted column, the implementation removes
the changed rows from the mapping, sorts them, and inserts them back;
in case of identical items, the rows are inserted at the end of the
block of equal rows.
The problem is that if the change doesn't actually happen on the roles
that are used for sorting, then we shuffle the rows, terribly confusing
the user. The typical case is a model with identical checkable rows:
(un)checking one row will move it at the end.
So, instead of trying to be smart with the removal/sort/insert sorted,
simply resort everything under the changed parent index. Since the
sorting used is stable, this keeps the items in the same positions.
Task-number: QTBUG-1548
Change-Id: Id0e61bd49da53b0a3e8aefa6b6893ac41179dc6f
Reviewed-by: David Faure <david.faure@kdab.com>
Convert a Windows-specific WebDAV specification
"//host@SSL/path" into URL's with scheme set to
"webdavs" and back to local file (Windows only).
Task-number: QTBUG-42346
Change-Id: I12663243848ea7b2d3f208743e837e9de14a93eb
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
We're not ready.
[ChangeLog][EDITORIAL] Remove all mentions of QVersionNumber.
Change-Id: I03ad95992982eb3177f982c1eeddb6a6bc29336c
Reviewed-by: Keith Gardner <kreios4004@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
gcc 4.9 has the __has_include feature which enables the
TEST_FORWARD_LIST and includes the forward_list header. This in turn
checks that the c++11 flags are enabled, or throws an error.
Change-Id: I44aa58e47c2f9ba6f14cb5a68d24da4a76698e5f
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Fix warning:
QEventLoop: Cannot be used without QApplication
and occasional crashes on Windows.
Task-number: QTBUG-26406
Change-Id: Ia8b2a4e3d375d1e43f0e66fe64a39af5f9cf4d60
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Dario Freddi <dario.freddi@ispirata.com>
If we detect a utf8 BOM mark at the beginning of the .ini
file, skip the marker and set the iniCodec to utf8.
Task-number: QTBUG-23381
Change-Id: I1b37fc4f1638a48e4f3ee71ab165e2989bc592f1
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
ICU would return a utf-16 (endian dependent) codec for unicode
which is very rarely what people want. In most cases, unicode is
encoded in utf8 these days, so return a utf8 codec for it.
Task-number: QTBUG-41998
Change-Id: I51ee758d520702b263a8b2011787eb1f3455ed96
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Do not automatically add a \n to all messages formatted by
qFormatLogMessage. Some backends require a final newline,
some don't, so it's best to only append it where it's actually needed.
The returned string will be null if the pattern is empty. This allows
to differentiate between the case that the pattern just didn't apply
(empty line is printed), and the case that qSetMessagePattern(QString())
have been called (nothing is printed).
Change-Id: I17fde997a4074f58f82de6dea129948155c322d6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Replace "Apple Roman" by "Macintosh" which is registered by IANA:
http://tools.ietf.org/html/rfc1345.
Replace unsupported "GB18030-0" by "GB18030".
Remove "JIS X 0201" and "JIS X 0208" as they are supported as parts of
other Japanese encodings but not directly.
Add "HP-ROMAN8" which is supported by both Qt and ICU.
Also clean the codecs test.
Change-Id: Iaf8e8ff1900d3f92ea0e0df75c60fe1534de23ac
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Substitute this encoding by "macintosh" when Qt is built with ICU.
It is for compatibility with Qt 4.x.
Change-Id: I70c51cba7d473ac81e25862736cb71a2f6894055
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
At 4GiB the CI test system still spends a considerable
amount of time testing this. Tune the size down to
16 MiB.
Change-Id: I417aa6829fcc734e5de4d7d34e503190f6b291e5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Change-Id: I823566ba72668c611d225aa92c4d09a53cabe8fc
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Benign, but easy to avoid by using automatic storage.
Change-Id: I60a1a2e85d8c1b2d91f3f33973374afae8876340
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>