Commit Graph

18908 Commits

Author SHA1 Message Date
Jorgen Lind
102cec7ec0 QOpenGLTextureBlitter fix allocating 4 times as much memory as needed
and copying a lot of garbage.

Change-Id: Idf1d23d06423a98ce503c9bcf9614b12dd1fb92a
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-05-16 14:39:00 +02:00
Frederik Gladhorn
1248eddd14 Accessibility Android: Fix states
Using the bit flags as parameters to the JNI functions would fail since
they'd always be cast to false instead of the c-style casts.

This fixes checkboxes reporting themselves as checkable and their check
state.

Task-number: QTBUG-38831
Change-Id: I30ab63ceabbec4cc2fbda9475e05523d915087fe
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2014-05-16 14:28:30 +02:00
Frederik Gladhorn
679cd99f3d Accessibility: Update ComboBox text on arrow keys
Use ValueChanged to notify of changes in the ComboBox.
On Linux we need to update name and then send selection-changed for
Orca.

Task-number: QTBUG-36814
Change-Id: Icdd34adddeac532476a6dd910d1e8bd33bcd590b
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2014-05-16 14:28:11 +02:00
Frederik Gladhorn
94f9c9678a Merge "Merge remote-tracking branch 'origin/release' into stable" into refs/staging/stable 2014-05-16 14:14:25 +02:00
Richard Moe Gustavsen
986309cbf0 cocoa: remove rtf converter from cocoa
There is now a modified rtf converter in qmacmime
that can also write rtf back to the pasteboard, and
that works on both OS X and iOS.
So we can therefore remove the one from the cocoa port.

Change-Id: Ieed04502752290d2f139f98cec69477ff1edbe4e
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2014-05-16 14:10:36 +02:00
Richard Moe Gustavsen
6388163df8 qmacmime: rename and move QMacPasteboardMimePlainText to the cocoa plugin
com.apple.traditional-mac-plain-text is not in use on iOS
according to Apples UTType reference. So we enable it only
for OS X by moving it into the cocoa port.

The order in which we instanciate convertors matters when
the application is reading data from the pasteboard.
But since QMacPasteboardMimePlainText should come before the
other "text/plain" convertors on OS X, moving it to the cocoa
port is safe as those convertors are instanciated after
those in qmacmime.

Change-Id: I76b9b14e5ce78f34e0f1ecbfee71e48a27a4687b
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2014-05-16 14:10:32 +02:00
Richard Moe Gustavsen
514697893f qmacmime: add support for public.rtf
Application like Safari on iOS posts rtf to the
pasteboard when copying html. With this converter added, you
can then paste rtf as html into Qt

Change-Id: I6b62bcc9cfc0b16a47d44bd8d74062226522526d
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2014-05-16 14:10:24 +02:00
Bernd Weimer
fa3d264b0b QNX: Fix tst_selftest
GRAPHICS_ROOT and TZ environment variables are needed in child
processes in order to successfully run the auto test selftests.

Change-Id: I7befabd535b4c47b1e75acbe3d6158d0d9b811b3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-05-16 10:20:34 +02:00
Laszlo Agocs
72558e810d Avoid setting unnecessary parameters in QOpenGLWidget
QOpenGLFramebufferObject sets the texture parameters already, do
not set them again. Especially not GL_REPEAT, which is wrong and
breaks on devices that do not support REPEAT on NPOT textures.
What QOpenGLFramebufferObject does is just fine (it sets NEAREST/
NEAREST and CLAMP_TO_EDGE).

This is important for WebEngine where the QWidget-based web view
is using QOpenGLWidget.

Change-Id: I264d30118ce7adf50f68f2c7b9a5599a406b4362
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2014-05-16 10:04:06 +02:00
Sean Harmer
a295bb575f Expose multisample settings on QOpenGLTexture
Change-Id: I877f4139aed8bb03b798818a3fac00dab1523ce1
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
2014-05-16 09:54:09 +02:00
Sean Harmer
ca15825ed4 Add viewport transform to QMatrix4x4
This allows to easily create a matrix that performs the transformation
used by OpenGL fixed function to go from normalized device coordinates
to window coordinates.

This comes in useful if you need to perform the NDC->window coordinate
conversion inside a shader.

Change-Id: I183b3545bfb3eb1e8b13fc3172911b46926fcbb7
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-05-16 09:53:58 +02:00
Jędrzej Nowacki
71fb3633e8 Unify all mid() functions in QtBase.
Up to now, Qt had at least 3 different implementations of the mid().
Only QString::mid implementation was not crashing on edge cases and
was protected against overflows, therefore I picked that one as the
base implementation, even if it has weird semantics for an invalid
input.

As a side effect QVector::mid was slightly optimized to not detach in
all cases (which follows current QList behavior). Documentation of
QVector::mid and QList::mid was updated to not mention "copy of data"
which could suggest that the mid() result is detached.

QStringRef::mid was fixed and now it follows general Qt behavior, by
returning a null value for a null input.

Change-Id: Ie9ff5d98372bd193d66508e6dd92b6ed1180ad9b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-05-16 09:51:38 +02:00
Tor Arne Vestbø
8f3a393e41 qpa: Merge qwidget_qpa.cpp into qwidget.cpp
Change-Id: I8424ec7290b366f4c76999a956fce1428fc56626
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2014-05-15 23:07:42 +02:00
Friedemann Kleint
b7275eee49 Remove unnecessary friend declarations from qevent.h.
Change-Id: Iec35b94f3898004850a076d4760d675248246ea7
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-05-15 22:58:56 +02:00
Friedemann Kleint
6a61a00ddb Windows: Use new clipboard API for listening to changes.
The currently used clipboard chain API has various problems with non-
responsive applications and requires checks for hung/debugged applications when
sending on notifications.

The new clipboard format listener API available from Windows Vista onwards
requires less code and does not have these problems, however the change
notifications now arrive asynchronously.

Change the tst_qclipboard  to be able to deal with asynchronous change
notifications.

Task-number: QTBUG-38670
Task-number: QTBUG-33492
Change-Id: I3c49e346a34310431c20f3051d12eaabf330a3ad
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-05-15 15:31:07 +02:00
Friedemann Kleint
f618dbdd04 Windows: Refactor cursor creation code.
Factor out a function creating bitmap cursors, streamline code.

Task-number: QTBUG-37862
Change-Id: Id9d4af34acb2cf15d8553d5e5a6390fae6014ff6
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
2014-05-15 12:53:09 +02:00
Joerg Bornemann
e26ed09102 Revert "fix build for MSVC 2010"
The condition in WinUser.h is _WIN32_WINNT >= 0x0602.
The original #if was correct.

This reverts commit 42d162addf82aa2064600219b9b3224836f676ac

Change-Id: I7a3098ced143fba7b31b138cc7aaaf8f6920bef3
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-05-15 12:41:45 +02:00
Alex Blasche
60d0b900d7 Force qdbusxml2cpp to use QStringLiteral rather than QLatin1String
Change-Id: I6db4c80a14466b51d73c2704e8fc2e2e8a8a6b02
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-05-15 10:08:59 +02:00
Friedemann Kleint
9b121e5579 Windows: Use WinAPI CommandLineToArgvW() to create argv from command line.
Split the Windows CE/Desktop Windows code paths in winmain.
Use CommandLineToArgvW() to obtain argv[] for Desktop Windows.

[ChangeLog][QtCore][Windows] Command line parsing on Windows
now uses the WinAPI function CommandLineToArgvW() to exactly
match the quoting of the command interpreter.

Task-number: QTBUG-35432
Task-number: QTBUG-23687
Change-Id: I6743e73649d953497642f7717d3731a83ffda2a2
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-05-15 09:34:19 +02:00
J-P Nurmi
1a93c2df1d Disable compiler warnings for libqtharfbuzz-ng
This 3rdparty code produces a lot of warnings especially with clang.

Change-Id: I6f48410699e785d1b2e84b9a6d7b0ba8751179b0
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-05-15 09:18:20 +02:00
Tor Arne Vestbø
9dc254ad50 qpa: Merge qdesktopwidget_qpa.cpp into qdesktopwidget.cpp
Change-Id: I39316744b87d1fd588a99ab71edbd711ee8fae47
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2014-05-15 02:51:06 +02:00
Tor Arne Vestbø
768f59202d qpa: Merge qgl_qpa.cpp into qgl.cpp
Change-Id: I91cfd7daf7f1dd88659019ccc671ec0d9245067f
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2014-05-15 02:51:06 +02:00
Tor Arne Vestbø
a5ea74b98b qpa: Clean up and refactor qfontengine_qpa
QFontEngineQPA was really QFontEngineQPF2, and has been renamed. The
multi font engine in qfontengine_qpa.cpp was really a base implementation
of a multi font engine, used by other multi font engines, and has been
renamed and moved accordingly into qfontengine_p.h/cpp.

Change-Id: Iac7409c4dbf0fdc3ee993ce4f7dc96cb00a422e6
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2014-05-15 02:51:06 +02:00
Gunnar Sletta
cd910e9254 Don't crash when platform plugin sends us two close events.
Change-Id: Icfe2954908fad2abfb4195fc535aadd1e6302f76
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2014-05-15 02:51:06 +02:00
Giuseppe D'Angelo
1ae7c76b2a Do not build or link to PCRE if QRegularExpression is disabled
Per Oswald's suggestion, just don't touch PCRE if it's not needed.
This can save ~500kB between text and data in QtCore.

Change-Id: Ia10c819c7fff562dda84ab0b77194baffbc8904e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-05-15 02:51:06 +02:00
Giuseppe D'Angelo
4c14fa607f Fix QtTestlib build under QT_NO_REGULAREXPRESSION
Change-Id: I4458226e814641269062990f272a40ca577bc9db
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-05-15 02:51:06 +02:00
Giuseppe D'Angelo
77425eefec Make QColorDialog build under QT_NO_REGULAREXPRESSION
Since we can't set a validator on the HTML-color lineedit,
just make it readonly.

Change-Id: Ibeaacbea00867cdb6ef33b6667f7ee3539b7f929
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-05-15 02:51:06 +02:00
Frederik Gladhorn
2a9201c1e6 Fix error when reading newlines
Fix error 'operation priorities' identified by static analysis from
http://www.viva64.com/en/b/0251/

'!=' operator's priority is higher than that of the '='

Change-Id: I2668171acb506992e3a15b113682ac04ba309532
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-05-14 20:10:03 +02:00
Thiago Macieira
5b4c0da9d0 Move the hex digits out of _q_toHex
Avoids them being duplicated several times in QtCore

Change-Id: Idee0168ed9d452a572ad46e2a14d2d4d3c7d2f7e
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-05-14 20:10:03 +02:00
Jerome Pasion
8e5e9d7987 QDoc: Added "QML Type" to HTML titles of QML type pages.
-makes it more consistent with the C++ pages.
-easier to read for the search engines.

Change-Id: I172bdff04e0aa80ee58a903d112585992234d7d7
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2014-05-14 20:10:03 +02:00
Paul Olav Tvete
a968042f54 Restore fullscreen mode after keyboard is dismissed
Showing the onscreen keyboard will also show the navigation
soft buttons. We need to tell Android to re-enable immersive
mode after the keyboard is hidden.

Since we now do this in two places, refactor the logic.

Task-number: QTBUG-36916
Change-Id: Ic69c28f41f5e8cf324d81f9bada3cb148dfb5306
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2014-05-14 20:10:03 +02:00
Eskil Abrahamsen Blomfeldt
08117eee00 Android: Support QFont::Courier style hint
Android doesn't have a serif monospaced font, so for the courier
style hint we at least need to fall back to something monospaced,
which is "Droid Sans Mono" on Android.

[ChangeLog][Android][Text] Fall back to Droid Sans Mono for
QFont::Courier style hint.

Task-number: QTBUG-37844
Change-Id: Ib42caf53a8fb7b9958e10a8f123cac928eee7069
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2014-05-14 20:10:03 +02:00
Bernd Weimer
1b2614477f Fix accessibility auto test
Prevent crash on platforms that don't support accessibility by skipping
tests.

Change-Id: I42ba44df3200e0abd62797c76a5c538fb1d2757c
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2014-05-14 20:10:03 +02:00
Richard Moe Gustavsen
8df62598ac qmacmime: add support for public.text
Copying a URL from Safari to Qt app does not work. The reason
is that it lies on the pasteboard as public.text, which we
don't support.

This patch will implement support for public.text.

The UTI public.text is documented as text with an unspecified
encoding. On iOS, this turns out to be UTF8 (which also matches
[UIPasteboard generalPasteboard].string).

Task-number: QTBUG-38551
Change-Id: I216dab206d3bff2dde99927ed7e5a3d85309f2a2
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2014-05-14 20:10:03 +02:00
Friedemann Kleint
70cd276db0 Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev 2014-05-14 18:43:38 +02:00
Friedemann Kleint
800214f0b9 Windows: Improve checking of options to the QPA plugin.
Change-Id: I59129132c7caa13d5c9d8f1e6211da68505dd838
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-05-14 18:42:27 +02:00
Louai Al-Khanji
bf284c2bbd Direct2D QPA: Fix check for cosmetic pen
When checking whether a QPen should be treated as cosmetic we need to
take into account the render hints set on the painter as well.

Change-Id: I8200611af08000d2d1626d8ef97eb3f6dac4951c
Reviewed-by: Risto Avila <risto.avila@digia.com>
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
2014-05-14 13:17:17 +02:00
Frederik Gladhorn
cb3348dec9 Merge remote-tracking branch 'origin/release' into stable
Change-Id: If1abbe7810ea43ae750db91066f9f579c79b2289
2014-05-14 12:37:34 +02:00
Richard J. Moore
1a8788d966 Move the PKCS#12 support from QSslSocket to QSslCertificate.
Discussed with Peter and agreed that it's a slightly better fit there.

Change-Id: If8db777336e2273670a23d75d8542b30c07e0d7b
Reviewed-by: Daniel Molkentin <daniel@molkentin.de>
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
2014-05-14 11:08:01 +02:00
Eskil Abrahamsen Blomfeldt
d16508a285 Fix crash when loading invalid font data in QRawFont
When passing invalid data to QRawFont, we need to fail gracefully
and mark the font as invalid, instead of crashing. This crashed
because of different missing sanity checks in the Windows
and FontConfig font databases.

[ChangeLog][Text] Fixed crash when trying to load a font from
invalid data.

Task-number: QTBUG-37190
Change-Id: I62c81217ec7d873350b575c9d4ae8e6f0a939540
Reviewed-by: Michael Bruning <michael.bruning@digia.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2014-05-14 09:13:38 +02:00
Bernd Weimer
4f83102df0 QNX: Make QDateTime "daylightTransitions" auto test pass
Change-Id: I8c68d15806c6ec39e98dddda86823d9b4e3a3169
Reviewed-by: John Layt <jlayt@kde.org>
2014-05-14 09:12:39 +02:00
Bernd Weimer
87152d3c89 QNX: Fix tst_qfileinfo
Change-Id: Ia97a0c661d675e4f5ba800c32f8368583d58ee20
Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
2014-05-14 09:12:16 +02:00
Frederik Gladhorn
3d4aeb7919 Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	src/gui/kernel/qguiapplication.cpp

Change-Id: Ibe75603dc8a51769db6550ea3f07bc8d19b0be85
2014-05-13 22:19:10 +02:00
Frederik Gladhorn
06e27c2a52 Accessibility Android: Fix crash for invalid interfaces
When asked for an accessibility interface with invalid ID we still
return an AccessibilityNodeInfo. But instead of setting that interfaces'
ID to the invalid ID, rather return one with no ID set so it will simply
fall back to the view.

Task-number: QTBUG-38829
Change-Id: If66f5b1b42ba46949d94a547050c7a2cfc7ee9b7
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2014-05-13 22:10:21 +02:00
Ivan Komissarov
b861c43395 Removed unused variable macItemVMargin in qmacstyle_mac.mm.
Change-Id: Ib888781238f6cc9407732431219e570299a47198
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2014-05-13 16:08:01 +02:00
Ivan Komissarov
ba1262187b Moved qt_mac_toQColor(CGColorRef) to qcocoahelpers.
Change-Id: I8f8feab3f2b88373bf9ad4d69b8de56b480910ac
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2014-05-13 16:08:01 +02:00
Ivan Komissarov
7db24dd864 QMenu: Use Qt::QueuedConnection when connecting to native menu.
This fix allows to catch exeptions thrown in slots connected to
QAction::triggered() signal via QApplication::notify().

Task-number: QTBUG-15197
Change-Id: I6f3e51ec39139ffb0a5f3a31b79f839c18089b26
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2014-05-13 16:08:01 +02:00
Joerg Bornemann
697cb33896 remove unused macro definition
Change-Id: Ic2451dd7ae352b9e515c52c20a43495066fb72c8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-05-13 16:08:01 +02:00
Frederik Gladhorn
ff334fd574 Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev 2014-05-13 16:08:01 +02:00
Jędrzej Nowacki
ec4c93a852 Remove unsused local variables from tst_collections
Change-Id: I4ca1862d29432ca83b90024664b548ea0eef26c0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-05-13 16:08:01 +02:00