Commit Graph

20783 Commits

Author SHA1 Message Date
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
Marc Mutz
356ab736a7 QCalendarWidget: move QCalendarTextNavigator into qcalendarwidget.cpp
This is in preparation of a change putting all these helper classes
into the unnamed namespace.

Change-Id: I553b1e23b6cdbe6daa492c2dc4c26406ac580de3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-09-23 15:30:45 +02:00
Gabriel de Dietrich
abde2a59c6 Cocoa: Properly remove content view from its superview in setNSWindow()
-[NSWindow setContentView:] doesn't make assupmtions about where that
view comes from, and just attaches it to the window. We need to make
sure we detach it from its previous window by calling -[NSView
removeFromSuperview], or the previous NSWindow may keep references to
the view. This can be an  issue if the view is deleted right after.

Task-number: QTBUG-39628
Change-Id: I152dedcb64ac044d8ca290c9996b388809e2477b
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2014-09-23 13:29:21 +02:00
Allan Sandfeld Jensen
dfb4af1fd3 Fix spin box with fine grained wheel events
Only step the value in the spin box when we have accumulated one wheel
tick worth of wheel delta.

Also fixes the obsolete contructors of QWheelEvent so they set the non
obsolete properties.

Change-Id: Ic6ea4b37afa8eec85a6ca7bdc0d919bf8fb02608
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2014-09-23 11:35:30 +02:00
Allan Sandfeld Jensen
e8ef241d0f Use NonPremultipliedImageSrc shader when painting non-premuled images
Recognize non-premultiplied images and draw them using the existing
NonPremultipliedImageSrc shader so we save premultiplying them on the
CPU.

Change-Id: I3dfc8f9385ff91502d64ccabf4bf54049cc28040
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2014-09-23 11:29:43 +02:00
Christian Kandeler
e66a878838 QSettings: Don't chop off trailing tabs that were actually part of a value.
This was done wrong when using the ini format.

Task-number:  QTBUG-22461
Change-Id: Ib9390460bce6138659cceac7e3cd25339ba5e9bb
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-09-23 11:28:58 +02:00
Frederik Gladhorn
c5a3e5edd9 Merge remote-tracking branch 'origin/5.3' into 5.4
The isAlwaysAskOption was removed in 3862171315
so manually removed code in
src/plugins/bearer/connman/qconnmanengine.cpp

Conflicts:
	src/corelib/global/qglobal.h
	src/corelib/tools/qcollator_macx.cpp
	src/corelib/tools/qstring.cpp
	src/gui/kernel/qwindow.cpp
	src/gui/kernel/qwindow_p.h
	src/gui/text/qtextengine.cpp
	src/platformsupport/fontdatabases/fontconfig/qfontenginemultifontconfig_p.h
	src/plugins/platforms/android/qandroidinputcontext.cpp
	src/plugins/platforms/xcb/qglxintegration.cpp
	src/plugins/platforms/xcb/qglxintegration.h
	src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
	src/testlib/qtestcase.cpp
	src/testlib/qtestlog.cpp
	src/widgets/dialogs/qfiledialog.cpp
	src/widgets/kernel/qwindowcontainer.cpp
	tests/auto/corelib/tools/qcollator/tst_qcollator.cpp
	tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp
	tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp
	tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp

Change-Id: Ic5d4187f682257a17509f6cd28d2836c6cfe2fc8
2014-09-23 11:23:36 +02:00
Jonathan Liu
7b7ad02681 Improve checking for event/socket notifiers and timers
Starting/stopping timers from another thread may result in errors that
may not appear until hours, days or weeks after if a release build of
Qt is used with the GLib/UNIX event dispatchers. Such errors may
manifest as warnings such as "QObject::killTimer(): Error: timer id 7
is not valid for object 0x2a51b488 (), timer has not been killed" and
application crashes (e.g. crashes in malloc, realloc and
malloc_consolidate).

Initial-patch-by: Eike Ziller <eike.ziller@digia.com>
Task-number: QTBUG-40636
Change-Id: I2de50d50eb1fc7467fcebb9c73b74d2f85137933
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-09-23 00:47:34 +02:00
Thiago Macieira
3bfdacaaeb Document that default-constructed QFuture are canceled
Task-number: QTBUG-40680
Change-Id: Idee9ff75c89c8349be779b90ee9c34a899d92c0c
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
2014-09-22 19:13:31 +02:00
Giuseppe D'Angelo
0d48e774c6 Refactor some loops over EINTR
QT_CLOSE is #defined to be qt_safe_close which already performs
the EINTR loop. So there's no need of doing other loops
(either by hand or by the EINTR_LOOP macro).

Change-Id: Icca256124def5ab5d79c2ba101c6f889c85d19da
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-09-22 18:57:23 +02:00