Commit Graph

18469 Commits

Author SHA1 Message Date
Friedemann Kleint
9f6a0300a5 Observe case insensitive file systems in QFileDialog::selectFile().
When stripping the root path from a file name that cannot be found
in the model, use case sensitive comparison depending on
file system.

Task-number: QTBUG-38162
Change-Id: I28e28973fca2da35a5768fdd00cc258b9669a15a
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2014-04-29 03:27:26 +02:00
Frederik Gladhorn
386292837b Add press action to QAccessibleCombobox
VoiceOver expects press to open the combobox.

Task-number: QTBUG-37922
Change-Id: Iee7b7974db097e4e2444202c703bd587e1576fe0
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2014-04-28 22:25:50 +02:00
Tor Arne Vestbø
a3634e4b2b iOS: Send updated expose events on application background/foregrounding
When an application has background processing enabled, for example for
communicating with an external accessory or getting location updates,
it might trigger code that does UI updates, which will kill the app as
doing UI in the background is not allowed on iOS.

We guard against this by propagating the backgrounding as updated expose
events with a non-exposed region and isExposed() returning false. This
means clients who correctly use QWindow::isExposed() to guard their
drawing code (including the scene-graph), will live to see another day.

Task-number: QTBUG-36956
Change-Id: Ib708394d33093affe68c9f2c7abde7e54be5ec74
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2014-04-28 19:52:25 +02:00
Liang Qi
b619c35d85 Revert "Mac: fix bugs for font selection in QFontDialog"
This reverts commit 3c09f6bc9a.

After fbaa6d3ca6, OS X/iOS no longer
uses localized font names.

Task-number: QTBUG-38548

Conflicts:
	src/gui/text/qfontdatabase.cpp

Change-Id: Id7f7e1976e4ffc30c5c18cf57e2acb3aebafc301
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2014-04-28 19:52:11 +02:00
Jean-Philippe Proulx
55e430a3b3 Fix double release in QTimeZone on Mac
m_nstz is released in the destructor but
not retained when using the QTimeZone(QByteArray)
constructor.

Task-number: QTBUG-35890
Task-number: QTBUG-37582
Change-Id: Ia569830bcd3c2f2cea04ad6696e681c4f2a3c137
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2014-04-28 19:50:32 +02:00
Oswald Buddenhagen
bd804329f5 install convenience libraries when building statically
we don't link static libs into other static libs, so the intermediate
libs need to be installed and resolved at app link time.

Task-number: QTBUG-32519
Change-Id: I0558140f98a6938b03306df7f800d66f8a19a7cd
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Jeremy Lainé <jeremy.laine@m4x.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-04-28 19:50:08 +02:00
Simon Hausmann
40b195d0f9 Fix font fallback handling with Harfbuzz and CoreText
Comparing CGFontRefs is not reliable it seems, CFEqual on them appears
to compare pointers and there's no guarantee that CTFontCopyGraphicsFont
returns the same pointer all the time.

So instead let's compare CTFontRefs, which we keep around and also provide
as input to CoreText shaping.

Task-number: 38363
Change-Id: I6073ea88f0c9f5ebf49d17cba0d76041ade32570
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2014-04-28 19:49:56 +02:00
Oswald Buddenhagen
9ab4142551 centralize auxiliary lib creation
this covers convenience libraries which are linked into dlls (if we are
not building statically) and "proper" (installed) builds of 3rdparty
code.

Change-Id: I2f00248c0baa0e73346e477724bf49bbc62ba925
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-04-28 19:49:44 +02:00
Laszlo Agocs
485b7424df Avoid reentering processMouseEvents on embedded
Task-number: QTBUG-38597
Change-Id: I168c9401863bace711d0d8409bf3da30a34185bd
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2014-04-28 19:49:26 +02:00
Topi Reinio
2222fdf330 Doc: Remove Qt Core documentation dependency to Qt QML
When generating documentation, the Qt namespace declared in Qt Core
collides with the Qt global object declared in Qt QML. This caused
the C++ Qt namespace documentation to go missing.

This change works around the issue by removing the dependency
between Qt Core and Qt QML.

Task-number: QTBUG-38630
Change-Id: Ifd250a19c476bc30e2a2ed561573c8b6b3b2dba5
Reviewed-by: Martin Smith <martin.smith@digia.com>
2014-04-28 19:49:12 +02:00
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
Tor Arne Vestbø
143eab8711 iOS: Send application state changes synchronously
The user might have a limited time to react when the application is
suspended, so we need to send the event as soon as possible.

Change-Id: Ib6c342f5426cf15e36ba4ef57edf30878f86d1c9
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2014-04-28 11:29:43 +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
Mark Brand
373d858812 [QtSql][QSqlTableModel] fix failure to refresh in selectRow()
Caused by missing braces, leaving the break outside the scope of the if clause.

Task-number: QTBUG-38509
Change-Id: I6b0a7f34512a3a9b0fbd790116f81f54f4a91cf0
Reviewed-by: Tobias Koenig <tobias.koenig.qnx@kdab.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2014-04-27 20:39:11 +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
Konstantin Ritt
1d372eddbe Fix identical sub-expressions in comparison
Found by static analyzer (see http://www.viva64.com/en/b/0251/).

Change-Id: I611def790a98abf7574e96e6039f10714316d81e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Jason McDonald <macadder1@gmail.com>
2014-04-26 09:10:03 +02:00
Laszlo Agocs
8ddf76989c Remove old symbols from QOpenGLContext
Task-number: QTBUG-38564
Change-Id: I39a0482e4411cdc644ed34813626c39dacb5b6af
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2014-04-26 09:09:54 +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
Morten Johan Sørvig
079f2bf5d8 Cocoa: Fix crash on Combobox popup close.
Regression caused by 0be1c4899c.

The calls to handleCloseEvent/flushWindowSystemEvents
may result in popup window deletion and a stale/null
pointer access.

Get the window type before closing it.

Task-number: QTBUG-38418
Change-Id: I212a56979e0248076e1eb5bf9ede1ff0d424e041
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2014-04-25 14:04:42 +02:00
Allan Sandfeld Jensen
55d1aa3121 Use runtime detection of XInput 2.1 to disable legacy wheel events
Ensure we fall back to using wheel button events if xinput 2.1
scroll events are not available. Handles lack of xinput 2.1
support in the server or in the input devices drivers.

Task-number: QTBUG-38169
Change-Id: Ie4ad9069f648d0ab02d8f9540ed01ad58fd9e9d8
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-04-25 14:03:55 +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
Laszlo Agocs
f9d323279a Rename new QOpenGLContext APIs
isES() becomes isOpenGLES(). The library type enums are changed
DesktopGL -> LibGL and GLES2 -> LibGLES. This removes the now
unnecessary version number, the confusing "desktop" term and provides
better readability.

The old function/values are kept until the related qtdeclarative
changes are integrated.

Task-number: QTBUG-38564
Change-Id: Ibb0a1209985f1ce4bb9451f9b7b093c2b68a6505
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2014-04-25 10:07:45 +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