Commit Graph

1456 Commits

Author SHA1 Message Date
Giuseppe D'Angelo
071561f0eb QHash benchmark: remove unused variables
Change-Id: Ib5abc171fb8fb70e2f73ac92ca22dc09146d8a55
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-01-27 22:48:12 +01:00
Pekka Vuorela
1166ad8603 QWidgets to use QGuiApplication focus object change notifications
Moving away from deprecated QInputPanel inputItem.

Small behavioral changes:
- On focus proxy widgets, disabling WA_InputMethodEnabled on
proxy will no longer disable input method for proxy target.
- setEnabled(false) on proxy widget will no longer disable
input method for target as a special case.

Change-Id: Ifb5b7144d29bd3aefdde7cf4a0bd396db06e67e2
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
2012-01-27 13:28:03 +01:00
Pekka Vuorela
dd565d2d4c QGuiApplication::focusObject() to replace QInputPanel::inputItem()
* Deprecated QInputPanel::inputWindow() which is already
  just returning QGuiApplication::activeWindow()
* Deprecated QInputPanel::inputItem() and introduced
  QGuiApplication::focusObject(). Input methods can check
  input method support by Qt::ImEnabled query.

Change-Id: I70a9c1c3f79aadb75c839d0489a9428f7a221df5
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
2012-01-27 13:27:54 +01:00
Anselmo L. S. Melo
76a5ce8acb Implement QWindow::close()
Implement the public slot QWindow::close() and add the correspondent test.

Change-Id: If3f07cce3b26640f06fc52d0e4dca875d9894b3d
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-01-27 08:57:58 +01:00
Jędrzej Nowacki
389fc8885b Fix a typo in tst_qtreewidget autotest.
Change-Id: I573467c3fdfc4b3d059b216258d39944ac546061
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-01-26 17:22:03 +01:00
Denis Dzyubenko
0818fce01a Made it possible to run tst_qtjson test from shadow build directory.
Change-Id: I167737c91e01f055a2ce14db54dfcc6b74ad8c28
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-01-26 15:38:33 +01:00
David Faure
4408bae29a Convert tst_qurl.cpp to UTF-8 (to make it editable in QtCreator)
Change-Id: I9baa445b11f65b28596e5b88746b72c5cf04fe77
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-01-26 15:23:25 +01:00
Denis Dzyubenko
e62fe9ed4f Fixed QString::operator<(QLatin1String)
QLatin1String now has a constructor that takes explicit length, which makes it
possible to create QLatin1String that do not have null-termination character.
Fixed QString::operator> and < to be safe in that case.

In the same patch fixed qtjson which had operator< implemented in the same way.

QString::compare(QLatin1String) is still broken and will be fixed separately.

Change-Id: I48ec1183a6f44034129cc17312af854795085408
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-01-26 13:28:16 +01:00
Stephen Kelly
61e8487e8e Mark the single argument containers as movable.
Change-Id: I1557b9f3c2d3ad805e1ab7bf4d49973f08664a79
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
2012-01-26 13:15:47 +01:00
Stephen Kelly
6b4f8a68c8 Automated metatype definition for template types.
If T is defined as a metatype, then QList<T> is too automatically.

So for example, no need to use

  Q_DECLARE_METATYPE(QList<int>)

anymore.

This is a source compatible change.

Change-Id: I2ee8a7b9e28fe6d4775f6a05cce39aca8563e0c5
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2012-01-26 13:15:38 +01:00
Samuel Rødal
71db6d654e Made QWindow::currentOrientation() a property.
To match the previous QWindow::orientation() property which can be
useful to access from QML. Also, removed the automatic translation of
Qt::PrimaryOrientation to QScreen::primaryOrientation() on the QWindow
level, as it leads to a lot of complexity regarding the
QWindow::contentOrientationChanged() signal, and makes it hard to
distinguish between the case where the window's orientation follows
that of the screen, and the case where the orientation just happens to
be set to that of the screen.

Change-Id: I6950d1337b7f929815eff1328181855090d8066b
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-01-26 08:32:28 +01:00
Andy Shaw
8eb2546bf2 Fix a couple of edge cases for WildcardUnix matching
Fix a couple of cases where WildcardUnix was not matching when the
string was just [] or ended with a \.

The testWildcardEscaping() test has been extended to account for these
two cases too.

Integrate 7ce3726aea4be2dfdb57966a4482f66fec6f8f57 from 4.8

Task-number: QTBUG-20897
Change-Id: I7a07ac008473fa7a080db752e189f6404842603f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-01-26 07:02:25 +01:00
Andrew den Exter
4dae8c1aff Remove QTextControl and QLineControl.
QtWidgets and QtDeclarative now both have their own versions of these
so there's no need to keep them around any longer.

Change-Id: I9c2201c8495a0a0816e2af16c8f647fcad991479
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-01-25 22:35:12 +01:00
Jędrzej Nowacki
aee1f6cc41 Cleanup mess in public type ids.
There is no reason to keep two separated core types sets. It
couldn't be fixed before Qt5 because of binary compatibility promise.

This patch merges QMetaType core types with ext core types.

This "simple" operation consists of:
- QDataStream version was incremented, because type ids are
saved in QVariant's data stream.
- QMetaType LastExtCoreType and FirstExtCoreType were replaced by
LastCoreType, FirstCoreType and new QMetaType::HighestInternalId.
- New tests checking QVariant data stream for Qt4 and for Qt5 versions
were added.

Change-Id: I02dd74d29317365c297a789a4eb7c9c5edc3b231
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2012-01-25 21:08:08 +01:00
Peter Hartmann
07662f93ac QAbstractSocket / QSslSocket: add API to pause and resume
pause and resume is currently only supported upon emitting the
QSslSocket::sslErrors() signal. The API was added in QAbstractSocket to
also support QAbstractSocket::proxyAuthenticationRequired() in the
future.

This is the first patch to support that feature on the socket level,
another patch will follow to support sslErrors() and
authenticationRequired() in QNetworkAccessManager / QNetworkReply.

Task-number: QTBUG-19032
Change-Id: Ide2918268590ab9a01454ab26cb7fdca3dc840ab
Reviewed-by: Shane Kearns <ext-shane.2.kearns@nokia.com>
2012-01-25 19:35:05 +01:00
Gunnar Sletta
4ecf82795d Remove use of QT_MODULE from library
These defines were there to aid in the commercial
licensing scheme we used long ago, and are no longer needed.

Keep a QT_MODULE(x) define so other modules continue compiling.

Change-Id: I8fd76cd5270df8f14aee746b6cf32ebf7c23fec7
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-01-25 10:19:44 +01:00
Kent Hansen
00c8984b4e moc: Use QMetaType::QVariant as the type for QVariant
QMetaType::QVariant has existed as a proper type for almost two
years, but the qvariant_nameToType function was written in 2006.

Using QMetaType::QVariant means QVariant can be treated just like
any other type. We can get rid of those hacky checks for LastType,
and the remaining checks become more readable.

The fact that QMetaProperty::{type,userType}() returned LastType
(0xffffffff) for QVariants was never documented (LastType itself is
internal). But there are other Qt modules that assume so. I'll fix
the ones I know about (qtdeclarative, qtscript, activeqt).

Change-Id: I799b9079bb8bbb1fe76c132525440b30415cbac5
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-01-25 08:46:40 +01:00
Friedemann Kleint
4fa2d51cf1 tst_qobject: Run as console application.
Change-Id: If3049249cf8ceeb0985d158209e217455bfc3c47
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-01-25 02:24:29 +01:00
aavit
48f9ba388b Remove support for the MNG file format and the bundled libmng
The MNG file format is generally abandoned, and libmng has been
unmaintained for several years.

The MNG plugin and bundled libmng has been moved to the
qtimageformats project on Gerrit.

Task-number: QTBUG-21869
Change-Id: I946432347014ffde2b72307a5f8b166ca5553602
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-01-25 02:22:18 +01:00
Andrew den Exter
c0d30db45c Add a changed() signal to QValidator.
This provides a general notification of changes that may change the
validity of previously validated input.

Change-Id: I5ec6f127af60fdca68605fee903a08758bc01360
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-01-25 00:58:12 +01:00
David Faure
9096334d14 QKeySequence: fix copy/paste error in autotest
Change-Id: If03a99c9aa7210d3f166c2674831c645f67b1794
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-01-25 00:07:59 +01:00
Friedemann Kleint
992e50e421 Add autotest for failing signal connection.
Change-Id: Iaae93253fa6d1ca0798d05d69a7ab6d6ff8b60bc
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-01-24 19:12:23 +01:00
Bradley T. Hughes
ed1d0886ca Re-enable 'make check' for tests/auto/widgets
We want the autotests for the QtWidgets library to be run on Mac OS X as
well.

Change-Id: Ie731b802b64222c84116e2df82f536acf4971565
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-01-24 19:12:23 +01:00
Mark Brand
764840ec0e add missing move* methods to QAbstractItemModel
The existence of QAbstractItemModel virtual methods
    moveRow, moveColumn, moveRows, and moveColumns
is implied by the existence of
   beginMoveRows, endMoveRows, beginMoveColumns and endMoveColumns.
However, these were not actually provided by QAbstractItemModel.

With this change, subclasses can implement support for moving rows
and columns following the same pattern as for insert* and remove*.

Change-Id: Iad8b2223d4b9303abb6459c174a82ffed71a0fdf
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-01-24 19:12:23 +01:00
Giuseppe D'Angelo
601d685849 Make mid() and midRef() properly return empty, non-null objects
If we request a substring starting at the very end of the string,
QString::mid should return an empty string, not a null string.
For instance, QString("abc").mid(3, 0) used to return a null
one, while this patch makes it return an empty one. The
same thing applies to QString::midRef() and QByteArray::mid().

Change-Id: Ie9efd7a0622d429efd0fb682c19856c19e9469af
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-01-24 17:36:11 +01:00
Samuel Rødal
b39df8bf92 Made window orientation API more flexible.
Previously we only had QWindow::setOrientation() which was a hint about
the orientation the window's contents were rendered in.

However, it's necessary to separate between the orientation
corresponding to the window buffer layout and orientation of the
contents. A game for example might typically want to use a landscape
buffer even on a portrait device. Thus, we replace
QWindow::orientation() with QWindow::reportContentOrientationChange() and
QWindow::requestWindowOrientation().

Change-Id: I1f07362192daf36c45519cb05b43ac352f1945b5
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-01-24 15:38:48 +01:00
Lars Knoll
37a7b035f8 Import json support from playground/qtbinaryjson
This imports the JSON support for Qt 5 from
playground/qtbinaryjson.

It adds a fast, fully compliant json parser, a
convenient C++ API, conversion to and from
QVariants and a binary format for JSON that is
extremely fast to use together with the C++ API.

Change-Id: If9e3a21a4241d388d0abaa446b6824f9cc6edb1c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-01-24 15:28:20 +01:00
Stephen Kelly
4b8ceb41ae Store the is-a QObject fact with the metatype declaration.
This is a source incompatible change for Q_DECLARE_METATYPE(T*),
which now requires T to be fully defined.

The consequences of this are:
 * Forward declared types can no longer be declared as a metatype.
     (though this is a very uncommon thing to do).

There is a trivial workaround where necessary.

Change-Id: Id74c40088b8c0b466fcd7c55abd616f69acc82c8
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-01-24 15:27:25 +01:00
David Faure
6efefb3fe5 QKeySequence: add tests, fix handling of '+' as key or separator.
Change-Id: I3c471dff9b46025aab762d36bb3a3adc64ced561
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-01-24 15:27:17 +01:00
David Faure
84bdb7b61f Make QUrl always lowercase the scheme().
URL schemes can only contain alphanumeric characters and all
protocols specify that they are case-insensitive. So instead
of doing case-insensitive comparison everywhere and then get
it wrong sometimes, better to lower-case it here.

Change-Id: I61f51a3f4c85b90af1586ebcf69608987fbe2ec3
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-01-24 15:27:08 +01:00
Joerg Bornemann
096b49bc1e QWinOverlappedIoNotifier introduced
For asynchronous (overlapped) I/O notification on Windows one
can now use the convenience class QWinOverlappedIoNotifier.
It's using one global I/O completion port and a watching thread to
get notified when a read or write operation completes.

Change-Id: If6f904b364be0405580c7e50355529ab136ae3cb
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-01-24 14:39:58 +01:00
Kurt Korbatits
746c148c95 Changed qnetworkdiskcache unittest to cleanup test directory.
- Remove foo directory tree after run.

Change-Id: I2d554b4c64fc7162c7717c840534cf77f5e744d0
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:21 +01:00
Kurt Korbatits
f5ef6bc58a Changed qtextdocument, qtextdocumentlayout unittests to cleanup tmp files.
- qtextdocument unittest to remove foo.png after test.
- qtextdocumentlayout unittest to remove expected.png and img.png after test.

Change-Id: I42971e9128d399cadc87b9fd345c868065f180a9
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:15 +01:00
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
Kurt Korbatits
3664d3b842 Changed xml unittests to work from installation directory
- Changed to use QFINDTESTDATA and TESTDATA

Change-Id: Ib738adfb6d0553e4c995ccaa51e34335f00f50f0
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-19 04:45:29 +01:00
Jan-Arve Saether
67a3698b3c Remove all references to QAccessible::(Covers|Covered)
These were not used in any bridges, and none of the bridges
(MSAA, Cocoa, AT-SPI/IA2) can hardly make use of this information.

Change-Id: If3cad6b6c1928535dd932f46c9ec6883a4a19c76
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-01-19 00:17:38 +01:00
Pekka Vuorela
711f367d8f Remove QInputContext usage from QWidget test
Change-Id: Ifcd600f5efd5bd079dd2f8d66803e34ffa6df37f
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
2012-01-19 00:17:28 +01:00
Pekka Vuorela
a3a0b03735 QWidget editors to return correct value for Qt::ImEnabled
Qt::ImEnabled input method query was added for Qt5.
Enhancing source compatibility with Qt4 by setting query value
in QWidget if widget does not return any valid value.

Change-Id: I274c1f6c47a5cb08ecf550b25e5b358622e21d90
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
2012-01-19 00:16:42 +01:00
Xizhi Zhu
8ecc2da31d Remove QNetworkConfiguration::bearerName().
It was added only to maintain source compatibility with Qt Mobility.

Change-Id: Iea8d40e401bd1f8d5115268e09b256eacca69ea0
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
2012-01-18 12:53:13 +01:00
Bradley T. Hughes
44cf5592ac Replace Q_WS_MAC with Q_OS_MAC in tests/auto/gui
Change-Id: I6d69ac96597f27575dd40e4c80c982f06fa88f51
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2012-01-18 12:51:18 +01:00
Joerg Bornemann
1656c4780c fix NTFS mount points
NTFS mount points are not treated as symlinks, because they might
not have a link target.
This is the case when a volume is mounted as a single mount point
without a drive letter.
This patch fixes building Qt in an NTFS mount point.

Task-number: QTBUG-20431
Change-Id: Ie2e15212e1a7ca7fa0067b7ca8857e243e42c21a
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@nokia.com>
2012-01-17 19:24:29 +01:00
Jiang Jiang
314da0ae01 Fix isolated Thai SARA AM handling
Since 5e07a3ac58f93bd5e09715d43b58c20950c2befa Thai text layout is
handled by libthai to special case of the SARA AM. It didn't handle
isolated SARA AM. This patch fixed it and added detailed explaination
on the special case.

The dotted circle should be shown rather than hidden.

Add an test case to verify that with Waree.

Change-Id: I4967715627cbe15f5a3e9ab3e3844420ab541aed
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-01-17 16:12:53 +01:00
Morten Johan Sorvig
bc02ef882b Delete src/widgets/platforms/mac
This looks like the mac port but isn't any more,
remove it to prevent confusion.

Change-Id: I498f536d77d1a3c53e687f696ca6992539a1a90b
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-01-17 12:19:29 +01:00
Bradley T. Hughes
147bbda067 Make tst_QGraphicsAnchorLayout1 pass on Mac OS X
On Mac OS X, tests are build with QT_DEBUG defined, but run against
libraries built with QT_NO_DEBUG, so the expected warning output is not
seen. Use a run-time check instead to know whether or not to expect the
warning output.

Change-Id: Ifb772b764d4135cc8f896827727939fd8cff5388
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-01-17 10:29:56 +01:00
Bradley T. Hughes
42744812dc Mark tst_QFileDialog2 failure as expected on Mac OS X
Change-Id: I678e1c714ac9c376484b4a3a5d9bfd2bd100e685
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-01-17 10:29:56 +01:00
Leandro Melo
85a14abd2e Join user state of removed text blocks
Note: Indentation of surrounding code was fixed.

Done-with: mae
(cherry picked from commit 8d3d3381c127f0f4dd9fc507c3069acddbf40535)
Change-Id: I8d3d3381c127f0f4dd9fc507c3069acddbf40535
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2012-01-17 09:09:03 +01:00
Kurt Korbatits
402a8c036b Changed qicon unittest to work from installation directory
- Changed to use QFINDTESTDATA and TESTDATA

Change-Id: Ic9fedac82d32f8484a9d915d9d91fdaabedc85e2
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-17 04:55:25 +01:00
Kurt Korbatits
50248b1dac Added check to qtemporaryfile unittest if run as root user
- nonWritableCurrentDir() function not valid test if run as root
  so added skip.

Change-Id: I772e8356e6f798f5acdf7688c55f3241ad012a43
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-17 04:54:37 +01:00
Kurt Korbatits
60f89f412d Added check to qtemporarydir unittest to check and skip if root
- nonWritableCurrentDir() function not valid test when run as root
  on unix platform so add skip.

Change-Id: I0c5ee685d3bdeaf3d5d2e0bb93ba7d7796fd1028
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-17 04:54:32 +01:00
Kurt Korbatits
74bf87aa4b Changed qpixmap unittest to work from installation directory
- Changed to use QFINDTESTDATA and TESTDATA

Change-Id: I962fb8093db5bd83208ebd59ec0cf82005add590
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-17 04:54:28 +01:00
Kurt Korbatits
502b64e06a Changed qpainter unittest to work from installation directory
- Changed to use QFINDTESTDATA and TESTDATA

Change-Id: If75ae2b8e39f6388f4e84ed4aa2681b5a5917e81
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-17 04:54:24 +01:00
Kurt Korbatits
5ef5b8f419 Changed qicoimageformat unittest to work from installation directory
- Changed to use QFINDTESTDATA and TESTDATA

Change-Id: Icbc823d87cdf6fd36a8ef10ade8e4bca7d9b1c3b
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-17 04:54:18 +01:00
Kurt Korbatits
5027368077 Changed qclipboard unittest to work from installation directory.
- made test depend on copier and paster to make sure they are built first.
- Changed to use installTestHelperApp() to deploy helper apps.

Change-Id: I39e4f2ddcc3c735e17256db5638bf8a3495362f6
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-17 04:54:12 +01:00
Kurt Korbatits
bd0c7aa315 Changed qimage unittest to work from installation.
- Changed to use QFINDTESTDATA and TESTDATA

Change-Id: I7aaf4d16b03373be0fef39fe05c0df0d947dc7e3
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-17 04:54:07 +01:00
Kurt Korbatits
b93ce4d78c Changed qimagewriter unittest to work from install directory.
- Changed to use QFINDTESTDATA and TESTDATA
- skip testing permissions if test run as root user

Change-Id: I5b308789202b01bdd0d630af65775ae23bf0cc4c
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-17 04:54:01 +01:00
Kurt Korbatits
7beeb932fd Changed qsharedpointer unittest to use build qmake over system one.
- If we can find the qmake belonging to the build, use that instead
  of qmake from the PATH for compiling subtests.

Change-Id: I9445754bb02dab11c3e1bbe9dc459ecc682689a4
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Kurt Korbatits  <kurt.korbatits@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-01-17 04:53:35 +01:00
Stephen Kelly
6acdb32561 Clarify docs that everything must be re-queried on model reset.
Change-Id: I05970302d4f52d092a7c65a45b9e5a3570b1d144
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-01-16 17:07:12 +01:00
Xizhi Zhu
5b1aa4c75d Fixed build break when bearer is disabled.
Change-Id: I29e88b046f6502c84acc9c6f566ecc328cf24e38
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
2012-01-16 11:29:04 +01:00
Frederik Gladhorn
ba888bb8c8 Clean up and extend QAccessible::State.
The state should contain useful and clear information.
Some of the old enum/bitfield members were not really clear.
Make them follow Qt terminology and shift the burden of interpreting
them to the bridge.

Apart from the previous commit changing from enum to bitfield, these
flags have changed names:

unavailable -> disabled
mixed -> checkStateMixed
protected -> passwordEdit (in the last commit)

floating is completely removed, even MSAA documentation states it is unsupported.

Some new states have been added.
Documentation added.

Change-Id: I152256e77a061f28ee5780f527524c80a2c7e333
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2012-01-16 08:55:37 +01:00
Toby Tomkins
169b9cac64 Flag tst_qmenubar tests as unstable.
Task-number: QTBUG-4965
Task-number: QTBUG-11823

Change-Id: Ie8b5093867cf177197e405fdcf3205d4436c110a
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-16 08:52:05 +01:00
Toby Tomkins
6b99b97556 Flag tst_QDoubleSpinBox::task255471_decimalsValidation test as unstable.
Task-number: QTBUG-23641

Change-Id: Iaa44ab20d2e50cd6fb0a1327efef35c1036f9e4c
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-16 08:52:02 +01:00
Toby Tomkins
a2e5f36552 Flag tst_QComboBox tests as unstable.
tst_QComboBox::keyBoardNavigationWithMouse and
task_QTBUG_1071_changingFocusEmitsActivated tests are unstable.

Task-number: QTBUG-23639

Change-Id: Ib8363505213117c581ea2921ebc58d4c2ec4cf8c
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-16 08:52:00 +01:00
Toby Tomkins
db549f90fa Flag tst_QTreeView::styleOptionViewItem test as unstable.
Task-number: QTBUG-23638

Change-Id: I8c07976001aeec5ba796d4b3e9ee421e32ba1360
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-16 05:30:36 +01:00
Toby Tomkins
5341880105 Flag tst_QItemDelegate::task257859_finalizeEdit test as unstable.
Task-number: QTBUG-23637

Change-Id: Ib08431ab1752c354f62646b3c207d9c24ac5eae5
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-16 05:30:36 +01:00
Toby Tomkins
d4d14e28e6 Modify SSL Socket test exceptions on Ubuntu 11.10 x64.
Modified exceptions as most tests are now passing correctly. Three exceptions
still remain, two serverSideMode tests (ssl3-any, tls1.0-any) and a
verifyMode test.

Task-number: QTBUG-23575

Change-Id: I847e8c2e3484050b8d07ede9aec955c30f7ef5a1
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-16 05:30:36 +01:00
Kurt Korbatits
d9a50fc1dc Moved largefile unittest to same level as qfile.
- Moved largefile from out of qfile unittest directory to be on
  same level as qfile.

Change-Id: I479b0b33594812759f8a6a7be61f8340f64234e9
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-16 01:55:31 +01:00
Kurt Korbatits
7940521fd9 Changed qrawfont unittest to work from installation directory.
- uses QFINDTESTDATA instead of SRCDIR
- Added check to test if fonts are present and generate one skip instead
  of 1200+ on platforms were no fonts are available for testing.
- fail if unittest fonts not found.

Change-Id: I9c051cf8cef6cd355f16647c614c86771dcf6150
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-16 01:55:26 +01:00
Kurt Korbatits
990e890b9e Changed unittests in corelib to use specific headers instead of super-headers.
Modified unittests to use specific class headers instead of
using super-headers like QtCore that pull in all the headers for
the module.
- Decreasing build time.

Change-Id: I9c3fd0767be15205893bb406f609c8283a2a3a5a
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-16 01:55:22 +01:00
Kurt Korbatits
f1da37e989 Changed qprocess unittest to work from installation directory.
- All subprograms installed as part of test instead of separate installs
  using installTestHelperApp() from testcase.prf
- Removed use of app_bundle for subprograms

Change-Id: I0a3de021800d36bd48479f63588b09fc7e60f32f
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-16 01:55:18 +01:00
Toby Tomkins
2087db0b20 Flag tst_QGraphicsWidget::updateFocusChainWhenChildDie test as unstable.
Task-number: QTBUG-23616

Change-Id: I664c77b16ac6b2ecd89d362a2c3c3028bd3246c0
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-16 01:42:26 +01:00
Toby Tomkins
e575e2316a Flag tst_qcalendarwidget::buttonClickCheck test as unstable.
Task-number: QTBUG-23615

Change-Id: I4ce9e415c29167ef9fdc584ac3543aa5f109bcf2
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-16 01:42:22 +01:00
Rohan McGovern
78f1dd251a Fixed failure of tst_qhostinfo since ~15 Jan 2012
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>
2012-01-16 01:38:36 +01:00
Jonas M. Gastal
bdce610022 Fixes examples/tests to use qinptr in QTcpServer::incomingConnection.
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>
2012-01-13 20:55:00 +01:00
Jonas M. Gastal
14b929e9c4 Cleaning up header includes.
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>
2012-01-13 20:54:23 +01:00
Samuel Rødal
e50416066c Added application flags to translate between touch and mouse events.
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>
2012-01-13 09:38:05 +01:00
Jason McDonald
0528d9dca7 Improve coverage of expectfail selftest
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>
2012-01-13 04:04:17 +01:00
Jason McDonald
3dfdf34c1c Improve coverage of expectfail selftest
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>
2012-01-13 04:04:12 +01:00
Jason McDonald
fa07815892 Improve coverage of expectfail selftest.
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>
2012-01-13 01:41:14 +01:00
Jan-Arve Saether
1133c0dd22 Remove all references to QAccessible::(Up|Down|Left|Right)
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>
2012-01-12 15:05:57 +01:00
Jonas M. Gastal
1453f74cc5 Make QFtp private.
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>
2012-01-12 14:38:55 +01:00
Samuel Rødal
16c2622fe7 Made it possible to report screen changes through QWindowSystemInterface.
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>
2012-01-12 12:08:19 +01:00
Friedemann Kleint
bffbcfd0cc Stabilize Language-Change test.
- 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>
2012-01-12 08:31:17 +01:00
David Faure
1319bd48c8 QTreeView: fix crash when starting a drag with hidden columns.
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>
2012-01-12 08:31:17 +01:00
David Faure
22b7d21186 Set missing flags in the option when rendering QTreeView drag pixmap
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>
2012-01-12 08:31:17 +01:00
Jason McDonald
188db2b817 Make expectfail selftest test XPASS.
Change-Id: I0f7943049995c7fa4ad70a05fd2fdac4bc9f6ff6
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-12 06:41:39 +01:00
Jason McDonald
29d8d8faec Make selftest for QEXPECT_FAIL more robust.
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>
2012-01-12 06:41:35 +01:00
Jason McDonald
a59bc6a6e4 Improve selftest coverage of QEXPECT_FAIL feature.
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>
2012-01-12 06:41:29 +01:00
Rohan McGovern
d3f6faedb5 Fixed findtestdata selftest on mac
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>
2012-01-12 06:41:10 +01:00
Toby Tomkins
d26a71da18 Flag test as expected failure for Ubuntu 11.10 x64.
Change-Id: I05ff434581f48d4d3ede7ecb59208821a2ab3e7d
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-12 06:25:25 +01:00
Toby Tomkins
605329eb1b SSL Socket withoutproxy failures on Ubuntu 11.10 x64.
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>
2012-01-12 06:13:29 +01:00
Toby Tomkins
c2a663dac3 Flag tst_qgraphicsview as insignificant, test are unstable.
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>
2012-01-12 05:34:36 +01:00
Stephen Kelly
e22431d719 Test that the CMAKE_AUTOMOC feature works with Qt5.
Update the wrapper macro which had bitrotted a bit.

Change-Id: I65c7940f9ebc0e1c963fddd2bbfc06b89e66df04
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-01-12 00:45:40 +01:00
David Faure
f65a10b733 Remove unused QT_NO_TEXTSTREAM.
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>
2012-01-11 22:17:46 +01:00
Stephen Kelly
0fd8816340 Add QModelIndex as a built-in metatype.
Change-Id: Ib87cfff8b4baee78189f3df5e20d2e1a00d690e1
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
2012-01-11 19:32:34 +01:00
Pekka Vuorela
8ae55a3484 Input direction/locale to come from platform input context
Change-Id: Ib049693211a08dcffc9dbe49add54e7feab38978
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
2012-01-11 11:18:51 +01:00
Frederik Gladhorn
30ad53a0a6 Make QAccessibleInterface::indexOfChild() 0-based.
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>
2012-01-11 11:18:51 +01:00
C. Boemann
d060b6f04f Add methods for font stretch and absolute letter spacing
We basicaly just rely on the methods in QFont

Change-Id: Iaf8cbf4d90d0c5b10b3a85983de7ca58763e0371
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
2012-01-11 09:24:07 +01:00
Kurt Korbatits
de6d3d5b1d Changed selftests unittest to not fail but warn when valgrind not installed.
- 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>
2012-01-11 04:09:32 +01:00
Kurt Korbatits
28bfa8f6cc Changed selftests unittest to work from installation directory.
- 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>
2012-01-11 04:09:26 +01:00
Stephen Kelly
008a1573af Make modules find their own dependencies.
Change-Id: I4a7b96d33417a15d79f3932ced91bee58915c83f
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-01-11 01:11:47 +01:00
Friedemann Kleint
dc5ea80963 Tests: Remove duplicate QTRY_VERIFY/QTRY_COMPARE macros in bearer.
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>
2012-01-10 19:54:03 +01:00