Commit Graph

18300 Commits

Author SHA1 Message Date
Louai Al-Khanji
0edb21df15 Direct2D QPA: Pixel-align aliased drawing
Aliased drawing has so far not been perfectly pixel aligned, resulting in
less than stellar output in some instances. Although a little hacky,
adding 0.5 to all coordinates when in aliased mode fixes things up nicely.
There doesn't appear to be a better way to get d2d to cooperate as we
would like it to.

Change-Id: I10ee494d2f576bfd0eca6d4429095a3726c0bf14
Reviewed-by: Risto Avila <risto.avila@digia.com>
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
2014-04-30 08:23:39 +02:00
Thiago Macieira
090124eab6 Remove duplicate symbol name: QTest::currentAppName
It's declared in qtestcase.h as a function, so let's not declare the one
in qtestresult.cpp as a static variable. None of the variables in
qtestresult.cpp need to be in the QTest namespace, but we don't need to
change them now.

Change-Id: If6cc34642fdfe3ccda3b8cea7d053ead0db9ccbd
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-04-30 01:40:39 +02:00
Joerg Bornemann
03fc60debf remove pointless checks for "." and ".."
Change-Id: Id2b1353a73012461c594319f9d1341bccef85ecc
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-04-29 18:33:18 +02:00
Joerg Bornemann
818eae42cb make use of QDir::NoDotAndDotDot
Change-Id: Ib4bdc0d4051fed25dec7dc030658b4d0822a37bd
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-04-29 18:33:11 +02:00
Kai Koehne
159465536f Allow building against static ICU libs also on Unix
For dynamic builds of ICU, libicudata is an implicit dependency. Anyhow,
it doesn't harm to explicitly link against it, either. So let's do
this everywhere ...

Task-number: QTBUG-38445
Change-Id: I420ba096e2ce5e1b8d81814ffb4aa7b300143b01
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-04-29 14:42:26 +02:00
parihaaraka
f1eefd6cf9 Fix PSQL column's metadata
Fixed libpq's PQfmod() interpretation inside QPSQLResult::record()

Task-number: QTBUG-12477
Change-Id: I0e4c94ca1b06fd6a8e5b5702235cdd6d9736f8bf
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2014-04-29 14:42:26 +02:00
Andrew Knight
eb211d74cc Add missing QT_NO_NETWORKPROXY guards around HTTP connect statements
Without these, a spew of connection warnings will occur when using HTTP
on Qt builds with QT_NO_NETWORKPROXY.

Change-Id: I330f6d98d1abdbadc57768dc48b8fab0ee1f6655
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
2014-04-29 12:01:29 +02:00
Richard Moe Gustavsen
2d019ddc93 iOS: scroll screen after hiding keyboard programatically
When the keyboard is told to hide, we resign first responder. If this
is done programatically on touch press, this will make the "hide keyboard
gesture" receive a touchesCancelled instead of a touchesEnded. Since we
didn't catch this from before, the gesture was left in a mixed state causing
the screen not to scroll when later showing the keyboard.

Change-Id: I70ed59710128a912097cd5bfbdd8f49b20b7934c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2014-04-29 11:59:18 +02:00
Louai Al-Khanji
195c070adf Direct2D QPA: Correctly set active state in paint engine
Change-Id: I4eea073ad11ba8684212258b344c1f237598a9c5
Reviewed-by: Risto Avila <risto.avila@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-04-29 11:59:18 +02:00
Louai Al-Khanji
81fde3a976 Direct2D QPA: Speed up widget painting
By only starting/ending drawing once in the backing store, we can avoid
multiple start/ends and thus flushes of the direct2d device context. This
can potentially be much faster with some drivers when many widgets that
draw to the same backing store need to redraw. Because starts/ends of
QWindowsDirect2DDeviceContext are already refcounted this works out of the
box.

Change-Id: Ib48edceef6a1041ae0509587c77ac0caa8b29fc6
Reviewed-by: Risto Avila <risto.avila@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-04-29 11:59:18 +02:00
Thiago Macieira
774082e2ee Doc: QSize::isValid does >= 0 instead of > 0 comparisons
The member function documentation was correct, just the class
description was off.

Task-number: QTBUG-38535
Change-Id: I55dded9d5ea79d93ce4984911acbeec8bbe6884a
Reviewed-by: Martin Smith <martin.smith@digia.com>
2014-04-29 03:27:26 +02:00
Thiago Macieira
eaffcab287 Doc: add info about the -perf benchmark switch to QtTest's manual
Change-Id: I923dcf4f59db8281800950684fdd6dcc6715508e
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2014-04-29 03:27:26 +02:00
Timur Artikov
4833e5080c Allow to control animations frame rate from a custom QAnimationDriver
Don't use time from the global timer (QUnifiedTimer::time.elapsed()) for
animations updating when an user overrides QAnimationDriver::elapsed()

Task-number: QTBUG-38390
Change-Id: Ic1470b43d8bbc0ee0a2bbb87f7173f97ba03f852
Reviewed-by: Michael Brasser <michael.brasser@live.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
2014-04-29 03:27:26 +02:00
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
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