Commit Graph

18793 Commits

Author SHA1 Message Date
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
Jędrzej Nowacki
ac660a0f8b Fix gcc warning in tst_collections.
warning: typedef 'Foo' locally defined but not used [-Wunused-local-typedefs]

Change-Id: Ifb1213414feb3aa5a5e46dac163e51ccd4925498
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-05-13 16:08:01 +02:00
Jędrzej Nowacki
36d5f80d97 Move tst_collections test to corelib/tools.
There is no reason to have the test separated from other tools tests.

Change-Id: Ie5b19961c383f5e4bc1ad4452cba7b92153fc303
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-05-13 16:08:01 +02:00
Kai Koehne
7cafb62538 Remove OOM exception handling from QDebug
According to the documentation, Qt doesn't even attempt to handle OOM
issues anymore. It's questionable in the first place why this should
be available only for the stream operator logging ...

Change-Id: If94c971793bc6c6773daf3997fe82b410a29538d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-05-13 16:08:01 +02:00
Kai Koehne
8c0b28a5a8 Document behavioral dependencies to ICU in QLocale
On Windows, Qt5Core does not link against ICU anymore.
So it's worthwhile to point out that QLocale::toUpper(),
QLocale::toLower() will just fall back to QString equivalents
/ "C"-locale conversions.

Change-Id: Icadc20f3033aa39fcee93e61e082562945951c08
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-05-13 16:08:01 +02:00
Kai Koehne
c8de2a8b5f Fix MSVC warnings in qspdyprotocolhandler
Fix warnings about 'truncation of constant value':

qspdyprotocolhandler.cpp(583) : warning C4309: '=' : truncation of constant value
qspdyprotocolhandler.cpp(656) : warning C4309: '=' : truncation of constant value
qspdyprotocolhandler.cpp(659) : warning C4309: '=' : truncation of constant value

Change-Id: I3c32b9f47c06da9b50f5c94871a2ee455b3a5cb6
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
2014-05-13 15:09:15 +02:00
Laszlo Agocs
2406a8b45f Remove an unused workaround and fix up the comments in the glyph cache
This old workaround is not necessary and could not be used anyhow since
it would affect a way too wide range of drivers. Modern drivers should
be able to honor the default GL_UNPACK_ALIGNMENT of 4 even for 1 byte
per pixel formats like GL_ALPHA. Instead, document why the behavior
is correct.

Change-Id: I1687448ba92875c8ff772ccc371894e88ff64096
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
2014-05-13 14:38:05 +02:00
Frederik Gladhorn
b5552bab40 Merge remote-tracking branch 'origin/stable' into dev
Manually changed enum to LibGL in
    src/plugins/platforms/xcb/qglxintegration.cpp

Change-Id: If34ee6cce3d1d51fb4bb1fdfa59c30389ea0d207
2014-05-13 14:21:22 +02:00
Frederik Gladhorn
12ba0d2cb3 Merge "Merge remote-tracking branch 'origin/release' into stable" into refs/staging/stable 2014-05-13 14:16:46 +02:00
Andy Shaw
79d35b331a Fix horizontal scrolling on Windows when ALT + mouse wheel is used
Task-number: QTBUG-30833
Change-Id: I366d2979060ba67f745f7c783dee8d7669ebdf57
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-05-13 14:12:02 +02:00
Thiago Macieira
9a747cb5b7 Fix an off-by-4 error in qHash with CRC32
I tested only the 64-bit build. The 32-bit build was reading garbage
past the end of the strings in some cases.

Change-Id: If6d239754e16a17cc4e8bb71e2b7778429dfa7ba
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-05-13 12:47:30 +02:00
Allan Sandfeld Jensen
a8877f529d Scrolling devices should not override touch or tablet devices
XISelectEvents override any earlier set event mask for the same device
ids. This may cause touch devices to stop reporting touch events if they
export scroll buttons or axis.

The patch checks for each scrolling device if they are also a touch
devices and includes the necessary bitmask if they are, and skips
any devices also recognized as tablet devices as they already capture
all relevant events.

In addition tablet event handling will no longer block handling of wheel
button events for scroll devices with the same device id.

Task-number: QTBUG-38935
Change-Id: Ifd4657beb0a0cebffe89d3470ef2bd605eb3552e
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-05-13 12:47:16 +02:00
Allan Sandfeld Jensen
7cc175c9d6 Assume unlabelled mouse buttons are default buttons
This patch fixes legacy wheel scrolling for XInput2 drivers that fail to
label mouse buttons correctly.

Task-number: QTBUG-38937
Change-Id: I659890517e749dc0039489e0b7a8c38be1065d33
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2014-05-13 12:47:12 +02:00
Thiago Macieira
b23e72a772 Fix stateful handling of invalid UTF-8 straddling buffer borders
When a UTF-8 sequences is too short, QUtf8Functions::fromUtf8 returns
EndOfString. If the decoder is stateful, we must save the state and then
restart it when more data is supplied.

The new stateful decoder (8dd47e34b9)
mishandled the Error case by advancing the src pointer by a negative
number, thus causing a buffer overflow (the issue of the task).

And it also did not handle the len == 0 case properly, though neither
did the older decoder.

Task-number: QTBUG-38939
Change-Id: Ie03d7c55a04e51ee838ccdb3a01e5b989d8e67aa
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-05-13 12:37:19 +02:00
Tor Arne Vestbø
6e5410e5b5 qpa: merge qrawfont_qpa.cpp
Change-Id: I8552199c8b3e365adefbc2bb096c8153e222cec8
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2014-05-13 12:18:26 +02:00
Tor Arne Vestbø
6e90a48920 qpa: Merge qfont_qpa.cpp
Change-Id: I5c3564aa9c10833957de14a4c28dbd2fb7eb11e4
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2014-05-13 12:18:22 +02:00