Commit Graph

4642 Commits

Author SHA1 Message Date
Friedemann Kleint
d7d12bc1eb Fix crash when accessing QFileDialog::selectedFiles() before widgets exist.
Discovered while investigating:

Task-number: QTBUG-38414
Change-Id: I764195254ba4b54c86079c6e8ef750d6249960d9
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2014-04-28 13:47:40 +02:00
Israel Lins Albuquerque
3e6e70bddd [QSqlQuery] misbehavior of seek in special query positions
When QSqlQuery::at() == QSql::BeforeFirstRow and seek(1, true) (seek to
next record) is called the expected result is go to first row.
When QSqlQuery::at() == QSql::AfterLastRow and seek(-1, true) (seek to
previous record) is called the expected result is go to last row.

But in all cases the first and last are skipped.

Change-Id: I584138b3d397ce1c790bf89688ee92289a99611c
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2014-04-26 20:22:42 +02:00
Peter Hartmann
8369f6d3ea QTcpSocket auto test: Temporarily disable Socks5 tests
... because they are too unstable. We can check whether they are more
stable once the new network tests server is in place.

Task-number: QTBUG-38385
Change-Id: I5ced7cc1f89290812aa88f174a41965fd2ef7252
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2014-04-25 10:55:31 +02:00
Frederik Gladhorn
dda9b5325f Add missing #ifndef QT_NO_SSL
Change-Id: I2912dcca77270582f6e989b8b3fb72b82f6f70d6
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
2014-04-25 10:55:31 +02:00
Jani Heikkinen
16501e32eb Merge "Merge remote-tracking branch 'origin/release' into stable" into refs/staging/stable 2014-04-25 10:55:31 +02:00
Friedemann Kleint
61ce16d25c Stabilize tst_qfilesystemmodel::rowsInserted() on Windows.
Introduce QTRY_COMPARE to let the sorting finish instead
of a hard-coded time-out.

Task-number: QTBUG-29403
Change-Id: I813bf6bcfe7110f49a5b95db589ed8a3f559db89
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2014-04-25 06:58:27 +02:00
Friedemann Kleint
403a9d97d6 Stabilize tst_qfilesystemwatcher::watchFileAndItsDirectory().
Use QTRY_COMPARE for dirChangedSpy, remove all unneeded
remove()/setPermission() calls (originating from the time
the test did not use QTemporaryFile), add more QVERIFY()
and messages for the other operations.

Task-number: QTBUG-30943
Change-Id: Ib3b78b1c6922539fd5e9238aa017fcdb554aacc8
Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2014-04-25 06:58:27 +02:00
Friedemann Kleint
d8cd99992f Stabilize tst_qfiledialog.
selectFile(): Ensure dialog is destroyed before the temporary file
to prevent leak.

selectFiles(): Introduce scopes to prevent co-existence of 2
instances of QFileDialog, which causes warnings from file watchers
and occasional crashes in accessibility.

Discovered while investigating:

Task-number: QTBUG-38414
Change-Id: I94d2bb3e05538416286641cb08a88d8b3837a8a6
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2014-04-25 06:58:27 +02:00
Thiago Macieira
ec74461e9d Ensure we try the UTF-8 conversions with longer strings
The SSE2-based conversion only kicks in with strings with 8 characters
or more in length.

Change-Id: Ic1daad0845571be03547553cc001d83550f0c89c
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-04-25 01:27:33 +02:00
Thiago Macieira
9a07ea69d6 Again to fix compilation after b0afad8f0b
Commit 125bb81bef wasn't enough. Let's
just make it simpler and use a regular function.

Change-Id: I9627dedaa87873b4b138224afd182e4fd9a55265
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-04-25 01:27:19 +02:00
Thiago Macieira
02a9f065c5 Autotest: fix use of dangling pointer
The "data" pointer became technically dangling after line 1866 did
    copy = data;
as copy was the last reference to the original data. That made the
pointer address available to be reused by the system malloc(), which
sometimes happened, causing the unit test to fail.

Discussed-on: http://lists.qt-project.org/pipermail/development/2014-April/016588.html
Change-Id: Ifa6a27bd53a6e60392b77a6609f2d47148695211
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-04-24 10:37:21 +02:00
Jani Heikkinen
54c1e5ed22 Merge remote-tracking branch 'origin/release' into stable
Change-Id: Id13b4a3803664692f32f9d57549be8a0c4a08567
2014-04-23 12:42:48 +03:00
Laszlo Agocs
4dbef58c3d Restore Qt 4 behavior in default double click handler
Revert 3bb9024952. That fix was an attempt
to handle the issue that has been fixed in 5.3 by
9063edef79 and should have been reverted
when the new approach, that restores Qt 4 behavior for widgets, was
introduced.

Task-number: QTBUG-38242
Task-number: QTBUG-36423
Change-Id: I8f8a82da22605fac90543492e9b2cd2b568544e7
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-04-17 10:59:13 +02:00
Jorgen Lind
50b8506eac XCB: fix that modal dialogs can go behind other process windows
Task-number: QTBUG-35302
Change-Id: I1ad7a66e530710d5338a15057254360dae676451
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-04-16 09:30:32 +02:00
Friedemann Kleint
ff2dbe609e Fix crash when deleting top level windows embedded into QGraphicsProxyWidget.
Clear proxyWidget pointer in slot
QGraphicsProxyWidgetPrivate::_q_removeWidgetSlot().

Task-number: QTBUG-29684
Task-number: QTBUG-33213
Change-Id: Ibdbd52aa810ca908e3d98daa00954345e7a93a48
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
2014-04-14 22:25:08 +02:00
Fabian Bumberger
c3bd4d08b0 QNX: Skip QGLBuffer autotest
see QTBUG-38275

Change-Id: If9a329b07f83ace77b05336d16534032310e0f82
Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
2014-04-14 20:03:30 +02:00
Fabian Bumberger
4a169ac015 QNX: Fix QDockWidget autotest
Show translates to showFullScreen on some platforms. This patch
replaces show with showNormal in the "task248604_infiniteResize" test.
On BlackBerry the test is skipped because all top level windows are forced
fullscreen by the platform.

Change-Id: Ia974c3fcbd0c71c107f4cc3f8405b8ef79ffb5b7
Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
2014-04-14 20:03:30 +02:00
Fabian Bumberger
3cc84f210a BlackBerry: Fix QDoubleSpinBox autotests
Change-Id: I380e983294c4467ad79f0835c05387a0ee155eb5
Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
2014-04-14 20:03:30 +02:00
Fabian Bumberger
56da768c59 QNX: Fix QComboBox autotest
Change-Id: I9fe4da6e02921c0474bf7ef31a2ba14e751584bf
Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
2014-04-14 20:03:30 +02:00
Fabian Bumberger
571c16555b QNX: Fix QMdiArea autotests
Change-Id: I1c4b0bbe4984182c217ee97957e2f21f43caf116
Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
Reviewed-by: Bernd Weimer <bweimer@blackberry.com>
2014-04-14 16:47:51 +02:00
Fabian Bumberger
bf2fa58c02 QNX: Fix QGuiApplication autotests
On QNX a window can only be activated if it has either a egl surface
or a raster backingstore.

Change-Id: If075093e39f1553eb8b25e35f7d372b1b15aa8af
Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
2014-04-14 16:47:51 +02:00
Fabian Bumberger
9cae7b5ee2 QNX: Fix QWizard autotest
In "task177022_setFixedSize" show was replaced with showNormal because on QNX
and some other platforms show translates to a showFullScreen.
For BlackBerry the test is skipped because the first top level window
is always forced into fullscreen mode.

Change-Id: I9df37c6bc47b47cbad4a1623b3eafa723abc6714
Reviewed-by: Bernd Weimer <bweimer@blackberry.com>
Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
2014-04-14 16:47:51 +02:00
Fabian Bumberger
ff34070709 QNX: Fix QTreeView autotest
The style is dpi dependent. I.e. on high dpi displays the pixel size of
sections and rows of a QTreeView will be larger.

Change-Id: I7477bfdd641d4db67973cafef5147f026f72c111
Reviewed-by: Bernd Weimer <bweimer@blackberry.com>
Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
2014-04-14 16:47:51 +02:00
Konstantin Ritt
0ec07b68ad Improve the Unicode script itemization implementation
Make it closer to the Unicode specs (UAX#24):
* Common now inherits the preceding character's script, if any;
* In a combining character sequence, if the base character is
  of Common script, the entire sequence is treated like if it were
  of the first non-Inherited, non-Common script in the sequence.
See http://www.unicode.org/reports/tr24/tr24-21.html for more details.

[ChangeLog][QtGui] Fixed regression in arabic text rendering.

Task-number: QTBUG-28813
Task-number: QTBUG-29930 (related)
Task-number: QTBUG-35836
Change-Id: Id85761965b08ca94c674d5f3613fe58b82b2ce9c
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: Ahmed Saidi <justroftest@gmail.com>
2014-04-14 06:43:57 +02:00
Konstantin Ritt
ef77c16cb0 Make HarfBuzz-NG the default shaper on Mac
For AAT shaping support, we need either the pre-QPA shaping trick
or the new HarfBuzz on Mac; prefer the latter.
Disable some test cases aimed to test the HB-old behavior; enable ones
that should guarantee shaping-unaware behavior.

[ChangeLog][OS X] Use CoreText text shaping engine for support of
complex scripts. If required, the shaping engine used in previous
versions can be preferred by configuring Qt with -no-harfbuzz.
Alternatively, the QT_HARFBUZZ environment variable could be set to "old".

Task-number: QTBUG-18980 (relates)
Task-number: QTBUG-38246
Change-Id: Iee6fe4f5bc047e77259182b8585385c5febd02b3
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2014-04-14 06:43:54 +02:00
J-P Nurmi
b2a6c9ec3e Fix tst_QListWidget::task217070_scrollbarsAdjusted()
QMacStyle::styleHint(SH_ScrollBar_Transient) wants either a style
object or the widget argument in order to return correct values.

Change-Id: I2fdef0820334fa66e076a4734eb2a30c722c841c
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2014-04-09 20:53:06 +02:00
Fabian Bumberger
cf439ae331 QNX: Fix QCompleter autotest
The tests expect a home folder which usually is not present on QNX

Change-Id: I44f548a95f14414c0db6f752fd115696069a7b90
Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
2014-04-09 20:53:06 +02:00
Richard J. Moore
814a1c7b2b Support for DH and ECDH key exchange for QSslSocket servers
Despite supporting DH and ECDH key exchange as a client, Qt did not provide
any default parameters which prevented them being used as a server. A
future change should allow the user to control the parameters used, but
these defaults should be okay for most users.

[ChangeLog][Important Behavior Changes] Support for DH and ECDH key exchange
cipher suites when acting as an SSL server has been made possible. This
change means the you can now implement servers that offer forward-secrecy
using Qt.

Task-number: QTBUG-20666
Change-Id: I469163900e4313da9d2d0c3e1e5e47ef46320b17
Reviewed-by: Daniel Molkentin <daniel@molkentin.de>
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
2014-04-09 20:53:06 +02:00
Friedemann Kleint
1a6410f91f Change QVERIFY in tst_qnetworkreply to warning.
FAIL!  : tst_QNetworkReply::ioPostToHttpUploadProgress() 'args.at(0).toLongLong() != sourceFile.size()' returned FALSE. ()

Task-number: QTBUG-37449
Task-number: QTBUG-24226
Change-Id: Idcc0ceac0332705b1e3a073d40fa8098bea2c9f3
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
2014-04-09 20:53:06 +02:00
Fabian Bumberger
b490116f82 QNX: Fix QHeaderView autotest
Some margines and sizeHints are DPI dependent on QNX and BlackBerry.
This patch skips two test that expect the section size to be of a
certain pixel size.

Change-Id: I7869f77fc2b623e091f53e420d1a4fdb3ec30724
Reviewed-by: Bernd Weimer <bweimer@blackberry.com>
Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
2014-04-09 20:53:06 +02:00
J-P Nurmi
82934f11e0 Stabilize tst_QListWidget
Replace weird QEventLoop hacks by sending all posted deferred delete
events.

Change-Id: I6da743f2b3fb6ef5dfc960dd3d752973cd511037
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-04-09 10:47:06 +02:00
Simo Fält
1d58ec346a Android: Add some ci usage features to Android testrunner
Added new options:
- silent to suppress the noice from ext tools, making it easier to
parse failed test cases.
- ci, to check test insignificance. Requires QMake::Project cpan
module if used.

Also added printing out results after each test as well as full
summary after test run is complete.

Task-number: QTQAINFRA-641
Change-Id: Ie5f02710a939f7526e0dd39979a0cd97ed19f55b
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2014-04-09 10:46:40 +02:00
Frederik Gladhorn
ccdfe354a6 Accessibility Mac: Cache Accessible Elements and Notify about changes
The big change is that we now keep the id objects representing accessibles
around so that they are persistent for ATs.
This improves performance of Mac accessibility significantly.

This is required for notifications which are now sent so that many things work much better,
for example the VoiceOver focus follows the keyboard focus.

The parent element in QCocoaAccessibleElement was removed, we can
dynamically access it more reliably.

Change-Id: I686d212f40d28b392dcc22f16f3c3430f08bdc98
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2014-04-09 10:46:02 +02:00
Friedemann Kleint
7d012552b0 Add diagnostic output to tst_QtConcurrentIterateKernel.
Add messages to comparisons and expect failure of blockSize()
on Windows.

Task-number: QTBUG-37822

Change-Id: Ie71d35a3d1ba0e52c93d5ba3fd7e92465b170d49
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2014-04-09 10:43:32 +02:00
Marc Mutz
c7dd6006b9 QPageLayout: provide op!=
For consistency.

Change-Id: I20fb70999785e2c1947f033d63367a2f6746990a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: John Layt <jlayt@kde.org>
2014-04-08 22:07:01 +02:00
Marc Mutz
22afdaa2da QPageSize: provide op!=
For consistency.

Change-Id: I4375a6f8c2514479a7479c735d397bf8a9876db1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: John Layt <jlayt@kde.org>
2014-04-08 22:06:38 +02:00
Bernd Weimer
f6dce4c858 QNX: Fix QGraphicsView autotests
On BlackBerry first window is always shown full screen. However, many
tests rely on a specific window size. A dummy full screen window is
created so subsequent windows have correct size.

Change-Id: Id8bd0212b6eca677953e78505459e3cd69bc6328
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
2014-04-08 09:50:24 +02:00
Marc Mutz
d9077669a1 tst_QTreeView: fix use of uninited variable
Valgrind complained:

==13941== Conditional jump or move depends on uninitialised value(s)
==13941==    at 0x4206FC: tst_QTreeView::styleOptionViewItem()::MyDelegate::paint(QPainter*, QStyleOptionViewItem const&, QModelIndex const&) const (tst_qtreeview.cpp:3062)
[...]

Change-Id: I76da01c191415ba0a00b4b85312f2fe08e4ee2d2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-04-07 23:41:30 +02:00
Peter Hartmann
9c2ecf89eb network: finish all pending replies upon error
... and not only one. This was a problem e.g. when there were several
requests to the same host and the host was not reachable; only one
reply would get an error signal in case we suppressed other errors in
"happy eyeballs" host lookup style.

Task-number: QTBUG-36890

Change-Id: I1b5757498bd644b0d773cf6c43e4950620949c5c
Reviewed-by: Richard J. Moore <rich@kde.org>
2014-04-07 17:57:42 +02:00
Shawn Rutledge
b5eb850e0d OSX: add several menuitem roles to support menu shortcuts in dialogs
Now menu items and key shortcuts for Cut, Copy, Paste and Select All
work in the standard ways in dialogs such as the file dialog, provided
that the corresponding QActions have been created and added to the menu.
This depends on new roles to identify each menu item which is so
broadly applicable that it should work even when a native widget has
focus; but the role will be auto-detected, just as we were already
doing for application menu items such as Quit, About and Preferences.
When the QFileDialog is opened, it will call
redirectKnownMenuItemsToFirstResponder() which will make only those
"special" menu items have the standard actions and nil targets.  When
the dialog is dismissed, those NSMenuItems must be reverted by calling
resetKnownMenuItemsToQt(), because to invoke a QAction, the NSMenuItem's
action should be itemFired and the target should be the
QCocoaMenuDelegate.

Task-number: QTBUG-17291
Change-Id: I501375ca6fa13fac75d4b4fdcede993ec2329cc7
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2014-04-07 08:30:24 +02:00
Frederik Gladhorn
cc57a2e90f Accessibility text updates for QTextEdit
For Mac this makes QTextEdit work nicely with VoiceOver.

Task-number: QTBUG-37204

Change-Id: I1326d24ca6a932ad667ee395f62881b6ec64e892
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2014-04-05 21:48:31 +02:00
John Layt
39c5098dbb QPrintDialog - Add Direct print to manual test
Enable printing without dialog.

Change-Id: I1058361febc7ddd8a5e0471e4365969e2f8becfe
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-04-05 21:48:03 +02:00
Thiago Macieira
f1540a2966 Fix capacity reservation for shared QByteArray
We can squeeze, but not by discarding elements. Make sure the size of
the object stays intact after changing the reserved capacity.

I've also added unit tests for other containers, just to be sure.

Task-number: QTBUG-37750
Change-Id: I5135b095943b7589423c51cebcb52af792468e61
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2014-04-05 05:23:07 +02:00
Oswald Buddenhagen
a4ec90175c purge vestiges of opengl es 1 support
amends 0d5170256c.

Change-Id: Ifa178d38f602bb7c66ef13334673ff47e332af5b
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-04-04 19:32:21 +02:00
Thiago Macieira
964ac38fb0 Don't read before the beginning of the string
The code did discard the the data, so it wasn't affecting the comparison
result (tests added anyway), but it could cause crashes if the pointer
to the beginning of the data in the first 8 bytes of a page.

Change-Id: I618e68de329b65de34ef8c934934c3e631cc6c9f
Reported-By: Erik Verbruggen
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2014-04-04 19:32:21 +02:00
Konstantin Ritt
8c0919a286 Remove QtWidgets dependency from tst_QComplexText
It doesn't depends on windget for quite a long time already.

Change-Id: I251e2e0d52028d17a61c892308d099f344728e79
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-04-04 19:32:21 +02:00
Konstantin Ritt
c603a29550 Remove spurious #ifdef from tst_QComplexText
That #ifdef is placed before any include, so it has no effect.

Change-Id: I4bbf967bda720d287b363847669c5c7a22807bc4
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2014-04-04 19:32:21 +02:00
Konstantin Ritt
330f6e3598 QTextLayout: Fix cursor movement from invalid position
Actually guarantee cursor doesn't move in this case for both logical
and visual modes (just what the documentation says we already do ;)

Change-Id: Iabdca7aa1d205672386a0095e3487e585611cdb5
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-04-04 19:32:21 +02:00
Konstantin Ritt
0b5911f376 QTextLayout: Fix visual cursor movement in some cases
To guarantee proper positioning at the end of the last line in a
bidirectional text we have to insert the eol position into the
insertion points vector, accordingly to the visual ordering.
Detection of the last *logical* item in a *visual* line is unrelaed
to the text direction, it is simply `iterator.item == iterator.lastItem`.

[ChangeLog][QtGui][QTextLayout] Fixed visual cursor movement
in bidirectional text.

Task-number: QTBUG-18060 (partially related)
Change-Id: I53b6ab889ef580ab0560b620b808b1e09efc0fbd
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Ahmed Saidi <justroftest@gmail.com>
2014-04-04 19:32:21 +02:00
Fabian Bumberger
bf05df9a23 BlackBerry: Fix QListView autotest
Change-Id: Id4967911d82cff86214665cc9ca3dbbefa69da11
Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
2014-04-04 19:32:21 +02:00