Commit Graph

20542 Commits

Author SHA1 Message Date
Matti Paaso
974c210835 Update license headers and add new license files
- Renamed LICENSE.LGPL to LICENSE.LGPLv21
- Added LICENSE.LGPLv3
- Removed LICENSE.GPL

Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2
Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
2014-09-24 12:26:19 +02:00
Tor Arne Vestbø
28a57799ce iOS: Don't update screen properties for statusbar frame while rotating
The rotation will already result in laying out of the root viewcontroller,
so we don't need to send explicit geometry changes for the statubar change.
The properties of the screen at that point are also not consistent, as the
screen is about to rotate.

Change-Id: I1b45bee1c1224ca56f9e37068d68c4ee1bfeb9b6
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2014-09-24 11:53:19 +02:00
Tor Arne Vestbø
f14d86c0f9 iOS: Reflect changes in statusbar height as QScreen availableGeometry
We detect changes to the statusbar height, eg. when the in-call 40px tall
statusbar is active, and ensure that the root viewcontroller view is laid
out again with new screen properties applied. To make the layout match
the animation of the statusbar height we apply the layout inside a
animation block.

Change-Id: I751d9d1273e833ef052a3a4f3d2777e1dffec7dd
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2014-09-24 11:53:14 +02:00
Tor Arne Vestbø
f1970c8916 iOS: Fix touch point translation when root view controller is offset
Instead of doing manual translation of the local touch point to global
screen (QScreen) coordinates we take advantage of the fact that QWindow
already has a position that's adjusted for all of the view-controller
offsets in its parent hierarchy.

Change-Id: Ib34173db5ac053c20712dfff469c4a1286f2a324
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2014-09-24 11:53:09 +02:00
Tor Arne Vestbø
0cd3416136 iOS: Simplify QWindow/UIView geometry mapping
As we now have a root viewcontroller that always has a geometry that matches
the containing UIWindow, we don't need to do any fancy calculations when
mapping between the two.

Change-Id: I08a7b9992be7b7238cbad2a2da20488bba1c0939
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2014-09-24 11:53:05 +02:00
Tor Arne Vestbø
e3a72a8aee iOS: Ensure root view controller always matches size of containing window
Change-Id: I249d847a1f4785b3e63e46759baed340b0d6362e
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2014-09-24 11:52:58 +02:00
Tor Arne Vestbø
df734769d3 iOS: Move top level window management out of QIOSScreen to QIOSDesktopManagerView
The logic of how to deal with top level windows in the presence of rotation
or status bar changes should be confined to our custom QIOSViewController
that acts as a desktop manager for regular Qt applications.

We no longer treat windows with full-screen or maximized geometry but without
the matching window state flag as being targeted for auto-resizing. In the
future we might detect this case and warn the user that windows should have
the appropriate flags to be able to auto-resize on orientation changes.

Change-Id: Ibab09de5cf37e77c356fbf51a54a2fcec4bb5c51
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2014-09-24 11:52:50 +02:00
Tor Arne Vestbø
4f0cd0693a iOS: Calculate screen (available) geometry using [UIView convertRect]
Instead of custom logic to detect portrait/landscape and the height of
the status bar. The latter would fail when the statusbar/orientation was
set explicitly through [UIApplication setStatusBarOrientation], as the
statusbar would not follow the normal behavior of covering the top part
of the screen. The new code also handles upside-down portrait mode, as
well as iOS8's behavior of reporting screen bounds and application
frame in interface orientation instead of device orientation.

Change-Id: I54e3b99246a32e17aaba13960f456fa823768fd8
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2014-09-24 11:52:40 +02:00
Tor Arne Vestbø
d2c925b977 iOS: Update screen properties more consistently
Instead of updating screen properties (and hence laying out top level
windows) in willAnimateRotationToInterfaceOrientation, we do it in
the more catch-all viewWillLayoutSubviews, which also handles changes
to the orientation while the application is in the background, as well
as changes to the statusbar frame/size, eg. while being in a call.

Change-Id: Ib4a08af2f3a56db426a10ff1ed819867895b5a5a
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2014-09-24 11:52:38 +02:00
Tor Arne Vestbø
d61d638721 iOS: Scroll root view when keyboard is visible using sublayerTransform
We opt to use sublayerTransform instead of changing the root view's
bounds, so that we can keep the root view at the same position and
size regardless of statusbar height and visibility.

Change-Id: I3f04a4587f1108084208aefa990f91a130fb47b8
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2014-09-24 11:52:28 +02:00
Tor Arne Vestbø
6742b250b5 Make QScreenPrivate constructor a bit clearer
Easier to read/understand that the screen properties are initialized
from the platformScreen.

Change-Id: I3084c3ac30a08cb4e154536f949475459212d2de
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2014-09-24 11:52:18 +02:00
Alessandro Portale
1fc8e089d8 Windows: devicePixelRatio aware QWindowsTheme::standardPixmap
QWindowsTheme::standardPixmap() takes a size parameter which is in user
space coordinates. This patch causes it to calculate the size in device
pixels, to get the image from the OS in the correct resolution and to
set the devicePixelratio of the returned pixmap accordingly.

Change-Id: Ifad5d0a26d5fd5945e37e432787d63ee79269295
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-09-24 11:34:23 +02:00
Nico Vertriest
0fe2c75273 Doc: Fixed autolink errors qtbase/kernel
Task-number: QTBUG-40362
Change-Id: I54a1111e39fb7e85d34ea97b937d2764d29b27a0
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2014-09-24 10:49:40 +02:00
Nico Vertriest
cf81bf2e2d Doc: corrected autolink errors qtbase/corelib/tools
Also corrected some minor language/spelling issues

Task-number: QTBUG-40362
Change-Id: I00d76521fc9beb4e7a4a83ff6dc3334a055a7148
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2014-09-24 10:49:09 +02:00
Eike Ziller
3ea0020d3b Abstract proxy model: Add missing delegation of supportedDragActions
Change-Id: I4d2519aaa46d3ca075330c6680dd3672249cbefe
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-09-24 10:37:59 +02:00
Laszlo Agocs
276a5f5acf Change fallback OpenGL library name
Change-Id: I7f07699f860d0300f221b980b7d2fbe0dacbf4a1
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-09-24 09:58:04 +02:00
Alex Blasche
b3bc6b9f7c Fix misleading documentation
Not every length parameter unit is accepted by Qt Style sheets.

Task-number: QTBUG-31907
Change-Id: I953c56caf68c1397ba24369f433d21c6f4772d0d
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2014-09-24 09:54:49 +02:00
Alex Blasche
d1fabb49a3 QXmlSimpleReader shall handle external entity reference file over 1k
This commit fixes a bug that causes QXmlSimpleReader to handle only
external reference files less than 1k. Instead of reading the
first 1k of the reference file, it reads all data from the file into
memory. The change is not optimal for memory management, but there does
not seem to be better solution without breaking the existing API.

A similar but incomplete patch was already applied to Qt 4.7 but never
made it into Qt 5. This patch is based on a Qt 4.7 patch and adds the
missing cases.

Task-number: QTBUG-26910
Change-Id: Ia4d055ded80a40ce76b79fc61ad585e8ebb719db
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
2014-09-24 09:54:38 +02:00
Frederik Gladhorn
c96426f19f Merge "Merge remote-tracking branch 'origin/5.3' into 5.4" into refs/staging/5.4 2014-09-24 12:04:52 +02:00
Sergey Radionov
2137cb7dc5 Windows: fix obvious mistyping in getSysColor
Change-Id: I1f215cdf17d85119535df35bbff1ee653ecc0ad5
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
2014-09-24 09:46:57 +02:00
Friedemann Kleint
2d685b8316 Vista style: Scale hardcoded values in menu drawing code.
Fix the position of the menu gutter.

Change-Id: Ia8e056f14315f314d1e7a8b95a1ac87f6843e466
Task-number: QTBUG-40277
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2014-09-24 09:46:48 +02:00
Allan Sandfeld Jensen
91b7d53154 Fix QPixelFormat values
The two mono formats are actually indexed and may have both color and
alpha values in the color-table, and Format_ARGB4444_Premultiplied and
Format_ARGB6666_Premultiplied both have the alpha value in the end.

Change-Id: I7f1efb2213710f5eb628d71356f9c8ed75b50f4d
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2014-09-24 09:33:51 +02:00
Lars Knoll
44a381087e Add * as a valid token to our blacklisting
This helps to blacklist a test function on all platforms,
something that isn't easily possible currently. Adding

[testfunction]
*

to the BLACKLIST file will now blacklist the function
on all platforms.

Change-Id: I9e1a1daf94caa05408a6b3cd7ea7a3acdc962a43
Reviewed-by: Simo Fält <simo.falt@digia.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2014-09-24 08:58:42 +02:00
Nico Vertriest
2699d40b57 Doc: correction return statement QSqlDatabase QSqlTableModel::database()
Task-number: QTBUG-37358
Change-Id: I68a0110a01ac21871e8a369c7ab94d2dadf1d80b
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2014-09-24 08:49:19 +02:00
Jake Petroules
4cb679d888 Fix doc typo with Q_FORWARD_DECLARE_MUTABLE_CF_TYPE.
Change-Id: I2e6b00513be87640dc20831aab4e972716445e63
Reviewed-by: Richard J. Moore <rich@kde.org>
2014-09-24 08:27:27 +02:00
Frederik Gladhorn
0c307f45fd Accessibility OS X: Fix image role
Change-Id: I0839a30041dbe558c420c944da49abe8ea26e0ab
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
2014-09-23 22:33:29 +02:00
Louai Al-Khanji
4073a3dd77 direct2d: Fix font size when display scaling is in use
Since we already tell direct2d that we are using pixel sizes in the
QWindowsDirect2DDeviceContextPrivate constructor and thereby enable
scaling inside direct2d, there is no need to scale the font size again.

Change-Id: Id9c9ed4d2848bcd09f997e41fb87802a3fe2432b
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
2014-09-23 21:08:20 +02:00
Marc Mutz
1ce6e432b6 QVersionNumber: correctly fail for numerically very large segments
The result of qstrtoull() was unconditionally truncated to an int,
resulting in wrong values being appended to the segments vector
when the numerical segment value was above INT_MAX.

Prevent this by first checking the return value of qstrtoull
as a qulonglong for values larger than INT_MAX and stopping
processing in that case. That means that segments that
numerically overflow an int are now considered part of the
suffix.

Also added tests for the case where a segment value is larger
than ULLONG_MAX. That was already working correctly.

Change-Id: Ia4b89021dcfe6bfae27c8d89bb678ec5e0e3b847
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-09-23 20:42:01 +02:00
Marc Mutz
42d4e054a6 QCommonStyle: remove references to QStyleOptionFrameV<n>
They're gone since Qt 5.0 and only exist as typedefs for QStyleOptionFrame.

Change-Id: I55539305df28267d0671a54a5cb7fcc17d045b8b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-09-23 20:21:14 +02:00
Marc Mutz
d488153fc2 QStyleSheetStyle: remove references to QStyleOptionFrameV<n>
They're gone since Qt 5.0 and only exist as typedefs for QStyleOptionFrame.

Change-Id: Ic165b524e8d86a0dd5355de338e87a33cd7429c7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-09-23 20:20:43 +02:00
Jochen Seemann
fbc4bce710 winrt: fix compiler warning on Windows Phone
qwinrtscreen(1010): 'd': local variable is initialized but not referenced

Change-Id: Ic21a9bc087d8418ad9f01b263677438a4db8f493
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
2014-09-23 18:55:30 +02:00
Joerg Bornemann
541b387c10 emulate mouse move in default implementation of QPlatformCursor::setPos
When QCursor::setPos() is called and the platform plugin doesn't
implement QPlatformCursor::setPos, a warning is printed.
Additionally, we now emulate a mouse move to have a default
implementation that's actually useful.

QPlatformCursor::pos() now returns the position that was set by
QPlatformCursor::setPos(), or other facilities that generate mouse events,
for example the Tslib plugin.

Change-Id: Ifc539202765f311baad085f72347aeb732f7b2ba
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-09-23 18:53:42 +02:00
Kai Koehne
06c31bdbec Fix compilation of ANGLE for XP
Fix compilation errors when trying to compile ANGLE with e.g. MSVC2013
targeting XP.

Change-Id: I3238c47e198662c39e2ca0cb0e53153e8f13d442
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
2014-09-23 18:29:23 +02:00
Caroline Chao
8f7c27d96b iOS: Add missing LSRequiresIPhoneOS field to Info.plist
This field specifies whether the app is an iOS app.

Change-Id: I38cfcbec97b32f517a14a9a34f1eb871b9fa1ef7
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2014-09-23 17:53:35 +02:00
Richard Moe Gustavsen
55bd24e961 iOS: Implement support for native menus
Change-Id: I2c7278697499aa046ac7b1240b7bc713ad1fc709
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2014-09-23 17:51:28 +02:00
Thiago Macieira
79ad2b3799 Fix warning about sign change (ICC)
ICC doesn't like that you assign -1 to an unsigned variable. I could
have used ~0 to mean the same thing, but actually initialization isn't
necessary at all.

error #68: integer conversion resulted in a change of sign

Change-Id: I3e9116d7309f7a7ccd99b1adfa9bffaed1ff1c73
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2014-09-23 17:44:59 +02:00
Thiago Macieira
0048127c94 Initialize certain Qt environment variables in testcases
QtTest has its own logging environment, such as XML output, so we don't
want to have messages formatted differently than expected or sent to an
unexpected place.

Change-Id: If665c9d7121267269e5b2063f49468eb2b9b9d08
Reviewed-by: Jason McDonald <macadder1@gmail.com>
2014-09-23 17:44:56 +02:00
Thiago Macieira
85ad88b064 Unify the environment variables used for console logging
[ChangeLog][Important behavior changes][Logging (including qDebug and
qWarning)] Support for the deprecated environment variables
QT_NO_JOURNALD_LOG and QT_ANDROID_PLAIN_LOG has been removed. Instead,
set QT_LOGGING_TO_CONSOLE to 1 to force logging to the console (stderr).
Set that variable to 0 to force logging to the system-specific event log
(if any).

Change-Id: I4800fc061752421f67aba1bf4535d524607579d5
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-09-23 17:44:29 +02:00
Thiago Macieira
d2349d8983 Fix the number of empty lines between warnings at the end of configure
Change-Id: I9b3e64477331cb7257228b4bf05f9ebb82227009
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-09-23 17:44:25 +02:00
Thiago Macieira
d554fa6fdc Add unit tests for cleaning up nested functions
I think supporting them now is too complex for the Qt code. We would
probably need to rewrite the parser using a tokenizer so we can find the
right name of the function. Just skipping backwards breaks the support
for returning function pointers and PMFs.

Change-Id: I78636437ecd46d77e6b9b013b2f2668cca1b6cd6
Reviewed-by: David Faure <david.faure@kdab.com>
2014-09-23 17:44:22 +02:00
Maks Naumov
86922b4655 QRegion: Reorganise members to reduce padding in EdgeTableEntry
On 64-bit platforms: 64 -> 56 bytes.
On 32-bit platforms it's still the same size (44 bytes).

Change-Id: I681b9385ee3bc7601c1e8036efd6544471d1e058
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-09-23 17:32:58 +02:00
Andy Shaw
3b3ecb79a6 Fix compilation on OS X with macx-clang-32
Task-number: QTBUG-27335
Change-Id: I1703aee2d90e02b1a6ed386715bebddf6dedb9f5
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
2014-09-23 17:05:36 +02:00
Friedemann Kleint
a1a678078e Fix MSVC source code encoding warnings in tst_qtjson.
tst_qtjson.cpp(2711) : warning C4566: character represented by universal-character-name '\u2090' cannot be represented in the current code page (1252)
tst_qtjson.cpp(2712) : warning C4566: character represented by universal-character-name '\u2090' cannot be represented in the current code page (1252)
tst_qtjson.cpp(2713) : warning C4566: character represented by universal-character-name '\u2090' cannot be represented in the current code page (1252)

Task-number: QTBUG-41100
Change-Id: I193dc48236bdd3857657a5684178630f0e1dab6d
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-09-23 17:04:15 +02:00
Alex Trotsenko
48a4a67e8d Fix QAbstractSocket::readData() behavior on buffered socket
Remove an useless check which spontaneously allow direct reads from the
socket engine.

Change-Id: Ia3d2a572d6f1563d613fe2f00d0d6849df259827
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-09-23 16:55:42 +02:00
Cristian Oneț
9165815c89 Fix the drawing of elided text in QHeaderView.
The text was not drawn properly because when eliding the text a fixed
value '4' was substracted from the rect to compute the available width
instead of the actual value of the header margin.

Change-Id: I1e110f1a6490679730ddf5815d3ff7b679dc1a47
Task-number: QTBUG-24772
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
2014-09-23 16:34:39 +02:00
Kalle Viironen
00b1360d9d Blacklist constantly failing test cases on OS X
tst_qcolumnview fails on OS X # QTBUG-41341
tst_qaccessibility fails on OS X # QTBUG-41340
tst_qnetworkreply fails on OS X # QTBUG-41320
tst_qfontcombobox fails on OS X # QTBUG-41318
tst_macplist fails on OS X # QTBUG-41314
tst_qgraphicsitem fails on OS X # QTBUG-41342
tst_qmdiarea fails on OS X # QTBUG-41343
tst_qtableview fails on OS X # QTBUG-41344

Change-Id: I2626aa61417336805872a807c4a6065b7e0ddb02
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-09-23 16:26:59 +02:00
Shawn Rutledge
cb37ab8298 xcb: support Wacom touch devices; distinguish from tablets
A tablet which can also do touch will show up as several XInput
devices.  The touch device should be treated as a touch pad, not as
a tablet.

[ChangeLog][Platform Specific Changes][X11 / XCB] Wacom touch
devices are not mistaken for additional graphics tablets

Task-number: QTBUG-39572
Change-Id: I7a61a4c0d82925080edb0175b7d03870748f55ce
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
2014-09-23 16:20:47 +02:00
Allan Sandfeld Jensen
710530bc55 Fix too fast zooming in QTextEdit with smooth scrolling events
Do not zoom 1pt on every single wheel-event, but instead scale
the zoom with the size of the angle delta.

Change-Id: Idbe17356c7845ebd0039f655d3e611e71c6f0dd6
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2014-09-23 15:59:38 +02:00
Marc Mutz
a2b453502c QCalendarWidget: fix a bug when parsing date/time formats
Quoting was not reset after consuming the quoted character.
This bug only manifests when a format contains two quoted
characters.

It's not possible to write an auto-test for this, since
the format is always read from the locale.

Change-Id: I39aff41f20f647c285c971b4d560f9e36d4b82fb
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-09-23 15:30:54 +02:00
Marc Mutz
181980d4a7 QCalendarWidget: move all helper classes into the unnamed namespace
Saves 1920 bytes of text size on AMD64 / GCC 4.7 release builds.

Change-Id: Ib437d285ca0555eb7a3751b53226093b71b789e9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-09-23 15:30:49 +02:00