Commit Graph

18285 Commits

Author SHA1 Message Date
David Faure
62a436cf3b Fix QFileDialog::viewMode() when using a native file dialog.
It should return the view mode that was set in setViewMode() and
stored in the options.

Change-Id: Iaaa94a201a25baa251446688bf5bdaca5cf3373b
Reviewed-by: Mark Gaiser
Reviewed-by: Dominik Haumann <dhaumann@kde.org>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2014-04-28 13:59:24 +02:00
Steven Ceuppens
c0b75d3e6b Update AddressBook Example
Adding parent to QDialog
As proposed on qt-project.org forum:
http://qt-project.org/forums/viewthread/41686/

Change-Id: Ib66d24e4afd0be803a1080c37bc6c0a189844786
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2014-04-28 13:54:44 +02:00
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
Gunnar Sletta
049fa03c2f Check the right object's height in qCompare for QImage and QPixmap.
Fixes http://www.viva64.com/en/b/0251/, Typo No. 3 and 4

Change-Id: Icbd33534dbf424e00e4c351ae5ee0e3daa99e7b9
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2014-04-28 09:34:06 +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
Thomas Perl
a2ad5cf1aa Fix build error when targeting Blackberry Playbook
The emitSignals() slot is only implemented/used in the file
qqnxfiledialoghelper_bb10.cpp, not in <...>_playbook.cpp.

Change-Id: I068e843be74ec9639d889b87caa016c8506ec905
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
2014-04-25 15:18:29 +02:00
Fabian Bumberger
3e596ffa00 QNX: Do not crash if physical screen size is not set
If the QQNX_PHYSICAL_SCREEN_SIZE is not set or set incorrectly the application
exits with a qFatal. This patch replaces the qFatal with a qWarning
and sets the physical screen size to 15cm x 9cm.

Change-Id: I9e1a36414289c9e9676ef550eac5c1d7be974553
Reviewed-by: Bernd Weimer <bweimer@blackberry.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
2014-04-25 15:18:29 +02:00
Joerg Bornemann
ca85cc620e remove superfluous include
Change-Id: Ie6f52595b84d1383dc64b016dbff9eebe6a5539e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-04-25 15:18:29 +02:00
Laszlo Agocs
4ff4935ed4 Document setUniformValue limitations wrt non square matrices
Task-number: QTBUG-37012
Change-Id: Ife4f16eef22090ae4f6fdc24b69a45142a10d9c9
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
2014-04-25 15:18:29 +02:00
Friedemann Kleint
ff77621469 Windows: Reject focus-in caused by reparenting Windows.
Calling WinAPI SetParent() causes the window to be activated, which
is not desired for native child widgets.

Task-number: QTBUG-32867
Change-Id: Idf61931bc425a043a4b7a98eec9ae122e234dc37
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2014-04-25 15:18:29 +02:00
Fabian Bumberger
d032ff6388 QNX: Don't create a platform window for a desktop widget
As I understand it the QDesktopWidget does only serve the purpose of
returning the screen size and number. It does not need a real platform
window.
This removes some overhead, because a desktop widget is always created.

Change-Id: I8c0d86bbb46b1f32094fda1592df795af6bb423f
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
2014-04-25 15:18:29 +02:00
Gabriel de Dietrich
c7ed644fd1 QMenu: Add support for QWidgetAction on Mac
The implementation follows a similar logic as in Qt 4
making sure we properly interface with the QPA backend.

We also make sure to delay moving the action widget to
the QPA menu until it's about to show. We still don't
support moving the action widget back from QPA world
into Qt, as explained in the QWidgetAction documentation.

Task-number: QTBUG-19840
Change-Id: I47f6359b0806f967d80c67fbb1f36c3d5ec8603e
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2014-04-25 15:18:29 +02:00
Oliver Wolff
379042b84c winphone: Fixed font deployment for Visual Studio projects
Instead of collecting all files from the "fonts" directory to deploy
them to the phone, we only collect files which are mentioned in the
FONTS variable. Otherwise fonts that were copied to the fonts directory
earlier (due to FONTS being unset (default fonts) or set to another set
of fonts) will also be deployed as part of the project.

Change-Id: I24c77e154a9f2ec75e88d487c056b0be46e17e87
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-04-25 15:18:29 +02:00
Oliver Wolff
68d83cabae Fixed target path condition for font deployment
Change-Id: I49568f5780af30753e68a6487afdc6c8f3b67214
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-04-25 15:18:29 +02:00
Milian Wolff
4ba57a0590 Use showNormal() instead of show() in QToolTip.
Even on platforms that use the QPlatformIntegration::StyleHint
ShowIsFullScreen we do not want to show tool tips fullscreen which
would happen if we just call show().

This is also required to fix somewhat random crashes on QNX when
browsing a website and hovering links that would trigger a tooltip to
be shown. There, we could end up with nested calls to
QToolTip::showText when the tooltip was shown full-screen. Since
QToolTip is not reentrant that can lead to crashes since
QTipLabel::instance could be deleted/invalidated inbetween.

Change-Id: I335fcd10cb6d4cffeb622ed8e0caf17f6413d62d
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-04-25 15:18:29 +02:00
Frederik Gladhorn
57f8fba4cb Accessibility Mac: implement min/max value
This commit fixes QProgressBar reading by VoiceOver.

Task-number: QTBUG-38272

Change-Id: I549fbebe1aff599e53b14685c1bde6c9fb98aa21
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2014-04-25 15:18:29 +02:00
Frederik Gladhorn
8abf98345a Accessibility Mac: Make value interface settable
This will let VoiceOver announce QLineEdit as editable text.
It also implements setting of values for value interfaces (eg sliders).

Task-number: QTBUG-38258

Change-Id: Ic30c10abc4dc0c4f3c5fe922ac5b0a4bbf4b1e5f
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2014-04-25 15:18:29 +02:00
Frederik Gladhorn
aa920e6274 Accessibility Windows: Improve Menus
This would especially trigger when moving the focus between menus - after
the right menu got the focus we would send another event for the QMenuBar,
preventing the screen reader from reading the actually selected menu,
announcing the menu bar instead.

[ChangeLog][QtWidgets][QMenu] Accessibility: Menus are read by screen
readers with more reliability.

Task-number: QTBUG-38498
Change-Id: Ie4028120b234949380315296bf07ca53863d0ad8
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2014-04-25 15:18:29 +02:00
Frederik Gladhorn
58e48831f1 Accessibility Mac: Fix reading of empty lines in text edit
startOffset is already one char past the newline.
By adding +1 we would skip one newline if the text was \n\n.

Task-number: QTBUG-38257
Change-Id: Ida49a4b690bfa71f134e9be46126f418783a3c97
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2014-04-25 15:18:29 +02:00
Allan Sandfeld Jensen
fab46b1c6f Avoid a double memory copy during bindTexture
If a painter is active on a QPixmap being uploaded, it will be copied
twice, first to create a QImage and then from QImage into a texture.

The first copy is unnecessary since the QImage is only temporary, so
we can force it to be created as a reference instead of a copy.

Change-Id: Iabcfb514a634446a01f1c4031349c185ec09290b
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
2014-04-25 15:18:29 +02:00
Allan Sandfeld Jensen
8ab1323842 Don't use GL_REPEAT for image-brush drawing on OpenGL ES2
Backport of commit 8dfeb1c374 in QtGui
to the same class in the QtOpenGL module.

OpenGL ES2 doesn't support NPOT textures in combination with GL_REPEAT,
so for OpenGL ES2 we use a custom program that emulates repeat by taking
the fractional part of the texture coordinates.

This is not enough though, as merely setting GL_TEXTURE_WRAP_x to GL_REPEAT
with a NPOT texture is an error in some implementations, so we have to
guard the call to updateTextureFilter() in updateBrushTexture() with
a check for OpenGL ES2 and use GL_CLAMP_TO_EDGE instead.

Change-Id: Icbdd784c2c6d562849679f87da18b20d5441f389
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-04-25 15:18:29 +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
Jędrzej Nowacki
0e99bd1990 Build fix with defined DEBUG_MOC
Change-Id: I365feceda20625e95503eb5acfa58fc89bd3720a
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-04-25 10:55:31 +02:00
Friedemann Kleint
6ddcfcdcbe Update tooltip palette when receiving a theme change notification.
Task-number: QTBUG-38183
Change-Id: Ia86ae698ae4afcf9d5c361f178f3ca44ae9a3ee5
Reviewed-by: Oliver Wolff <oliver.wolff@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
Friedemann Kleint
9fc0c54662 Windows: Add missing colors to tooltip palette.
Task-number: QTBUG-38183
Change-Id: Ic3581cc87c0d61140624ddaf6fa85d682120ad4f
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
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
Olivier Goffart
c1d41b42a1 Document that the connection stay active when objects used in a lambda are destroyed
Task-number: QTBUG-37472
Change-Id: I44a6d7f8bf6928cd99a05d1b00fe36313cb18ffa
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-04-25 10:55:31 +02:00
Bernd Weimer
3f4c8293f2 QNX: Fix geometry change handling
QWindowSystemInterface::handleGeometryChange has to be called with
proper geometry whenever it changes.

Change-Id: I691b85467a815ed21bce2bb64b33fa297c16f809
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
2014-04-25 10:55:31 +02:00
Louai Al-Khanji
cc15a20d03 Direct2D QPA: Improve software fallback mechanism
Improve the way we fall back to the raster engine by forwarding painting
state. Amongst other things this makes perspective transforms appear
correct.

Change-Id: I729de56ef3112bbc01516fc11c295f33a2aada0d
Reviewed-by: Risto Avila <risto.avila@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
2014-04-25 08:52:57 +02:00
Louai Al-Khanji
1467b63b06 Direct2D QPA: Fix paint engine state handling
Fix the paint handling to support QPaintEngineEx style state updates. This
fixes most of the outstanding issues, as QPainter save and restore were
essentially broken before

Change-Id: I477d8acfd71bba32dfac4c491bc5bbaad1804ec5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Risto Avila <risto.avila@digia.com>
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
2014-04-25 08:52:57 +02:00
Louai Al-Khanji
5611b66c90 Direct2D QPA: Optimize Clipping
Use axis aligned clips when possible instead of layer-clipping. This can
be much faster when a lot of clipping operations take place.

Change-Id: I6865d69fc917a7da858033b4c362b307724d9006
Reviewed-by: Risto Avila <risto.avila@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
2014-04-25 08:52:57 +02:00
Louai Al-Khanji
42bc626e4e Direct2D QPA: Disable vsync
We shouldn't block the whole gui thread for vsyncing. This can slow things
down a lot if a lot of drawing happens.

Change-Id: Ie459f9dee2271e7908e2b7f56873393c67f82836
Reviewed-by: Risto Avila <risto.avila@digia.com>
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
2014-04-25 08:52:57 +02:00
Friedemann Kleint
817fe67839 Improve COM error handling in the Windows platform plugin.
Add error strings, print warning if OleInitialize() fails.

Task-number: QTBUG-38398
Change-Id: I37f6b7003fd1cf524ce69d6843891943402b27a1
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-04-25 06:58:27 +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
Martin Jansa
d7dd22bb29 configure: gtk style related cosmetical fixes
* add -help text for gtkstyle
* use capital GTK in warning message for consistency

Change-Id: Iff522cc49497dda406dd111594857930d82e4231
Reviewed-by: Martin Jansa <Martin.Jansa@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-04-25 01:37:49 +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
Albert Astals Cid
08edb8742c Remove unneeded ;
Warnings returned by pedantic

Change-Id: I501621df6e9f39b18576625b321714a862dc971a
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-04-24 17:42:40 +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
Laszlo Agocs
f9d7f85079 Fix up EGL config selection comments
After cross-checking with the spec and some embedded devices providing
both 888 and 565 configs, it turns out the behavior and the old legacy
comments are correct. Rephrase and extend the comments a bit to make
it maintainable.

Change-Id: If6043a39ca0129cfd075c997f362891f0c28dc2c
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2014-04-24 10:37:19 +02:00
Bernd Weimer
d5a4732c1a Allow logging to stderr
Introduced a new environment variable "QT_LOGGING_TO_CONSOLE".
When set on QNX for instance, log output is directed to the console
instead of slog2. This can be more convenient when working on the
command line. Besides, many declarative auto tests expect that,
as well.

Marked QT_NO_JOURNALD_LOG and QT_ANDROID_PLAIN_LOG as deprecated,
to be replaced with QT_LOGGING_TO_CONSOLE.

Change-Id: I7329fa2d10d31506eff145e956eaaa45d94f8e20
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-04-24 10:15:24 +02:00
Louai Al-Khanji
a564b4e70a Direct2D QPA: Do not attempt to create swap chain for desktop widget
We can't and don't need to create a swap chain for the desktop widget.

Change-Id: I84cd5c753710af09bab5c7afc27e202e661343db
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Reviewed-by: Risto Avila <risto.avila@digia.com>
2014-04-24 07:58:02 +02:00
Sergio Ahumada
f0e8f9c4de Bump Qt version to 5.3.1
Change-Id: Ie84329ab67143c3a8560bc49c4f0f8e0c423bdfc
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-04-24 07:56:50 +02:00
Jani Heikkinen
54c1e5ed22 Merge remote-tracking branch 'origin/release' into stable
Change-Id: Id13b4a3803664692f32f9d57549be8a0c4a08567
2014-04-23 12:42:48 +03:00
Tor Arne Vestbø
b0d996aed1 Build Qt tools for iOS
Change-Id: Ie3dc93e01ed878233c8094ca92bef25a6cf4dcd9
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2014-04-23 06:31:08 +02:00
Friedemann Kleint
1cb0cd9e7a Windows printer support: Fix linking problem when built with -no-opengl .
Add missing libraries that were otherwise pulled in by opengl.prf.

Task-number: QTBUG-38431
Change-Id: I1705d432088a47b5a202595e818e9efcd5f6a4cf
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2014-04-23 06:31:04 +02:00
Konstantin Ritt
aeb0d58782 Fix warning with -Wswitch-enum
> warning: enumeration values 'Joining_None', 'Joining_Left', and 'Joining_Transparent'
> not explicitly handled in switch [-Wswitch-enum]

Change-Id: I314b486462451e7d62980b6185b46cd115be1547
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-04-23 06:31:00 +02:00