This test hardcodes IP address / hostname pairs to be used for forward
and reverse lookups.
The reverse DNS entry for 62.70.27.69 has recently disappeared. Replace
it with an IP / name pair which is (hopefully) much less likely to
disappear.
Change-Id: I03f589e1c0f4bde0b1a14e94b3c1047eeb81246e
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
This is a fix for problems introduced by bf7f170.
Change-Id: If5dd8e031ef2efea578b3efb188c2e950e1ba41a
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
QNetworkCookie doesn't need to know about QNetworkCookieJar and for
QNetworkCookieJar header a forward declared QNetworkCookie is enough.
Change-Id: I21145ce0f67a0a6bd68a46a5e757f82105cdf520
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
The current way we do it of having the platform or touch plugin send
both mouse and touch events is not ideal. There's no good way to write
an application that works sanely both on a touch-only device and on a
desktop except by restricting yourself to only handling mouse events. If
you try to handle touch events you don't get any events at all on
desktop, and if you try to handle both, you end up getting duplicate
events on touch devices.
Instead, we should get rid of the code in the plugins that automatically
sends mouse events translated from touch events. This change enables
that by making the behaviour fully configurable in QtGui.
Two new application attributes are added to explicitly say whether
unhandled touch events should be sent as synthesized mouse events and
vice versa, and no duplicates are automatically sent as the current
situation. Synthesized mouse events are enabled by default.
We also get rid of the QTouchEvent::TouchPoint::Primary flag, which
was only used to signal that the windowing system automatically
generated mouse events for that touch point. Now we only generate mouse
events from the first touch point in the list.
Change-Id: I8e20f3480407ca8c31b42de0a4d2b319e1346b65
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
Add a test case for calling QEXPECT_FAIL in a data-driven test without
passing a specific data tag for the expected failure, in which the
expected failure should apply to the current data row.
Change-Id: I70a6592de77b1718c3a749fd2216e66f8f312805
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Add a test for the case where a call to QEXPECT_FAIL nominates a
different data row from the current row, in which case the call to
QEXPECT_FAIL should be ignored.
Change-Id: Iff774b89f9374fa26105acdd8769177272a95229
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Add a test for the case where QEXPECT_FAIL is called twice in a row
without an intervening verification step, which is supposed to result in
a failure.
Change-Id: Ie004652a76a2c35c2679945670ff5561e8f5b62e
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
It is now the resonsibility of the bridge to support this
(by querying for QAccessibleInterface::rect())
The windows bridge (currently the only bridge in need of this) has
already been updated to reflect this in commit
7dca461620
Change-Id: Ief1339ab6edc118e2d47e3875e09fa885db65c2f
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
All references to QFtp in documentation have been removed, QFtp's
documentaiton was marked internal. The QFtp example was removed.
Task-number: QTBUG-23199
Change-Id: Ifff83cac069fb350e8ebeae63e605850e65c0c30
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
This makes it possible for platform plugin independent code (such as
generic plugins) to report changes to screen properties. An example
would be an accelerometer plugin that reports orientation changes
without knowing anything about the windowing system.
Change-Id: I984984b6d064327772c264bc942269422451da37
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
- Introduce separate state machine class with a timer instead of
using semi-synchronous qWait(). Also invoke closeAllWindows()
repeatedly should the file dialog be slow on Windows.
- Use QTemporaryDir for test data to avoid conflicts with
remains from previous tests.
Change-Id: Ibd95176b44ff20d6f326dc3139fb386472f64c2b
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Crash was introduced by d639105759491 (pre-Qt-4.8 only)
Task-number: QTBUG-15834
Merge-request: MR-2725
(cherry picked from qt4 commit fd25323de7b5d5f3e0ffb1bd81ea4d251e071566)
Change-Id: I59959d3ba4c9bcb0d39bdbe58432817bbbfdd9f1
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
QAbstractItemViewPrivate::renderToPixmap was not setting all the flags
that the normal QTreeView painting sets:
option.showDecorationSelected, option.viewItemPosition (so the drag pixmap
looked wrong on Windows 7, with rects around each cell), and then the
unittest also discovered that State_Children/State_Sibling wasn't set either.
Task-number: QTBUG-15834
Merge-request: 2517
(cherry picked from Qt4 commit d63910575949106f84dacf04abaa14fc866aa66b)
Change-Id: I0a5014d960543c3ed8fea73d6df578e7e521b0e0
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Make the test fail if calling QEXPECT_FAIL with the mode set to Abort
does not cause the current test function to abort. Previously, such an
error would not cause the selftest to fail and someone would have to see
the warning message in the test output to know that there is a problem.
Change-Id: I2bd58fafe6b51ea0ab86fde7c5afb781e4534ee4
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
The existing expectfail selftest did not test QEXPECT_FAIL with a
data-driven test function. This commit adds such a test.
Change-Id: I39fa9aa227b58779ce5268dd37bf55468e7269c5
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
This test relies on being able to set a custom QLibraryInfo::PrefixPath
for the duration of the test. However, the test code neglected to
account for the following behavior on mac (from "Using qt.conf"
documentation):
On Mac OS X, the Prefix is relative to the Contents in the application
bundle.
Change-Id: Ie9b6d5ebfe8af7d7f332e827069b60a830d6c6f2
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Numerous failures in the qsslsocket autotest suite relating to
connections without using proxies. Some have been skipped due to
the number of failures, other more specific tests have been set
to expect a failure.
Task-number: QTBUG-23575
Change-Id: I35fccc65bcab303646617a57a33f5aa7f7a4323f
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Some of these test have had unstable results for multiple runs.
QTBUG_4151_clipAndIgnore and QTBUG_16063_microFocusRect seem to be the
unstable tests.
Task-number: QTBUG-16063
Task-number: QTBUG-4151
Change-Id: Idd108197c327446080dbd69dfe5c5fba6b2944cd
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
It was checked in a few places, but it didn't actually remove QTextStream,
so it was pretty useless.
Change-Id: I8eaf28893cd6c7acbe1c0b69d58de90742aee755
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Makes the code nicer and more consistent with the rest of the world.
Change-Id: I5ba0ee39f5b0afd1a079a3cea9990d123955ed3f
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
- Changed to detect valgrind at runtime and skip test instead of failing.
- subprograms inherit QT_QPA_PLATFORM value from parent if set.
Change-Id: I280acee389df1ee74ee6758a0dd1601226e103c7
Reviewed-by: Kurt Korbatits <kurt.korbatits@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
- All subprograms installed as part of test instead of separate installs
- Added installTestHelperApp() to testcase.prf
Change-Id: I02fbbb299f095054c9216ad0e5f91f574fb0fe3d
Reviewed-by: Kurt Korbatits <kurt.korbatits@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Introduce QTRY_VERIFY_WITH_TIMEOUT and QTRY_COMPARE_WITH_TIMEOUT
to be able to specify a timeout value.
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Change-Id: Iaeaa4938eb14f2c431537055f626510cba183ce3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Preparing the introduction of a change that uses the actual
QScreen resolution in the style helper.
Change-Id: I3fbb36b0d6a34904c875a2e3684d73124f534bed
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Change-Id: I4001fcabc67e5b46465b3c9111c33247c52e5788
Reviewed-by: David Faure <faure@kde.org>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: David Faure <david.faure@kdab.com>
This is consistent with the rest of the API of QAbstractItemModel
(which is virtual) and removes the need for code like this
in the constructor (where it doesn't belong):
QHash<int, QByteArray> myRoleNames = roleNames();
myRoleNames.insert(Qt::UserRole + 1, "myCustomRole");
setRoleNames(myRoleNames);
in favor of
MyModel::roleNames() const {
QHash<int, QByteArray> myRoleNames = QAbstractItemModel::roleNames();
myRoleNames.insert(Qt::UserRole + 1, "myCustomRole");
return myRoleNames;
}
which is consistent with all other QAIM API (eg, flags()).
This is a source compatible change.
Change-Id: I7e1ce17f8dab2292c4c7b6dbd3c09ec71b5c793b
Reviewed-by: David Faure <faure@kde.org>
Reviewed-by: Marius Bugge Monsen <marius@cutehacks.com>
New implementation fixes some commented code marked as FIXME.
Change-Id: If8f5bebedd65bcf8f839d804c2022ca79ef82ddf
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
We would like to add more flags that will be over the 32 bit boundary.
On Windows enums don't seem to digest values >32 bit.
This patch changes the state flags to be a bit field instead.
The windows part of the patch was written by Jan-Arve Sæther.
Change-Id: I2d1d87807f920ce4d4a5c7bfea8b1122ed44eb08
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
The previous change missed some headers from years prior to 2011, and a
few new files were merged after the previous change.
Change-Id: Ib7d1a2b7062228c2a5373da64242b2ee1f0981e1
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
The custom QTRY_VERIFY macro is needed since the one provided by testlib does
not support custom timeout.
Change-Id: I12bbc5efcb16c4f53514ad738d6115d217a55b05
Reviewed-by: Alex <alex.blasche@nokia.com>
It's only used by Maemo and Harmattan, thus not needed in Qt5.
Change-Id: I8638f4fc63637be88d1aa584cde7e3a4116f2de6
Reviewed-by: Alex <alex.blasche@nokia.com>
Changed selftests unittest to use specific classes of QtCore instead of
pulling in all of QtCore headers by using include <QtCore>
- Decreasing build time.
Change-Id: Ic53a70423ecafeb342cc05ae6d7dee795533d205
Reviewed-by: Kurt Korbatits <kurt.korbatits@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reinstate a check that was presumably disabled because it wasn't
checking for the right expected date. At present pressing Enter in a
QDateTimeEdit without changing the date still emits the dataChanged()
signal. By reinstating the test, we ensure that the behaviour can't
change by accident.
Change-Id: I1b766af6ced001a4191606247338dbc91049cb8d
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
The created entity node's reference count needs to be decremented to 0
before it is added as a child, because appendChild will increment the
reference count to correct value of 1. Re-enabled commented-out test data
tst_QDom::setContent to exercise the code path with the leak.
Change-Id: Ieb015d68ba9bbb3f20dd47e76835ad15abb1738e
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Changed qprocess unittest to use specific classes of QtCore instead of
pulling in all of QtCore headers by using include <QtCore>
- Decreasing build time.
Change-Id: Ifc7911548e4a9323726093ac1d35e4ce38b5f8ad
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Before the selection of cells NW of anchor showed some defects where
cells would not be selected as the user expects
Change-Id: Ia2b63f11b8d534e918ffb97b76339d60f1ca0389
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
The QtV8 library is going to live in the qtjsbackend module.
Change-Id: I72251316163829411dda998b9503ce6f75b3606a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
It is mostly not used (most places in Qt use typename directly), so
is already not very useful.
For example typename is used in:
QDataStream& operator<<(QDataStream& s, const QVector<T>& v)
Change-Id: I85337ad7d8d4ebbb424bfa2ab9a356456ff3e90f
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
These are deprecated in favor of
QAccessibleInterface::child() and QAccessibleInterface::parent()
QAccessible::Sibling can be done with a combination of those two.
This is handled by the bridges, if required.
Change-Id: I2e2a6eb2a982e7c9001a393d69f0c5f1ae9c0970
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
We're trying to deprecate these, so don't use them anymore.
The inline uses of these have been left intact, for the moment. Inline code will
need to create their own non-inline allocation methods (for future-proofing to
allow alterations in how e.g. individual containers allocate)
Change-Id: I1071a487c25e95b7bb81a3327b20c5481fb5ed22
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
The removed class was evidently attempting to promote protected members
of its base class to public, but the way this was done doesn't work and
doing so wasn't actually necessary for the test.
Change-Id: I15e0c31891da08cacee1054e15596a79a058b466
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
QHttpNetworkReply crashed in Qt4.7 and 4.8 if a HTTP server responded with
gzip-encoded empty content without defining Content-Length in the response
header. This commit adds the test for the problem as a regression test to
Qt5.
Change-Id: Iddfb970a31d92a66fd1dd524811cf54bb06e5157
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
The created entity node's reference count needs to be decremented to 0
before it is added as a child, because appendChild will increment the
reference count to correct value of 1. Also added autotest DTDEntityDecl
to tst_qdom to expose the leak when executed under valgrind memcheck.
There was no previous direct test case for unparsed entity declarations in
DTD, only indirect coverage via regression test cloneDTD_QTBUG8398.
Task-number: QTBUG-22587
Change-Id: I394ae9fc32d5b84e4ca287c5db4dd7effde6128b
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
The created notation node's reference count needs to be decremented to 0
before it is added as a child, because appendChild will increment the
reference count to correct value of 1. Also added autotest DTDNotationDecl
to tst_qdom to expose the leak when executed under valgrind memcheck.
There was no previous test coverage for the notation declarations in DTD.
Task-number: QTBUG-22588
Change-Id: I876186d1277ceb4414f803b58b62f51cc1474367
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Windows x64 uses 64 bits integer for sockets, to ensure compatibility we
should use ptr sized integers for our socket descriptors.
Task-number: QTBUG-19004
Change-Id: I4b56023874a4f1bad107c66c054fecfedde33d88
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
All QDebug operator << in custom classes were disabled by
QT_NO_DEBUG_STREAM, which was set by QT_NO_DEBUG_OUTPUT.
Now QT_NO_DEBUG_STREAM is never set automatically, but remains available
for reducing the feature set altogether (qconfig.h).
Remove check on QT_NO_TEXTSTREAM: this define is meaningless, it
doesn't even undefine QTextStream, and this is unrelated to QDebug
streaming anyway.
Change-Id: I5eeed0144fa684d0e790e9dfd9a4aeb956218c39
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The test was allocating a new model on the heap each time init() was
invoked, but none of these models were deleted.
Change-Id: Ibe107b2dbc949a5f72940f67c08f4b0f46256c09
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Use a small helper class to ensure that the files created during the
test are removed afterwards, even if the test fails. Also, verify
creation of the files in the body of the test function, not in the
helper, as verifying in the helper won't terminate the test on failure.
Change-Id: I76eff20e54ef6a1ed71d9bbb31e00f41f3d14c38
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Changed these tests to use QFINDTESTDATA macro to detect location of testdata.
Checking for a specific file contained in the testdata so as not to be confused by empty directories
created during configure.
Change-Id: Iac2ac6304b6b9ac79e00886025b93ec0af5a8507
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
This signal can be used to clean up OpenGL resources in a safe way
before the context is destroyed.
Task-number: QTBUG-20083
Change-Id: I45a4be01b06af4ee7196fa502116f099d50afeab
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
Commit d52fd497f6 introduced a call path to
QPaintEngineEx::drawStaticTextItem, which has a bug in using the pen's color
instead of the entire brush.
This patch replaces the use of the color with the pen's brush().
Task-number: QTBUG-23450
Change-Id: Ieb3bf352c840ff0d3fb4ac678caf7b13f4f9a8f1
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
This is particularly useful for situations where the user might really want to
be notified about a failure, for instance, in a backup application.
Empty paths are not treated as an error in calling, as the user code cannot
really do anything sensible to handle this error, but empty paths should not be
used.
Change-Id: Iddb44fd39f4e3fac5c3f9f60fb7999e1833280a8
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
QVariant implementation is based on delegation to a handler. The handler
has rather simple construction, it is a set of function that implements
a switch statement over known types and redirects calls to a right
method of an encapsulated types instance. Unfortunately after qt
modularization project, it is not easy to use types directly from
different modules, as they can be undefined or completely unaccessible.
Which means that each module has to implement own handler to cooperate
correctly with QVariant. We can suspect that list of modules known to
QVariant will grow and it is not limited to GUI, Widgets and Core,
therefore it would be nice to have an unified, from performance and
source code point of view, way of working with handlers.
This patch is an attempt to cleanup handlers. Keynotes:
- Each handler is working only on types defined in the same module
- Core handler implements handling of primitive types too
- Custom types have an own handler
- Each handler is independent which means that dispatch between handlers
is done on QVariant level
- Handlers might be registered / unregistered using same interface
Change-Id: Ib096df65e2c4ce464bc7a684aade5af7d1264c24
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
QCOMPARE and friends should only be called in a test function. Instead
of calling QCOMPARE elsewhere, keep a count of the number of errors and
QCOMPARE that count with zero in the test function.
Change-Id: I9a264e91169a98c30980fdc04a3e45bfb0ca8063
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
There is no need to print out the name of the backend used by each test
run of a test function as every message output by the test function will
have the name of the current data row included.
Change-Id: Ie69881d2ecedce728ea67b5aae1c1196776552a5
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
On Mac, the application's dir is in the bundle, so we need to "escape"
the bundle when looking for the an executable relative to the
application's dir path.
Change-Id: I5c01f7d816ec8cc30f5277202f4eefb0c49a2bc3
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Use the C++ boolean constants true and false instead of the C macros
TRUE and FALSE (which are actually integers), and use QVERIFY instead of
QCOMPARE for verifying simple boolean expressions.
Change-Id: Ie76dfcab6722df6b93b3fa62b0f3437901482932
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Inotify has been available in Linux for some ~6 years now, 7 when Qt 5 will
actually be released, so I'd say it's safe to remove this fallback path now,
particularly as the autotest notes that it's broken.
Change-Id: I49dbb161d4765d63e92f512a6375323c7d37ccbe
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
The value is changed to true. It is a common bug that developers expect
this proxy model to reflect the source model when the source changes.
That requires setDynamicSortFilter(true), so we change the default to
optimize for the common case.
Change-Id: I9bf7efdbda10309fa77aed9391c33054aaae4a29
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Pure syntactical sugar, to match up with what the other container
classes offer.
Change-Id: I0f97de011923d9d204cca0fa906b059dc5054a89
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
... and deprecate the old registerTimer() functions. The new pure-
virtual registerTimer() breaks source-compatibility. Subclasses cannot
be instantiated anymore, since the pure virtual function signature has
changed.
QAbstractEventDispatcher::TimerInfo is no longer a QPair. It is now a
struct with timerId, interval, and timerType members. This is a source
incompatibility that should only affect subclasses of
QAbstractEventDispatcher, which will need to pass 3 arguments to the
TimerInfo constructor instead of 2. If the subclass used QPair<int,int>
instead of the TimerInfo typedef, the QPair<int,int> declarations will
need to be replaced with TimerInfo.
Call the new registerTimer() function with the type from
QObject::startTimer(). Change all subclasses of QAbstractEventDispatcher
to reimplement the new virtual function. The type argument is unused at
the momemnt, except to ensure that registeredTimers() returns the type
each timer was registered with. Implementations for the various
dispatchers will be done in separate commits.
Author: Thiago Macieira <thiago.macieira@nokia.com>
Change-Id: Ia22697e0ab0847810c5d162ef473e0e5a17a904b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Previously they would fall into the unicode handling and return very
strange values.
Change-Id: I62a53894c0983bf53fd79f924b40a6fd3ba02993
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
These tests used requires(contains(QT_CONFIG,private_tests)) in their
.pro file, but did not subtract themselves from their parent project
SUBDIRS when private_tests weren't enabled.
In the best case, this wastes a little time as qmake iterates over these
projects which won't be built. In some worse esoteric cases, this may
break compilation or packaging.
Change-Id: If36b1b8f69c3509128786fec67899ae18ffaa2bc
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This testcase fails on the Ubuntu 11.10 x64 platform, add flag to .pro
file so test is ignored on this platform.
Task-number: QTBUG-23380
Change-Id: I51831df8c8e9bfcf63d3689e37552ca1a62691cd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Several of the test functions in the QDebug autotest call
qInstallMsgHandler() to temporarily use a custom message handler.
Unfortunately, these test functions were then resetting the message
handler back to Qt's default handler at the end of the test.
QTestLib also calls qInstallMsgHandler() to set a message handler that
redirects debug/warning/fatal messages into the test log. When the test
resets the message handler back to Qt's default handler, testlib's
message handler is bypassed for the rest of the test, preventing any
subsequent debug/warning/fatal messages from being visible in the test
log or subject to testlib's ignoreMessage() function.
This error also caused several of the test functions to fail if they
were run manually. The "defaultMessagehandler" test would fail if it
was run before any other test function and the "assignment" test would
fail if it was run after any other test function.
This commit fixes these failures by using a helper class to ensure that
the previously active message handler is restored at the end of each
test function, even if the test function fails or throws an exception.
Change-Id: I51376724d164c8ad126e5b9be76890bf3e6a9fb0
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
When verifying nonzero results (i.e. that something expected *did* happen),
using these macros allows bailing out of the timer much earlier than the
potential 5 seconds.
My running this on Linux goes from ~147 seconds to ~91 seconds.
Change-Id: Ie1e41252eb4eb295b5c8e795ded02f00eb7f9387
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Don't call QSKIP when omitting the optional part of the test, as doing
so hides the fact that the rest of the test passed.
Change-Id: I9c102e8daeaf9586b2e510c4c9ce697ead290795
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Use QTRY_VERIFY() to fail after a reasonable timeout rather than putting
the test into an infinite loop.
Change-Id: Ie0917556e15999a94cc0587f3f4c11c0d743a228
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Register the meta-type in initTestCase(), which is run once, rather than
in init(), which is run before every test function is run.
Change-Id: Ic62a2469da6a2a85254ffc7c4d893395202c50d8
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
The threadCount() test function is unstable and had been disabled by
making it not be a slot. It is better to disable it with QSKIP so that
the test output shows that the test function exists and is in need of
repair.
Change-Id: Iccdc8da31e0d15d922f7e9606835d1ff1a3a4966
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>