This attempts to emulate a dictionary usecase of sorts, done in code to avoid
bloating the git repository by adding an actual word list.
Change-Id: I878bc4af8877ba780ee699932f240c0d9c8ff12c
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
For some reason, hiding files via executing "attrib +h filename"
process didn't work realiably, so changed the file hiding to be done
via Windows native API.
Also changed the test to use QTemporaryDir to simplify temporary
directory handling a bit.
Task-number: QTBUG-24291
Change-Id: I4f02b16e2f9105bcf5e6c5bf136f55434a26e2f4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Only test code change, we already have the correct behaviour
Task-number: QTBUG-20001
Change-Id: I2296f405f47f9c8d15796e69f9d1854063e38d6a
Reviewed-by: Richard J. Moore <rich@kde.org>
This made sense only for Symbian where there was a special
CFbsBitmap-based backend present and it was used from the
Symbian-specific VG and GL pixmap implementations.
The generic version is merely a useless wrapper over QImage and is not
in use anywhere in the codebase.
Change-Id: I1dabe22dfb8cbbc35dce8e22703a3aff810fb5f9
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
- Use temporary directories to avoid instabilities
due to remains of previous failed tests and locked
directories.
- Replace SRCDIR by QFINDTESTDATA(), reference only
the freedesktop.org.xml contained in the Qt source
tree by $$QT.corelib.sources.
- Improve some error messages, test suite instructions
for Windows.
Change-Id: Idee8e3767ef0a8299df3bdaaac20334164878db0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: David Faure <faure@kde.org>
The private git history shows that the test program associated with this
data file was missing from the original commit and was never
subsequently added.
Change-Id: I3401724ac04168158a48eb06436db83d3557711f
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
- Skip the failing windowsDefaultLocale() test.
- Improve the handling of the subprocess, locate
the binary in initTestCase instead of repeatedly searching it.
- Make all applications console/non-app bundles.
Task-number: QTBUG-24543
Change-Id: I79dfaa3320cd5698f02e74a3fe53477d4a79d4fb
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
The libraries were built into wrong directory in Windows. Fixed it so
that the libraries are built into debug and release directories like
the test executable.
Also fixed QMAKE_CLEAN statement, which was using incorrect separator.
Task-number: QTBUG-24151
Change-Id: Iade656af5f83ef2b79c2b9c4177df4a16b2f6821
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
moc is currently generating code to convert from a pointer to member
function of a slot or signal to its index.
The idea was that it could be usefull for slots to have the new syntax
do the same as the old one (connecting signal index to slot index). But
in practice, the new syntax do not use the IndexOfMethod for slots.
Also, it does not work for all the slots (no Q_PRIVATE_SLOT,
no static slots)
So since it is not used, and that it would take room in the binaries to
generate all the code to get the index of slots, we remove it.
If ever we need it, we can still add it later.
Change-Id: Ia417e3e524d7915ca86433ea86c66ac2b299c81a
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Previously the silent logging mode suppressed passes, skips and internal
testlib info messages, but did not suppress debugging output, making it
hard to see the fails in a noisy test. This commit changes silent mode
so that it suppresses all output except test failures and fatal errors,
making silent mode truly useful for seeing just the important test
output.
This commit also adds a selftest to verify the behaviour of silent mode.
Change-Id: I75420aead03682306210746a87e2a3b608b58fc6
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
This adds Sha224, Sha256, Sha384, and Sha512 enum values to
QCryptographicHash::Algorithm. The implementation comes from RFC 6234,
http://tools.ietf.org/html/rfc6234, which is added to
src/3rdparty/rfc6234. Only the headers and SHA-2 code is included in
src/3rdparty/rfc6234 (the SHA1, HMAC, and HKDF code is not included).
Change-Id: I85139fd118291f15efc22899a5ddd1cc83810cfb
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
it did the same cleanup() did, and they are always called consecutively
anyway (except at start and end where it does not matter).
Change-Id: I4c82024d19d6c670f1f4037d43147a15680614ae
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
we want to call it even if the test fails
Change-Id: Ie8f3f9d2df5d52990d6b9f9a632e49826278175a
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
this allows us to temporarily set some extra args without (incorrectly)
instantiating a second TestCompiler (and on the way relying on $PATH for
finding qmake).
Change-Id: Icce5bf7314148ddbe705606f77a26e3362b31f67
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Clear away Q_WS_WIN/Q_WS_X11 from QMenu. Using the hint returned by the
QPlatformTheme.
Task-number: QTBUG-24325
Change-Id: Iaa4da26c74273d7cfc1fbec6519c52d09e10f7bb
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
tst_qclipboard.cpp still has Q_WS_WIN which must be clear away. After
clean up, auto test will fail under windows: When setMimeData() is
called, dataChanged() signal will be emited twice.
The solution for QTBUG-24184 has partially solved the problem, but it
still there. Make sure emitChanged() only called by QPlatformClipboard
will give our more control for this.
Task-number: QTBUG-24484
Change-Id: I23566c6d3b32828b6865234c311af3635fe9e299
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
- Create subdirectories containing profiles to avoid
problems with -fast.
- Use QFINDTESTDATA to locate binary.
- Make it a console application, no Mac-bundle.
- Add error messages to the test, give it a longer time-out
and ensure sub-process is killed if it hangs.
Change-Id: Ibc177b786c4bc8fdbc068a8c45f4801a41c9f660
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
Fixes a crash when invoking various QRegExp methods on an object
*before* doing any match. For instance fixes:
QRegExp re;
re.matchedLength(); // crash
Task-number: QTBUG-23352
Change-Id: I9c239ff790a139c7820ef1aeced89d31320ae6b0
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reusing a template is much better then creating a new one, even if it
should inline the same code.
For some reason replacing T* by void* force gcc to remove a few bytes
per template instantiation too, it is not really significant, but it
alows us to simplify the code.
Benchmarks don't show any regressions.
Change-Id: I4fdf1e4dc311b23021eb5758605602937d05b183
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QVariant::Type is marked as obsolete. It is not possible to get rid of
it completely, in a source compatible way, but at least we can remove it
safely from a method arguments list.
Change-Id: I26b58099bfa6d32f3a583a8ae0047f0bb36bcd0d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Allow moc to produce the desired identifiers when used with C++
symbol names that have been redefined, for example by -Dfoo=bar.
Two changes are required: firstly, when encoding a type name, the
components of the name must be checked for substitutions that have been
defined for that token (note that this is not done here by correct
pre-processing, but only by processing the resultant table of
definitions). Secondly, the arguments to the SIGNAL, SLOT and METHOD
macros must be allowed to be substituted during macro expansion rather
than stringized directly.
This is a temporary change to prevent breaking existing projects
that depend on the declarative module. After clients have had an
opportunity to update their code to the use the new interfaces,
it can be removed.
Task-number: QTBUG-23737
Change-Id: I39e6844cebf6ca7984af6028160b8a3797ac44a5
Reviewed-by: Martin Jones <martin.jones@nokia.com>
These function are marked as obsolete since Qt 4.3
The motivation here was too fix QPixmap::serialNumber which is marked as
QT_DEPRECATED_SINCE but was not inlined.
But then I took the oportunity to do the same with all the other
functions.
Change-Id: Ic50a7857461fc402b2f2b4528c83e53e8e28ea30
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
- Fix key handling in QWidgetLineControl according to
the keyboard scheme returned by the QPlatformTheme,
remove #ifdefs.
- Do the same in the test.
Task-number: QTBUG-21402
Change-Id: I36d836584e7122309061af72819a4147cadd0a74
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
It might be silly to have sections with size 0 without using hideSection.
Nevertheless we should still use the principle of least surprise.
It does not make sense that hiding a row 'far' away should affect
the semantics of setOffsetToSectionPosition on lower indexes.
Change-Id: Iaf847eba2ea4d28fc7bcfe3a27d62f432f6f61e0
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Support pixel-based deltas as well as sending
dx and dy values in the same event. Keep source and
behavior compatibility with Qt 4.
New API:
QPoint pixelDelta() const
QPoint angleDelta() const
Deprecate delta() and orientation().
Both pixel-based deltas and combined updates are
necessary for smooth trackpad-based scrolling on
OS X.
Qt 4 compatible behavior is achieved by sending an
extra wheel event in cases where the initial event
has a combined dx and dy update. This extra event
sends dx in delta() and orientation(), with pixelDelta()
and angleDelta() set to null.
Modify the Cocoa implementation to provide pixel
deltas. It is expected that not all platforms can
provide these. Angle deltas will always be available.
Change-Id: I20c10f0df338ddcd6a3f7a4d40949ed5ae3b4795
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
The code coverage tool adds #line when instrumenting the code using the gcc
syntax.
Since tst_headersclean now uses the -pedantic-errors flag (qtbase commit
7e970eb58c), it causes a fatal error when the code is
instrumented with the coverage tool.
Change-Id: Icb1888d1c1f0a982c0c56aa168e70a76a246a18c
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
remove "header" and assignmets which are defaults or bogus,
reorder some assignments.
Change-Id: I67403872168c890ca3b696753ceb01c605d19be7
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
This commit reverts partly 7401832a7d
There is something wrong with DummyWindow/XCB/Metacity, Metacity
crashes quite often when QWindow is activated.
Change-Id: I611af2678814f41c941cb697054135f561a77878
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
Change-Id: Iff8b9bdd4b069721103e1cd5854e56b6116d7549
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Many languages use a fullstop to indicate an abbreviation, making the
fullstop part of the word. For languages like thai, it is required to
pass the fullstop along for correct word breaking.
Change-Id: I5ad0ddbc66ea96e08913446dad8fd3c5d5dd0905
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
Thai is not supposed to have ZWJ and ZWNJ characters or any other of the
Inherited Unicode Scripts
(http://www.verisigninc.com/assets/idn-inherited-unicode-script.pdf)
- they don't have a mapping to the thai encoding tis620 which libthai
requires. However it is an unfortunate fact that there are many websites
etc that liberally place these ZWJ and ZWNJ characters throughout thai text
to force word boundaries, so we must also deal with them.
We deal with all Inherited characters by mapping them to the invalid code ~0
in tis620 encoding, following what libthai does internally in its own tis620
encoding functions, and then replacing this character with the original
unicode and setting dontPrint to true to hide the ZWJ and ZWNJ
characters.
Includes a unit test to check the behaviour.
Change-Id: I1ee8388b650cb5fc61bcb265efb9843c73f327ac
Reviewed-by: Adrian Yanes <ext-adrian.yanes@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
Since we would add 1 to the height of script lines in the layout before
and there was no compensation for this in the box font engine, which is
used by this test, the selection rect in the test images was one pixel too
high. Now that the +1 has been removed from the height, the images have to
be updated.
Change-Id: Ic9ea0ace6b61be496846c7f757ae309756cd9f5f
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
If QMainWindow::restoreState() then QWidget::setStylesheet() were called
before the QMainWindow is shown, the size of QDockWidget can not be
restored.
QWidget::setStylesheet() will generate QEvent::StyleChange event, which will
cause the function QDockAreaLayout::fitLayout() to be called before the layout
of MainWindow is activated. Although the state info has been stored in
a QMainWindowLayoutState variable by QMainWindow::restoreState(), but
QMainWindowLayout::setGeometry() still isn't called at present. So
QDockAreaLayout::fitLayout() will force the size of dockwidgets
and centralwidget to be calculated using the wrong geometry, which will
break the state restored by QMainWindow::restoreState().
This is a side effect of 692e9103ebb85b90e79377206d5d03b704d43d42.
Task-number: QTBUG-15080
Change-Id: I8cda6a529d178f7467a59b780db80df0a44d4769
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Use QRectF consistently to avoid the rounding done in the conversion
to QRect.
Task-number: QTBUG-24463
Change-Id: If9ea858ebabf8c449ea058b9d379d4a57cb6c82d
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
- Replace Q_WS_WIN with Q_OS_WIN
- Remove useless #ifdef Q_OS_WINCE which located in another #ifdef
Q_OS_WINCE
Change-Id: I6279b6d74902ab3ca6bdb7292c2936a76e3e6952
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
When configuring with -fast on Windows, a directory which contains two
.pro files, one SUBDIRS and one not, will have the SUBDIRS Makefile
silently clobbered by the non-SUBDIRS Makefile. In practice, this may
cause various subdirectories to be silently excluded from the build.
Rearrange .pro files for this test to avoid triggering this bug.
See also e9015b3bc8.
Task-number: QTBUG-21168
Change-Id: I18fac1ac636fdc6b2aaee1b4cdfee9c4bc2a77ff
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
This setting is extremely harmful, as code cannot know whether or not to expect
it. It also made the behaviour of QString::fromAscii and ::toAscii unintuitive,
and caused a lot of people to make mistakes with it.
Change-Id: I2f429fa7ef93bd75bb93a7f64c56db15b7283388
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
- Fix warning: "Character represented by universal-character-name
'\uFFFF' cannot be represented in the current code page (1252).
- Fix character conversion
- Change source file to plain ASCII, add defines for special
characters.
Change-Id: I8557e6ba7488f746247f0d78181f14bfb7d5aaae
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
When configuring with -fast on Windows, a directory which contains two
.pro files, one SUBDIRS and one not, will have the SUBDIRS Makefile
silently clobbered by the non-SUBDIRS Makefile. In practice, this may
cause various subdirectories to be silently excluded from the build.
Rearrange .pro files for this test to avoid triggering this bug.
Task-number: QTBUG-21168
Change-Id: Ic51941db497d7b8fb004f3c50f5ea24d90ff3114
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
This abstraction imposed serious performance penalties and is being
dropped from the public API.
In particular, by allowing file names to be arbitrarily hijacked by
different file engines, and requiring engines to be instantiated in
order to decide, it imposed unnecessary overhead on all file operations.
Another flaw in the design with direct impact on performance is how
engines have no way to provide (or retain) additional information
obtained when querying the filesystem. In many places this has meant
repeated operations on the file system, where useful information is
immediately discarded to be queried again subsequently.
For Qt 4.8 a major refactoring of the code base took place to allow
bypassing the file-engine abstraction in select places, with
considerable performance gains observed. In Qt 5 it is expected we'll be
able to take this further, reaping even more benefits, but the
abstraction has to go.
[Dropping this now does not preclude that virtual file systems make an
appearance in Qt at a later point in Qt 5's lifecycle. Hopefully with a
new and improved abstraction.]
Forward declarations for QFileExtension(Result) were dropped, as the
classes were never used or defined.
Tests using "internalized" classes will only fully run on developer
builds. QFSFileEngine was removed altogether from exception safety test,
as it isn't its intent to test internal API.
Change-Id: Ie910e6c2628be202ea9e05366b091d6d529b246b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
This test is broken in a couple of ways. A few one line fixes
combined into a single patch.
1. Linux is the only OS that does
abstract unix domain sockets by prepending a null as the first
character. Don't test this on non-Linux platforms and expect
it to pass.
2. Change QVERIFY2 to QCOMPARE so we can see why this
fails in CI but no on the local system. Use QCOMPARE
where possible.
Change-Id: Ic3d2cf9696730dc4d6589539fdfe8a48ccf28de5
Reviewed-by: Alex <alex.blasche@nokia.com>
Due to recent changes in the test it should now compile
and run properly. This re-enables the test.
Change-Id: I6c647d99fa1f1b1c53e006fef2865d6be08ec16c
Reviewed-by: Alex <alex.blasche@nokia.com>
The fPIE flag should only be used with executables.
Change-Id: If799ae4a7fe2492af3aac67651659a52d365024a
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
This way, ctest -V shows that it fails for the expected reason.
Change-Id: I97589d4e90d889ea0b10dbd6192526712dbfdd8e
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
This code sets LANG=en_US so that the method comment(), which returns a translated
name, can be compared with an expected result in English.
(QMimeType::comment uses QLocale::system().name() and QLocale::system().uiLanguages())
But LANG= has no effect if LC_ALL is set, so LC_ALL needs to be cleared (or set
to en_US) for the test to work.
Change-Id: Icb031057769be9bc8c0fcab65daa45e7bf1d5b18
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Change the ifdefs in our own code (except openssl backend) to use the
new configure flag.
Change-Id: I8774734771c66b22164b5fae8fdb27814ac3df7b
Reviewed-by: Richard J. Moore <rich@kde.org>
The move constructor sets other.d_ptr to zero. This is safe, because
after being moved from, the object is left in a state in which it
can be safely destroyed (delete nullptr is a no-op).
It cannot meaningfully be used anymore (most members will crash with
a nullptr dereference), but in most cases, the moved-from object
cannot be accessed anyway (not a named object), and if a named object
is moved from, it must have been through explicit std::move(), as in
the test case.
The STL makes better guarantees (moved-from containers are .empty()),
but I don't think it's worth introducing a null state into
QEasingCurve just for supporting a use-case that should be
considered a bug anyway.
Change-Id: I4115b7386cdea6960507da6843a0d0196d8e4139
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Implemented as in QPen etc.
Change-Id: I65b43c6ec7308ca4b44f614594c15c41ab2f89f9
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Implementated as in QPen etc.
Change-Id: Ia08551bf7902b60e115d1b1d2353030597e34841
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The meta-object format is going to change for Qt5. Use QMOB to
insulate the badxml test from such changes.
(It just so happens that the QFAIL("a failure") statement is still on
line 109 after the refactoring, so the expected_badxml.* files'
location tags did not have to be changed.)
Change-Id: I04421d13c4df71c8004fa71cafc4823a59079a41
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Add QSysInfo::macVersion() instead, to match the windowsVersion()
function.
Change-Id: I783e59583ca21653d25586156cbb0cb1f301868b
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Be explicit about skipping the test when no default printer is present.
Change-Id: If69b275eb0f490411471ec42798d8aefcc57fd83
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Remove previously defined insignificant test flag as the number of
tests failing has been reduced.
Task-number: QTBUG-24406
Task-number: QTBUG-23058
Change-Id: I01b41f30469cf7a440e21195e105cb30a8db76e2
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Use QFINDTESTDATA to locate the helper applications.
Change-Id: I604d10e37c9367f2e95225864edf5bf705f1d961
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
The tab key behavior in Qt5 no longer respects the "Text boxes and lists
only" tab navigation option in OSX, which is the default. This is a
regression since Qt4.
Task-number: QTBUG-24372
Change-Id: I54c1663f8fb259dd847083432102a0bfad7dd69c
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
- Made test depend on subprogram
- added install of subprogram
Change-Id: Ib263e9e75ed3c900b52fb1c9b6d319e71d19bdbb
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
This test was written incorrectly in a way which happened to allow it to
pass most of the time (but not all the time).
Reset the state of test objects between each test function, and mark the
broken functions with QEXPECT_FAIL and a link to a task.
Replace the unusual WaitForPinger construct with the usual
QTRY_VERIFY/QTRY_COMPARE method of verifying asynchronous operations.
Task-number: QTBUG-24262
Change-Id: I82d09002307c0b500bf60cd5b583674321b37609
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
They create noise in the test results.
Change-Id: I40e7239ba7cd41bec577fe8220c86476553a6502
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Change-Id: I70c324e6fcfd2bba3ab44837c5ce2c007de8896f
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Many (most?) strings written aren't in fact UTF-8, and we can check at
compile-time which are and which aren't, so don't hard-code fromUtf8()
but use the much more efficient QStringLiteral() where applicable.
This is low-hanging fruit. This patch only optimises US-ASCII string
literals, not those that are latin-1 or even UTF-8, because that would
require more extensive changes to the original fixString() function.
Likewise, there are also other calls to QString::fromUtf8() being
generated (e.g. in the pixmap code) that could benefit from being
turned into QStringLiterals, but their code paths are more involved
than those this patch fixes.
This patch at least suffices in turning all the setObjectName()
arguments into QStringLiterals, which was the main goal.
The autotest baseline has been updated with the new expected results.
Change-Id: Ic1ef67f500f9ff92d36164d515f4e004ef2a10bc
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
This function provides a proper way of determining whether a function
returned by QMetaObject::method() is valid. (Checking whether
signature() returns a 0 pointer, which e.g. testlib does, is not an
ideal API -- especially given that signature() will soon be removed
and replaced by a function that returns a QByteArray.)
Change-Id: I644f476b09904925f2042945f5d0ad744482b682
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
The helper functions contained QSKIP macros which do not also skip their
parent function. These QSKIP function were removed and replaced with a
return success value.
Change-Id: I533f57842fc95beaeb1fcde5235678e9807db056
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
This autotest seems to be caught in an event loop preventing further
correct signalling. Mark test function skipped with QSKIP.
Task-number: QTBUG-24374
Change-Id: Ic943a33b71fa87d0873278cb7b7b134c22602be3
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
For shadow builds where "make install" had not been run, the
tst_QLocale::emptyCtor test function would fail to find its helper
application because QFINDTESTDATA was not searching for it in the build
directory due to the test not instantiating QCoreApplication.
This commit fixes the test by instantiating a QCoreApplication using the
QTEST_MAIN macro, which also allows some special case code for Windows
CE to be removed.
Change-Id: Ic81d4699da2538c24b36b3d6bd52c4a02ad417f4
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Prior to this commit, a benchmark test could report 0..n passes and 0..m
fails or skips, where n is the number of accumulation iterations used to
collect benchmark data and m is the number of times the test function
was invoked. Depending on the type of benchmark measurer being used,
this could result in a very large volume of test output and inconsistent
pass, fail and skip counts between test runs.
This commit changes the behaviour so that each benchmark test reports
one pass, fail or skip, regardless of the number of iterations used to
collect benchmark data.
This commit also prevents benchmark data being reported in the test
output if the benchmark test failed or skipped, as any benchmark data is
of dubious value in such cases.
The latter change in behaviour requires a minor modification to the
badxml selftest, which now tests quoting of literal strings in xml test
output for both passing and failing benchmarks.
Finally, this commit also adds a new selftest specifically for verifying
correct behaviour for benchmarks that fail or skip.
Task-number: QTBUG-24313
Change-Id: I3426dc659a7511b62fd183a031c7235bc753f497
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
- Made test depend on subprogram to make sure it was there when
test ran.
- install signalbug subprogram
Change-Id: Ie0a19e52d131adcd17c97b263389aecffb81520e
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Prior to this commit, when an unexpected pass occurred the test output
showed the message "XPASS : tst_foo::function() 'expr' returned FALSE",
where the problem was actually that the expression evaluated to true
when it was expected to be false.
This commit changes the output to make it clear that the expression
evaluated to true unexpectedly.
Task-number: QTBUG-22118
Change-Id: Id22c178073d3b75789675ca37a8ef019029b1f91
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reduce the thread and iteration counts to make this test execute faster.
This change reduces the runtime to 14 seconds (from 5 minutes, 38
seconds).
Change-Id: Id5ea056cfd33022da5a06809f0598a5cdb02b27b
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
History of the development before the import:
ssh://codereview.qt-project.org/playground/mimetypes.git
Mimetype definitions come from shared-mime-info where available (UNIX systems),
loaded using a mmap'ed binary cache generated by update-mime-database.
As a fallback if no cache is found, we parse the raw XML files otherwise.
This makes the MIME type support fast and with very low memory usage on UNIX,
and it makes it easy to use on Windows (no dependency on shared-mime-info,
Qt even includes a freedesktop.xml file to use if none are found on the system).
Change-Id: I27b05008216ff936dc463bd80d3893422bfb940e
Reviewed-by: Richard J. Moore <rich@kde.org>
Emit changed signal only if the clipboard is not owned,
in which case QClipboard does it.
Task-number: QTBUG-24184
Change-Id: I27420583a718a5f8cd93b9d361b1e422a75df300
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>