Commit Graph

1323 Commits

Author SHA1 Message Date
Kurt Korbatits
1509739d43 Changed painting unittests to remove created files after run.
- qpainter cleans up temp files dest.png, expected.png and foo.png
- qpainterpath clean up temp file data
- qprinter cleans up silly, out1.ps, out2.ps, test.pdf and file.pdf

Change-Id: Id434bea0bae5b970355206a250456e4beeca8060
Reviewed-by: Kurt Korbatits  <kurt.korbatits@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-01-24 06:59:09 +01:00
Kurt Korbatits
5f22288346 Changed qpixmap unittest to remove created file after run.
- Removes temp_image.png after test run.

Change-Id: I0b233609c2bbf57151cf173181a40738d934f0ec
Reviewed-by: Kurt Korbatits  <kurt.korbatits@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-24 06:59:04 +01:00
Kurt Korbatits
8820f83646 Changed qxmlstream unittest to remove its created file after run.
- Removes test.xml after test completed.

Change-Id: I548e2d644cca8ae0d30c3002df45cf57433170af
Reviewed-by: Kurt Korbatits  <kurt.korbatits@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-24 06:58:58 +01:00
Kurt Korbatits
2d1150e6e3 Changed qdatastream unittest to remove the test file it creates.
- Remove datastream.tmp file after test completed.

Change-Id: I844600f0a477397d129fd01ac755183c2d874da4
Reviewed-by: Kurt Korbatits  <kurt.korbatits@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-24 06:58:53 +01:00
Olivier Goffart
c0323cfbaf Test connecting to virtual function pointer
The C++ standard says that the comparison between pointer to virtual
function is unspecified (C++11 $5.10.2)
But we still may rely on it for the Qt::UniqueConnection and the
disconnection

So test if it works while using the same function.
Using function from different classes works for me, but we should
probably not assume it works. I left it commented in the test for
reference.

Change-Id: I1d9b91d4cc1a424d4f43ef2ee4981b8573f1e86f
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-01-24 01:13:01 +01:00
Robin Burchell
1806ea8dd9 Add the capability to use multiple data sources for qhash benchmark.
More data sources to be added in followup commits.

Change-Id: I0393119b36ac5d88fc2c5c8d46b000d13d5ca996
Reviewed-by: Richard J. Moore <rich@kde.org>
2012-01-24 01:09:05 +01:00
Robin Burchell
47d0813f5b Remove executive summary.
It isn't necessarily that hashing the whole string is the main problem, as the
recently added java string benchmark appears to show, which means the original
purpose of this benchmark is rather voided.

This removal allows gradually repurposing the test towards providing general
benchmarks of QHash performance.

Change-Id: Iaab0a3b493387dcce99240632342235ed9c44d88
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2012-01-24 01:09:01 +01:00
Robin Burchell
f61112aa32 Move test files around.
main.cpp is easier for my muscle memory to remember than qhash_string as it is
used by a number of other tests.

Change-Id: I044f995d55a4ff1328dde0ae27b6e36a80114c38
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2012-01-24 01:08:55 +01:00
Bradley T. Hughes
1831abb5bb Remove QEventLoop::DeferredDeletion
This flag has been deprecated since Qt 4.4, so remove it.
tst_QApplication had 2 nearly identical tests, one for testing the
QEventLoop::DeferredDeletion flag, and one to test sendPostedEvents()
with QEvent::DeferredDelete. The latter is the preferred way, so keep
that test, but remove the test for the obsoleted flag.

Change-Id: Icdb7483c32b3c920bda31d2bbb4f7414ece6d826
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-01-23 14:47:10 +01:00
Bradley T. Hughes
1196b70cf2 Ignore known tst_QStyleSheetStyle failures on Mac OS X
Task-number: QTBUG-23686
Change-Id: I566f3b3491576325389862bac2ad7c8526dd930b
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-01-23 14:47:10 +01:00
Bradley T. Hughes
36493a7a41 Ignore tst_QStyleSheetStyle::hoverColors() failures on Mac OS X
Qt::WA_UnderMouse is not working at the moment, causing this test to
fail.

Task-number: QTBUG-23685
Change-Id: If167311b09ba8fc3d04d056590588b595825c443
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-01-23 14:47:10 +01:00
Bradley T. Hughes
8fdf8baa88 Ignore tst_QSizeGrip failures on Mac OS X
This test currently fails on Mac, mark it as insignificant.

Task-number: QTBUG-23681
Change-Id: I7355cda953966778d651fafaff837f1083eeb3f4
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-01-23 14:47:10 +01:00
Bradley T. Hughes
6f21509ac0 Skip tst_QMenu::QTBUG_10735_crashWithDialog() on Mac OS X
This test currently hangs, preventing the autotest from finishing.

Task-number: QTBUG-23677
Change-Id: I3c5f56c10735d65fb35de4e22a1e2e6414532309
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-01-23 14:47:10 +01:00
Bradley T. Hughes
1d0d44a53a Ignore tst_QMenu::keyboardNavigaction() failure on Mac OS X
The shortcut0 test data fails, indicating that keyboard navigation via
shortcuts doesn't work on Mac OS X for the time being. Mark the failure
as expected.

Task-number: QTBUG-23684
Change-Id: I199222a87c09e6f491e5dcd21c9f65c28ecbb86d
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-01-23 14:47:10 +01:00
Bradley T. Hughes
2f46ea9fd6 Skip tst_QPushButton::sizeHint() with Mac style on Mac OS X
QStyleFactory cannot create the Mac style, so skip the test for now.

Task-number: QTBUG-23680
Change-Id: I2ae61aab152cd8a4e6a7270902df40dd3cc6df3b
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-01-23 14:47:10 +01:00
Bradley T. Hughes
9f0ddaae41 Mark tst_QDateTimeEdit with insignificant_test on Mac OS X
This tests has numerous failures on Mac OS X, ignore the test for now.

Task-number: QTBUG-23674
Change-Id: I29bcfd379a6a13f9859e96c5cc6dc7e932feaf4a
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-01-23 14:47:10 +01:00
Bradley T. Hughes
cae2b0f0e8 Mark tst_QComboBox::hide() with QEXPECT_FAIL() on Mac OS X
Task-number: QTBUG-23678

Change-Id: I6ced2aa9392f2688ee982113addef7fffcf4b9f2
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-01-23 14:47:10 +01:00
Bradley T. Hughes
ceed394199 Ignore tst_QAbstractSlider failures on Mac OS X
Mark current failures as expected.

Task-number: QTBUG-23679
Change-Id: Ic574dbb0fea3a21ef9963ef16bdf85da4c809036
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-01-23 14:47:10 +01:00
Laszlo Agocs
7ed6a247bf Fix synthesizing mouse events when touches change ordering
There is no guarantee the touches will be listed in the same order in
an update: the platform/generic plug-in, the drivers, etc. are all
free to shuffle the list of touch points in each report (even though
the order is fairly stable with most systems).

Therefore, to be safe, move and release events should be generated not
from the first point in the list but from the one with the matching
id.

Change-Id: I6615224cbf2cfdc440143eb3191482a23d85c6a4
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-01-23 13:10:00 +01:00
Bradley T. Hughes
9d87e1db1f Expect tst_QWizard::setPixmap() failure on Mac OS X
Task-number: QTBUG-23701

Change-Id: Iba5b926e57c1565856d17bbfbff4d1da75645ad4
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-01-23 09:34:16 +01:00
Bradley T. Hughes
e3c59443c6 Expect tst_QFileDilaog:clearLineEdit() failure on Mac OS X
Task-number: QTBUG-23703

Change-Id: I981de80d6946d3637c493bede0adb1b90a539261
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-01-23 09:34:08 +01:00
Bradley T. Hughes
855505ea35 Do not expect tst_QFileDialog::selectFiles() failure on Mac OS X
This test no longer fails:

XPASS  : tst_QFiledialog::selectFiles() '!listView->selectionModel()-
   Loc: [tst_qfiledialog.cpp(915)]

Change-Id: Ib790c0f81b3d383117cceceaacbf0c3d6a673404
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-01-23 09:34:00 +01:00
Bradley T. Hughes
fdfec806f9 Do not mark tst_QGraphicsWidget as insignificant anymore
Allow new failures in this test to block CI.

Change-Id: I1c7e797740be2f77f82d00943f6f2018b686481f
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-01-23 09:33:45 +01:00
Bradley T. Hughes
664528b7f3 Expect tst_QGraphicsWidget::updateFocusChain...() failure on Mac OS X
tst_QGraphicsWidget::updateFocusChainWhenChildDie() currently fails due
to what appears to be window activation.

Task-number: QTBUG-23699
Change-Id: I404f90d32dba64d558598d97cf805b6c025e6456
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-01-23 09:33:16 +01:00
Bradley T. Hughes
619fbc129d Fix XPASS in tst_QGraphicsWidget on Mac OS X
Don't expect failure from these 2 tests anymore:

XPASS  : tst_QGraphicsWidget::initStyleOption(all) COMPARE()
   Loc: [tst_qgraphicswidget.cpp(1162)]
XPASS  : tst_QGraphicsWidget::initialShow2() COMPARE()
   Loc: [tst_qgraphicswidget.cpp(3196)]

Change-Id: Ibd1178f8cab480fa9fad9c829083a4862749c60b
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-01-23 09:33:12 +01:00
Bradley T. Hughes
37167e3420 Fix XPASS in tst_QGraphicsView on Mac OS X
These tests now fail with XPASS on Mac OS X, so remove/skip the
QEXPECTED_FAIL(). Unfortunately we don't know which commit fixed this.

Change-Id: Id919a2c9d56fd7c4dee8ccb8aa3293efdce603b2
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-01-23 09:32:58 +01:00
Bradley T. Hughes
34b3336866 Expect tst_QGraphicsProxyWidget::updateAndDelete() failure on Mac OS X
Task-number: QTBUG-23700

Change-Id: Ic472cea966761afc1e6e17479588b8b53ec4786c
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-01-23 09:32:52 +01:00
Bradley T. Hughes
ba21ca7b5b Replace Q_WS_MAC with Q_OS_MAC in tests/auto/widgets
tst_qwidget.cpp will not build/link without tst_qwidget_mac_helpers.mm,
so re-add it to the build as well.

Change-Id: I55130f62c215c4b82683d90456e31fdb09f833a8
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-01-23 09:32:43 +01:00
Jason McDonald
629d6eda5c Update contact information in license headers.
Replace Nokia contact email address with Qt Project website.

Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-23 04:04:33 +01:00
Rohan McGovern
de8a245ca9 Mark tst_qhostinfo as insignificant on Linux.
This test sometimes gives different results on consecutive runs, and is
therefore insignificant for the purpose of regression detection.

Task-number: QTBUG-23837
Change-Id: I8747972c5cb7952089c54cbd22e1660db551e2f5
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
2012-01-23 02:32:10 +01:00
Harald Fernengel
0696071316 Remove dependency of QtDBus onto QtXml
Replace the QDom based code in qdbusxmlparser
with code using QXmlStreamReader.

Task-number: QTBUG-20856
Change-Id: I294e3ebd6faa813c20806be3ae225ac00befb622
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-01-22 22:10:02 +01:00
Robin Burchell
7c247d3e70 Obsolete QInputDialog::getInteger() 'officially'.
It has long since been obsolete in code and removed from the documentation, but
was never marked QT_DEPRECATED. Do so, and inline the implementation.

Change-Id: Ic7bfdaf76269b7f9addeba83e64bc9525c581dda
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-01-22 22:10:02 +01:00
Robin Burchell
4ed85ba43f Introduce a qalgorithms benchmark.
Based on the unit test for data production.

Change-Id: I88a411c0079b251d3682c3fbf9fe7ed1b5457a7e
Reviewed-by: Anselmo L. S. Melo <anselmo.melo@openbossa.org>
Reviewed-by: Richard J. Moore <rich@kde.org>
2012-01-21 14:29:49 +01:00
Robin Burchell
642155703e Minor style fixups.
Add spaces where necessary, and pull braces back to the same line.

Change-Id: If543686c9727a110f8a91f1a88e08d5d2ac12284
Reviewed-by: Richard J. Moore <rich@kde.org>
2012-01-21 13:04:57 +01:00
Shane Kearns
85594bd972 QFileInfo autotest - don't fail on default configured windows systems
NTFS file access times are disabled by default since windows 6 for
performance reasons. The test now checks the registry setting and
reports XFAIL if access times are disabled.

Change-Id: Ia84ed0c8736e6c7d5817425006f6115d9f3e70a4
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2012-01-20 18:48:22 +01:00
Joerg Bornemann
06abf7934b make tst_QProcess::softExitInSlots pass in under 120 seconds
Due to unconditional waits this test always needed 120 seconds to pass.
Now we're using QTRY_VERIFY and make sure that we write the data before
the process got killed even in the cases 3 and 4.
On my machine this test now takes 8 seconds.

Change-Id: I606a8b43ba4c97704be5202a6c5d8d1c75337f9c
Reviewed-by: Bill King <bill.king@nokia.com>
2012-01-20 14:20:51 +01:00
David Faure
47d5d349d8 Remove QBool and use bool instead.
QBool was introduced with Qt-4.0, to detect Qt3-like code like
 if (c.contains(d) == 2) and break compilation on such constructs.
This isn't necessary anymore, given that such code couldn't possibly
compile in Qt4 times.
And QBool was confusing developers, and creating compile errors (e.g.
QVariant doesn't have support for it), so better remove it for Qt 5.

Change-Id: I6642f43f5e12b872f98abb56600186179f072b09
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-01-20 14:17:41 +01:00
Robin Burchell
8060dd3c42 Add a string hash implementation similar to the one in Java.
This uses a similar runtime to the approach of sampling part of the string, with
the benefit that it doesn't reduce the sampling to subsections of the string.

Ironically, Java used to only sample parts of the string as well, but found that
it produced too many collisions with certain string types, so they moved to use
this method.

RESULT : tst_QHash::qhash_qt4():
     0.0537 msecs per iteration (total: 110, iterations: 2048)
PASS   : tst_QHash::qhash_qt4()
RESULT : tst_QHash::qhash_faster():
     0.015 msecs per iteration (total: 62, iterations: 4096)
PASS   : tst_QHash::qhash_faster()
RESULT : tst_QHash::javaString():
     0.016 msecs per iteration (total: 66, iterations: 4096)

Change-Id: Icb5da341ab6445163f4217650a0bdb3903e50210
Reviewed-by: hjk <qthjk@ovi.com>
2012-01-20 12:42:27 +01:00
Bradley T. Hughes
f188d8a005 Expect tst_QTreeView::editTriggers() failure on Mac OS X
EditKeyPressed 4 test data fails, all other test data for the function
pass.

Task-number: QTBUG-23696
Change-Id: Ied56bd0b653ad4dcc2b6451b486aae7cad134211
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-01-20 08:50:27 +01:00
Bradley T. Hughes
cdfb3f29c2 Expect tst_QColumnView::moveCursor() failure on Mac OS X
Both test data fail.

Task-number: QTBUG-23697
Change-Id: Iee4b08a88db33c72c584e326e928863af61c8dd4
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-01-20 08:50:22 +01:00
Bradley T. Hughes
e6a538a3ed Expect tooltip related test failures on Mac OS X
Mark test failures related to tool tips with QEXPECT_FAIL(). See
QTBUG-23707 for description of the failures.

Change-Id: I753256d1db748cef41cf1898620647c4cbacc472
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-01-20 08:50:09 +01:00
Bradley T. Hughes
0d12500240 Ignore failures from tst_QWidget_window on Mac OS X
The tst_windowFilePathAndwindowTitle test currently fails, so mark the
failures as expected failures for now.

Task-number: QTBUG-23682
Change-Id: If64a82c919b218b5c1c38ce5228081bb46fe70ac
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-01-20 08:49:43 +01:00
Jonas M. Gastal
8bbf1a46a5 Removing QHttpHeader and QHttpResponseHeader.
QAuthenticator used it for the convinience of QHttpSocketEngine only.
QHttpSocketEngine has now been ported to use QHttpNetworkReply to parse
HTTP responses.

Change-Id: Idf6e70aa76613aad6e3d789d81ca1b4fd73575c2
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
2012-01-19 14:31:10 +01:00
Bradley T. Hughes
a84d893bae Add "nswindow" resource to the Cocoa native interface implementation
This will return the NSWindow* for the given QWindow*. Port the QWidget
autotest helper to use the native interface and the "nswindow" resource.

Change-Id: I754b7e9288690ac3c99c3ec65c5526d5fe121234
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-01-19 11:31:22 +01:00
Bradley T. Hughes
e87813bfa2 Remove the tst_QWidget::retainHIView() test
Qt is Cocoa only now, and does not use HIView anymore, making this test
is meaningless. The testAndRelease() and createAndRetain() helper
functions are also no longer needed.

Change-Id: I26180a4670c8e7445741d3aab510c4da7b65388c
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-01-19 11:31:22 +01:00
Joerg Bornemann
97a8dff3c0 remove NTFS junction and mount point detection
Qt now treats neither NTFS junctions nor mount points as symlinks.

Task-number: QTBUG-20431
Change-Id: I93f67d7438d441ceb53308d4a1f29335beedd547
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2012-01-19 11:31:22 +01:00
Joerg Bornemann
49d1b06898 Revert "fix NTFS mount points"
We agreed on treating neither junctions nor mount points as symlinks.
This will be handled in another commit.

This reverts commit 1656c4780c.

Change-Id: I41a87b6df9f7fba333df4c967ee9f0c1f3940952
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2012-01-19 11:31:22 +01:00
Bradley T. Hughes
9d0a41b1ca Disable 'make check' for tst_QWidget on Mac OS X
This test crashes, which can destabilize the CI system, so don't run the
test for now. It is still compiled as part of the build process, though.

Task-number: QTBUG-23695
Change-Id: I841fab7c56b8dba33e8d1b074f118b65790f34ef
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-01-19 11:31:22 +01:00
Bradley T. Hughes
3ad7cd3a60 Replace Q_WS_MAC with Q_OS_MAC in tests/auto/other
Change-Id: If805ea762047d07872a278956fc7637e5bafc6db
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-01-19 11:31:22 +01:00
Friedemann Kleint
57738689cd Fix hang in tst_qwidgetaction on Windows.
Increase timer interval.

Change-Id: I2cf40415d356c29ebd753a0e78f43aee474123ca
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-01-19 10:03:46 +01:00